* icall.c (ves_icall_MonoMethod_get_base_definition): Return the
[mono.git] / mono / metadata / ChangeLog
1 2006-06-29  Raja R Harinath  <rharinath@novell.com>
2
3         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
4         definition that introduces the virtual function slot.
5         Also fix Coverity #105.
6
7 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
8
9         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
10         for dynamic assemblies. Fixes #78724.
11
12 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
13
14         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
15         Fixes #78722.
16
17 2006-06-21  Martin Baulig  <martin@ximian.com>
18
19         * reflection.c
20         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
21         fixes #76484.
22
23 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
24
25         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
26
27 2006-06-20  Raja R Harinath  <rharinath@novell.com>
28
29         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
30         nor TYPEREFs.
31         * class.c (mono_class_create_from_typespec): Add 'context' argument.
32         Inflate result if necessary.
33         (mono_class_get_full): Remove old version.  Rename from
34         'mono_class_get' and add 'context' argument.  Pass it to
35         ..._create_from_typespec.
36         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
37         (mono_ldtoken): Revert change below.
38
39 2006-06-20  Martin Baulig  <martin@ximian.com>
40
41         * class.c (mono_ldtoken): Don't pass the generic context to
42         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
43
44 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
45
46         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
47         and later freeing it. Fixes #78638.
48
49 2006-06-15  Miguel de Icaza  <miguel@novell.com>
50
51         * icall.c (mono_class_get_throw): Revert over-zealous error
52         throwing, the caller for mono_class_get_throw will cope with
53         errors when classes are not properly initialized already.
54
55         The code still copes with loader exceptions though.
56
57         Fixes the regression in reftype1 and reftype3 from the CAS tests.
58         
59 2006-06-14  Miguel de Icaza  <miguel@novell.com>
60
61         Fixes the `make run1' version of RuntimeAbort (to be commited,
62         source is in Bugzilla).
63         
64         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
65         FALSE on class loading failure instead of returning true.
66
67         * class.c (mono_class_create_from_typedef): It is possible for
68         mono_metadata_interfaces_from_typedef_full to fail if a class is
69         not found, cope with this.
70         
71
72 2006-06-14  Dick Porter  <dick@ximian.com>
73
74         * socket-io.c: 
75         * process.c: Fix a bunch of signed/unsigned warnings from gcc
76         4.1.1
77
78 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
79
80         * culture-info-table.h : oops, forgot to make it nsync with r61548.
81
82 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
83
84         * icall.c: Another fix for building mono in Visual Studio.
85
86 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
87
88         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
89         
90 2006-06-09  Martin Baulig  <martin@ximian.com>
91
92         * debug-mono-symfile.c: Put this back and really fix it this
93         time. Sorry for all the trouble.
94
95 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
96
97         * icall.c (mono_class_get_throw): Fix a warning.
98         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
99         ReflectionTypeLoadException if needed. Fixes #78606.
100
101         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
102         (mono_class_init): Ditto.
103
104         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
105         ref_only exceptions.
106         (mono_loader_clear_error): Make this work even if there is no error.
107
108 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
109
110         * object-internals.h marshal.c marshal.h icall.c: Implement method 
111         Marshal.GetComSlotForMethodInfo using internal call.
112
113 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
114
115         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
116         a function for signalling it.
117
118         * class.c (mono_class_from_typeref): Use the new kind of loader error when
119         a referenced assembly is not found.
120
121         * loader.c (mono_loader_error_prepare_exception): Add support for 
122         LOADER_ERROR_ASSEMBLY. Fix formatting.
123
124 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
125
126         * domain.c appdomain.c class-internals.h marshal.c: Add support 
127         for VARIANT marshalling on windows and increment corlib version
128         since Variant struct was added.
129
130 2006-06-03  Miguel de Icaza  <miguel@novell.com>
131
132         * debug-mono-symfile.c: Revert Martin's previous patch which broke
133         stack trace line information:
134
135         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
136         (Martin) when looking up B which is between A and C, return A not C.
137
138         Bug is #78573.
139
140         Thanks to Alexander Olk for tracking this down.
141
142 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
143
144         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
145         
146         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
147         avoid clobbering its value.
148         (mono_string_to_lpstr): Fix a warning on windows.
149
150 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
151
152         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
153         it gets GC tracking.
154
155         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
156         GC tracking.
157         
158         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
159
160         * marshal.c threadpool.c: Update callers of mono_async_result_new.
161
162         * appdomain.c: Bump corlib version.
163
164 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
165
166         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
167         CEE_STIND_REF when working with object references.
168
169 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
170
171         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
172         Fixes #78539.
173
174 2006-05-30  Miguel de Icaza  <miguel@novell.com>
175
176         * loader.c (method_from_memberref): Fix argument value for
177         mono_loader_set_error_method_load (I was passing the MonoClass
178         instead of the class name char *).
179
180 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
181
182         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
183         CEE_STIND_REF when working with object references.
184
185 2006-05-30  Martin Baulig  <martin@ximian.com>
186
187         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
188         mono_method_full_name() change and replace the ':' with a '.'
189         here.
190
191 2006-05-30  Martin Baulig  <martin@ximian.com>
192
193         * debug-mono-symfile.c
194         (mono_debug_symfile_lookup_location): Fix the algorithm:
195         when looking up B which is between A and C, return A not C.
196
197 2006-05-29  Martin Baulig  <martin@ximian.com>
198
199         * mono-debug.h
200         (MonoDebugMethodInfo): Make the typedef public.
201         (MonoDebugSourceLocation): New public struct.
202
203         * mono-debug.c
204         (mono_debug_source_location_from_address): Removed.
205         (mono_debug_source_location_from_il_offset): Removed.
206         (mono_debug_il_offset_from_address): Removed.
207         (mono_debug_address_from_il_offset): Removed.
208         (mono_debug_lookup_method): New public function.
209         (mono_debug_lookup_source_location): New public function; replaces
210         the old mono_debug_source_location_from_*() functions; see the
211         inline documentation.
212         (mono_debug_free_source_location): New public function.
213         (mono_debug_print_stack_frame): New public function; see the
214         inline documentation.
215
216         * debug-mono-symfile.c
217         (mono_debug_find_source_location): Renamed into
218         mono_debug_symfile_lookup_location(); only take a
219         `MonoDebugMethodInfo *' and an `offset' argument; added inline
220         documentation.
221         (mono_debug_find_method): Renamed into
222         mono_debug_symfile_lookup_method().
223
224 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
225
226         * assembly.c (mono_assembly_open_full): Dont overwrite the status
227         returned by mono_image_open_full ().
228
229         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
230         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
231         #78517.
232
233         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
234         #78518.
235
236 2006-05-27  Miguel de Icaza  <miguel@novell.com>
237
238         * class.c (mono_class_from_typeref): handle missing images
239         earlier, deals with bug #78418.   Refactor code; 
240
241         Fix a warning introduced in my previous commit (some stale code
242         from before I revisited my patch).
243
244         * class.c (mono_class_create_from_typedef): On failure, remove the
245         class from the MonoImage->class_cache as the class is not
246         initialized;   Fixes the leak pointed out by Paolo.
247
248 2006-05-25  Dick Porter  <dick@ximian.com>
249
250         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
251         DeleteCriticalSections until I figure out which one may still be
252         sometimes locked when mono_thread_cleanup is called.
253
254 2006-05-24  Dick Porter  <dick@ximian.com>
255
256         * threads.c (mono_thread_cleanup): Move the threading cleanup out
257         of mono_thread_manage and back into its own function, so it can be
258         called after the finalizer thread has finished.
259
260         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
261
262 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
263
264         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
265         Fixes #78495.
266
267         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
268         with non-blittable elements.
269         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
270
271 2006-05-24  Martin Baulig  <martin@ximian.com>
272
273         * mono-debug-debugger.h (MonoDebuggerEvent): Added
274         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
275
276         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
277         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
278         `mono_debugger_event_handler' to NULL.
279
280 2006-05-24  Martin Baulig  <martin@ximian.com>
281
282         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
283
284 2006-05-24  Martin Baulig  <martin@ximian.com>
285
286         * mono-debug-debugger.h
287         (mono_debugger_create_notification_function): Added
288         `MonoCodeManager *' argument.
289
290 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
291
292         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
293
294 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
295
296         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
297         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
298         implementation.
299
300 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
301
302         * icall.c: precise GC support: objects can't be stored in unmanaged
303         memory anymore, even if they are kept alive by other references: since
304         they can move the GC needs to be able to always find them.
305
306 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
307
308         * object.c: precise GC support for static fields. Support
309         for moving GCs: write barriers and pinned allocation for interned
310         strings.
311
312 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
313
314         * domain.c, domain-internals.h: precise GC support for the MonoDomain
315         structure.
316
317 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
318
319         * class.c, gc.c: sgen and precise GC updates.
320
321 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
322
323         * marshal.h, marshal.c: added write barrier wrapper and precise type
324         fixes.
325
326 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
327
328         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
329         support.
330
331 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
332
333         * reflection.c: precise and sgen GC updates.
334
335 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
336
337         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
338
339 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
340
341         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
342
343 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
344
345         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
346         MONO_TYPE_OBJECT. Fixes #78462.
347
348 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
349
350         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
351         and blittable types.
352
353 2006-05-17  Miguel de Icaza  <miguel@novell.com>
354
355         * class.c (mono_class_get_exception_for_failure): Implement parts
356         of a TODO: if the loader error is set (instead of the class
357         error), we return a Loader exception that can be properly thrown
358         elsewhere.
359
360         This was exposed by some Winforms 2.0 code that I tried to run
361         (Atsushi pointed me to it).
362
363 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
364
365         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
366         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
367         
368         * marshal.c (emit_marshal_vtype): Add limited support for 
369         UnmanagedType.LPStruct. Fixes #78427.
370
371         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
372         Applied a patch from kangaroo to fix #77523.
373
374 2006-05-17  Martin Baulig  <martin@ximian.com>
375
376         * threads.c
377         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
378         (debugger_thread_created): Removed.
379         (debugger_thread_exited): Removed.
380
381 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
382
383         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
384
385         * object-internals.h (MonoReflectionResource): Sync with managed version.
386
387 2006-05-12  Wade Berrier <wberrier@novell.com>
388
389         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
390
391 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
392
393         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
394         functions try to allocate from the image mempool.
395
396 2006-05-12  Dick Porter  <dick@ximian.com>
397
398         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
399
400 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
401
402         * object.c: The FieldGetter and FieldSetter methods require the full
403         name of the class, not only the name. Fixes bug #78277.
404
405 2006-05-11  Miguel de Icaza  <miguel@novell.com>
406
407         * loader.c (method_from_memberref): Do not pass the NULL klass to
408         mono_loader_set_error_() methods.  Pass the non-NULL value
409         (class). 
410
411 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
412
413         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
414         (mono_assembly_close): Null out assembly->image->references after freeing it.
415
416         * image.c (mono_image_close): Free image->references.
417         
418         * reflection.c (mono_image_basic_init): Fix a small memory leak.
419
420 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
421
422         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
423         before checking if it's NULL (g_assert).
424
425 2006-05-10  Martin Baulig  <martin@ximian.com>
426
427         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
428         I thought I already killed that two months ago, but now it somehow reappeared.
429
430 2006-05-10  Martin Baulig  <martin@ximian.com>
431
432         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
433
434 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
435
436         * reflection.c: Allocate memory for dynamically created methods in the image
437         mempools.
438
439 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
440
441         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
442         don't use the ad pointer before checking if it's NULL (g_assert).
443
444 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
445
446         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
447         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
448
449         * marshal.c: Allocate all signatures from mempools.
450
451         * marshal.c: Allocate some more signatures from mempools.
452
453 2006-05-09  Miguel de Icaza  <miguel@novell.com>
454
455         * object.c (mono_load_remote_field): The code used to provide a
456         temporary variable for returning results if the user did not
457         provide a result pointer.  But our temporary variable was allocted
458         on the satck.
459
460         Fix calling code to always pass a result area.   Coverity ID 103.
461
462 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
463
464         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
465         value, not the old. Fixes #78312.
466         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
467
468         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
469         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
470         per-image cache.
471
472         * assembly.c (mono_assembly_close): Free image->references.
473
474         * assembly.c (mono_assembly_names_equal): Fix a warning.
475         (mono_assemblies_cleanup): Cleanup more global data.
476
477         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
478
479         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
480         ptr_cache and image->modules.
481
482         * image.c (mono_image_init): Allocate array_cache lazily.
483         
484 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
485
486         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
487         behavior was changed recently and has bad side effects.
488
489 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
490
491         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
492         
493         * assembly.c (mono_assembly_close): Remove a debug printf.
494
495         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
496
497         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
498         to also allow for temporary references between mono_image_open ()/close ().
499
500         * domain.c (get_runtimes_from_exe): Add a FIXME.        
501
502 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
503
504         * marshal.c: Fix support for dynamic methods.
505
506         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
507
508         * marshal.c (mono_marshal_cleanup): New cleanup function.
509
510         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
511         image mempools.
512
513         * class.c (mono_class_init): Fix leaking class->nested_classes.
514
515         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
516
517         * image.c (mono_image_init): Initialize the new cashes.
518
519         * image.c (mono_image_close): Destroy the new cashes.
520
521         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
522
523         * mempool.c (mono_mempool_strdup): New helper function.
524
525         * class-internals.h: Add prototype for mono_loader_unlock ().
526
527         * domain.c (mono_jit_info_table_find): Fix a warning.
528         (mono_debugger_check_runtime_version): Ditto.
529
530         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
531         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
532         functions to these modules.
533
534         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
535         metadata modules.
536         
537         * marshal.c (mono_free_bstr): Fix a warning.
538
539         * assembly.c (mono_assembly_open_full): Fix another small leak.
540
541         * object.c: Fix some unload leaks in the remoting code.
542
543         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
544         function.
545
546         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
547
548         * reflection.c: Fix some unload leaks in dynamic assemblies.
549
550 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
551
552         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
553         * marshal.h: Add BSTR support on Win32
554         * icall.c: Add BSTR icalls
555         * metadata.h: Add BSTR enums
556
557 2006-04-28  Miguel de Icaza  <miguel@novell.com>
558
559         Work to catch the crash from #76795 and turn it into an
560         exception.   As I stubbed out pieces of the VisualBasic support,
561         I found a number of places where the code was failing and I added
562         checks to those places. 
563         
564         * metadata.c (do_mono_metadata_parse_generic_class): Make this
565         function return a status code.  If we fail to parse the signature
566         from mono_metadata_parse_generic_inst, return FALSE.
567
568         * loader.c (mono_get_method_from_token): If we fail to load the
569         method (mono_class_get) return NULL.   
570
571         * (method_from_memberref): Return NULL if we are unable to parse
572         the method signature
573
574         (mono_loader_error_prepare_exception): Since we now use the
575         loader_error flag internally to stop processing, and obtaining
576         exceptions that might be thrown will walk this code path the
577         proper way of going from a MonoLoaderError into a
578         MonoException was convoluted.   This new routine encapsulates the
579         process of turning the error into an exception and *clearing* the
580         error afterwards.
581         
582 2006-04-27  Miguel de Icaza  <miguel@novell.com>
583
584         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
585         with missing assemblies), and to cope with:
586
587                 * Missing fieldref from a non-existing assembly.
588                 * Missing methodref from a non-existing assembly.
589
590         The first batch of work to address *some* of the issues from 76661.
591         
592         * object.c (mono_class_create_runtime_vtable): If we fail to
593         initialize the class raise the exception here. 
594
595         * metadata.c (mono_class_get_overrides_full): If any methods fail
596         to load return the failure to the caller.
597
598         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
599         flagging assemblies that failed to load.   
600
601         Do not crash if we are unable to load the assembly.
602
603         (mono_assembly_close): Do nothing with REFERENCE_MISSING
604         assemblies. 
605
606         * loader.c (mono_loader_set_error_type_load): Change the
607         convention to always pass unallocated strings, so we make our own
608         copies (I know our own code had duplicated strings before, but
609         this keeps the normal conventions).
610         (method_from_memberref): Call mono_loader_set_error_method_load
611         for all possible failures of loading the class. 
612         Remove assert, turn into a loader error.
613
614         (mono_loader_error_to_exception): Move this routine from mini
615         (mini_loader_error_to_exception) there was no need to have that in
616         mini. 
617
618         * class.c (mono_class_from_typeref): If we were not able to load
619         the assembly with mono_assembly_load_reference, call the
620         mono_loader_set_error_type_load to register the problem.
621
622         (mono_class_setup_fields): If we fail to load the type from
623         mono_metadata_parse_type_full, call mono_class_set_failure and
624         break from the loop.
625
626         If class->exception_type is set, we do not layout the fields as
627         that might crash the runtime, and instead return (from breaking
628         from the previous loop).
629
630         (mono_class_setup_vtable): This now returns a boolean indicating
631         whether the table was properly setup.   The decision is driven by
632         mono_class_get_overrides_full which might run into non-existing
633         methods. 
634         
635         (mono_class_init): Returns TRUE on success or FALSE if there was a
636         problem in loading the type (incorrect assemblies, missing
637         assemblies, methods, etc).
638
639         When we call mono_class_setup_fields we also check for a potential
640         error inside this call (either a class exception or a general
641         loader exception).
642
643         (mono_class_create_from_typedef): If the parent fails to load
644         (calling mono_class_get_full) return NULL.
645         
646         ** Important **
647
648         calls to mono_metadata_parse_type_full should be checked
649         everywhere and set the mono_class_set_failure
650         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
651
652         The current patch checks the places where my manually constructed
653         tests show the errors are showing up, but we should do it
654         everywhere. 
655
656         ** Important2 **
657
658         mono_class_init return values should be tested everywhere, like
659         the previous case this is something that we should audit
660         everywhere and not only on the cases exposed by the tests I
661         created. 
662
663 2006-04-26  Miguel de Icaza  <miguel@novell.com>
664
665         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
666         boolean parameter and instead pass the information on `options'
667         parameter (FileOptions).
668
669         * icall.c: Register the new signature for MonoIO.Open.
670
671         * debug-helpers.c (dis_one): Trying to understand how coverity
672         works.  Fix Run 5, item 78.
673
674 2006-04-26  Dick Porter  <dick@ximian.com>
675
676         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
677         dereference.
678
679 2006-04-25  Martin Baulig  <martin@ximian.com>
680
681         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
682
683         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
684         debugger_thread_created().
685         (debugger_gc_push_all_stacks): Don't handle the main thread in any
686         special way.
687         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
688         (mono_debugger_finalize_threads): New function; undo the effects
689         of mono_debugger_init_threads().
690         (mono_debugger_create_all_threads): Removed.
691
692 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
693
694         * image.c (mono_image_close): Tidy up trace messages.
695
696         * assembly.c (mono_assembly_close): Ditto.
697
698         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
699         no longer references an already freed assembly. Fixes #78168.
700
701 2006-04-21  Dick Porter  <dick@ximian.com>
702
703         * threads.c (mono_thread_detach): Fix reference counting when
704         detaching threads.
705
706 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
707
708         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
709         #78155.
710
711 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
712
713         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
714         (mono_type_to_stind): Ditto.
715
716         * marshal.c: Use the new helper functions to simplify code.
717
718         * image.c (mono_image_close): Add some code for help debug assembly unloading
719         problems.
720
721         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
722         image mempool.
723
724         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
725         assembly was already loaded in another appdomain. Fixes #78083.
726
727 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
728
729         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
730         referenced assemblies.
731         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
732
733         * domain.c (mono_domain_free): Add a trace message.
734
735         * appdomain.c (add_assemblies_to_domain): Ditto.        
736
737         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
738         field.  
739
740 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
741
742         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
743
744 2006-04-12  Martin Baulig  <martin@ximian.com>
745
746         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
747         `USE_INCLUDED_LIBGC'.   
748
749 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
750
751         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
752         the patch contains ../ and a small directory name later. Hopefully fixes
753         #78035.
754
755 2006-04-10  Martin Baulig  <martin@ximian.com>
756
757         Clean up the debugger's thread-handling code.
758
759         The debugger's thread-handling code has been moved from
760         ../mini/debug-debugger.c to threads.c.  We now iterate directly
761         over the `threads' hash, keep track of exiting threads and also
762         use proper locking.
763
764         We can now debug XSP and XSP based applications with the debugger.
765
766         * object-internals.h (MonoThread): Added `gpointer end_stack'.
767
768         * threads.h
769         (MonoThreadCallbacks): Removed; this was only used by the debugger.
770         (mono_install_thread_callbacks): Likewise.      
771
772         * threads.c (mono_thread_callbacks): Removed.
773         (debugger_thread_created, debugger_thread_exited): New static functions.
774         (start_wrapper): Call debugger_thread_created().
775         (thread_cleanup): Call debugger_thread_exited().
776         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
777         (mono_debugger_init_threads): New public function.
778         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
779         iterate directly over the `threads' hash and also use proper locking.
780
781         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
782
783         * mono-debug-debugger.h
784         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
785
786 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
787
788         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
789         argument type=array. Fixes #78057.
790
791 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
792
793         * culture-info-table.h : regenerated. Fixed bug #69652.
794
795 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
796
797         * loader.c metadata.c: Reapply a variant r59116.
798         
799         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
800
801         * class.c (mono_class_setup_interface_offsets): New internal function.
802
803         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
804         interfaces too. Fixes #77398.
805
806         * reflection.c (encode_cattr_value): Add support for 
807         parameter type=object, argument type=array.
808         (load_cattr_value): Ditto. Fixes #77916.
809
810         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
811         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
812
813         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
814         a byval char array and CharSet is Ansi.
815
816         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
817
818 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
819
820         * metadata.c: Add some locking comments.
821         
822         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
823         mempool.
824         (mono_metadata_free_method_signature): Don't free the signature itself.
825
826         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
827
828         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
829         reference the same MonoImage.
830         (mono_assembly_load_from_full): Add an assert.
831
832 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
833
834         * image.c (mono_image_close): Don't put the image we are about to free into the
835         loaded_images_guid_hash.
836
837         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
838         to reduce code duplication.
839
840         * marshal.c: Register the native functions called by this module as icalls, to
841         somewhat centralize the creation of MonoMethodSignature's.
842
843         * loader.c (mono_method_signature): Add a cache for method signatures.
844
845         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
846         the parameter attributes of a method.
847         (mono_metadata_parse_method_signature_full): Refactored the computation of
848         parameter attributes into a separate function. Also avoid one allocation in
849         most cases.
850
851         * assembly.c (mono_assembly_close): Ditto.
852
853         * image.c (mono_image_close): Log trace messages with INFO level.
854
855         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
856
857         * image.c reflection.c: Correct reference counting of image modules.
858         
859         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
860         of this function from the image mempool.
861         
862         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
863         to allow more cached types to be used.
864
865         * mono-debug.c (mono_debug_add_method): Appled patch from
866         David S. Miller  <davem@sunset.davemloft.net>: Access 
867         minfo->lexical_blocks[] entry elements using read32().
868
869 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
870
871         * loader.c (mono_free_method): No longer free the method header for non-dynamic
872         methods as it is allocated from the mempool.
873
874         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
875         image mempool.
876
877         * metadata-internals.h: Add comments describing the reference counting scheme
878         used for MonoImage and MonoAssembly.
879
880         * image.c assembly.c reflection.c: Rework reference counting of images and 
881         assemblies so they are freed when the runtime is shut down. Free some 
882         additional memory structures when an image is unloaded.
883         
884 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
885
886         * class.c loader.c reflection.c: Allocate more data structures in
887         the image mempool.
888
889 2006-03-31  Miguel de Icaza  <miguel@novell.com>
890
891         * icall.c
892         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
893         build on pre glib 2.4 systems.
894
895 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
896
897         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
898
899         * icall.c: Fix some warnings.
900
901 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
902
903         * culture-info-table.h : regenerated.
904
905 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
906
907         * threads.c, object-internals.h, verify.c: changed the culture caching
908         code to use a normal MonoArray for storage so the GC can keep track of
909         them easily. Fixed bits of the cache logic, too and simplified the
910         code.
911
912 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
913
914         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
915         thread for non-Boehm GCs.
916
917 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
918
919         * domain.c, object.c, domain-internals.h: reduce the amount of memory
920         needed to keep track of the data for static fields.
921
922 2006-03-29  Raja R Harinath  <rharinath@novell.com>
923
924         Fix #75172
925         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
926         for interface classes.  Use 'num_methods' instead.
927         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
928         before using '->vtable_size' field.
929
930 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
931
932         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
933         doesn't contain managed pointers, so use a normal hashtable.
934
935 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
936
937         * reflection.c, class-internals.h, domain.c: fixed handling of types
938         used as values for objects in custom attributes (bug #77915):
939
940 2006-03-24  Martin Baulig  <martin@ximian.com>
941
942         * class.c (mono_class_setup_fields): Added support for generic
943         instances; fixes #77580.
944
945 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
946
947         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
948
949 2006-03-24  Dick Porter  <dick@ximian.com>
950
951         * file-io.c (get_file_attributes): More stat macro breakage.
952         Fixes bug 77759.
953
954 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
955
956         * profiler.c: added the file=filename option in the default profiler
957         to output the profile data to filename.
958
959 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
960
961         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
962         bug #77877.
963
964 2006-03-22  Martin Baulig  <martin@ximian.com>
965
966         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
967         allocated `MonoClassField *' in `fb->handle'.
968
969 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
970
971         * class.c, image.c, metadata-internals.h: implemented new mechanism to
972         allocate interface ID to save memory and allow better ID reuse on
973         appdomain unload. setup_generic_vtable () removal from Martin.
974
975 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
976
977         * object.h, appdomain.c, domain.c, exception.c, icall.c,
978         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
979         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
980         write barriers for reference stores with managed objects accessed with
981         C structures in the runtime and in embedding programs.
982
983 2006-03-20  Raja R Harinath  <rharinath@novell.com>
984
985         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
986         'interface_id' and 'max_interface_id' fields of MonoClasses
987         representing open generic types.
988
989 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
990
991         * object.h, object.c, icall.c: added functions to deal with
992         storing valuetypes that contain references in managed objects.
993         * reflection.c, string-icalls.c, threads.c, marshal.c: small
994         fixes and comments around uses of mono_array_addr ().
995
996 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
997
998         * object.h, icall.c, monitor.c: object.GetHashCode ()
999         implementation that supports the moving garbage collector.
1000
1001 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
1002
1003         * icall.c, threads-types.h, threads.c: implemented finalizer for
1004         LocalDataStoreSlot.
1005
1006 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
1007
1008         * metadata.c (mono_type_size): Add a fixme.
1009         (mono_type_stack_size): Ditto.
1010
1011         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
1012         'type_forwarders' field.
1013
1014         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
1015         attribute from net 2.0.
1016
1017         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
1018         from class.c.
1019
1020         * class.c (mono_class_setup_fields): Fix a warning.
1021         
1022         * class.c (mono_class_from_name): Add support for assemblyref entries
1023         in the EXPORTEDTYPE table.
1024
1025         * reflection.c: Add support for handling type forwarders under net 2.0.
1026
1027         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
1028         
1029 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
1030
1031         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
1032         overwriting entries in ModuleBuild->types, also clean up the code
1033         a little. Fixes #77774.
1034
1035 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
1036
1037         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
1038         load friend assembly info when present.
1039
1040 2006-03-14  Raja R Harinath  <rharinath@novell.com>
1041
1042         Fix crasher on gtest-158.cs.
1043         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
1044         the return value if the MonoClass we want is yet in an
1045         inconsistent state.
1046         * class.c (mono_class_create_from_typedef): Add an comment
1047         explaining an order dependency between mono_class_setup_parent and
1048         mono_class_setup_mono_type.
1049
1050 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
1051
1052         * class.c: documentation updates and events bug fix.
1053
1054 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1055
1056         * class.c: some cleanup, locking fixes.
1057
1058 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
1059
1060         * class.c: fix the generics code to setup nested
1061         type info to the instantiated type (bug #77770).
1062
1063 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1064
1065         * marshal.c: fixed a few type correctness issues.
1066
1067 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1068
1069         * loader.c: the Set/Get/Addrtess array methods should be public.
1070
1071 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
1072
1073         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
1074         
1075         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
1076         info->wrapper.
1077
1078 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
1079
1080         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
1081
1082         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
1083
1084         * mempool.c (mono_mempool_alloc): Speed this up a bit.
1085         (mono_mempool_alloc0): Ditto.
1086
1087 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1088
1089         * socket-io.c:
1090         (create_object_from_sockaddr): it was allocating 4 extra bytes
1091         for the AF_UNIX data. Fixes bug #77747.
1092
1093 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
1094
1095         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
1096
1097 2006-03-09  Dick Porter  <dick@ximian.com>
1098
1099         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
1100         Fixes bug 76966 again.
1101
1102 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
1103
1104         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
1105         names from r57532
1106         * appdomain.c: Bumped corlib version to 48 (due to r57532)
1107
1108 2006-03-07  Martin Baulig  <martin@ximian.com>
1109
1110         * object.c
1111         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
1112
1113 2006-03-07  Martin Baulig  <martin@ximian.com>
1114
1115         * class.c
1116         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
1117         regression introduced in r56970; see gtest-252.cs.
1118
1119         * loader.c (mono_get_method_constrained): Correctly handle generic
1120         methods; see gtest-253.cs.
1121
1122 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
1123
1124         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
1125
1126 2006-03-04  Martin Baulig  <martin@ximian.com>
1127
1128         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
1129         compute the parent type at runtime, just like we're already doing
1130         it for interfaces.
1131
1132         * reflection.c
1133         (mono_reflection_bind_generic_parameters): Don't compute the
1134         parent type anymore.
1135
1136         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
1137
1138 2006-03-04  Martin Baulig  <martin@ximian.com>
1139
1140         * mono-debug-debugger.h
1141         (mono_debugger_create_notification_function): Allocate memory at
1142         runtime and return a pointer to it.
1143
1144 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
1145
1146         * assembly.c: Fix windows build.
1147         
1148         * assembly.c: Fix build.
1149
1150         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
1151
1152         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
1153         
1154 2006-03-03  Dick Porter  <dick@ximian.com>
1155
1156         * process.c
1157         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
1158         Check parameters before dereferencing them.  Fixes Aaron's part of
1159         bug 77393.
1160
1161 2006-03-03  Raja R Harinath  <rharinath@novell.com>
1162
1163         Fix performance regression.
1164         * loader.c (find_method_in_class): Add 'from_class' argument.
1165         Rename 'klass' argument to 'in_class'.  The signature is compared
1166         against the method in 'in_class', and the corresponding method is
1167         returned from 'from_class'.
1168         (find_method): Walk both 'in_class' and 'from_class' in parallel.
1169         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
1170         type definition and generic instantiation in parallel.
1171         (mono_get_method_constrained): Update to changes.
1172
1173 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
1174
1175         * threads.c: make sure the domain is correct, too when doing
1176         mono_thread_attach ().
1177
1178 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
1179
1180         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
1181         windows. Fixes #77683.
1182
1183 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
1184
1185         * object.h, *: introduced specific way to set elements of an array
1186         of references to be used as write barrier. Still need to audit the
1187         uses of mono_array_addr.
1188
1189 2006-03-01  Miguel de Icaza  <miguel@novell.com>
1190
1191         * object-internals.h: New field to cache the assmebly name, patch
1192         from Tambet Ingo (tambet@ximian.com)
1193
1194 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1195
1196         * decimal.h, class-internals.h, metadata-internals.h,
1197         file-io.h: mark a few function declarations as internal, to
1198         reduce the number of PLT entries.
1199
1200 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1201
1202         * file-io.c: fix typo in warning message.
1203
1204 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
1205
1206         * loader.c: on unix, lookup the "*A" version of a function
1207         if charset is auto as a second option before failing.
1208
1209 2006-02-28  Raja R Harinath  <rharinath@novell.com>
1210
1211         * class.h (mono_class_inflate_generic_method): Revert to two
1212         argument version.
1213         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
1214         (mono_class_inflate_generic_method_full): Add.
1215         * class.c (mono_class_inflate_generic_method_full): Rename from
1216         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
1217         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
1218         * loader.c, reflection.c: Update to changes.
1219
1220 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
1221
1222         * icall.c: const fixes and small improvements.
1223
1224 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1225
1226         * threadpool.c: for asynchronous connect(), enable the same workaround
1227         for BSD 6 as for the Mac. Fixes bug #77637.
1228
1229 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
1230
1231         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
1232         formatted classes. Fixes #77524.
1233
1234 2006-02-24  Raja R Harinath  <rharinath@novell.com>
1235
1236         * class.c (inflate_generic_type): Add a couple more
1237         micro-optimizations.
1238         (inflate_generic_context): Don't use the 'gmethod' from
1239         'inflate_with'.
1240         (mono_class_inflate_generic_method): If the method has generic
1241         parameters, but the passed-in context doesn't have a 'gmethod',
1242         create one.  Use the possibly simplified generic instantiation
1243         from the declaring class instead of the one passed in.
1244
1245 2006-02-24  Raja R Harinath  <harinath@gmail.com>
1246
1247         Make generic method signature and method header handling lazy.
1248         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
1249         (inflate_generic_header): Likewise.
1250         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
1251         parameter to avoid inflating types.
1252         (mono_get_inflated_method): Empty out.
1253         * class.h (mono_class_inflate_generic_method): Update to changes.
1254         * loader.c (mono_get_method_from_token): Don't parse signature for
1255         generic methods, nor methods of generic classes.
1256         (mono_method_signature): Rename from 'mono_method_signature'.
1257         Inflate signature on demand.
1258         (mono_method_get_header): Inflate method header on demand.
1259         * reflection.c: Update to changes.
1260
1261 2006-02-23  Raja R Harinath  <rharinath@novell.com>
1262
1263         * metadata.c (mono_metadata_inflate_generic_inst): If the
1264         instantiation is closed, don't bother expanding it in the new
1265         context.
1266         * class.c (inflate_generic_class): If the generic instantiation
1267         doesn't change after inflation, return the argument itself.
1268         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
1269         Add bounds checks.
1270         (inflate_generic_context): If neither the generic class nor the
1271         generic method instantiations change, return the original context.
1272         * reflection.c (mono_method_get_object): Do
1273         'mono_get_inflated_method' before accessing the ->klass field.
1274         (inflate_mono_method): Don't create a MonoGenericMethod unless
1275         necessary.
1276         (inflate_method): Don't pass a constructed type as the declaring
1277         type of a methodbuilder.
1278
1279 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
1280
1281         * object.c: fix memory overwrite.
1282
1283 2006-02-22  Dick Porter  <dick@ximian.com>
1284
1285         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
1286         it doesn't work any more.
1287         (mono_threads_request_thread_dump): Fix unused variable warnings.
1288
1289 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1290
1291         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
1292         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
1293         the public header file.
1294
1295 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
1296
1297         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
1298
1299 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
1300
1301         * class-internals.h, object.c: reduce the size of MonoVTable
1302         and store the interface_offsets array at negative offsets.
1303
1304 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
1305
1306         * metadata.c: tweak table descriptors data structures to reduce
1307         size and runtime relocations.
1308
1309 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1310
1311         * marshal.c: fix some types and opcodes to be type-safe
1312         in marshaling wrappers.
1313
1314 2006-02-21  Ankit Jain  <jankit@novell.com>
1315
1316         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
1317
1318 2006-02-21  Raja R Harinath  <rharinath@novell.com>
1319
1320         * metadata.c (get_constraints): Relax debugging checks for monodis.
1321
1322 2006-02-21  Ankit Jain  <jankit@novell.com>
1323
1324         * metadata.c (mono_metadata_load_generic_params): Move the code
1325         checking for ambiguous generic params from here to mono/dis/get.c
1326         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
1327
1328 2006-02-21  Raja R Harinath  <harinath@gmail.com>
1329
1330         Fix assertion triggered when compiling nemerle.
1331         * class.c (mono_get_shared_generic_inst): Rename from
1332         get_shared_inst and make non-static.
1333         * loader.c (mono_get_shared_generic_method): New.  Used to create
1334         the MonoGenericContext-equivalent of a MonoGenericContainer.
1335         (mono_get_method_from_token): Initialize the 'context' field of
1336         the created MonoGenericContainer.
1337         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
1338         * metadata.c (get_constraints): Add sanity check.
1339         * class-internals.h: Add new internal methods.
1340
1341         * reflection.c (verify_safe_for_managed_space): New sanity check.
1342         Currently checks that owner-less generic parameters aren't allowed
1343         in managed space.
1344         (mono_type_get_object): Use it.
1345         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
1346         that are now in mono_type_get_object.
1347         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
1348
1349 2006-02-19  Raja R Harinath  <harinath@gmail.com>
1350
1351         * metadata.c (mono_type_create_from_typespec): Rename from
1352         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
1353         argument and caching of types in the generic container.
1354         (unwrap_arrays, find_generic_param): Remove.
1355         * metadata-internals.h: Update.
1356         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
1357
1358 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
1359
1360         * class.c (mono_class_get_exception_for_failure): Fix a warning.
1361
1362         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
1363         return values. Fixes #77581.
1364
1365         * class.c (mono_fnptr_class_get): Switch name and name_space.
1366
1367         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
1368         classes and add support for [In, Out] attributes.
1369         (mono_marshal_free_asany): Ditto. Fixes #77524.
1370
1371 2006-02-18  Raja R Harinath  <harinath@gmail.com>
1372
1373         * class.c (mono_class_from_generic_parameter): Make more robust to
1374         incomplete MonoGenericContainers from monodis.
1375
1376 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1377
1378         * class-internals.h: added some more exception types.
1379         * class.c, metadata.c: added a few checks to handle missing
1380         types.
1381
1382 2006-02-17  Raja R Harinath  <rharinath@novell.com>
1383
1384         Use owner-less generic-params some more.
1385         * class.c (my_mono_class_from_generic_parameter): Remove.
1386         (mono_class_from_generic_parameter): Handle null image,
1387         param->name and param->owner.
1388         (mono_class_from_mono_type): Update.
1389         (mono_class_create_from_typespec): Remove 'container' parameter.
1390         If that parameter is non-null, the result is always inflated by
1391         'mono_class_get_full' anyway.
1392         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
1393         parameter.
1394         (mono_class_get_full): Update.
1395
1396         * class.c (inflate_generic_type) [GENERICINST]: If the generic
1397         instance is not open, don't bother inflating.
1398         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
1399         parse metadata for inflated classes.
1400         (_mono_class_get): Change GenericContext* parameter to
1401         GenericContainer*.
1402         (mono_class_create_from_typespec): Likewise.  Simplify, and
1403         implement trivially.  All the cases are handled in
1404         mono_class_from_mono_type.  Don't inflate returned class.
1405         (mono_class_get_full): Delegate GENERICINST optimization to
1406         inflate_generic_type.
1407         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
1408
1409 2006-02-16  Dick Porter  <dick@ximian.com>
1410
1411         * socket-io.c (create_object_from_sockaddr): Fix typo.
1412         (create_sockaddr_from_object): Check array lengths before
1413         potentially accessing items off the end.
1414         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
1415         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
1416         (ves_icall_System_Net_Sockets_Socket_Send_internal)
1417         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
1418         length checks to avoid wraparound overflows.
1419         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
1420         contents of the array of sockets
1421         (hostent_to_IPHostEntry2)
1422         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
1423         Check return value of inet_ntop ().
1424         (addrinfo_to_IPHostEntry): Fix typo
1425
1426 2006-02-16  Raja R Harinath  <rharinath@novell.com>
1427
1428         Type metadata parsing doesn't use generic-instantiation information.
1429         * metadata.c (mono_metadata_parse_array_full): Change
1430         MonoGenericContext* parameter to MonoGenericContainer*.
1431         (mono_metadata_parse_type_full): Likewise.
1432         (mono_type_create_from_typespec_full): Likewise.
1433         (mono_metadata_parse_mh_full): Likewise.
1434         (mono_metadata_parse_generic_inst): Likewise.
1435         (do_mono_metadata_parse_generic_class): Likewise.
1436         (do_mono_metadata_parse_type): Likewise.
1437         * metadata-internals.h: Update to changes.
1438         * class.c (mono_class_find_enum_basetype): Likewise.
1439         (mono_class_setup_fields): Likewise.
1440         (mono_class_create_from_typespec): Likewise.
1441         * loader.c (method_from_methodspec): Likewise.
1442         (mono_get_method_from_token): Likewise.
1443         (mono_method_get_header): Likewise.
1444
1445 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1446
1447         * marshal.c: handle additional GENERICINST case (patch from
1448         Thong Nguyen <tum@veridicus.com>).
1449         Fix a few cases where LDIND_I/STIND_I was used for references.
1450
1451 2006-02-16  Raja R Harinath  <rharinath@novell.com>
1452
1453         * reflection.c (mono_reflection_get_token): Remove unused variable.
1454
1455 2006-02-16  Martin Baulig  <martin@ximian.com>
1456
1457         * reflection.c (mono_reflection_get_token): Add support for fields
1458         in instantiated generic types.
1459
1460         * icall.c
1461         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
1462
1463 2006-02-15  Martin Baulig  <martin@ximian.com>
1464
1465         * icall.c
1466         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
1467         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
1468         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
1469         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
1470
1471 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
1472
1473         * class.c, metadata.c, metadata.h, object.c, icall.c,
1474         marshal.c: changed mono_type_get_underlying_type () to do
1475         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
1476         Fixed handling of instantiated generic valuetypes (bug #75479).
1477
1478 2006-02-15  Raja R Harinath  <rharinath@novell.com>
1479
1480         * metadata.c (mono_metadata_decode_signed_value): Simplify.
1481         Delegate to mono_metadata_decode_value, and work on the returned value.
1482
1483         * icall.c (ves_icall_MonoType_GetGenericArguments):
1484         Add consistency check here too.
1485         
1486 2006-02-15  Ankit Jain  <jankit@novell.com>
1487
1488         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
1489         char/short etc.
1490
1491 2006-02-15  Ankit Jain  <jankit@novell.com>
1492
1493         * metadata.c (mono_metadata_decode_signed_value): New function to decode
1494         signed values, used only for representing lower bounds of arrays.
1495         (mono_metadata_parse_array_full): Use new
1496         mono_metadata_decode_signed_value to decode lower bounds.
1497
1498 2006-02-14  Martin Baulig  <martin@ximian.com>
1499
1500         * reflection.c
1501         (mono_reflection_get_token): Support "MonoGenericMethod" and
1502         "MonoGenericCMethod" and allow generic instances / methods.
1503
1504 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
1505
1506         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
1507         to obtain the terminal size using an ioctl.
1508
1509         * object.c (mono_nullable_init): Revert this as nullable reference
1510         types are not valid.
1511         (mono_nullable_box): Ditto.
1512
1513 2006-02-09  Dick Porter  <dick@ximian.com>
1514
1515         * threads.c (mono_thread_detach): Drop a reference to the thread
1516         we're detaching.
1517
1518 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
1519
1520         * object.c (mono_nullable_init): Handle nullable reference types.
1521         (mono_nullable_box): Ditto. Fixes #77446.
1522
1523 2006-02-07  Martin Baulig  <martin@ximian.com>
1524
1525         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
1526
1527 2006-02-07  Ankit Jain  <jankit@novell.com>
1528
1529         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
1530         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
1531         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
1532         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
1533         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
1534         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
1535
1536 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
1537
1538         * class.c (mono_class_create_generic): Set type_token as well.
1539
1540         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
1541         compatible with MS.
1542
1543 2006-02-02  Martin Baulig  <martin@ximian.com>
1544
1545         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
1546         has never been used so far.
1547
1548 2006-02-02  Martin Baulig  <martin@ximian.com>
1549
1550         * mono-debug-debugger.h: Changed comment at the top of this file;
1551         the header is not installed, but it's safe to #include it from
1552         within the JIT.
1553
1554         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
1555         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
1556
1557 2006-02-02  Martin Baulig  <martin@ximian.com>
1558
1559         * mono-debug.h
1560         (MonoSymbolTable): Removed the `metadata_info' field.
1561
1562         * mono-debug.c
1563         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
1564
1565         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
1566         (mono_debugger_add_builtin_types): Removed.
1567         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
1568         (mono_debugger_create_notification_function): We now operate on a
1569         pre-allocated area; take a `gpointer' and return `void'.
1570
1571         * mono-debug-debugger.c
1572         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
1573         (mono_debugger_add_builtin_types): Removed.
1574
1575 2006-02-02  Martin Baulig  <martin@ximian.com>
1576
1577         * threads.c (mono_debugger_create_all_threads): New public method.
1578
1579 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1580
1581         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
1582         breaks on several platforms.
1583
1584 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
1585
1586         * assembly.c: the VS.NET build doesn't supply default values for
1587         MONO_ASSEMBLIES and MONO_CFG_DIR.
1588
1589 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
1590
1591         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
1592         helper function.
1593
1594         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
1595
1596         * loader.c (method_from_memberref): Fix a warning.
1597
1598         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
1599
1600         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
1601         with explicit layout. Fixes #77433.
1602
1603 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
1604
1605         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
1606         max_interface_id is initialized before using it. Fixes #77398.
1607         (ves_icall_Type_GetInterfaces): Ditto.
1608
1609 2006-01-30  Raja R Harinath  <rharinath@novell.com>
1610
1611         * metadata.c (mono_metadata_parse_method_signature_full): Don't
1612         allocate memory for parameter attributes when parsing memberref
1613         signatures.
1614         * loader.c (mono_loader_set_error_method_load): Don't warn.
1615         (method_from_memberref): Ensure MissingMethodException gets thrown
1616         if method is not found.  Make warning more informative.
1617
1618 2006-01-29  Raja R Harinath  <harinath@gmail.com>
1619
1620         Fix #77397
1621         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
1622         return true if is byref.
1623         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
1624         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
1625         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
1626
1627 2006-01-27  Raja R Harinath  <rharinath@novell.com>
1628
1629         Fix tests/find-method.2.il
1630         * loader.c (find_method, find_method_in_class): Remove is_inflated
1631         argument.  Revert 2006-01-18 change.
1632         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
1633         is generic, search for method in its generic definition.
1634         * class.c (mono_class_setup_vtable_general): Print generic
1635         arguments of generic types in debugging printf.
1636
1637 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
1638
1639         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
1640
1641         * threads.c (mono_threads_request_thread_dump): New helper function.
1642
1643 2006-01-25  Raja R Harinath  <rharinath@novell.com>
1644
1645         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
1646
1647 2006-01-25  Ankit Jain  <jankit@novell.com>
1648
1649         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
1650         move definition to ..
1651         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
1652         
1653 2006-01-25  Ankit Jain  <jankit@novell.com>
1654             Raja R Harinath  <rharinath@novell.com>
1655
1656         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
1657         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
1658         as necessary.
1659
1660 2006-01-25  Martin Baulig  <martin@ximian.com>
1661
1662         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
1663         `MonoDebuggerThread' into debug-debugger.c.
1664
1665 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
1666
1667         * profiler.c: fix printing of data.
1668
1669 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
1670
1671         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
1672           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
1673
1674 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
1675
1676         * object.c: fix deadlock related to string interning.
1677
1678 2006-01-23  Martin Baulig  <martin@ximian.com>
1679
1680         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
1681
1682         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
1683
1684 2006-01-23  Martin Baulig  <martin@ximian.com>
1685
1686         * mono-debug.h: Moved the prototypes of some functions which are
1687         used by the JIT here from mono-debug-debugger.h.
1688
1689 2006-01-21  Martin Baulig  <martin@ximian.com>
1690
1691         * Makefile.am: Don't install mono-debug-debugger.h.
1692
1693 2006-01-21  Martin Baulig  <martin@ximian.com>
1694
1695         * mono-debug-debugger.h: Enforce the private status of this header
1696         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
1697         Moved some stuff from mono-debugger-jit-wrapper.h here.
1698
1699 2006-01-20  Raja R Harinath  <rharinath@novell.com>
1700
1701         * class.c (mono_class_from_typeref): Add a sanity test to help
1702         catch lack of assembly load/search hooks.
1703
1704 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
1705
1706         * marshal.c (emit_struct_conv): Relax the fields with same offset
1707         check even more. Fixes #77230.
1708
1709 2006-01-18  Martin Baulig  <martin@ximian.com>
1710
1711         * loader.c (find_method_in_class): Added `gboolean is_inflated'
1712         argument; if false, we compare the uninstantiated signatures.
1713         (method_from_memberref): Compare the uninstantiated signatures;
1714         fixes #76417.
1715
1716 2006-01-18  Robert Jordan  <robertj@gmx.net>
1717
1718         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
1719         Clear the weak link. Fixes bug #77170.
1720
1721         * gc.c (mono_gchandle_free):
1722         Reflect *-gc.c changes (tiny optimization).
1723
1724 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
1725
1726         * metadata.c (mono_metadata_signature_dup): Applied patch from
1727         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
1728         Fixes #77288.
1729
1730 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
1731
1732         * marshal.c (emit_struct_conv): Allow fields with the same offset when
1733         marshalling from native to managed code. Fixes #77230.
1734
1735 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1736
1737         * threadpool.c: fix problem (Mac only) when more than one asynchronous
1738         connect. Fixes bug #77020.
1739
1740 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
1741
1742         * class.c: fixed id assignement for nested interfaces (bug #77275).
1743         Added also better info for --print-vtable debugging.
1744
1745 2006-01-12  Martin Baulig  <martin@ximian.com>
1746
1747         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
1748         interfaces on-the-fly; fixes #76625.
1749
1750         * class-internals.h
1751         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
1752         don't need that anymore.
1753
1754 2006-01-12  Miguel de Icaza  <miguel@novell.com>
1755
1756         * socket-io.c
1757         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
1758         To avoid initing the nested_classes when not needed I turned the
1759         PeerCredData as a toplevel internal class, as it has to be shared
1760         anyways. 
1761
1762         Fixes the CASA issue.
1763
1764 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
1765
1766         * domain.c: Accessors for MonoJitInfo
1767
1768         * profiler-private.h: Add jitinfo to the end jit hook
1769
1770         * profiler.[ch]: Define new hooks, called after jitting which give
1771         the MonoJitInfo that was compiled
1772
1773 2006-01-10  Martin Baulig  <martin@ximian.com>
1774
1775         * class.c (mono_class_setup_events): Add support for generic
1776         classes; fixes #76440.
1777
1778 2006-01-06  Raja R Harinath  <rharinath@novell.com>
1779
1780         Fix #77160.
1781         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
1782         on passed-in method.
1783
1784 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
1785
1786         * object.c (mono_runtime_invoke_array): Add Nullable support.
1787
1788         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
1789
1790 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
1791
1792         * file-io.c: Don't consider sockets as directory and avoid an endless
1793         loop. Fix bug #76966.
1794
1795 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
1796
1797         * object.c (mono_nullable_init): New helper function.
1798         (mono_nullable_box): Ditto.
1799
1800         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
1801
1802         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
1803
1804         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
1805         
1806 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
1807
1808         * class.c (mono_class_is_assignable_from): Make T assignable to 
1809         Nullable<T>.
1810
1811 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
1812
1813         * appdomain.c: Bump corlib version to 46.
1814         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
1815         serialization purpose) and changed ves_icall_System_Reflection_
1816         Assembly_get_code_base signature to accept a boolean (to escape, or 
1817         not, the assembly code base).
1818
1819 2005-12-23  Dick Porter  <dick@ximian.com>
1820
1821         * icall.c: 
1822         * threads-types.h: 
1823         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
1824         CreateEvent icall now returns "created" boolean parameter.
1825
1826 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
1827
1828         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
1829         #76967.
1830
1831         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
1832         when attr_klass is an interface. Fixes #77045.
1833
1834 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
1835
1836         * marshal.c (emit_struct_conv): Fix previous patch.
1837         
1838         * marshal.c (emit_struct_conv): Add a check for fields with the same
1839         offset.
1840
1841 2005-12-20  Raja R Harinath  <rharinath@novell.com>
1842
1843         Fix regression in Mono.C5.
1844         * class.c (mono_class_create_generic): If 'klass' is an interface
1845         set up the interface offsets.
1846         (mono_class_is_assignable_from): Don't throw away generic arguments.
1847
1848 2005-12-19  Raja R Harinath  <rharinath@novell.com>
1849
1850         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
1851         type parameters.
1852
1853 2005-12-15  Raja R Harinath  <rharinath@novell.com>
1854
1855         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
1856         dead store.
1857         (do_mono_metadata_parse_generic_class): Don't pass the current
1858         generic context when parsing the type being instantiated: it
1859         cannot use it, anyway.
1860
1861         * loader.c (method_from_memberref): Don't inflate a signature if
1862         it doesn't contain any type parameters.
1863
1864 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
1865
1866         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
1867
1868 2005-12-14  Martin Baulig  <martin@ximian.com>
1869
1870         * class.c
1871         (mono_type_get_name_recurse): Don't return null for type
1872         parameters and open generic classes.
1873         (mono_class_setup_methods): Don't exclude generic instances.
1874         (mono_get_unique_iid): Use different IDs for different
1875         instantiations of the same generic type.
1876         (mono_class_setup_vtable): Only use setup_generic_vtable() for
1877         open generic instances; create a normal vtable for closed generic
1878         instances.
1879         (mono_class_setup_vtable_general): We're now also called for
1880         closed generic instances.
1881
1882         * reflection.c
1883         (mono_reflection_bind_generic_parameters): Correctly use
1884         mono_metadata_lookup_generic_inst() everywhere.
1885
1886 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
1887
1888         * object.c (mono_class_create_runtime_vtable): Call 
1889         mono_class_setup_vtable ().
1890
1891         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
1892         function.
1893         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
1894         #76959.
1895
1896         * loader.c (mono_loader_set_error_type_load): Print the type load
1897         warnings to the console so they are more visible to the user.
1898         (mono_loader_set_error_method_load): Ditto.
1899
1900         * reflection.c (ensure_runtime_vtable): Revert the last change as it
1901         is still broken.
1902         
1903         * reflection.c (ensure_runtime_vtable): Fix build.
1904
1905         * reflection.c (ensure_runtime_vtable): Disable an optimization which
1906         doesn't work in all cases.
1907
1908 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
1909
1910         * object.c (mono_array_new_full): Treat a single dimensional array
1911         with 0 lower bounds as an szarray. Fixes #76973.
1912
1913         * reflection.c (custom_attr_visible): Really fix this.
1914
1915 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
1916
1917         * reflection.c (custom_attr_visible): Allow nested public attributes
1918         as well.
1919
1920         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
1921         interface check.
1922
1923 2005-12-12  Raja R Harinath  <harinath@gmail.com>
1924
1925         * class.c (set_generic_param_owner): Delete.
1926         (mono_class_create_from_typedef): Don't set ->owner field of
1927         generic parameters to "param containers" of enclosing classes.
1928         * reflection.c (mono_reflection_initialize_generic_parameter):
1929         Likewise.
1930
1931 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
1932
1933         * reflection.c (custom_attr_visible): Fix build.
1934
1935 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
1936
1937         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
1938         private attributes.
1939         
1940         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
1941         handling of null parameter defaults.
1942
1943 2005-12-09  Raja R Harinath  <rharinath@novell.com>
1944
1945         * class.c (mono_class_from_generic_parameter): Don't set
1946         klass->generic_container.
1947         (my_mono_class_from_generic_parameter): Likewise.
1948
1949 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
1950
1951         * reflection.c (load_public_key): Fix a warning.
1952         (method_encode_code): Fix unaligned accesses.
1953
1954 2005-12-07  Martin Baulig  <martin@ximian.com>
1955
1956         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
1957
1958         * reflection.c
1959         (write_generic_param_entry): Encode our custom attrs.
1960
1961         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
1962
1963 2005-12-07  Martin Baulig  <martin@ximian.com>
1964
1965         * reflection.c (encode_new_constraint): Removed; we don't use the
1966         `NewConstraintAttribute' anymore.
1967
1968 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
1969
1970         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
1971         not fire a TypeResolve event when Assembly.GetType () is called.
1972
1973 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
1974
1975         Beginning of support for nullable types in the runtime. Parts of
1976         this patch are from Martin.
1977
1978         * appdomain.c (MONO_CORLIB_VERSION): Bump
1979
1980         * domain.c (mono_init_internal): get the nullable type
1981
1982         * class.c (mono_class_is_nullable): New method
1983         (mono_class_get_nullable_param): New mehod
1984         (mono_class_create_generic): In types T? set cast_class to T
1985
1986         * class-internals.h (MonoDefaults): new nullable default class
1987         (mono_class_get_nullable_param, mono_class_get_nullable_param):
1988         new methods.
1989
1990 2005-12-05  Raja R Harinath  <rharinath@novell.com>
1991
1992         * metadata.c (select_container): New.  Refactor code to select the
1993         appropriate GenericContainer given the type of generic parameter
1994         we are looking for.
1995         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
1996         not a MonoGenericContext.  Use select_container.  Update parameters.
1997         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
1998         and MONO_TYPE_MVAR.
1999         (unwrap_arrays): Remove duplicate tests.
2000         (find_generic_param): Rename from 'has_same_context'.  Now walks a
2001         generic instantiated class to find any arguments that are generic
2002         parameters.
2003         (mono_type_create_from_typespec_full): Use find_generic_param to
2004         avoid evicting some generic instantiations from the typespec
2005         cache.
2006
2007 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
2008
2009         * reflection.c: fixed writing of doubles on ARM FPA.
2010
2011 2005-12-02  Robert Jordan  <robertj@gmx.net>
2012
2013         * icall.c: Fixed EventInfo.ReflectedType (#76829).
2014
2015 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2016
2017         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
2018         least on SUSE 10 they are not the same (on debian, they are just the
2019         same thing).
2020
2021 2005-12-01  Raja R Harinath  <rharinath@novell.com>
2022
2023         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
2024         DeclaringType for VARs and MVARs.
2025         * class.c (set_generic_param_owner): Fix initialization of owner
2026         fields.
2027
2028 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
2029
2030         * icall.c: fixed Enum.ToObject() to correctly convert the values.
2031
2032 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2033
2034         * threadpool.c: workaround for a bug that shows up on the Mac:
2035         select()+connect() on a blocking socket is not like it should
2036         be, so we proceed to connect() in that case, wasting the I/O
2037         threadpool thread until connect succeedes. Fixes bug #75436.
2038
2039 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2040
2041         * threadpool.c: fix typo when setting file descriptor states.
2042
2043 2005-11-28  Raja R Harinath  <rharinath@novell.com>
2044
2045         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
2046         * metadata.c (mono_metadata_parse_method_signature_full): Don't
2047         create a temporary signature container.
2048         (mono_metadata_parse_generic_param): Update to changes.
2049         (mono_type_create_from_typespec_full): Update to changes.
2050         * loader.c (method_from_memberref): Don't use a
2051         MonoGenericContainer while parsing a memberref signature.
2052         (method_from_methodspec): Remove dead-store of the 'container'
2053         variable.  It's overwritten before use.
2054
2055         * metadata.c (mono_type_create_from_typespec_full): Make debugging
2056         checks tighter.
2057         (mono_metadata_parse_generic_param): Likewise.
2058         * loader.c (find_method_in_class): Does not need a
2059         MonoGenericContainer.  Use 'mono_method_signature' rather than
2060         'mono_method_signature_full'.
2061         (find_method, mono_get_method_constrained, method_from_memberref):
2062         Update to changes.
2063
2064         * metadata.c (mono_type_create_from_typespec_full): Ensure that
2065         owner-less generic-parameters are never evicted from the typespec
2066         cache.
2067
2068         * loader.c (method_from_memberref): Don't use the current context
2069         when parsing signatures.
2070         (method_from_methodspec, mono_get_method_from_token): Update to changes.
2071
2072         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
2073         side-effects in g_assert.
2074         * loader.c (mono_get_method_from_token): Resolve klass earlier so
2075         that we don't potentially lose information.
2076
2077 2005-11-26  Dick Porter  <dick@ximian.com>
2078
2079         * icall.c:
2080         * threads.c: icalls to implement basic (ie, not named)
2081         System.Threading.Semaphore.
2082
2083 2005-11-24  Dick Porter  <dick@ximian.com>
2084
2085         * process.c
2086         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2087         Use GetProcessId() if it's available.
2088
2089 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
2090
2091         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
2092
2093 2005-11-23  Raja R Harinath  <rharinath@novell.com>
2094             Ankit Jain  <jankit@novell.com>
2095
2096         * loader.c (mono_get_method_from_token): Initialize 'method' field
2097         of all generic parameters before parsing the signature.  Remove
2098         code that "fixed"-up MVAR references.
2099
2100 2005-11-23  Ankit Jain  <jankit@novell.com>
2101
2102         * metadata.c (mono_metadata_has_generic_params):
2103         (mono_metadata_load_generic_param_constraints):
2104         (mono_metadata_load_generic_params): Move duplicate code ...
2105         (mono_metadata_get_generic_param_row): ... here. Returns the
2106         first row-id in GenericParam table for a given owner (token).
2107         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
2108         prototype.
2109
2110 2005-11-23  Raja R Harinath  <rharinath@novell.com>
2111             Ankit Jain  <jankit@novell.com>
2112
2113         * metadata.c (mono_metadata_class_equal): Pass signature_only when
2114         comparing VARs too.
2115         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
2116         type->data.generic_param only if the type is an MVAR.
2117         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
2118         leak owner-less VARs and MVARs into managed space.
2119
2120 2005-11-21  Martin Baulig  <martin@ximian.com>
2121
2122         * class-internals.h
2123         (MonoMethod): Moved the `generic_container' here from
2124         `MonoMethodNormal' since we now also need it for
2125         `MonoMethodPInvoke';
2126         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
2127         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
2128         an union containing both `MonoMethodNormal' and
2129         `MonoMethodPInvoke'.
2130
2131         * loader.c
2132         (mono_get_method_from_token): Allow implementing generic methods
2133         as interncalls.
2134
2135         * threads.c
2136         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
2137         icall.
2138
2139 2005-11-17  Dick Porter  <dick@ximian.com>
2140
2141         * icall.c: 
2142         * process.h: 
2143         * process.c: Split the Process Start_internal icall into
2144         ShellExecuteEx_internal and CreateProcess_internal, which are
2145         called depending on whether UseShellExecute is true.  Fixes bug
2146         76670.
2147
2148         * appdomain.c (MONO_CORLIB_VERSION): Incremented
2149
2150 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
2151
2152         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
2153         'msize' parameters, use the information in 'mspec' instead.
2154         (emit_object_to_ptr_conv): Ditto.
2155
2156         * marshal.c (emit_struct_conv): Handle explicit layout structs with
2157         fields out of order. Fixes #76733.
2158
2159 2005-11-17  Ankit Jain  <jankit@novell.com>
2160
2161         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
2162
2163 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
2164
2165         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
2166           bug #76575.
2167
2168 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
2169
2170         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
2171         for types with non-auto layout. Fixes #76717.
2172
2173 2005-11-16  Ankit Jain  <jankit@novell.com>
2174
2175         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
2176         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
2177         if generic_context is null.
2178           (mono_metadata_generic_param_equal): param->owner can be null.
2179           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
2180         null.
2181
2182 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
2183
2184         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
2185         the correct value.
2186
2187 2005-11-15  Martin Baulig  <martin@ximian.com>
2188
2189         * object.c (set_value): Use mono_class_from_mono_type() instead of
2190         the hack for generic instances; fixes #76136.
2191
2192 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
2193
2194         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
2195         fields.
2196
2197         * image.c (load_metadata_ptrs): Initialize the new fields.
2198
2199         * reflection.c (create_dynamic_mono_image): Ditto.
2200
2201         * reflection.c (build_compressed_metadata): Use the new fields.
2202
2203         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
2204         icall.
2205
2206         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
2207         icall.
2208         
2209 2005-11-15  Ankit Jain  <jankit@novell.com>
2210             Raja R Harinath  <harinath@gmail.com>
2211
2212         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
2213         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
2214         new per-generic_container cache if the cached MonoType's context matches
2215         the current context.
2216           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
2217         to the expected context.
2218           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
2219
2220 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2221
2222         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
2223         we changed the signature of an icall.
2224         * icall.c: Modify to mono_double_ParseImpl return true/false 
2225         depending on the success, instead of throwing the exception. This will
2226         help us in Double.TryParse methods.
2227         
2228 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
2229
2230         * marshal.c (emit_marshal_object): Throw an exception when
2231         marshalling 'object' instead of crashing. Fixes #76696.
2232
2233 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
2234
2235         * class-internals.h: Add prototype for mono_type_get_full_name ().
2236
2237 2005-11-11  Dick Porter  <dick@ximian.com>
2238
2239         * threads.c (mono_thread_manage): Make sure the main thread has
2240         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
2241
2242 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
2243
2244         * loader.c (mono_loader_set_error_type_load): Log a warning to the
2245         console about the missing type.
2246         (mono_loader_set_error_method_load): Ditto.
2247
2248 2005-11-09  Miguel de Icaza  <miguel@novell.com>
2249
2250         * mono-config.c (mono_get_config_dir): Set the system defaults if
2251         none is specified.
2252
2253         * assembly.c (mono_set_dirs): New API entry point to set the
2254         assembly and the config directory in one call
2255
2256 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
2257
2258         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
2259         the ftnptr was created from a delegate in a domain other than the
2260         current domain. Fixes #75377.
2261
2262         * exception.h exception.c: Add mono_get_exception_not_supported ().
2263
2264 2005-11-08  Martin Baulig  <martin@ximian.com>
2265
2266         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
2267
2268 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
2269
2270         * security-manager.h: Added definitions to deal with strongname key 
2271         pairs bigger (and smaller) than 1024 bits.
2272         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
2273         adjust wrt the public key length being used.
2274
2275 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
2276
2277         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
2278           Windows build (r51396-51397).
2279
2280 2005-11-03  Martin Baulig  <martin@ximian.com>
2281
2282         * class.c (mono_class_setup_vtable_general): Also add generic
2283         methods to the vtable; fixes #76581.
2284
2285 2005-11-01  Miguel de Icaza  <miguel@novell.com>
2286
2287         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
2288         sure that we lookup GetString method from the System.Text.Encoding
2289         class, not the derived class or we get an empty method.
2290
2291         Fixed class #76612.
2292
2293 2005-10-25  Miguel de Icaza  <miguel@novell.com>
2294
2295         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
2296         if it has been previously set (embedders). 
2297
2298         Make mono_set_rootdir available also on Unix.
2299
2300 005-10-24  Robert Jordan  <robertj@gmx.net>
2301
2302         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
2303
2304 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
2305
2306         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
2307         only calls which are made to native code use this flag.
2308
2309         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
2310
2311 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
2312
2313         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
2314         Add support for FieldBuilders.
2315
2316 2005-10-29  Martin Baulig  <martin@ximian.com>
2317
2318         * mono-debug.c
2319         (mono_debug_using_mono_debugger): New public method; returns
2320         whether we're running inside the debugger.
2321
2322 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
2323
2324         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
2325         for Method/Constructor/FieldBuilders.
2326
2327 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
2328
2329         * reflection.c (module_add_cattrs): Save custom attributes for global methods
2330         and fields as well.
2331
2332 2005-10-26  Martin Baulig  <martin@ximian.com>
2333
2334         * mono-debug-debugger.c
2335         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
2336
2337 2005-10-24  Raja R Harinath  <harinath@gmail.com>
2338
2339         * icall.c (base64_to_byte_array): Don't pass an out-of-range
2340         integer to isspace.
2341
2342 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
2343
2344         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
2345         when passing valuetypes byref. Fixes #76502.
2346
2347 2005-10-19  Jackson Harper  <jackson@ximian.com>
2348
2349         * profiler.c: Don't put a . in front of types that are not in a
2350         namespace.
2351
2352 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
2353
2354         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
2355
2356 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
2357
2358         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
2359         #76436.
2360         (mono_marshal_get_ldflda_wrapper): Fix a warning.
2361
2362 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2363
2364         * assembly.c metadata-internals.h icall.c: Define an additional
2365         parameter for mono_assembly_name_parse_full, so we can avoid creating
2366         S.R.AssemblyName.Version when no version info wasn't passed.
2367         
2368 2005-10-09  Miguel de Icaza  <miguel@novell.com>
2369
2370         * class.c (mono_type_get_full_name): Reimplement method that was
2371         removed. 
2372
2373         * image.c: Some docs
2374
2375 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
2376
2377         * profiler.c (output_newobj_profile): Fix printing of Total memory
2378         on x86.
2379
2380 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
2381
2382         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
2383
2384 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
2385
2386         * threads.c: remove debug output.
2387
2388 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
2389
2390         * threads.c (mono_thread_manage): Fix crashes if more than 64
2391         threads need to be aborted. Hopefully fixes #75899.
2392
2393         * assembly.c (mono_stringify_assembly_name): New helper function.
2394
2395         * class.c: Use mono_stringify_assembly_name instead of the similar
2396         static function.
2397
2398         * assembly.h assembly.c: Add support for calling a postload search 
2399         hook if an assembly cannot be loaded.
2400
2401         * appdomain.c: Register new search hooks which call the AssemblyResolve
2402         events in AppDomain. Fixes #75231
2403
2404 2005-10-07  Martin Baulig  <martin@ximian.com>
2405
2406         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
2407         methods without debug info.
2408
2409 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
2410
2411         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
2412         wrappers.
2413
2414 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2415
2416         * file-io.c: now that we return symlinks, use lstat and, when the file
2417         is a symbolic link, stat, to get the file attributes. Also avoid the
2418         conversion to/from utf16/external.
2419
2420 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
2421
2422         * class.c (mono_class_layout_fields): Compute klass->has_references
2423         correctly if an embedded valuetype is not yet initialized. Fixes
2424         #76331.
2425
2426 2005-10-04  Martin Baulig  <martin@ximian.com>
2427
2428         * metadata.c
2429         (mono_metadata_load_generic_param_constraints): New public
2430         function; splitted the constraints loading out from
2431         mono_metadata_load_generic_params().
2432
2433         * class.c (mono_class_create_from_typedef): Call
2434         mono_metadata_load_generic_param_constraints() after setting up
2435         the type and creating our parent; fixes #75329.
2436
2437 2005-10-04  Martin Baulig  <martin@ximian.com>
2438
2439         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
2440         non-dynamic parent classes.
2441
2442 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
2443
2444         * file-io.c : win32 build fix (ETXTBSY seems not found).
2445
2446 2005-10-04  Martin Baulig  <martin@ximian.com>
2447
2448         * reflection.c
2449         (mono_image_get_methodspec_token): Make the cache actually work;
2450         fixes #75974.
2451
2452 2005-10-04  Martin Baulig  <martin@ximian.com>
2453
2454         * class.c (mono_class_name_from_token): Removed the unneccessary
2455         `MonoGenericContext *' argument.
2456
2457 2005-10-04  Martin Baulig  <martin@ximian.com>
2458
2459         * loader.c
2460         (method_from_methodspec): Make the caching work again; fixes the
2461         performance regression from #76262.
2462
2463 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2464
2465         * file-io.c:
2466         * file-io.h:
2467         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
2468         GetFileSystemEntries that performs the same work but without going
2469         into io-layer, locking, etc.
2470
2471 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
2472
2473         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
2474         ThreadState_Stopped as well. Fixes #76047.
2475
2476 2005-09-29  Martin Baulig  <martin@ximian.com>
2477
2478         * class.c
2479         (inflate_generic_context): If the new context has a `gmethod', set
2480         its `container' that that gmethod's `container'.
2481
2482         * metadata.c
2483         (mono_metadata_parse_generic_param): Simplify things;
2484         `generic_container = generic_context->container;' is just fine.
2485
2486         * loader.c (method_from_methodspec): Code cleanups.
2487
2488 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
2489
2490         * decimal.c: fix warning (and let gcc generate correct
2491         code on ARM with optimizations).
2492
2493 2005-09-28  Martin Baulig  <martin@ximian.com>
2494
2495         * loader.c
2496         (method_from_memberref): Added `MonoGenericContext *class_context'
2497         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
2498         (method_from_methodspec): If we're a memberref, use the enclosing
2499         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
2500
2501 2005-09-28  Martin Baulig  <martin@ximian.com>
2502
2503         * object.c (mono_runtime_invoke_array): Added support for
2504         MONO_TYPE_GENERICINST; fixes #75917.
2505
2506 2005-09-27  Martin Baulig  <martin@ximian.com>
2507
2508         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
2509         `k->byval_arg.type' to determine the actual type.
2510
2511         * loader.c (method_from_methodspec): Removed some hacks.
2512
2513 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
2514
2515         * class-internals.h (mono_field_is_deleted): Do the test for
2516         rtspecialname before we check the actual name of the field. This
2517         prevents us from dereferencing a pointer into the string table,
2518         saving us from accessing a few pages
2519
2520         * *.c: Replace the use of {Enter,Leave}CriticalSection with
2521         macros. This will allow a deadlock debugger to easily be plugged
2522         in.
2523
2524 2005-09-27  Martin Baulig  <martin@ximian.com>
2525
2526         * loader.c (method_from_methodspec): Create a "signature"
2527         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
2528
2529 2005-09-27  Martin Baulig  <martin@ximian.com>
2530
2531         * class.c
2532         (inflate_generic_class): Correctly set the new context's
2533         container.
2534
2535         * loader.c
2536         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
2537         instead of a `MonoGenericContext *'.
2538         (mono_method_signature_full): Take a `MonoGenericContainer *'
2539         instead of a `MonoGenericContext *'.
2540
2541         * metadata.c
2542         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
2543         instead of a `MonoGenericContext *'.
2544         (mono_metadata_parse_method_signature_full): Likewise.
2545
2546 2005-09-26  Martin Baulig  <martin@ximian.com>
2547
2548         * class.c
2549         (mono_class_from_generic_parameter): Set `klass->generic_container'
2550         (mono_class_from_generic_parameter): Likewise.
2551         (mono_bounded_array_class_get): We inherit the generic container
2552         from the element class.
2553
2554         * loader.c
2555         (find_method, find_method_in_class): Take a `MonoGenericContext *'
2556         argument rather than computing it here.
2557         (method_from_memberref): Correctly set the generic context before
2558         parsing the signature.  Fixes #75681.
2559
2560 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
2561
2562         * object.c (mono_class_has_special_static_fields): Fix warnings.
2563
2564 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2565
2566         * assembly.c: Add parse_public_key function, to
2567         par the public keys. Also added mono_assembly_name_parse_full,
2568         to define it the parsed key should be freed or not.
2569         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
2570         to parse a long format assembly name.
2571         * metadata-internals.h: Keep mono_assembly_name_parse_full as
2572         private, since calling it to preserve the key requires
2573         freeing it manually.
2574         
2575 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
2576
2577         * locales.c : removed HAVE_ICU part.
2578
2579 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
2580
2581         * object.c (mono_class_create_runtime_vtable): Avoid calling 
2582         field_is_special_static if the klass has no special static fields.
2583
2584         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
2585         (MonoCachedClassInfo): Likewise.
2586
2587         * object.c (mono_class_has_special_static_fields): New helper function.
2588
2589 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
2590
2591         * class.c (mono_class_create_from_typedef): Don't call 
2592         interfaces_from_typedef_full for enums.
2593         (mono_class_create_from_typedef): Compute the base types of enums directly
2594         without calling mono_class_setup_fields ().
2595         (mono_class_find_enum_basetype): New helper function.
2596
2597         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
2598         one place inside the string heap.
2599         
2600 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
2601
2602         * class.c: locking fixes, code cleanups, some docs added.
2603         Allocate some data structures in the image mempool.
2604
2605 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
2606
2607         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
2608         the example code.
2609         
2610 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
2611
2612         * class-internals.h, class.c, reflection.c: reduce memory taken by
2613         MonoClass.
2614
2615 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
2616
2617         * metadata.c, metadata.h, loader.h: documentation updates, code and
2618         API cleanups.
2619
2620 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
2621
2622         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
2623         the example code.
2624
2625         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
2626         page faults caused by the runtime while reading metadata.
2627
2628 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2629
2630         * socket-io.c: the field names were changed 3 months ago and no one
2631         realized until bug #76077 got filed!
2632
2633 2005-09-20  Martin Baulig  <martin@ximian.com>
2634
2635         * icall.c (assembly_icalls): Removed some unused debugger icalls.
2636
2637 2005-09-20  Martin Baulig  <martin@ximian.com>
2638
2639         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
2640         write the rank into the class entry.
2641
2642 2005-09-20  Martin Baulig  <martin@ximian.com>
2643
2644         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
2645
2646 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
2647
2648         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2649
2650         * icall.c (custom_attrs_defined_internal): New icall.
2651
2652         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
2653         function.
2654         (mono_custom_attrs_construct_by_type): New helper function.
2655
2656 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
2657
2658         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
2659         terminate the resulting string. Fixes #76123.
2660
2661 2005-09-16  Martin Baulig  <martin@ximian.com>
2662
2663         * mono-debug.c
2664         (mono_debug_add_method): Ignore inflated methods for the moment.
2665
2666 2005-09-14  Martin Baulig  <martin@ximian.com>
2667
2668         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
2669
2670 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
2671
2672         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
2673         return a success/failure indication.
2674         (mono_metadata_interfaces_from_typedef_full): Ditto.
2675         (get_constraints): Ditto.
2676
2677 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
2678
2679         * marshal.c (emit_marshal_array): Fix handling of null arrays.
2680         
2681         * marshal.c (emit_marshal_array): Add support for returning string
2682         arrays from delegates. Fixes #76063.
2683
2684         * marshal.c: Use the emit_ldloc/stloc macros where possible.
2685
2686 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
2687
2688         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
2689         icall.
2690
2691 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
2692
2693         * reflection.c icall.c: Fix after mono_get_exception_type_load
2694         signature change.
2695
2696         * assembly.c (mono_assembly_get_assemblyref): New helper function.
2697         (mono_assembly_load_reference): Use the new helper.
2698
2699         * class-internals.h (MonoLoaderError): New structure containing 
2700         information about type loading errors.
2701
2702         * class-internals.h loader.c: Add APIs to store per-thread loader
2703         error information.
2704
2705         * loader.c class.c: Set the loader error if needed.
2706
2707         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
2708
2709 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
2710
2711         * decimal.c: fixed to handle the broken ARM fp format.
2712
2713 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
2714
2715         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
2716         broken.
2717
2718 2005-09-06  Martin Baulig  <martin@ximian.com>
2719
2720         * domain.c (supported_runtimes): Added v2.0.50727.
2721
2722 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
2723
2724         * culture-info.h: reduce the size of some structures.
2725
2726 2005-09-05  Martin Baulig  <martin@ximian.com>
2727
2728         Reflect latest API changes in the August CTP.
2729
2730         * icall.c
2731         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
2732         ("MonoType.HasGenericArguments"): Removed.
2733         ("MonoMethod.BindGenericParameters"): Renamed to
2734         "MakeGenericMethod".
2735         ("MethodBuilder.BindGenericParameters"): Renamed to
2736         "MakeGenericMethod".    
2737
2738 2005-09-05  Martin Baulig  <martin@ximian.com>
2739
2740         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
2741
2742 2005-09-05  Martin Baulig  <martin@ximian.com>
2743
2744         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2745
2746         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
2747         generic_container is non-NULL.
2748
2749 2005-09-05  Martin Baulig  <martin@ximian.com>
2750
2751         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2752
2753         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
2754
2755 2005-08-29  Michal Moskal  <malekith@nemerle.org>
2756
2757         * reflection.c (encode_locals,
2758         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
2759         for large generic types.
2760
2761 2005-09-05  Martin Baulig  <martin@ximian.com>
2762
2763         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2764
2765         * class.c (mono_dup_array_type): New public method.
2766         (mono_metadata_signature_deep_dup): New public method.
2767         (dup_type): Correctly duplicate array and function types.
2768
2769 2005-09-05  Martin Baulig  <martin@ximian.com>
2770
2771         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2772
2773         * reflection.c (get_default_param_value_blobs): Handle generic types
2774         and generic methods.
2775
2776 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
2777
2778         * class.c: Fixed error reporting (method/class were inversed) for 
2779         inheritance demands.
2780         * security-manager.c|h: Added the AppDomain when calling the managed
2781         System.Security.SecurityManager.InheritanceDemand method.
2782
2783 2005-09-01  Raja R Harinath  <rharinath@novell.com>
2784
2785         * reflection.c (encode_marshal_blob): 'marshaltype' and
2786         'marshaltyperef' are alternate sources for the custom marshaler
2787         name.
2788
2789 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
2790
2791         * class.c: fix creation of array classes with rank == 1
2792         (patch by Ankit Jain <jankit@novell.com>).
2793
2794 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
2795
2796         * object.c: fix check for creating the bound data for arrays vs
2797         szarrays.
2798
2799 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2800
2801         * object.c: configuration file name is now based on the executable name,
2802         not the image name. Fixes bug #75931.
2803
2804 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
2805
2806         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
2807         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
2808
2809 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
2810
2811         * rand.c: Use wincrypt.h instead of WinCrypt.h.
2812
2813 2005-08-24  Ankit Jain  <jankit@novell.com>
2814             Raja R Harinath  <rharinath@novell.com>
2815
2816         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
2817           called by it recursively.
2818           (mono_class_init): Remove special case in pending_init handling, since it's
2819           superseded by the fix to mono_class_from_typeref.
2820
2821 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
2822
2823         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
2824         BROKEN_THREAD_START stuff.
2825
2826 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
2827
2828         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
2829         trampoline.
2830
2831         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
2832         
2833         * object.c (mono_delegate_ctor): Replace the original function address with
2834         a delegate trampoline.
2835
2836 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
2837
2838         * icall.c: add boolean argument to base64_to_byte_array and 
2839         InternalFromBase64String to control whether a whitespace-only string
2840         is allowed (or should casue a FormatException to be thrown). We need
2841         this as the behavior has changed between MS.NET 1.x and 2.0, and we
2842         to match the MS behaviour in both profiles.
2843         * appdomain.c: Bump corlib version.
2844
2845 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2846
2847         This patch implements a big portion of publisher policy
2848         support, used to bind assembly versions and redirect
2849         one assembly from version A to version B.
2850
2851         * assembly.c:
2852         New GSList loaded_assembly_bindings, for storing the cached
2853         assembly bindings.
2854         (assembly_binding_maps_name): New static function for checking if a 
2855         assembly binding information maps an assembly name.
2856         (mono_assembly_binding_info_free): New function for freeing
2857         assembly binding information resources.
2858         (get_publisher_policy_info): New static function for retrieving 
2859         assembly binding information from a MonoImage.
2860         (compare_versions): New static function for comparing an assembly
2861         binding information data and the version of an assembly name.
2862         (check_policy_versions): New static function for checking if an
2863         assembly binding info mapping an assembly name is valid for it.
2864         (mono_assembly_load_publisher_policy): New static function for
2865         loading the 'policy.major.minor.MyAssembly' image for an assembly
2866         with an assembly name 'aname'.
2867         (mono_assembly_bind_version): New static function for updating
2868         assembly redirection.
2869         (mono_assembly_apply_binding): New static function for applying
2870         assembly binding.
2871         (search_binding_loaded): New static function for searching 
2872         loaded assembly binding infos in the cache domain.
2873         (mono_assembly_load_full): Don't apply assembly binding for
2874         reflection only assemblies.
2875
2876         * metadata-internals.h: Add MonoAssemblyBindingInfo,
2877         which contains information about assembly binding. Also
2878         declare signature for mono_config_parse_publisher_policy ()
2879         function, used to retrieve pub policy info.
2880         
2881         * mono-config.c:
2882         (publisher_policy_start): New static function used to parse publisher 
2883         policy config files.
2884         (publisher_policy_parser): New static MonoParseHandler containing 
2885         the functions used when parsing config files.
2886         (mono_config_parse_publisher_policy): New function for parsing
2887         publisher policy files.
2888         
2889 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
2890
2891         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
2892
2893         * marshal.c (mono_delegate_free_ftnptr): Ditto.
2894
2895         * object.c (mono_get_addr_from_ftnptr): New helper function.
2896
2897         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
2898
2899         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2900
2901 2005-08-19  Dick Porter  <dick@ximian.com>
2902
2903         * threads.c, threads.h, appdomain.c, appdomain.h,
2904         profiler-private.h, monitor.c, object.c, object-internals.h,
2905         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
2906         store the thread ID, so it can hold a 64 bit value if needed.
2907
2908 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
2909
2910         * reflection.c (mono_reflection_create_dynamic_method): Store the
2911         handle class into the method references as well so ldtoken works in
2912         dynamic methods.
2913
2914         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
2915         types.
2916
2917 2005-08-19  Ankit Jain <jankit@novell.com>
2918
2919         Fix #75847.
2920         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
2921           here rather than using the method signature of a arbitrary function
2922           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
2923           two arguments.
2924           Hack done with Harinath.
2925
2926 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2927
2928         * threadpool.c: disable printing stack traces when we get a exception
2929         in a threadpool thread. I need to do more testing to figure out which
2930         cases actually print this. Fixes bug #75828.
2931
2932 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2933
2934         * icall.c: there might be ignored whitespace after the last '='. This
2935         fixes length computation and bug #75840.
2936
2937 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
2938
2939         * assembly.c (mono_assembly_load_full): Consider .exe extension as
2940         well. Fixes #75809.
2941
2942         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
2943         #75784.
2944         
2945         * reflection.c (create_custom_attr_data): Ditto.
2946
2947 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
2948
2949         * locales.c, culture-info.h : removed RegionLCIDMap.
2950         * culture-info-tables.h : regenerated.
2951
2952 2005-08-16  Martin Baulig  <martin@ximian.com>
2953
2954         * class.c (mono_type_get_name_recurse): Small fix.
2955
2956 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
2957
2958         * locales.c : indentation fixie.
2959
2960 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
2961
2962         * object-internals.h,
2963           locales.h,
2964           locales.c,
2965           culture-info.h,
2966           icall.c : added RegionInfo table support.
2967         * culture-info-table.h : regenerated for region support.
2968
2969 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
2970
2971         * reflection.c (resolve_object): handle all kinds of MonoMethod
2972         including generic ones
2973
2974 2005-08-12  Ankit Jain <jankit@novell.com>
2975
2976         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
2977           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
2978
2979 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
2980
2981         * process.c: Don't close a thread handle when it's NULL. This is a
2982         workaround for bug #75733.
2983
2984 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
2985
2986         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
2987
2988 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
2989
2990         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
2991
2992 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2993
2994         * threadpool.c: if a work item in the thread pool has a callback that
2995         catches a exception, don't propagate it after invoking the callback.
2996         Fixes bug #75336.
2997
2998 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
2999
3000         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
3001
3002         * class-internals.h (MonoCachedClassInfo): Add some new fields.
3003
3004         * class.c (mono_class_init): Load field info lazily in the AOT case.    
3005
3006         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
3007
3008 2005-08-03  Ankit Jain  <jankit@novell.com>
3009
3010         Fix #75683.
3011         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
3012           PInvoke calling convention is 0.
3013
3014 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
3015
3016         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
3017         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
3018
3019 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
3020
3021         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
3022         to handle threads not started by the GC (patch by Michael Meeks
3023         <michael.meeks@novell.com>).
3024
3025 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
3026
3027         * reflection.c: Make buffer used in emitting types larger for some
3028         big generic types (patch by Michal Moskal).
3029
3030 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
3031
3032         * mono-debug.c: Fix some (not all) alignment problems.
3033
3034 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3035
3036         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
3037         Invoke mono_image_load_from_data_full passing the refonly
3038         parameter.
3039
3040         * assembly.c
3041         (mono_assembly_open_from_bundle): Add the refonly argument, 
3042         in order to pass it to other methods it calls to.
3043         (do_mono_assembly_open): Add the refonly argument, in order 
3044         to pass it to other methods it calls to.
3045         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
3046         the refonly parameter to it.
3047
3048         * image.c: Add loaded_images_refonly_hash and
3049         loaded_images_refonly_guid_hash to cache the reflection
3050         only loaded images.
3051         (mono_images_init): Initialize the hash tables used for
3052         caching the reflection only images.
3053         (load_modules): Invoke mono_image_open_full passing the refonly
3054         parameter to load the modules the correct way.
3055         (build_guid_table): Add the refonly argument, to re-build the 
3056         correct hash table.
3057         (do_mono_image_open): Added the refonly argument, in order to
3058         define it for the loaded image.
3059         (mono_image_loaded_full): New function, which receives an
3060         additional parameter to look for the image in the refonly or
3061         non-refonly section.
3062         (mono_image_loaded): Updated, using mono_image_loaded_full.
3063         (mono_image_loaded_by_guid_full): The same case that happens
3064         with mono_image_loaded_full.
3065         (mono_image_loaded_by_guid): Likewise.
3066         (register_image): Use the ref_only variable inside MonoImage
3067         to decide in which hash table store the current image.
3068         (mono_image_open_from_data_full): Rename
3069         mono_image_open_from_data to mono_image_open_from_data_full,
3070         adding the refonly argument, to define the ref_only variable 
3071         inside MonoImage.
3072         (mono_image_open_from_data): Return 
3073         mono_image_open_from_data_full.
3074         (mono_image_open_full): Rename mono_image_open to
3075         mono_image_open_full, receiving the new refonly argument,
3076         to pass it to inner methods.
3077         (mono_pe_file_open): Update this function, to open
3078         a MonoImage as a non-refonly image.
3079         (mono_image_close): Use the refonly variable inside
3080         MonoImage to remove the image from the correct caches.
3081
3082         * image.h: Add the signatures of mono_image_open_full,
3083         mono_image_open_from_data_full, mono_image_loaded_full,
3084         mono_image_loaded_by_guid_full.
3085
3086         * metadata-internals.h: Add the ref_only field to 
3087         MonoImage.
3088         
3089 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3090
3091         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
3092         Fix the last behavior, which used to load the assemblies and
3093         extract MonoReflectionAssemblyName information, instead of
3094         extract it from the metadata tables. Needed for Reflection
3095         Only assemblies.
3096         
3097 2005-07-29  Martin Baulig  <martin@ximian.com>
3098
3099         * mono-debug-debugger.c
3100         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
3101         not initialized.
3102
3103         * mono-debug.c
3104         (mono_debug_address_from_il_offset): Check whether we have
3105         debugging support before attempting to take the lock.
3106         (mono_debug_source_location_from_address): Likewise.
3107         (mono_debug_source_location_from_il_offset): Likewise.
3108         (mono_debug_il_offset_from_address): Likewise.
3109         (mono_debug_address_from_il_offset): Likewise.
3110
3111 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
3112
3113         * class.c (mono_class_from_name_case): Add support for dynamic images.
3114         Fixes #75650.
3115
3116         * object.c (mono_class_compute_gc_descriptor): Add a workaround
3117         for #75479.
3118
3119 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
3120         
3121         * reflection.c (mono_method_get_object): Fix warning.
3122
3123 2005-07-28  Martin Baulig  <martin@ximian.com>
3124
3125         * mono-debug.c
3126         (mono_debug_add_wrapper): Also write the wrapper type.
3127
3128 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
3129
3130         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
3131         
3132         * class.c (mono_class_init): Avoid reading nested classes if the AOT
3133         data indicates the class has none.
3134
3135 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
3136
3137         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
3138         loader lock with the debugger lock. Prevents deadlocks for beagle.
3139
3140         Beagle can now run on an smp box for a weekend without any
3141         issues. Woohoo!
3142
3143 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
3144
3145         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
3146         in a module. Fixes #75629.
3147
3148 2005-07-26  Martin Baulig  <martin@ximian.com>
3149
3150         * mono-debug.c (mono_debug_add_wrapper): New static method.
3151         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
3152         interncall or a wrapper.
3153
3154         * mono-debug.h (MonoDebugWrapperData): New public typedef.
3155         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
3156         (MONO_DEBUGGER_VERSION): Bump to 51.
3157
3158         * mono-debug-debugger.c
3159         (mono_debugger_add_type): Removed this empty function.
3160         (mono_debugger_add_method): Likewise.
3161
3162 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
3163
3164         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
3165         before accessing method->slot.
3166
3167 2005-07-21  Jb Evain  <jbevain@gmail.com>
3168
3169         * reflection.c (method_encode_clauses/class): Handle filters clauses.
3170         Fixes #75010.
3171
3172 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
3173
3174         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
3175         #75587.
3176
3177 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
3178
3179         * image.h image.c: Add mono_image_get_guid () API function.
3180
3181 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
3182
3183         There were issues when multiple threads tried to load
3184         assemblies. A deadlock was created between assemblies_mutex and
3185         mono_domain_assemblies_lock. This fixes the issue by making the
3186         assembly ref counting be lock free. See bug 75586.
3187         
3188         * image.c (mono_image_close): The add ref function here was using
3189         Interlocked operations while the unref was using a mutex and a
3190         --. I don't think this was ever a bug that would be exposed in a
3191         non-pendantic way (ie, by an embedder doing a ref on one thread
3192         and an unref on another), but for the sake of correctness, this is
3193         now Interlocked.
3194
3195         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
3196         (mono_assembly_load_reference): Call mono_assembly_addref rather
3197         than touching the refcount ourselves.
3198         (mono_assembly_close): Use InterlockedDecrement to unref the
3199         assembly. Don't acquire the lock unless it is actually needed.
3200
3201 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
3202
3203         * class.c (mono_class_layout_fields): Fix calculation of has_references
3204         for generic types.
3205
3206 2005-07-12  Martin Baulig  <martin@ximian.com>
3207
3208         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3209
3210         * metadata.c
3211         (mono_type_hash): Provide better hashing for generic instances.
3212         (mono_generic_inst_hash): Improve hashing.
3213         (mono_generic_class_hash): Likewise.
3214
3215         * reflection.c (mymono_metadata_type_hash): Improve hashing for
3216         generic instances.
3217
3218 2005-07-12  Martin Baulig  <martin@ximian.com>
3219
3220         * reflection.c (mono_reflection_create_runtime_class): Remove the
3221         hack for generic type definitions and non-`Run' assemblies.
3222         (mono_reflection_bind_generic_parameters): Also use
3223         `klass->wastypebuilder' to check for TypeBuilders.
3224
3225 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
3226
3227         * class.c (mono_class_layout_fields): Fix calculation of has_references
3228         for generic types.
3229
3230         * class.c (inflate_generic_class): Fix a leak.
3231         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
3232         for generic types.
3233
3234 2005-07-11  Martin Baulig  <martin@ximian.com>
3235
3236         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
3237         on error.
3238
3239 2005-07-11  Martin Baulig  <martin@ximian.com>
3240
3241         * loader.c (find_method): Also lookup in
3242         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
3243
3244 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3245
3246         * appdomain.c (mono_domain_unload): Don't free the error message
3247         before passing it to mono_get_exception_...
3248
3249         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
3250         
3251 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
3252
3253         * threads.c: try to better guess an available RT signal (bug #75387).
3254
3255 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3256
3257         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
3258         and CACHE_OBJECT.
3259
3260 2005-07-07  Martin Baulig  <martin@ximian.com>
3261
3262         * class.c (mono_type_get_name_full): Return NULL for
3263         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
3264         fixes #75408.
3265
3266 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3267
3268         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
3269         exit the appdomain as well being aborted.
3270
3271         * threadpool.c: Create all threadpool threads inside the root appdomain, and
3272         change back to the root domain after calling managed code. This enables
3273         appdomains using threadpools to be unloaded.
3274
3275 2005-07-07  Martin Baulig  <martin@ximian.com>
3276
3277         * class-internals.h
3278         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
3279         into `MonoDynamicGenericClass' since we only need it for dynamic
3280         types.
3281
3282         * reflection.c (mono_class_bind_generic_parameters): We don't need
3283         to compute the `parent' here.
3284
3285 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
3286
3287         * culture-info-table.h : regenerated.
3288
3289 2005-07-06  Martin Baulig  <martin@ximian.com>
3290
3291         * icall.c
3292         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
3293
3294         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
3295
3296 2005-07-06  Martin Baulig  <martin@ximian.com>
3297
3298         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
3299         we're doing a signature-only comparision; fixes #74945.
3300
3301 2005-07-06  Martin Baulig  <martin@ximian.com>
3302
3303         * class-internals.h (MonoGenericClass): Moved some things out into
3304         a new `MonoInflatedGenericClass' type.  
3305         (MonoInflatedGenericClass): New type; the `klass' of a
3306         `MonoGenericClass' is now computed lazyly in
3307         mono_get_inflated_generic_class().      
3308
3309         * class.c (mono_get_inflated_generic_class): New public function.
3310         (mono_class_inflate_generic_method): Removed the unused
3311         `MonoClass *' argument.
3312         (setup_generic_vtable): Don't call mono_get_inflated_method() on
3313         all the methods.
3314         (mono_class_create_generic): Make this static and merge it with
3315         mono_class_create_generic_2(); we're now called automatically from
3316         mono_get_inflated_generic_class().
3317
3318         * loader.c (mono_method_signature): Call
3319         mono_get_inflated_method() here.
3320
3321 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
3322
3323         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
3324         type of fields with RVA.
3325
3326         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
3327         for this pseudo class.
3328         (my_mono_class_from_generic_parameter): Likewise.
3329         (mono_class_init): Allow interfaces to have cctors.
3330
3331 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
3332
3333         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
3334         lazily for AOT methods.
3335
3336 2005-07-05  Martin Baulig  <martin@ximian.com>
3337
3338         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
3339         returns FALSE for a successful match, not TRUE.
3340
3341 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
3342
3343         * loader.c (mono_method_get_index): Optimize this a bit.
3344
3345 2005-07-04  Martin Baulig  <martin@ximian.com>
3346
3347         * class.c
3348         (class_compute_field_layout): Move the check for generic type
3349         definitions into mono_class_layout_fields().  Fixes #74684.
3350         (mono_class_from_generic_parameter): Correctly compute
3351         `klass->parent'; fixes #75457.
3352
3353         * reflection.c (register_assembly, register_module): Make sure
3354         `domain->rejobject_hash' is already created.
3355
3356 2005-07-02  Martin Baulig  <martin@ximian.com>
3357
3358         * class-internals.h
3359         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
3360         `MonoDynamicGenericClass'.      
3361
3362 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
3363
3364         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
3365         returned by a field getter is null, since null is a valid value.
3366
3367 2005-07-01  Martin Baulig  <martin@ximian.com>
3368
3369         * reflection.c (mono_reflection_generic_class_initialize): Update
3370         the `dgclass->fields [i].parent' to the correct class.
3371         (mono_image_get_fieldref_token): Use the declaring type, not the
3372         reflected type.
3373
3374 2005-07-01  Martin Baulig  <martin@ximian.com>
3375
3376         * loader.c (find_method): Also look in the interfaces; fixes #75429.
3377
3378 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
3379
3380         * threads.c (thread_cleanup): assert that thread != NULL
3381         (wait_for_tids_or_state_change): We were using the wrong variable
3382         when accessing wait->threads. `i' was always out of the bounds of
3383         the array.
3384
3385 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3386
3387         * loader.c: map user32 and kernel32 to libMonoSupportW
3388
3389 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
3390
3391         * appdomain.c (unload_thread_main): Mark this as WINAPI.
3392
3393 2005-06-28  Martin Baulig  <martin@ximian.com>
3394
3395         * loader.c (method_from_methodspec): Fix #75334.
3396
3397 2005-06-28  Martin Baulig  <martin@ximian.com>
3398
3399         Fix #74953 - Arrays now implement the generic IList<T> interface
3400         on the 2.0 platform.
3401
3402         * class-internals.h (MonoDefaults): Added `generic_array_class'.
3403
3404         * reflection.c (mono_class_bind_generic_parameters): New public
3405         function; similar to mono_reflection_bind_generic_parameters(),
3406         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
3407
3408         * domain.c (mono_init_internal): Try to initialize.
3409         `mono_defaults.generic_array_class' here; this'll only succeed if
3410         we're using the 2.0 corlib.
3411
3412         * icall.c
3413         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
3414         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
3415         (mono_lookup_internal_call): Added support for nested classes.
3416
3417         * loader.c
3418         (mono_get_method_from_token): Set `result->signature->pinvoke' if
3419         we're an interncall and have generic arguments.
3420
3421         * class.c
3422         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
3423         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
3424         instance of System.Array.InternalArray<T> for arrays, so they
3425         implement the generic IList<T> interface.
3426
3427 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
3428
3429         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
3430         (chastamar@yahoo.com). Fixes #75374.    
3431
3432 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
3433
3434         * culture-info-table.h: regenerated.
3435
3436 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3437
3438         * icall.c: handle spaces correctly for base64 strings.
3439
3440 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
3441
3442         * *.c: Kill some warnings.
3443
3444 2005-06-23  Duncan Mak  <duncan@novell.com>
3445
3446         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
3447         that this builds on Solaris 10 (x86).
3448
3449 2005-06-23  Martin Baulig  <martin@ximian.com>
3450
3451         * class.c
3452         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
3453         generic type definitions.
3454
3455 2005-06-23  Martin Baulig  <martin@ximian.com>
3456
3457         Fix #75331.
3458
3459         * metadata.c (mono_class_get_overrides): Renamed to
3460         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
3461         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
3462         pass it to mono_get_method_full().
3463
3464 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
3465
3466         * reflection.c (mono_reflection_create_runtime_class): take the
3467         mono_domain_lock in this method. Prevents deadlocks
3468
3469 2005-06-22  Martin Baulig  <martin@ximian.com>
3470
3471         * loader.c (method_from_methodspec): Fix #75330.
3472
3473 2005-06-22  Martin Baulig  <martin@ximian.com>
3474
3475         * reflection.c (type_get_qualified_name): Use
3476         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
3477         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
3478         argument; use it if we don't have an assembly name.
3479
3480 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
3481
3482         * object.c: In mono_message_init, set "copy out" flag for in
3483         parameters with the [Out] flag.
3484
3485 2005-06-21  Martin Baulig  <martin@ximian.com>
3486
3487         * class.c
3488         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
3489         and MONO_TYPE_PTR.
3490
3491 2005-06-21  Martin Baulig  <martin@ximian.com>
3492
3493         * class.c (mono_class_init): Don't initialize `class->fields' for
3494         generic instances since they're initialized again in
3495         compute_field_layout(). 
3496         (compute_field_layout): Set the field's `generic_info' here; fix
3497         #75320. 
3498
3499 2005-06-21  Martin Baulig  <martin@ximian.com>
3500
3501         * class-internals.h
3502         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
3503
3504         * metadata.c (mono_metadata_generic_method_equal): Also
3505         distinguish the `generic_class'; fixes #75334.
3506
3507 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3508
3509         * domain.c:
3510         * appdomain.c:
3511         * domain-internals.h:
3512         * reflection.c: 'domain_assemblies' field is now protected by its own
3513         lock. Don't call into managed code to run the AssemblyLoad event if we
3514         now there are no registered delegates for it.
3515
3516 2005-06-20  Martin Baulig  <martin@ximian.com>
3517
3518         * class.c (mono_class_is_assignable_from): Use a custom version of
3519         mono_class_has_parent() to make things work for generic instances;
3520         fix #75300.
3521
3522 2005-06-20  Martin Baulig  <martin@ximian.com>
3523
3524         * loader.c (method_from_methodspec): Apply a patch from
3525         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
3526
3527 2005-06-20  Martin Baulig  <martin@ximian.com>
3528
3529         * class.c (mono_class_init): Reverted Zoltan's last change; it
3530         breaks generics.
3531
3532 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
3533
3534         * threads.c (wait_for_tids_or_state_change): Add missing locking.
3535
3536 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3537
3538         * socket-io.c: fix the index in the socket array for writable/error
3539         sockets. Fixes bug #75306.
3540
3541 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
3542
3543         * class.c (mono_class_init): Allow interfaces to have static ctors.
3544
3545 2005-06-17  Martin Baulig  <martin@ximian.com>
3546
3547         * loader.c (method_from_methodspec): Use `context->container' when
3548         parsing the `gmethod->inst'.
3549
3550 2005-06-17  Martin Baulig  <martin@ximian.com>
3551
3552         * class.c (mono_type_get_name_recurse): Don't add the assembly
3553         name for type arguments.
3554
3555 2005-06-15  Martin Baulig  <martin@ximian.com>
3556
3557         * reflection.c (mono_image_get_inflated_method_token): Encode
3558         correct klass; fixes #75260.
3559
3560 2005-06-13 Michal Moskal <malekith@nemerle.org>
3561
3562         * icall.c: Make GetCorrespondingMethod/Constructor take
3563         MonoReflectionMethod method not MonoMethod. Removed
3564         MonoType.GetCorrespondingField, and make
3565         MonoGenericType.GetCorrespondingField take name not
3566         MonoClassField.
3567
3568 2005-06-13  Michal Moskal <malekith@nemerle.org>
3569
3570         * reflection.c (field_encode_signature, encode_locals):
3571          Make sizes of buffers for types larger (for big generic types).
3572          (create_generic_typespec,
3573          mono_reflection_sighelper_get_signature_local,
3574          mono_reflection_sighelper_get_signature_field):
3575          Add asserts for too small buffers.
3576
3577 2005-06-15  Martin Baulig  <martin@ximian.com>
3578
3579         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
3580         if our parent is not a dynamic type.
3581
3582 2005-06-15  Martin Baulig  <martin@ximian.com>
3583
3584         * class-internals.h (MonoTypeNameFormat): New enum.
3585
3586         * class.c
3587         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
3588         (mono_type_get_full_name): Removed.
3589         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
3590         argument instead of the boolean's.
3591
3592         * icall.c (ves_icall_System_MonoType_getFullName):
3593         Added `gboolean assembly_qualified'.    
3594
3595         * reflection.h
3596         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
3597
3598         * reflection.c (mono_reflection_parse_type): Parse the new type
3599         name format.
3600
3601 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3602
3603         * icall.c: no need to convert from utf16 to utf8 and then back again
3604         after the call to GetLogicalDrives.
3605
3606 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3607
3608         * icall.c: frombase64. Fix problems exposed by new tests.
3609
3610 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3611
3612         * icall.c: added internal calls for converting char [] and strings in
3613         base64 into byte [].
3614
3615 2005-06-10  Martin Baulig  <martin@ximian.com>
3616
3617         * class.c (mono_class_create_generic_2): Read the nested classes
3618         from the metadata rather than from `gklass->nested_classes' since
3619         `gklass' might not be initialized yet.
3620
3621 2005-06-09  Duncan Mak  <duncan@novell.com>
3622
3623         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
3624         all public headers. Fixes #74919.
3625
3626 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
3627
3628         * domain.c: The key for proxy_vtable_hash is now a pointer
3629         array. Added new GHashFunc and GCompareFunc functions for this.
3630
3631         * class.h: The list of interfaces in MonoRemoteClass is known in
3632         advance and can't grow (we create a new MonoRemoteClass if needed),
3633         so now the interface array can be allocated together with
3634         MonoRemoteClass.
3635         
3636         * object.c: Added a new method create_remote_class_key.
3637         Fixed mono_remote_class so it does not depend on
3638         mono_upgrade_remote_class.
3639         Removed extend_interface_array.
3640         Added new method clone_remote_class(), which makes a copy of a remote
3641         class and adds a new interface or class to it.
3642         mono_upgrade_remote_class() now creates a new remote class (or gets
3643         it from the cache) if an vtable upgrade is needed. In this way
3644         we make sure that other objects sharing the same remote class
3645         don't get the new vtable with unwanted interfaces.
3646         
3647         * object-internals.h:
3648         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
3649         
3650         * marshal.c: Track changes in mono_upgrade_remote_class().
3651
3652 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
3653         * icall.c: Add runtime methods for obtaining members of inflated
3654         class, which were created from supplied non-inflated members. It
3655         is used in internal Get{Method,Constructor,Field} methods in
3656         System.Type
3657
3658 2005-06-09  Martin Baulig  <martin@ximian.com>
3659
3660         * reflection.c
3661         (mono_reflection_bind_generic_method_parameters): Fix #75169.
3662
3663 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3664         * reflection.c (mono_image_basic_init): Define
3665         Version in MonoDynamicAssembly. 
3666         
3667 2005-06-08  Martin Baulig  <martin@ximian.com>
3668
3669         Fix #75136.
3670
3671         * loader.c
3672         (mono_method_signature_full): New public method; takes a
3673         `MonoGenericContext *'.
3674         (find_method): Use mono_method_signature_full() and pass the
3675         klass'es context to it.
3676
3677         * class.c (mono_class_is_inflated_method): Use
3678         mono_method_signature_full() and pass the context to it.
3679
3680 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
3681
3682         * object.c: add proper locking in mono_remote_class_vtable(),
3683         fixes possible memory corruption.
3684
3685 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
3686
3687         * marshal.c (mono_remoting_marshal_init): set
3688         initialized after initialization.
3689
3690 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
3691
3692         * locales.c : hush.
3693
3694 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
3695
3696         * object.c (extend_interface_array): fix really silly
3697         memory corrupting / comparison bug.
3698
3699 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3700
3701         * reflection.c: Functions added to support the creation
3702         of CustomAttributeData, which includes Attribute data
3703         used by ReflectionOnly methods.
3704
3705         * reflection.h:  mono_reflection_get_custom_attrs_data and
3706          mono_custom_attrs_data_construct added (functions exposed).
3707
3708          * icall.c: Added mono_reflection_get_custom_attrs_data
3709          as icall.
3710         
3711 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
3712
3713         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
3714         lupus's request.
3715
3716 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
3717
3718         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
3719
3720         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
3721         dynamic DllImportAttribute.
3722
3723         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
3724         dynamic DllImportAttribute.
3725
3726         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
3727         Fixes #75162.
3728
3729 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3730
3731         * threads.c: avoid segfault when an unstarted thread is aborted.
3732
3733 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
3734
3735         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
3736         Returns the name and version of the runtime for reporting.
3737
3738 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3739
3740         * appdomain.c: bump corlib version.
3741         * object-internals.h: new field in MonoReflectionAssembly.
3742
3743 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3744
3745         * object-internals.h: Carlos forgot to add this field.
3746
3747 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3748
3749         * icall.c: Added create_version to create instances
3750         of Version of MonoReflectionAssemblyName. This change helps
3751         the AssemblyName tests to keep running fine.
3752         
3753 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
3754   
3755         * object.c (mono_method_return_message_restore): A somehow less
3756         intrusive fix for #75138.
3757
3758 2005-06-03  Raja R Harinath  <rharinath@novell.com>
3759
3760         * object.c (mono_method_return_message_restore): Fix computation
3761         of expected number of out args.
3762
3763 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
3764
3765         * reflection.c (mono_image_get_method_info): Fix the case when the
3766         charset is empty.
3767
3768 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
3769
3770         * object.c: Added missing null check in
3771           mono_method_return_message_restore.
3772
3773 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
3774
3775         * reflection.c (mono_image_get_method_info): Handle the case when
3776         dllentry is empty.
3777
3778 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
3779
3780         * object.c: When creating the vtable for a proxy, take into account
3781         all inherited interfaces, not only the ones registered in
3782         iclass->interfaces. This fixs bug #74996.
3783         Also, in mono_method_return_message_restore, verify that the array
3784         of out args has the expected lengh.
3785
3786 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3787
3788         * socket-io.c: update the timeout in Poll when the call is interrupte.
3789
3790 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3791
3792         * socket-io.c: support abort/suspend in Select_internal after last
3793         change.
3794
3795 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3796
3797         * threadpool.c: remove warning.
3798
3799 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3800
3801         * icall.c:
3802         * socket-io.[ch]: Select_internal uses poll() now when available, thus
3803         removing the 1024 limit from select(). Runtime part of the fix for
3804         bug #71203.
3805
3806 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3807
3808         * socket-io.c: when resolving the addresses for the same
3809         host returned by gethostname(), get the local IPs from the interface
3810         list. Loopback addresses are discarded if the are interfaces up with
3811         non-loopback ones. Fixes bug #63265.
3812
3813 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
3814
3815         * appdomain.c, verify.c, object-internals.h, reflection.c:
3816         bumped corlib number to 36, and added new extra_flags field
3817         to ReflectionMethodBuilder and friends.  Fixes #75060.
3818
3819 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
3820
3821         * gc.c: register a new weak link only if the object is non-null
3822         (fixes bug#75047).
3823
3824 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
3825
3826         * culture-info.h : short time pattern too.
3827
3828 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
3829
3830         * culture-info.h : expand long time pattern string length.
3831
3832 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
3833
3834         * culture-info-table.h : update (more French date format; #72788).
3835
3836 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
3837
3838         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
3839         the method is static. Fixes #75029.
3840
3841 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
3842
3843         * reflection.c: Update the table_idx field of method builders after
3844         saving the module, since it can change. This is a workaround for
3845         bug #74914. 
3846
3847 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
3848
3849         * culture-info-table.h : update (additional French date format).
3850
3851 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
3852
3853         * icall.c (ves_icall_type_Equals): Revert last change.
3854         
3855         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
3856
3857         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
3858
3859 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
3860
3861         * class-internals.h: Added executioncontext_class field to 
3862         MonoDefaults structure.
3863         * domain.c: Cache System.Threading.ExecutionContext class in 
3864         mono_defaults.
3865         * object.c: Capture the ExecutionContext for asynchroneous calls in
3866          mono_async_result_new.
3867         * object-internals.h: Added execution_context and original_context 
3868         fields to MonoAsyncResult. Added execution_context to MonoThread.
3869         * security-manager.c|.h: Added mono_get_context_capture_method to 
3870         return the capture method (if required by the security manager or by
3871         the framework version used).
3872         * threadpool.c: Apply capture (if present) ExecutionContext in 
3873         mono_async_invoke and revert to original context after it completes.
3874
3875 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
3876
3877         * culture-info-table.h : updated (real hacky solution for zh-CHT).
3878
3879 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
3880
3881         * culture-info-table.h : zh-CHT related workaround.
3882
3883 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
3884
3885         * marshal.c (emit_marshal_custom): Add some error checking and call the
3886         methods in the ICustomMarshaler interface. Fixes #74875.
3887         
3888         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
3889         native->managed wrappers.
3890
3891 2005-05-12  Martin Baulig  <martin@ximian.com>
3892
3893         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
3894         here and use the loader lock.
3895
3896         * mono-debug.c: Properly lock when the debugger is not attached.
3897         (mono_debug_init): Release the initial lock if we're not running
3898         in the debugger.
3899
3900 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
3901
3902         * marshal.c (emit_marshal_custom): Pass through NULL values without
3903         calling the custom marshalling routines.
3904
3905         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
3906         conversion in structures. Fixes #74882.
3907
3908 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
3909
3910         * culture-info-table.h : zh-* cultures were missing.
3911
3912 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
3913
3914         * threads.c: Added a new event background_change_event which is signaled
3915         when a thread changes its background mode.
3916         Moved here several checks previously done in managed code. The checks
3917         require the thread lock, and using the thread lock in managed code
3918         can result in deadlocks.
3919         Merged Start_internal and Thread_internal into a single method. Now 
3920         Thread_internal does all work of creating and starting a thread.
3921         Added icalls for setting and getting the state of the object. Moved from
3922         managed code to avoid locking there.
3923         Added wait_for_tids_or_state_change() which is called instad of
3924         wait_for_tids when waiting for non-backround threads to end. This method
3925         will return if one of the threads ends or the background_change_event
3926         is signaled.
3927         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
3928         the background mode. This method signals the background_change_event
3929         event.
3930         * icall.c:
3931         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
3932         removed Start_internal.
3933         
3934 2005-05-11  Martin Baulig  <martin@ximian.com>
3935
3936         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
3937         to order of some fields to get proper alignment on 64-bit machines.
3938
3939 2005-05-11  Martin Baulig  <martin@ximian.com>
3940
3941         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
3942         changes as they're broken and completely fuck up the debugger.
3943
3944         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
3945
3946 2005-05-10  Martin Baulig  <martin@ximian.com>
3947
3948         * reflection.c (mono_reflection_generic_class_initialize): Don't
3949         call mono_class_setup_parent() here.
3950
3951 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3952
3953         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
3954         send/receive timeout use an integer in milliseconds. We were using a
3955         struct timeval.
3956
3957 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3958
3959         * locales.c:
3960         (internal_get_cultures): reserve the first slot of the array for the
3961         InvariantCulture, which will be filled in managed code.
3962
3963 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
3964
3965         * reflection.c (mono_image_fill_module_table): Initialize the
3966         GENERATION field as well.
3967
3968 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3969
3970         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
3971         Monitor.Enter on the object.
3972
3973 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
3974
3975         * threads.c: Enable the wait for running threads when exiting.
3976         * icall.c: Suspend all threads before exiting.
3977
3978 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
3979
3980         * assembly.c (mono_assembly_load_reference): Fix warning.
3981
3982 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3983
3984         * threadpool.c: changed the default number of threads per cpu. From now
3985         on, the default will be 20 + (5 * number of cpus) instead of 50.
3986
3987 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
3988
3989         * loader.c (mono_method_get_signature_full): Add locking here.
3990
3991 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
3992
3993         * appdomain.c: Moved methods for parsing and freeing assembly
3994         names to assembly.c.
3995         * assembly.c, domain-internals.h: Created public methods for parsing
3996         assembly names. Fixed mono_assembly_load_with_partial_name:
3997         it now finds the best match, taking into account the version,
3998         token and culture specified in the partial name. Also return
3999         the latest version if no version information is specified.
4000
4001 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
4002
4003         * threadpool.c: replace check for SocketAsyncCall class.
4004
4005 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4006
4007         * threadpool-internals.h:
4008         * Makefile.am: added threadpool-internals.h
4009
4010         * threadpool.c: call mono_unhandled_exception on exceptions not handled
4011         that happen in threadpool threads (tested on MS).
4012         (mono_thread_pool_remove_socket): new function that dispatch any pending
4013         AIO call on a socket that is closing. By now only epoll really needs it,
4014         as select/poll wake up when the socket closes.
4015
4016
4017         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
4018
4019 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
4020
4021         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
4022
4023 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
4024
4025         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
4026
4027 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
4028
4029         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
4030         has an abort request, convert it into a suspend request.
4031
4032 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
4033
4034         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
4035         warning for the usage of `UnmanagedFunctionPointerAttribute' which
4036         is not supported yet.
4037
4038 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4039
4040         * image.c: register assemblies loaded from data (bundles) in the loaded
4041         assemblies hash. Fixes bug #74772.
4042
4043 2005-04-29  Martin Baulig  <martin@ximian.com>
4044
4045         * class.c (mono_type_get_name_recurse): Update to the new naming
4046         schema from the latest .NET 2.x beta2.
4047         (mono_class_setup_vtable_general): If we're a generic instance,
4048         copy the vtable from our generic type definition and inflate all
4049         the methods in it.
4050
4051         * loader.c (find_method): Update to the new naming schema from the
4052         latest .NET 2.x beta2.
4053
4054 2005-04-29  Raja R Harinath  <harinath@gmail.com>
4055
4056         * class.c (mono_class_init): Add a mono_loader_unlock to the
4057         #74734 fix.
4058
4059 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
4060
4061         * icall.c (ves_icall_System_Environment_Exit): Remove the 
4062         suspend_all_other_threads () call for the time being, since it can hang.
4063
4064         * threads.c (mono_thread_manage): Similarly, disable the waiting for
4065         the background threads to exit, since it can also hang.
4066
4067         * class.c (mono_class_init): Applied patch from Ankit Jain 
4068         (radical@gmail.com). Avoid pending init errors when a field refers
4069         to a nested class using a typeref. Fixes #74734.
4070
4071         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
4072         this for dynamic modules.
4073
4074 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4075
4076         * threads.c: don't wait for threads that are in the process of aborting
4077         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
4078         and waiting for background threads to finish. This makes xsp and
4079         mod-mono-server exit without random length delays and/or hangs.
4080
4081 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4082
4083         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
4084
4085 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
4086
4087         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
4088         dynamic types to prevent infinite loops. Fixes #74727.
4089
4090         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
4091         ..._is_assignable_to.
4092
4093 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
4094
4095         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
4096
4097 2005-04-25  Martin Baulig  <martin@ximian.com>
4098
4099         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
4100
4101         * domain.c
4102         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
4103
4104         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
4105
4106         * reflection.c (build_compressed_metadata): Set metadata header
4107         version to 2.0.
4108
4109 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
4110
4111         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
4112         number into an integral and a decimal part. Fixes #70473.
4113
4114         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
4115
4116 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
4117
4118         * culture-info-table.h : reflected the latest locale-builder output.
4119
4120 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4121
4122         * threadpool.c: check for SuspendRequested too when deciding if
4123         mono_thread_interruption_checkpoint should be called.
4124
4125 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4126
4127         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
4128         * threads.c: remove interruption_mutex and use Interlocked instead. When
4129         suspending all the threads, wait for all the suspended events at once.
4130         If we're shutting down and get an APC that is going to be queued,
4131         call mono_thread_execute_interruption immediately, as the thread might
4132         be sleeping on a pthread condition or mutex.
4133
4134         * icall.c: call mono_runtime_set_shutting_down before suspending the
4135         threads.
4136
4137         Fixes bug #74693. And now xsp is happier when exiting.
4138
4139 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
4140
4141         * loader.c (mono_stack_walk): Fix #74690.
4142
4143 2005-04-22  Martin Baulig  <martin@ximian.com>
4144
4145         * mono-debug.h (MonoDebugMethodJitInfo): Added
4146         `MonoDebugMethodJitInfo *jit'.
4147
4148         * mono-debug.c (mono_debug_read_method): Cache the
4149         MonoDebugMethodJitInfo in `address->jit'.
4150         (mono_debug_free_method_jit_info): New public method.
4151
4152 2005-04-22  Martin Baulig  <martin@ximian.com>
4153
4154         * class.c (mono_class_is_assignable_from): Disallow
4155         type parameter -> interface.
4156
4157 2005-04-21  Dick Porter  <dick@ximian.com>
4158
4159         * threads.c (mono_thread_create): Turn an assertion into an error.
4160
4161 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
4162
4163         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
4164         
4165         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
4166         Fix some gcc 4.0 warnings.
4167
4168 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
4169
4170         * file-io.c: fix alt dir separator char on unix systems
4171         and cleanup (fixes bug #71214).
4172
4173 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
4174
4175         * marshal.c: Use CALLVIRT instead of CALL when dispatching
4176         a call to a remote domain, since the method may be an
4177         interface method in the client domain. This fixes bug #74192.
4178
4179 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4180
4181         * threadpool.c: recv/send are now performed before going back to managed
4182         code to save one transition.
4183
4184 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4185
4186         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
4187
4188         * metadata/threadpool.c: removed hack to workaround the bug above.
4189
4190         Fixes bug #74618.
4191
4192 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
4193
4194         * reflection.c reflection.h: Fix handling of parameter defaults in
4195         dynamic methods. Also fixes handling of parameter attributes.
4196         Fixes #74609.
4197
4198         * mono-debug.c (mono_debug_close_image): Fix warning.
4199
4200 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4201
4202         * socket-io.h: replaced old unused field with new 'blocking'.
4203         * threadpool.c: restore socket blocking state on windows(tm).
4204
4205 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
4206
4207         * icall.c: don't return the codebase in the AssemblyName[] returned by
4208         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
4209         * object-internals.h: Removed FIXME (fields were presents) and fixed
4210         versioncompat declaration.
4211
4212 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4213
4214         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
4215         not closed, so don't cleanup when it happens.
4216
4217 2005-04-13  Chris Toshok  <toshok@ximian.com>
4218
4219         * mono-debug-debugger.h: change prototype for
4220         mono_debugger_lookup_type.
4221
4222         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
4223         this function, although it should probably be named
4224         mono_debugger_init_type.
4225
4226 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4227
4228         * threadpool.c: fix non-AIO case.
4229
4230 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
4231
4232         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
4233         the built-in profiler to measure just JIT compilation times.
4234
4235 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4236
4237         * threadpool.c: the epollfd might be closed by another thread at
4238         any time, so ignore EBADF at treat it as a "we're closing" sign.
4239
4240 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4241
4242         * threadpool.c: release the semaphores with a count equals to the number
4243         of working threads in both IO and regular pools. Fixed typo that messed
4244         up the count of IO pool threads. Don't initialize the pipe handles if
4245         we're using epoll.
4246
4247 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4248
4249         * threadpool.c: some systems don't like a NULL when deleting the socket
4250         from epoll.
4251
4252 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4253
4254         * threadpool.c: fix semaphore allocation.
4255
4256 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4257
4258         * threadpool.c: added epoll() based implementation for asynchronous IO
4259         that is used instead of the default poll() when available.
4260         It can be disabled by setting MONO_DISABLE_AIO.
4261
4262 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4263
4264         * threadpool.c: windows needs 'closesocket' and instead of returning
4265         0 when the stream is closed while in select, it returns -1. Fixes bug
4266         #74573.
4267
4268 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
4269
4270         * class.c (class_compute_field_layout): Fix the regression caused by
4271         the previous try.
4272
4273 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4274
4275         * threadpool.c: separate pool for socket async. IO.
4276         * threadpool.h: mono_max_worker_threads is not a global any more.
4277
4278 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
4279
4280         * class.c (class_compute_field_layout): Fix #74549.
4281
4282 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4283
4284         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
4285         use 2 connected sockets instead.
4286
4287 2005-04-08  Miguel de Icaza  <miguel@novell.com>
4288
4289         * mono-config.c: Add new entry point for mkbundle
4290         mono_config_parse_memory. 
4291
4292 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4293
4294         * threadpool.c: removed another unused function.
4295
4296 2005-04-08  Ankit Jain  <radical@corewars.org>
4297
4298         * reflection.c (get_default_param_value_blobs): Add 'types'
4299         parameter to get the types encoded in the constant table.
4300         (mono_param_get_objects): Use the type from the constant table,
4301         not the type of the parameter, when creating default values.
4302         Handle null default values correctly.
4303
4304 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4305
4306         * file-io.c:
4307         * file-io.h:
4308         * threadpool.c:
4309         * threadpool.h:
4310         * icall.c:
4311         * socket-io.c: removed dead code for async IO.
4312
4313 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4314
4315         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
4316
4317         * threadpool.c: intercept socket async. calls and pass them to a thread
4318         that is polling and dispatching the job items to the threadpool as
4319         socket become ready. Fixes bugs #71217, #71933.
4320
4321         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
4322         between char and short/ushort arrays.
4323
4324         * socket-io.c: remove dead code.
4325
4326 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
4327
4328         * locales.c,
4329           icall.c : removed InternalToUpper_Comp() and
4330           InternalToLower_Comp().
4331
4332 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
4333
4334         * char-conversions.h : The tables were incorrectly generated. Should
4335           be generated against invariant culture.
4336
4337 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
4338
4339         * object.c (mono_runtime_invoke_array): Fix return value when 
4340         passing pre-created valuetype objects to ctors.
4341
4342         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
4343         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
4344         Fixes #74338.
4345
4346 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
4347
4348         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
4349         only used with --security and hides the wrong corlib version error.
4350
4351 2005-03-30  Joshua Tauberer  <tauberer@for.net>
4352
4353         * class.c: Changed mono_class_name_from_token so that types
4354         outside of a namespace don't have an initial period.  Improved
4355         the g_warning message used in _mono_class_get when loading
4356         fails.
4357         * assembly.c: In mono_assembly_load_reference, when an assembly
4358         can't be found, "No such file or directory" is misleading and
4359         unhelpful because a few paths were checked for the presence of
4360         the assembly.  When that happens (ENOENT), display a nicer
4361         message indicating the directories that were searched.  In all
4362         cases, the warning is made easier to read for non-hackers.
4363
4364 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
4365
4366         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
4367         project/solution.
4368         * appdomain.h|domain.c: Removed inline from functions.
4369         * appdomain.c: Reduced warnings when compiling on windows.
4370         * icall.c: Fixed output_debug declaration to gunichar2*.
4371         * mono-config.c: Reduced warnings when compiling on windows.
4372         * rand.c: Added missing "windows.h". Added missing return value.
4373         * rawbuffer.c: Added missing winsock2.h for windows.
4374         * sysmath.h: Added mono-compiler.h header to allow/ease 
4375         compilation with non-GCC compilers.
4376         * threads.c: Fixed declarations to compile with VS.NET C compiler.
4377         Removed cast warnings.
4378
4379         Adapted from the work of J Lothian (for VC6).
4380
4381 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
4382
4383         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
4384         from default_path.
4385
4386 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
4387
4388         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
4389         the 2.0 profile.
4390
4391 2005-03-27  Raja R Harinath  <harinath@gmail.com>
4392
4393         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
4394         has to be in $(exec_prefix).  $(prefix) is for arch-independent
4395         stuff, and it would probably use $(prefix)/share rather than
4396         $(prefix)/lib.
4397
4398 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4399
4400         * console-io.c: added 2 includes that might be missing.
4401
4402 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
4403
4404         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
4405         profile.
4406
4407         * reflection.c (create_custom_attr): Allocate the params array using
4408         alloca so it gets GC tracking.
4409
4410 2005-03-23  Chris Toshok  <toshok@ximian.com>
4411
4412         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
4413         out some spew.
4414
4415 2005-03-24  Raja R Harinath  <rharinath@novell.com>
4416
4417         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
4418         changes to pick up any changes in prefix, etc.
4419
4420 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
4421
4422         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
4423         
4424         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
4425         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
4426
4427 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
4428
4429         * class-internals.h object-internals.h class.c reflection.c: Extend the
4430         mono_lookup_dynamic_token () function to return the class of the
4431         token as well. 
4432
4433         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
4434         well. Fixes #73848.
4435
4436 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
4437
4438         * security-manager.c: Skip inheritance checks for intra-corlib
4439         class inheritance and method overrides. This skips a lot of checks
4440         and (anyway) permissions cannot work until corlib is loaded.
4441
4442 2005-03-23  Martin Baulig  <martin@ximian.com>
4443
4444         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
4445         MONO_TYPE_GENERICINST.  
4446
4447 2005-03-23  Martin Baulig  <martin@ximian.com>
4448
4449         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
4450
4451 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4452
4453         * class.c: added locking comments to some functions.
4454         Cache the interface offsets arrays (saves about 20 KB
4455         of runtime memory in a typical app).
4456         Reduce the time overhead in mono_class_setup_supertypes ().
4457
4458 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
4459
4460         * icall.c: speedup and fix leaks in GetMethodsByName and
4461         GetPropertiesByName.
4462
4463 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4464
4465         * reflection.c: some locking fixes.
4466
4467 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
4468
4469         * metadata.c: added missing break in case statement.
4470
4471 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
4472
4473         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
4474         typedbyref return values. Fixes #73941.
4475
4476 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
4477
4478         * security-manager.c|h: Added demandunmanaged method and 
4479         suppressunmanagedcodesecurity class to MonoSecurityManager.
4480         Renamed aptc class to allowpartiallytrustedcallers.
4481
4482 2005-03-17  Martin Baulig  <martin@ximian.com>
4483
4484         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
4485
4486 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4487
4488         * file-io.c: disabled file async. IO using aio_*. It uses the
4489         threadpool now. Workaround for bug #73718.
4490
4491 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4492
4493         * assembly.h, mono-config.c: added code to deal with bundled configs
4494         for bundled assemblies.
4495
4496 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
4497
4498         * *.c, private.h: cleanup, removing old private.h header file.
4499
4500 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
4501
4502         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
4503         and throw_on_unmappable_char attributes.
4504
4505 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
4506
4507         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
4508         _ProcessName_internal.
4509
4510 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
4511
4512         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
4513         #73631.
4514
4515         * icall.c threads.c threads-types.h: Remove slothash icalls as they
4516         are no longer used.
4517
4518 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
4519
4520         * object.c (compute_class_bitmap): Add support for generics. Fixes
4521         #73527.
4522
4523 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
4524
4525         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
4526
4527 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4528
4529         * filewatcher.c: commented out the code for windows watcher, as we don't
4530         use it (we use the managed implementation instead).
4531
4532 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
4533
4534         * object-internals.h (MonoThread): Remove 'unused1' field.
4535
4536         * appdomain.c: Bump corlib version.
4537
4538         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
4539
4540         * reflection.c (mono_reflection_create_runtime_class): Remove the
4541         AssemblyBuilder.Save optimization since it causes too many problems.
4542
4543 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
4544
4545         * exception.c|h: Added mono_get_exception_reflection_type_load to
4546         create a ReflectionTypeLoadException object.
4547         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
4548         to return NULL is a InheritanceDemand fails during reflection. Updated
4549         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
4550         ReflectionTypeLoadException if an InheritanceDemand fails during 
4551         reflection. Added icall mapping for GetLinkDemandSecurity.
4552         * security-manager.c|h: Added ves_icall_System_Security_
4553         SecurityManager_GetLinkDemandSecurity internal call to return the
4554         class and methods permissions set for a LinkDemand. Removed unused
4555         fields in MonoSecurityManager.
4556
4557 2005-03-10  Martin Baulig  <martin@ximian.com>
4558
4559         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
4560         it's a generic instance.
4561
4562 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
4563
4564         * reflection.c (mono_get_object_from_blob): Applied patch from
4565         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
4566
4567         * class.c (mono_class_is_assignable_from): Another try at fixing 
4568         #73469 without breaking anything.
4569
4570 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
4571
4572         * class.c: (mono_class_is_assignable_from): Revert the last changes
4573         since they don't work with generics.
4574         
4575         * class.c (mono_class_is_assignable_from): Fix build bustage.
4576
4577         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
4578         the managed IsAssignableFrom method. Fixes #73469.
4579
4580         * reflection.c (mono_reflection_call_is_assignable_from): New helper
4581         function.
4582
4583 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
4584
4585         * object.c (mono_load_remote_field_new): Fix returning uninitialized
4586         memory when the remoting callback does not sets the out arguments.
4587         Fixes #73007.
4588
4589         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
4590         by mistake.
4591
4592         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
4593
4594         * object-internals.h (MonoStackFrame): Sync with managed object layout.
4595
4596         * appdomain.c: Bump corlib version.
4597
4598 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
4599
4600         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
4601         function.
4602
4603         * threads.c (mono_thread_attach): Detect threads which are not started
4604         by the GC pthread wrappers.
4605
4606 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
4607
4608         * icall.c: Added new icall for RNG.
4609         * rand.c|h: Added new icall to open the RNG. This allows to share a 
4610         single handle on Linux to access /dev/urandom and fix #73183.
4611
4612 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
4613
4614         * object.c: setting the new vtable in a transparent proxy object must
4615         not change the GC descriptor.
4616
4617 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4618
4619         * object.c: fixed compilation without GCJ support.
4620         * reflection.c: for runtime-created types ensure klass->has_references
4621         is correct (bug #73215).
4622
4623 2005-03-02  Martin Baulig  <martin@ximian.com>
4624
4625         * class.c (mono_class_is_assignable_from): Make this work if
4626         `oklass' is a generic instance; fixes #72831.
4627
4628 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
4629
4630         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
4631         with hasthis set.
4632         
4633         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
4634
4635         * marshal.c: Reorganize native->managed marshalling code to also use
4636         the emit_marshal_... functions.
4637
4638 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
4639
4640         * object.c: typed allocs have issues with bitmap sizes > 30,
4641         so check for max_set >= 30.
4642
4643 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
4644
4645         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
4646         managed code. Fixes #73012.
4647
4648         * metadata.h (MonoMarshalSpec): Add elem_mult field.
4649
4650         * metadata.c reflection.c: Load/Emit elem_mult as well.
4651         
4652         * metadata.h (MonoMarshalSpec): Add comment.
4653
4654         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
4655
4656         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
4657         num_elem to -1 if not given.
4658
4659         * object-internals.h (MonoReflectionMarshal): Add has_size field.
4660
4661         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
4662         given values.
4663
4664 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
4665
4666         * null-gc.c (mono_gc_free_fixed): Was not compilable.
4667
4668 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
4669
4670         * reflection.c (encode_marshal_blob): Encode param_num field as well.
4671
4672         * object-internals.h (MonoReflectionMarshal): Add param_num field.
4673
4674 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
4675
4676         * object.c: generalized the reference bitmap creation
4677         and added hooks for the new GC.
4678         * class-internals.c: removed the gc_bitmap field from MonoClass.
4679
4680 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4681
4682         * domain.c: help the compiler to produce better code
4683         in mono_jit_info_table_find ().
4684
4685 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
4686
4687         * object.c: make all allocations look typed.
4688
4689 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4690
4691         * socket-io.c: load Mono.Posix if it's not loaded already
4692         (fixes bug#73033).
4693
4694 2005-02-24  Martin Baulig  <martin@ximian.com>
4695
4696         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
4697         * reflection.c (dup_type): Likewise.
4698
4699 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
4700
4701         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
4702         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
4703
4704 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4705
4706         * domain.c, threads.c, object-internals.h: make the critical thread
4707         local vars use the fast access mode (even when we're compiled in
4708         a lib). Provide accessors to be used by the jit during codegen.
4709
4710 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4711
4712         * appdomain.c: Changed hook functios behavior to include
4713         support for the reflection only assemblies. Some icalls were changed
4714         to support the mentioned assemblies too. Signatures of static methods
4715         try_assembly_resolve and real_load now have an additional parameter:
4716         refonly.
4717
4718         * assembly.c: General changes to mono_assembly_ methods to support
4719         reflection only api. Functions mono_assembly_open, mono_assembly_load,
4720         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
4721         suffix, to support an additional gbool parameter to specify whether
4722         the assembli is reflection only or not. Created some new hook functions 
4723         to add support for reflection only assemblies. Signatures of static 
4724         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
4725         have now an additional parameter: refonly.
4726
4727         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
4728         indicating whether the assembly is reflection only or not.
4729
4730         * exception.c: Add mono_get_exception_invalid_operation.
4731
4732         * icall.c: Throw an InvalidOperationException when trying to invoke
4733         a property/method/event, or trying to set/get the value of a field.
4734         Also add an icall to retrieve the ref_only flag to the
4735         MonoReflectionAssembly.
4736
4737 2005-02-23  Chris Toshok  <toshok@ximian.com>
4738
4739         Part of fix for #72827.
4740         * mono-debug.c (mono_debug_add_method): add lexical block data to
4741         the info we write.  Kind of a hack at the moment - we copy the
4742         lexical block info from the MonoDebugMethodInfo to the
4743         MonoDebugMethodJitInfo here, before writing it.
4744         (mono_debug_read_method): read the lexical block info.
4745
4746         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
4747
4748         * debug-mono-symfile.h: add lexical block support.
4749
4750         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
4751         support.
4752
4753 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
4754
4755         * loader.c (mono_lookup_pinvoke_call): Fix warning.
4756
4757         * object.c (mono_runtime_free_method): Call mono_free_method () and
4758         put the TODOs there.
4759
4760         * loader.c (mono_free_method): Free up most memory allocated for 
4761         dynamic methods.
4762
4763 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
4764
4765         * reflection.c: properly flag a Type argument to a
4766         named custom attr value (bug #72248).
4767
4768 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4769
4770         * reflection.c: reduce code duplication in named custom
4771         attribute encoding.
4772
4773 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
4774
4775         * reflection.c: properly encode custom attrs of type object
4776         (bug #72649).
4777
4778 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
4779
4780         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
4781
4782 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
4783
4784         * socket-io.c: load System.dll if it's not loaded already
4785         (bug #72850 and #70477).
4786
4787 2005-02-21  Martin Baulig  <martin@ximian.com>
4788
4789         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
4790         generic instances.
4791
4792 2005-02-21  Martin Baulig  <martin@ximian.com>
4793
4794         * reflection.c (mono_image_build_metadata): We also need to
4795         "fixup" the MethodImpl table after we computed the final method
4796         indices.  Call fixup_methodimpl() to do that.
4797         (fixup_methodimpl): New private method.
4798
4799 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
4800
4801         * assembly.c: special case mscorlib.dll (bug#72536),
4802         patch from Carlos Alberto Cortez.
4803
4804 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
4805
4806         * threads-types.h threads.c: Fix build bustage.
4807
4808         * threads.c: Use a union for long<->double conversions.
4809
4810         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
4811         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
4812
4813         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
4814         containing the checkpoint call with NOT_TAKEN.
4815         
4816         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
4817         checkpoint before pushing the arguments, so they won't have to be
4818         spilled to stack.
4819
4820 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4821
4822         * domain.c, assembly.c, domain-internals.h: make some data
4823         const and relocation-free.
4824
4825 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
4826
4827         * object.c, appdomain.c, class-internals.h: introduce the
4828         MonoClassRuntimeInfo structure to hold the info needed to
4829         use a class at runtime. Made mono_class_vtable() lock-free
4830         for all the appdomains.
4831
4832 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
4833
4834         * metadata-internals.h, image.c: introduce a per-image mempool to
4835         be used for memory that has the same lifetime as the image.
4836
4837 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
4838
4839         * domain.c: In mono_init_internal(), instead of selecting the first
4840         runtime version supported by an executable, get a list of all
4841         supported versions and select the one for which an mscorlib exists
4842         (since even if the runtime supports a given version, it doesn't mean
4843         that the framework for that version is installed).
4844         Modified get_runtimes_from_exe to support this behavior.
4845         In supported_runtimes, added information about additional system
4846         assembly versions.
4847         
4848         * assembly.c: Added support for more than one system assembly version
4849         per runtime version. Updated the assembly list.
4850         In mono_assembly_remap_version, removed the initial version check,
4851         since we don't know to which version we need to compare until we
4852         get the version set on which the assembly is based.
4853         Moved the code for loading corlib into the new method
4854         mono_assembly_load_corlib(), so it can be used by the initialization
4855         code.
4856         
4857         * domain-internals.h: Updated data structures and added declaration
4858         for mono_assembly_load_corlib.
4859
4860 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
4861
4862         * reflection.c (resolve_object): Fix the creation of the signature in 
4863         the SignatureHelper case.
4864
4865         * assembly.c (mono_assembly_remap_version): Fix binary search.
4866         
4867 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
4868  
4869         * class.c: Added inheritance check when a method is overloaded (from a
4870         virtual method or when implementing an interface) and when a class is
4871         inherited. Added functions to set a failure for a class and to 
4872         retreive the exception from a failure.
4873         * class-internals.h: Added fields to MonoClass to keep the exception
4874         information status for inheritance (or other exceptions) to be thrown
4875         later (i.e. not at load time).
4876         * object.c: Throw the inheritance SecurityException when a type is to 
4877         be created with either class or method inheritance violations.
4878         * reflection.c|h: Fix when getting declsec from a class. Removed 
4879         unrequired code for class. Improved sanity in parameter naming.
4880         * security-manager.c|h: Added functions to check for class and method
4881         inheritance.
4882
4883 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
4884
4885         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
4886         and has_finalize in dynamic types as well.
4887
4888 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
4889
4890         * culture-info-table.h : fixed currency format for en-GB (and so on).
4891
4892 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
4893
4894         * gc.c: ensure the GC handles never have 0 as a value.
4895
4896 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
4897
4898         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
4899         a pointer to a struct to unmanaged code. Fixes #72625.
4900
4901 2005-02-16  Martin Baulig  <martin@ximian.com>
4902
4903         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
4904
4905 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
4906
4907         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
4908
4909 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
4910
4911         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
4912
4913         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
4914         UnmanagedFunctionPointerAttribute, use it for determining calling convention
4915         etc. Fixes #71471.
4916
4917         * reflection.c (mono_custom_attrs_get_attr): New helper function.
4918
4919         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
4920
4921 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
4922
4923         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
4924         changes to make the current context a field in MonoThread.
4925
4926 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
4927
4928         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
4929         the last change.
4930         
4931         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
4932         extracted from mono_marshal_get_native_wrapper.
4933
4934         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
4935         to create wrappers around native functions.
4936
4937         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
4938         delegates for arbitrary function pointers. Fixes #71472.
4939
4940 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
4941
4942         * threads.c: cleaned up the code a little.
4943
4944 2005-02-15  Martin Baulig  <martin@ximian.com>
4945
4946         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
4947         the data table.
4948
4949         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
4950         allocate larger chunks if needed.
4951
4952 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
4953
4954         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
4955         in by mistake.
4956
4957 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
4958
4959         * domain.c: keep the domains in an array and ensure the domain ids
4960         are kept small, so they can be used as indexes to domain-specific data
4961         with a small memory overhead.
4962
4963 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
4964
4965         * icall.c: Handle byref types in Type icalls. Fixes #72544.
4966
4967 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
4968
4969         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
4970
4971 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
4972
4973         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
4974
4975         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
4976         values.
4977
4978         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
4979         
4980 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
4981
4982         * domain-internals.h: add the hashtable here.
4983
4984         * class-internals.h: Remove `info' from MonoMethod
4985
4986         * domain.c: Add a new hashtable, jit_trampoline_hash
4987
4988 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
4989
4990         * object.c: don't set the value of static fields
4991         (fixes bug#72494).
4992
4993 2005-02-11  Martin Baulig  <martin@ximian.com>
4994
4995         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
4996         (mono_debug_add_method): Silently ignore the method if it's too big.
4997         (mono_debug_add_type): Likewise.
4998
4999 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
5000
5001         * threads.c, appdomain.c: remove #ifdefs from the code.
5002
5003 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
5004
5005         * metadata-internals.h: Added flags to MonoAssembly to cache the most
5006         common security informations. This allows us to stay in unmanaged code
5007         when doing LinkDemand and it's special cases (except for the first 
5008         time for initialization). The flags a very much used with --security.
5009         * reflection.c|h: Added code to get declarative security attributes 
5010         for LinkDemand and InheritanceDemand. This required to refactor the
5011         existing code for Demand.
5012         * security-manager.c|h: Added new method fields for the special cases
5013         of LinkDemand.
5014
5015 2005-02-10  Martin Baulig  <martin@ximian.com>
5016
5017         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
5018         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
5019
5020 2005-02-10  Martin Baulig  <martin@ximian.com>
5021
5022         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
5023         debugging code; this is almost a complete rewrite.
5024
5025         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
5026
5027 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5028
5029         * domain.c, object.h: expose mono_string_equal () and 
5030         mono_string_hash ().
5031         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
5032         it's implemented in managed code.
5033
5034 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5035
5036         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
5037         lo leak objects between appdomains.
5038
5039 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5040
5041         * assembly.c: old compilers compilation fix from 
5042         robertj@gmx.net (Robert Jordan).
5043
5044 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
5045
5046         * class-internals.h: Little reminder for the future.
5047
5048         * debug-helpers.c: Fix up wrapper_type_names
5049
5050 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5051
5052         * image.c, metadata-internals.h: when loading an image from a file,
5053         mmap all of it and use the same codepaths as when using a
5054         in-memory image: the code is simpler and we use less memory
5055         (both writable and readonly).
5056
5057 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5058
5059         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
5060         API to alloc runtime data structures that need to be tracked by the
5061         GC and contain pointers.
5062         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
5063         make the code more readable and eventually use a different GC.
5064
5065 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
5066
5067         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
5068         for out arguments.
5069         
5070 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
5071
5072         * object.c: In release_type_locks(), don't release the cctor lock
5073         if it has already been released. This fixes a crash in the
5074         thread5 test.
5075
5076 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5077
5078         * gc.c, marshal.c, icall.c: register a delegate for finalization
5079         only when the native function pointer has been allocated for it.
5080
5081 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5082
5083         * object.c: cleaned up some code, allocate objects that are
5084         pointer free with the atomic malloc variant. Allocate memory
5085         for static data from the mempool if it's pointer-free.
5086         Allocate the bounds array at the end of the array data, when needed.
5087         * object-internals.h, object.h: move a private function in a private
5088         header.
5089         * class.c: handle missing case in tracking references in fields.
5090
5091 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5092
5093         * class.c, class-internals.h: keep track if a type has
5094         reference fields in either the instance or static fields.
5095
5096 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
5097
5098         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
5099         and renamed to MonoRuntimeInfo. Added fields to store the expected
5100         framework assembly version. Changed mono_get_framework_version and
5101         mono_get_runtime_version for a single mono_get_runtime_info method.
5102         
5103         * assembly.c: Added method to remap system assembly versions to the
5104         current executing runtime version. Removed old mapping code.
5105         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
5106         
5107         * icall.c, reflection.c: Track api changes.
5108
5109 2005-02-06  Miguel de Icaza  <miguel@novell.com>
5110
5111         * loader.c (method_from_memberref): Improve error reporting,
5112         produce the class name instead of the typeref/typedef index. 
5113
5114 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
5115
5116         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
5117
5118 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5119
5120         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
5121         stdcall and charset name mangling.  Reorganize the code and add
5122         some tracing stuff.
5123
5124 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
5125
5126         * monodiet.c: More iters!
5127
5128         * marshal.c: Iter usage.
5129
5130         * icall.c: Iter usage.
5131
5132         * object.c: Use iters.
5133
5134         * debug-helpers.c: More iters
5135
5136 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5137
5138         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
5139         under win32.
5140
5141 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
5142
5143         * mono-debug-debugger.c: use iters
5144
5145         * class.c, class-internals.h: mono_class_setup_events is static
5146         now
5147
5148         * All callers: use iters
5149
5150 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5151
5152         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
5153         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
5154
5155 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
5156
5157         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
5158
5159         * marshal.h: Add prototypes for ldfld/stfld_remote.
5160
5161         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
5162         this is called during startup.
5163         
5164 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
5165
5166         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
5167         MonoThreadsSync struct private in monitor.c. Changed the way
5168         MonoThreadsSync is allocated so it's faster and there is no
5169         need to keep track of it with a finalizer and it uses less memory.
5170         This also finally allows us to allocate mono objects as ptrfree when
5171         there are no reference fields.
5172
5173 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
5174
5175         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
5176         disappearing link to the GC interface and use them to simplify
5177         the gchandles code.
5178
5179 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
5180
5181         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
5182         stfld_remote which call mono_load/store_field_new. This allows methods
5183         calling ldfld/stfld wrappers to be AOTed.
5184
5185         * console-io.c: Include sys/filio.h under solaris.
5186         
5187         * console-io.c: Include curses.h if needed correctly.
5188
5189 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
5190         
5191         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
5192         method->klass as well.
5193
5194         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
5195
5196         * class.c (mono_class_init): Switch on lazy initialization of 
5197         methods.
5198
5199         * class.c (mono_class_get_finalizer): Handle the case when the 
5200         finalizer is inherited.
5201
5202 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5203
5204         * console-io.c: <curses.h> is needed by term.h on solaris.
5205
5206 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
5207
5208         * icall.c, class-internals.h, monodiet.c, class.c: Remove
5209         mono_class_setup_properties where possible. Remove this ftn from
5210         the header file, and make it static.
5211
5212 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
5213
5214         * loader.c: Add missing setup_... call.
5215
5216         * class.c: Add missing setup_... calls.
5217
5218         * class.c (mono_class_init): Switch on lazy initialization of 
5219         the generic vtable.
5220         
5221         * class.c (mono_class_init): Fix generics broken by the recent changes.
5222
5223         * monodiet.c (handle_type): Add missing setup_... calls.
5224
5225         * class.c: Back out garbage in previous patch.
5226         
5227         * class.c: Add missing setup_... calls.
5228
5229         * class.c (mono_class_get_method_from_name_flags): Avoid calling
5230         mono_class_setup_methods () if possible.
5231
5232         * class-internals.h (MonoClass): Add 'has_cctor' flag.
5233
5234         * class-internals.h (MonoCachedClassInfo): New structure.
5235
5236         * class.c: Initialize properties and events fields of MonoClass lazily.
5237
5238         * class.c: Add infrastructure for lazily initializing the methods and
5239         vtable fields of MonoClass. Not yet used.
5240
5241         * class.c (mono_class_get_finalizer): New helper function.
5242
5243         * class.c: Add infrastructure for loading some class related data from
5244         an AOT file.
5245
5246         * object.c: Add infrastructure for initializing the vtable from data
5247         in the AOT file.
5248
5249         * gc.c (run_finalize): Use mono_class_get_finalizer ().
5250
5251         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
5252         appropriate initialization function before accessing parts of the
5253         MonoClass structure.
5254
5255         * marshal.c: Fix warnings.
5256         
5257         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
5258
5259         * mono-debug-debugger.c (get_exception_message): Use 
5260         mono_class_get_method_from_name_flags ().
5261
5262 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
5263
5264         * reflection.c, appdomain.c: Replace a few manual searches that
5265         Zoltan missed. (Paolo approved this part of my initial patch).
5266
5267 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
5268
5269         * profiler.c: disable recording statistical events at report time.
5270
5271 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5272
5273         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
5274         to byteswap arrays of enum values, too (bug #72080).
5275
5276 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
5277
5278         * appdomain.c (set_domain_search_path): Allow this to be called if
5279         domain->setup is not yet set.
5280
5281         * loader.c (mono_method_get_index): New helper function.
5282
5283         * loader.c reflection.c: Use mono_method_get_index ().
5284
5285         * class.c (mono_class_get_method_from_name_flags): New helper method.
5286
5287         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
5288         this.
5289
5290         * class.c (mono_class_get_cctor): New helper method.
5291
5292         * string-icalls.c object.c class.c marshal.c reflection.c: Use
5293         mono_class_get_method () to look up methods.
5294
5295 2005-02-01  Miguel de Icaza  <miguel@novell.com>
5296
5297         * console-io.c: Fix the build, this should work on Windows.
5298
5299 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
5300
5301         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
5302         be set to null to keep things valid
5303
5304 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5305
5306         * icall.c: added Console 2.0 icalls.
5307         * Makefile.am: added console-io.[ch]
5308         * console-io.[ch]: internal calls for Console 2.0 API.
5309
5310 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5311
5312         * class.c: make sure we consider all the interfaces
5313         when calculating max_interface_id (bug found by
5314         Jeroen Frijters running ikvm).
5315
5316 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
5317
5318         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
5319         valuetype fields to null.
5320
5321         * object.c (set_value): Ditto. Fixes #71669.    
5322
5323 2005-01-31  Martin Baulig  <martin@ximian.com>
5324
5325         * metadata.c (mono_metadata_has_generic_params): New public
5326         function; checks whether something is a generic method.
5327
5328 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
5329
5330         * appdomain.c: fix infinite recursion when adding assemblies.
5331
5332 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
5333
5334         * object.c: Fix small typo to return all items for Environment.
5335         GetCommandLineArgs.
5336
5337 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5338
5339         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
5340         reflection.c: more domain and assembly-unload related fixes
5341         and memory leaks plugs.
5342
5343 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
5344
5345         * class.c loader.c security.c loader.h process.c threads.c mono-debug-debugger.c profiler.c marshal.c rand.cpedump.c: Fix 64 bit warnings.
5346
5347 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
5348
5349         * loader.c (mono_method_signature): Make this method lazy
5350         (mono_get_method_from_token): Don't computate the signature here.
5351
5352         Doing this saves quite a bit of memory. I got 90 kb on starting up
5353         monodoc. It should also save some disk reads on startup.
5354
5355         * *: MonoMethod->signature might be NULL now. You *MUST* use
5356         mono_method_signature.
5357
5358 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
5359
5360         * object.c (mono_runtime_get_main_args): Return an array from the
5361         current domain here. Fixes #71938.
5362
5363 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
5364
5365         * monitor.c: formatting changes to comply with the
5366         mono coding style and remove #ifdefs from the code.
5367
5368 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5369
5370         * metadata.c, private.h: remove some unneeded data
5371         and use a more compact representation for table schemas.
5372
5373 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
5374
5375         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
5376         to get a better distribution in hash tables.
5377         * *.c: use mono_aligned_addr_hash() where appropriate.
5378         * assembly.c: make var static.
5379
5380 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
5381
5382         * domain-internals.h: Put MonoJitInfo on a diet.
5383
5384         * domain.c: Fix a warning.
5385
5386 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5387
5388         * gc.c: rework the gc handles code to reuse handles
5389         when freed.
5390
5391 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5392
5393         * domain.c: fixed long standing bug in mono_string_equal() which
5394         was brought to light with the ldstr changes.
5395
5396 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
5397
5398         * reflection.c: Remove warning by adding missing include for marshal.h
5399
5400 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5401
5402         * domain.c, object.c: change the ldstr_table to hold
5403         MonoString* as keys: makes the runtime isinterned lookup
5404         faster and simplifies memory management.
5405
5406 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
5407  
5408         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
5409         possible to add imperative security checks before calling the icall.
5410         * reflection.c: Return security attributes on the original MonoMethod
5411         (and not the wrapped one). This fix permissions on icalls.
5412
5413 2005-01-25  Dick Porter  <dick@ximian.com>
5414
5415         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
5416         the check for mktime() support actually test the mktime() return
5417         value.  "Fixes" bug 71682, though the output is still different to
5418         MS.
5419
5420 2005-01-25  Martin Baulig  <martin@ximian.com>
5421
5422         * class.c (mono_class_is_assignable_from): Make this work for
5423         generic instances.
5424
5425 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
5426
5427         * marshal.c (mono_string_utf8_to_builder)
5428         (mono_string_builder_to_utf16): We might not have ownership of the
5429         string. In thise case, we need to create a new buffer.
5430
5431         * object-internals.h (mono_stringbuilder_capacity): sb->str might
5432         be null, in which case, use the default capacity.
5433
5434 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5435
5436         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
5437         GC events to the profiler.
5438
5439 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5440
5441         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
5442         if you don't want the GC to run.
5443
5444 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
5445
5446         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
5447         start providing a GC API and keeping different implementations in
5448         their own file.
5449         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
5450
5451 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
5452
5453         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
5454         mmap rather than allocating a huge buffer.
5455         (mono_debug_close_mono_symbol_file): Free the buffer allocated
5456         above.
5457
5458 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
5459
5460         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
5461         and CheckExecutionRights.
5462         * reflection.c|h: Keep the index of the declarative security to be 
5463         used, instead of the pointer, when AOT compiler is used. Also add 
5464         class initialization when requesting demands.
5465         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
5466         CheckExecutionRights. Both properties are now FALSE by default, and
5467         unmodifiable, unless the --security option is used.
5468
5469 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5470
5471         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
5472         reflection.c: properly refcount images and assemblies, many leaks fixed.
5473
5474 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5475
5476         * threadpool.c: increase the timeout for threads in the thread pool to
5477         10s.  Fixes bug #67159.
5478
5479 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
5480
5481         * class-internals.h: Sun's compiler insists on explicit
5482         signed on bit fields to handle then correctly.
5483
5484 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
5485
5486         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
5487         Make the size of the array fit only the number of invalid path
5488         chars that we have.
5489
5490         * class.c (_mono_class_get): Improve the error reporting when a
5491         class referenced is not found, to assist debugging. 
5492
5493 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
5494
5495         * threads.c: fix off-by-one error.
5496         * domain.c: free data allocated in the domain.
5497
5498 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
5499
5500         * reflection.c (mono_method_body_get_object): Fill out exception info
5501         as well.
5502
5503         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
5504         structure.
5505         
5506 2005-01-19  Martin Baulig  <martin@ximian.com>
5507
5508         * loader.c (mono_get_method_constrained): Make this work again.
5509
5510 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
5511
5512         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
5513         guint16 to match the managed side.
5514
5515         * reflection.c (mono_reflection_body_get_object): Fill out local
5516         variables array.
5517
5518         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
5519         as well.
5520
5521         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
5522         'local_var_sig_token'.
5523
5524 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
5525
5526         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
5527         System.Drawing.
5528
5529         * reflection.c (mono_method_body_get_object): Handle abstract and
5530         runtime methods.
5531
5532 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
5533
5534         * marshal.c, loader.c, class-internals.h, reflection.c:
5535         store the emthod data for a wrapper in an array instead of a list.
5536
5537 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
5538
5539         * marshal.c: change the code to allocate memory more
5540         conservatively for method wrappers.
5541
5542 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
5543
5544         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
5545         fields from MonoClass to the marshal info structure where they belong.
5546
5547 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5548
5549         * class.c, object.c, class-internals.h, marshal.c: rearrange
5550         some fields and tweak some types to lower memory usage.
5551
5552 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
5553
5554         * threads.c (signal_thread_state_change): Handle the case when the
5555         target thread is the current thread.
5556
5557         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
5558
5559         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
5560         emit_ptr_to_object_conv. 
5561
5562         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
5563         marshalling. Fixes #71352.
5564
5565 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
5566
5567         * metadata.h, blob.h: move table enum to blob.h so it can be included
5568         in any header.
5569         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
5570         cut the size of MonoImage/MonoDynamicImage.
5571
5572 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
5573
5574         * profiler.c (mono_profiler_install_simple): Fix default arguments.
5575
5576 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
5577
5578         * reflection.c, reflection.h, icall.c: add a function to check
5579         if an attribute type is defined for a metadata object.
5580
5581 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
5582
5583         * object-internals.h: Added some needed fields from StringBuilder class.
5584         * marshal.c: Set the maxCapacity when creating a StringBuilder.
5585
5586 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
5587
5588         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
5589         threads before shutting down the runtime.
5590
5591         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
5592
5593 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5594
5595         * object-internal.h, threads.c: implement stacksize and 
5596         parameterized thread start functionality (requires
5597         matching corlib). Marked broken code for later removal.
5598
5599 2005-01-12  Martin Baulig  <martin@ximian.com>
5600
5601         * class-internals.h (MonoGenericClass): Moved the `initialized'
5602         flag to MonoDynamicGenericClass, removed `init_pending'.
5603         (MonoGenericInst): Added `is_reference' flag.
5604
5605 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
5606
5607         * reflection.c (mono_image_create_pefile): Only set the pe_offset
5608         inside the MSDOS header. Fixes #71201.
5609
5610         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
5611         gc thread.
5612         (mono_domain_finalize): Ditto.
5613
5614 2005-01-12  Martin Baulig  <martin@ximian.com>
5615
5616         * class.c (mono_get_shared_generic_class): Use the cache for
5617         non-dynamic generic classes.
5618
5619         * class-internals.h (mono_class_create_generic_2): Removed
5620         function prototype, this function is now static inside class.c.
5621
5622         * class.c (mono_class_create_generic_2): Made this static, only
5623         call it from mono_class_init() and mono_class_setup_parent().
5624         (collect_implemented_interfaces_aux): Call mono_class_init() on
5625         the interfaces we collect.
5626         (mono_class_setup_vtable): Call mono_class_init (class->parent).
5627
5628 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
5629
5630         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
5631         it a real thread handle.
5632
5633         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
5634         MonoJitExceptionInfo, since each catch clause needs its own variable.
5635         
5636 2005-01-11  Dick Porter  <dick@ximian.com>
5637
5638         * image.c (mono_pe_file_open): New variant on mono_image_open()
5639         that does not set up the CLI metadata; used for FileVersionInfo so
5640         it can get the data for windows binaries too.
5641         
5642         * process.c (process_read_string_block): Don't read off the end of
5643         the StringTable block.
5644
5645         These both fix bug 70766.
5646
5647 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
5648
5649         * gc.c: set some fields to NULL at GC cleanup time.
5650         * threads.c: if we quit the main thread, call exit ().
5651
5652 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
5653
5654         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
5655
5656 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
5657
5658         * threads.h, threads.c, object.c: added accessor and settor for
5659         main_thread. Handle it specially when exiting from it: wait
5660         for other foreground threads to exit.
5661
5662 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
5663
5664         * process.c, verify.c: remove some bloat.
5665
5666 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
5667
5668         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
5669         the calling convention to cdecl under win32.
5670
5671 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
5672
5673         * object.c (mono_object_get_size): New function to get the size of
5674         an object instance.
5675
5676         * profiler.c (simple_allocation): Use above.
5677
5678 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
5679
5680         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
5681         ves_icall_System_AppDomain_getRootDomain (as it's not required to
5682         get an appdomain by it's id and we can't assume the root's id is 0).
5683         * domain-internals.h: Change the function prototype to match.
5684         * icall.c: Change the icall table for AppDomain.
5685
5686 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
5687
5688         * locales.c (string_invariant_compare_char): Only compute
5689         GUnicodeTypes in the case where we need them.  Test for ordinality
5690         first and return if so.
5691
5692         From the commit:
5693
5694                 /*
5695                  * FIXME: here we must use the information from c1type and c2type
5696                  * to find out the proper collation, even on the InvariantCulture, the
5697                  * sorting is not done by computing the unicode values, but their
5698                  * actual sort order.
5699                  */
5700
5701 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5702
5703         * loader.c: for P/Invoke methods, allow the "Internal" shared
5704         library name to refer to the calling process symbol namespace.
5705
5706 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
5707
5708         * Makefile.am: Add the security manager to the build.
5709         * security-manager.c|h: New. Initialization of the security manager.
5710
5711 2005-01-07  Dick Porter  <dick@ximian.com>
5712
5713         * threads.c: 
5714         * monitor.c: Update thread state during Monitor and WaitHandle
5715         waits.  Fixes bug 71031.
5716
5717 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
5718
5719         * reflection.c (property_encode_signature): Correctly handle when the
5720         property has no methods.
5721
5722 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
5723
5724         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
5725         
5726         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
5727         fields from mb, not rmb. Fixes #71017.
5728
5729         * marshal.c (emit_ptr_to_str_conv): Add support for 
5730         ByValTStr -> string conversion. Fixes #71015.
5731
5732         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
5733
5734         * mempool.c (mono_mempool_contains_addr): New helper function.
5735
5736 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
5737
5738         * metadata.c (mono_metadata_compute_size): Fix size calculation of
5739         HasSematics encoded fields.
5740         
5741         * metadata.c (mono_type_to_unmanaged): Improve error message for 
5742         invalid string marshalling.
5743
5744         * metadata.c: Fix warnings.
5745         
5746 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5747
5748         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
5749         profiler support.
5750
5751 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
5752
5753         * domain.c object.c domain-internals.h: Revert part of r38077 since the
5754         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
5755         tests.
5756
5757 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
5758
5759         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
5760         so methods containing these can be AOTed.
5761
5762 2005-01-03  Martin Baulig  <martin@ximian.com>
5763
5764         * loader.c (find_method): Removed the hack for generic instances.
5765         (method_from_memberref): If our parent is a generic instance, pass
5766         its generic type definition to find_method() and then inflate the
5767         method.
5768         (mono_get_method_constrained): Pass the generic type definition to
5769         find_method() and inflate the method later.
5770
5771         * class-internals.h (MonoStats): Added `generic_class_count'.
5772
5773         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
5774         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
5775
5776         * reflection.c (mono_custom_attrs_from_params): Don't ignore
5777         generic type definitions.
5778
5779 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
5780
5781         * loader.c icall.c: Fix warnings.
5782
5783 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
5784
5785         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
5786         blittable types. Fixes #70864.
5787
5788 2004-12-29  Martin Baulig  <martin@ximian.com>
5789
5790         * icall.c
5791         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
5792
5793         * reflection.c (mono_method_get_object): Create a
5794         "System.Reflection.MonoGenericMethod" for inflated methods; don't
5795         call mono_get_inflated_method().
5796
5797         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
5798
5799 2004-12-27  Martin Baulig  <martin@ximian.com>
5800
5801         * class-internals.h (MonoMethod): Added `is_inflated' flag.
5802         (MonoMethodInflated): Added `inflated' field.
5803
5804         * class.c (mono_class_inflate_generic_method): Don't really
5805         inflate the method here; just set the `is_inflated' flag in the
5806         MonoMethod.
5807         (mono_class_get_inflated_method): Actually inflate the method here
5808         if it's not already inflated; we use the MonoMethodInflated's new
5809         `inflated' field as a cache.
5810
5811 2004-12-26  Martin Baulig  <martin@ximian.com>
5812
5813         * class.c
5814         (inflate_generic_class): Moved some code out of inflate_generic_type().
5815         (mono_class_inflate_generic_method): If we're already inflated,
5816         inflate the context and use the declaring method; ie. make sure
5817         the declaring method of an inflated method is always the generic
5818         method definition.
5819         (mono_class_create_from_typedef): Create
5820         `class->generic_container->context->gclass'.
5821
5822 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
5823
5824         * metadata-internals.h, marshal.c, reflection.c: More
5825         MonoGHashTable->GHashTable.
5826
5827         * domain-internals.h, class.c: Change MonoGHashTable's into
5828         GHashTables for some cases where no gc stuff is used
5829
5830         All users: update apis
5831
5832 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
5833
5834         * metadata.c (builtin_types): Make this `const'. Makes this get
5835         put into the shareable section.
5836         (mono_metadata_init): Casts to make gcc happy.
5837
5838 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
5839
5840         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
5841
5842 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
5843
5844         * icall.c: Added an internal call to retrieve the position and length
5845         of assembly-level declarative security attributes (RequestMinimum, 
5846         RequestOptional and RequestRefuse). This is used by the Assembly class
5847         to re-create the corresponding permission sets.
5848
5849 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
5850
5851         * marshal.c: fix the stelemref wrapper to be type correct
5852         (and faster).
5853
5854 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
5855
5856         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
5857         to do key & 0x7fffffff. Hashtable already does this. It just
5858         results in longer code.
5859
5860 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
5861
5862         * appdomain.c: Bump corlib version.
5863         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
5864         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
5865         * reflection.c|h: Add functions to get declarative security infos
5866         (blob position and length) for assemblies, classes and methods.
5867
5868 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
5869
5870         * reflection.c: sort the constant table (bug #70693).
5871
5872 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
5873
5874         * object-internals.h, threads.c, domain.c: add accessors for
5875         the MonoThread and MonoDomain tls keys.
5876
5877 2004-12-18  Martin Baulig  <martin@ximian.com>
5878
5879         * class.c (inflate_generic_type): If we're inflating a generic
5880         instance, set `ngclass->context->container = context->container';
5881         ie. the container we inflated into.
5882
5883         * metadata.c (mono_metadata_parse_generic_param): Reflect above
5884         inflate_generic_type() changes.
5885
5886 2004-12-17  Martin Baulig  <martin@ximian.com>
5887
5888         * class-internals.h
5889         (MonoGenericClass): Replaced `MonoType *generic_type' with
5890         `MonoClass *generic_class'.  Removed `dynamic_info'; if
5891         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
5892         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
5893
5894 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
5895
5896         * exception.c (mono_exception_from_token): New helper function.
5897
5898 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
5899
5900         * assembly.c (mono_assembly_load_with_partial_name): Call 
5901         mono_assembly_loaded before invoking the preload hooks. Fixes
5902         #70564.
5903
5904         * object-internals.h (MonoThread): Change culture_info and 
5905         ui_culture_info into an array.
5906
5907         * threads.c: Cache culture info objects from more than one appdomain.
5908
5909         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
5910         current UI culture.
5911
5912 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
5913
5914         * threads.h threads.c appdomain.c: Clear the culture_info field of
5915         all threads during unloading if they point to an object in the dying
5916         appdomain.
5917
5918 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
5919
5920         * culture-info.h (TextInfoEntry): New struct
5921         * object-internals.h: sync with managed
5922         * locales.c: fill the `text_info_data' field
5923         * culture-info-tables.h: update
5924
5925 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
5926
5927         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
5928         collector.
5929
5930 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
5931
5932         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
5933         (ves_icall_ModuleBuilder_getMethodToken): Ditto
5934
5935 2004-12-12  Martin Baulig  <martin@ximian.com>
5936
5937         * mono-debug-debugger.c (write_type): If we're an enum and the
5938         builtin types have already been initialized, call mono_class_init().
5939
5940 2004-12-11  Martin Baulig  <martin@ximian.com>
5941
5942         * metadata.c (mono_metadata_load_generic_params): Added
5943         `MonoGenericContainer *parent_container' argument; automatically
5944         compute `container->is_method'; pass the correct owner to
5945         get_constraints().      
5946
5947         * reflection.c (compare_genericparam): Sort the GenericParam table
5948         according to increasing owners. 
5949
5950 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
5951
5952         * profiler.c: allow disabling the default profiler.
5953
5954 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
5955
5956         * decimal.c, icall.c: allow disabling System.Decimal support.
5957
5958 2004-12-09  Marek Safar <marek.safar@seznam.cz>
5959
5960         * reflection.c: Add support for null attribute arguments.
5961
5962 2004-12-09  Martin Baulig  <martin@ximian.com>
5963
5964         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
5965         names to get rid of compiler warnings.
5966
5967 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
5968
5969         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
5970         mono_marshal_load_type_info (). Fixes #69625.
5971         (mono_marshal_get_ptr_to_struct): Likewise.
5972
5973 2004-12-08  Martin Baulig  <martin@ximian.com>
5974
5975         * mono-debug.h: Bumped version number to 47.
5976
5977         * mono-debug-debugger.c
5978         (mono_debugger_event_handler, mono_debugger_event): Take two
5979         guint64 arguments insteed of a gpointer and a guint32.  
5980
5981 2004-12-08  Martin Baulig  <martin@ximian.com>
5982
5983         * debug-mono-symfile.h
5984         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
5985         `address' to `native_offset'.
5986
5987 2004-12-08  Martin Baulig  <martin@ximian.com>
5988
5989         * class.c (mono_class_create_from_typespec): Only inflate if we
5990         either have `context->gclass' or `context->gmethod'.
5991
5992 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
5993
5994         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
5995
5996         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
5997
5998         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
5999
6000         * reflection.c (mono_assembly_get_object): Remove the workaround put
6001         in for the release.
6002         
6003         * appdomain.c: Use the corlib_internal field from MonoAssembly.
6004
6005         * appdomain.c: Bump corlib version.
6006
6007         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
6008         be visible in other appdomains.
6009
6010 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
6011
6012         * threads.c: Interlocked inc and dec for longs were messed up,
6013         use a KISS based impl for this. Fixes 70234
6014
6015 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
6016
6017         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
6018
6019 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
6020
6021         * icall.c: fix to follow policy not to allow struct
6022         arguments in icalls.
6023
6024 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6025
6026         * process.c: make the patch that handles spaces in file paths work
6027         on mono/windows too.
6028
6029 2004-12-06  Martin Baulig  <martin@ximian.com>
6030
6031         * class.c (mono_class_create_generic): Call
6032         mono_class_setup_supertypes() if we're dynamic.
6033         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
6034
6035 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
6036
6037         * object-internals.h: Add new fields to MonoThread.
6038
6039         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6040
6041         * icall.c threads-types.h threads.c: Add new icalls.
6042
6043         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
6044
6045         * object-internals.h (MonoReflectionAssembly): Sync object layout with
6046         managed side.
6047
6048         * appdomain.c: Bump corlib version.
6049
6050         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
6051         internal assemblies. Fixes #69181.
6052
6053 2004-12-05  Martin Baulig  <martin@ximian.com>
6054
6055         * class.c (mono_class_inflate_generic_signature): Make this a
6056         no-op if `context' is NULL or we don't have any type parameters;
6057         also copy `sentinelpos'.        
6058
6059 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
6060
6061         * image.c: Add unbox_wrapper_cache.
6062
6063         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
6064
6065         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
6066         function generator.
6067         
6068         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
6069         Fixes #70173.
6070
6071         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
6072         
6073 2004-12-04  Martin Baulig  <martin@ximian.com>
6074
6075         * loader.c (mono_method_get_signature_full): New public function;
6076         like mono_method_get_signature(), but with an additional
6077         `MonoGenericContext *' argument.
6078
6079         * class.c (mono_class_inflate_generic_signature): Formerly known
6080         as inflate_generic_signature(); make this public.
6081
6082 2004-12-04  Martin Baulig  <martin@ximian.com>
6083
6084         * metadata.c
6085         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
6086         instead of a `MonoGenericContainer *'.  
6087         (mono_metadata_parse_array_full): Likewise.
6088         (mono_metadata_parse_signature_full): Likewise.
6089         (mono_metadata_parse_method_signature_full): Likewise.
6090         (mono_metadata_parse_generic_inst): Likewise.
6091         (mono_metadata_parse_generic_param): Likewise.
6092         (mono_metadata_parse_mh_full): Likewise.
6093         (mono_type_create_from_typespec_full): Likewise.
6094
6095 2004-12-03  Martin Baulig  <martin@ximian.com>
6096
6097         * class-internals.h (MonoGenericContainer): Replaced the
6098         `MonoGenericContext * pointer with a `MonoGenericContext'
6099         structure and made it the first element.
6100
6101 2004-12-03  Martin Baulig  <martin@ximian.com>
6102
6103         * class.c
6104         (inflate_generic_type): Set the `context->container' when creating
6105         a new MonoGenericContext.
6106         (mono_class_inflate_generic_method): Likewise.
6107         (mono_class_create_from_typespec): Just use `context->container'
6108         to get the container.
6109
6110         * loader.c (method_from_methodspec): Set `context->parent' from
6111         `context->container' - and if that's a method container, use its
6112         parent.  Also set the `context->container' when creating a new
6113         MonoGenericContext.
6114         (mono_get_method_from_token): Use just `context->container' to get
6115         the container.
6116
6117         * metadata.c (do_mono_metadata_parse_generic_class): Also set
6118         `gclass->context->container'.
6119
6120         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
6121         the `context->container' when creating a new MonoGenericContext.
6122
6123 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
6124
6125         * reflection.c (compare_genericparam): Sort params with identical
6126         owner by their number. Fixes gen-111 on sparc.
6127
6128 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
6129
6130         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
6131         around the domain changes.
6132
6133         * appdomain.c (mono_domain_unload): Handle the case when the thread
6134         calling Unload is itself being aborted during unloading. Fixes #70022.
6135
6136         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
6137
6138         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
6139         checkpoint_func as an icall so it gets a wrapper.
6140         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
6141         in the cross-appdomain wrappers too.
6142
6143         * threads.c (mono_thread_has_appdomain_ref): Make this public.
6144
6145         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
6146
6147         * reflection.c: Fix some memory leaks.
6148         
6149 2004-12-02  Martin Baulig  <martin@ximian.com>
6150
6151         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
6152
6153         * metadata.c (generic_class_cache): New static hashtable.
6154         (mono_metadata_lookup_generic_class): New public method.
6155
6156 2004-12-02  Martin Baulig  <martin@ximian.com>
6157
6158         * class.c (mono_class_create_from_typedef): Call
6159         mono_class_setup_parent() and mono_class_create_mono_type() before
6160         parsing the interfaces.
6161
6162 2004-12-02  Martin Baulig  <martin@ximian.com>
6163
6164         * metadata.c (generic_inst_cache): New static hashtable.
6165         (mono_metadata_lookup_generic_inst): New public function.
6166         (mono_metadata_inflate_generic_inst): New public function.
6167         (mono_metadata_parse_generic_inst): New public function.
6168         (do_mono_metadata_parse_generic_class): Use the new
6169         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
6170         since this'll also use the cache.
6171
6172         * reflection.c (mono_reflection_bind_generic_method_parameters):
6173         Use mono_metadata_lookup_generic_inst() to use the new cache.
6174
6175         * class.c (inflate_mono_type): Use
6176         mono_metadata_inflate_generic_inst() to inflate a generic
6177         instance; this'll also use the new cache.
6178
6179         * loader.c (method_from_methodspec): Use
6180         mono_metadata_parse_generic_inst() and
6181         mono_metadata_inflate_generic_inst() rather than parsing it
6182         manually, so we can use the new cache.
6183
6184 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
6185
6186         * threads.c (wait_for_tids): Do not incorrectly free threads when 
6187         the wait times out.
6188
6189 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6190
6191         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
6192         iter->args based on whether parameters are passed in registers (i.e.
6193         MONO_ARCH_REGPARMS is defined)
6194
6195 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
6196
6197         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
6198         the exception message. Fixes #70070.
6199         (method_from_methodspec): Fix warnings.
6200
6201 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6202
6203         * process.c: (complete_path) return the path quoted
6204
6205 2004-12-01  Martin Baulig  <martin@ximian.com>
6206
6207         * class-internals.h (MonoGenericInst): New structure.
6208         (MonoGenericClass): Replaced `type_argc', `type_argv' and
6209         `is_open' with `MonoGenericInst *inst'.
6210         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
6211         `is_open' with `MonoGenericInst *inst'.
6212
6213 2004-11-30  Martin Baulig  <martin@ximian.com>
6214
6215         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
6216
6217         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
6218         to `generic_class_cache'.
6219
6220         * metadata.c
6221         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
6222         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
6223         (mono_generic_inst_is_valuetype): Renamed to
6224         mono_generic_class_is_valuetype().
6225
6226         * class-internals.h
6227         (MonoGenericInst): Renamed to MonoGenericClass.
6228         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
6229         (MonoClass): Renamed `generic_inst' to `generic_class'.
6230         (MonoGenericContext): Renamed `ginst' to `gclass'.
6231
6232         * object-internals.h
6233         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
6234
6235         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
6236         mono_reflection_generic_class_initialize().
6237
6238         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
6239         now known as "System.Reflection.MonoGenericClass".
6240         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
6241
6242 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
6243
6244         * class-internals.h: Added a flag field to MonoClass to cache the
6245         declarative security attributes actions associated with the class.
6246         * domain-internals.h: Added booleans to MonoJitInfo to cache the
6247         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
6248         applicable to the JITted method.
6249         * reflection.c|h: Added functions to extract (as flags) which security
6250         actions are available (declaratively) for a method, class or assembly.
6251         * metadata.c|h: Added functions to search the declarative security
6252         table in the metadata.
6253         
6254 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
6255
6256         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
6257         EXPORTEDTYPES are already in the class name cache, so there is no
6258         need to add extra code here to look at them. Just removes a bit of
6259         cruft.
6260
6261         (ves_icall_System_Environment_get_TickCount): No need for #if
6262         WINDOWS. We already have the code in io-layer.
6263
6264 2004-11-28  Martin Baulig  <martin@ximian.com>
6265
6266         * loader.c
6267         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
6268         Fixes gen-112.cs.
6269
6270 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
6271
6272         * assembly.c (do_mono_assembly_open): Instead of having a
6273         conditional WITH_BUNDLE, incorporate support for bundles here, by
6274         having a global `bundles' variable holding a pointer to the actual
6275         bundles. 
6276
6277         (mono_register_bundled_assemblies): New API call used by the
6278         bundle code. 
6279
6280         See mkbundle.1 for details.
6281         
6282 2004-11-27  Martin Baulig  <martin@ximian.com>
6283
6284         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
6285         the vtable for generic methods.
6286
6287 2004-11-26  Martin Baulig  <martin@ximian.com>
6288
6289         * metadata.c
6290         (mono_metadata_generic_method_hash): New public function.
6291         (mono_metadata_generic_method_equal): Likewise.
6292
6293         * class-internals.h
6294         (MonoGenericContainer): Added `GHashTable *method_hash'.
6295
6296         * reflection.c (ReflectionMethodBuilder): Added
6297         `MonoGenericContainer *generic_container'.
6298         (reflection_methodbuilder_to_mono_method): Don't create a new
6299         MonoGenericContainer each time we're called.
6300         (mono_reflection_bind_generic_method_parameters): Use
6301         `container->method_hash' to cache the results so we don't create a
6302         different method if we're called several times with the same
6303         arguments.
6304
6305         * loader.c (method_from_methodspec): Use the new
6306         `container->method_hash' here, too.
6307
6308 2004-11-26  Martin Baulig  <martin@ximian.com>
6309
6310         * class.c (inflate_generic_signature): Correctly compute
6311         `res->has_type_parameters'.
6312         (mono_class_vtable): Use the `has_type_parameters' flag to
6313         determine whether we're a generic method.
6314
6315         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
6316
6317 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
6318
6319         * object.c (mono_runtime_run_main): Fix a small memory leak.
6320
6321 2004-11-25  Martin Baulig  <martin@ximian.com>
6322
6323         * class.c (set_generic_param_owner): Fixed the loop.
6324
6325 2004-11-25  Martin Baulig  <martin@ximian.com>
6326
6327         * object.c (mono_class_vtable): Don't create any JIT wrappers for
6328         generic methods.
6329
6330 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
6331
6332         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
6333         names. Fixes #69787.
6334
6335 2004-11-24  Martin Baulig  <martin@ximian.com>
6336
6337         * class.c (mono_class_create_generic_2): If we don't have a
6338         `ginst->parent', inflate `gklass->parent' to get our parent.
6339
6340 2004-11-24  Martin Baulig  <martin@ximian.com>
6341
6342         * reflection.c (compare_genericparam): Correctly sort the
6343         GenericParam table; fixes #69779.
6344
6345 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
6346
6347         * reflection.c: When writing a PE file, don't create a huge
6348         buffer in memory. Just write the arrays we have to the file.
6349         This reduces memory usage.
6350
6351         * metadata-internals.h: MonoDynamicStream pefile is no longer used
6352         globally.
6353
6354 2004-11-17  Martin Baulig  <martin@ximian.com>
6355
6356         * class.c (mono_class_init): Don't setup `class->parent' for
6357         dynamic instances; moved this to mono_class_generic_2().
6358         (mono_class_create_generic): Also set `klass->inited' for dynamic
6359         generic instances.
6360         (mono_class_create_generic_2): Don't do anything for dynamic
6361         generic instances.  Set `klass->parent' here and also call
6362         mono_class_setup_parent() here. 
6363
6364         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
6365         `MonoType *parent' argument; set `ginst->parent' before calling
6366         mono_class_create_generic_2(), so we set the correct parent.
6367
6368 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
6369
6370         * reflection.c: allow getting attributes from ModuleBuilder
6371         (used by ikvm).
6372
6373 2004-11-17  Martin Baulig  <martin@ximian.com>
6374
6375         * class.c (mono_class_create_from_typedef): If a type parameter is
6376         inherited from an outer class, set its owner to that class.
6377
6378 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
6379
6380         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
6381           for (int*) written size. This fixes bug #69592.
6382
6383 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
6384
6385         * icall.c: Added IsAuthenticodePresnet internal call.
6386         * image.c|h: New function that check a MonoImage for an Authenticode
6387         signature in the certificate PE data directory.
6388         * security.c|h: New internal call to ask the runtime if an 
6389         Authenticode signature seems referenced in the PE header.
6390
6391 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
6392
6393         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
6394
6395         * reflection.c (mono_image_create_pefile): Free the assembly streams
6396         after writing out the assembly file.
6397
6398         * object.c (mono_runtime_run_main): Fix small memory leak.
6399
6400         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
6401         property access modifiers. Fixes #69389.
6402
6403 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
6404
6405         * domain.c, object.c, object-internals.h, domain-internals.h,
6406         object.h, marshal.c: keep dynamic code info per domain.
6407
6408 2004-11-15  Martin Baulig  <martin@ximian.com>
6409
6410         * class.c (mono_type_get_name_recurse): Put type arguments in
6411         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
6412         see bug #68387.
6413
6414 2004-11-15  Martin Baulig  <martin@ximian.com>
6415
6416         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
6417         (mono_class_setup_vtable): When computing `the_cname' for a
6418         generic instance, don't include the namespace since we'd otherwise
6419         add it twice.
6420
6421 2004-11-15  Martin Baulig  <martin@ximian.com>
6422
6423         * class.c (mono_class_create_generic): Changed return type to void.
6424         (mono_class_create_generic_2): New public function; setup
6425         `class->method', `class->field' and `class->interfaces' here
6426         instead of in mono_class_init().
6427
6428         * class.h (mono_class_create_generic): Moved to class-internals.h.
6429
6430 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
6431
6432         * reflection.c (mono_image_create_pefile): take a file HANDLE.
6433         rather than writing to memory, write to this file. Right now,
6434         we are just writting into a buffer, and copying that. However
6435         we can avoid the buffer later.
6436
6437         (mono_dynamic_stream_reset): new function
6438
6439         * icall.c, object-internals.h: update for the above.
6440
6441 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
6442
6443         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
6444         have been using gc'd memory. First it is slower, unlikely
6445         the comment in the source code said, secondly, it increases
6446         our footprint to do it in the gc.
6447
6448         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
6449         the method so that it does not have to copy to managed code.
6450
6451 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
6452
6453         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
6454
6455 2004-11-12  Martin Baulig  <martin@localhost>
6456
6457         * reflection.c (mono_image_create_token): Allow generic method
6458         definitions here, since they may appear in an `.override'; see
6459         gen-98/gen-99 for an example.
6460
6461 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
6462
6463         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
6464         #69365.
6465
6466         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
6467         descriptive.
6468
6469 2004-11-11  Martin Baulig  <martin@ximian.com>
6470
6471         * class.c (mono_class_setup_vtable): In an explicit interface
6472         implementation, the method name now includes the arity.
6473
6474 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
6475
6476         * object.c (mono_array_full_copy): Fix warning.
6477
6478 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
6479
6480         * appdomain.c: Removed look_for_method_by_name(). Use the new method
6481         mono_class_get_method_from_name() instead.
6482         
6483         * class-internals.h: Added two new types of wrappers. 
6484         Added MonoRemotingTarget enum. Added new trampoline function type, which
6485         takes an additional MonoRemotingTarget value as parameter, so it is
6486         possible to request a trampoline for a specific target.
6487         
6488         * class.c: Added new mono_class_get_method_from_name() method.
6489         
6490         * class.h: In MonoRemoteClass, we can have now to vtables, one for
6491         general remoting sinks and one specific for cross domain calls.
6492         
6493         * debug-helpers.c: Added new wrapper names.
6494         
6495         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
6496         of a remote class.
6497         
6498         * image.c: Porperly delete value objects form the remoting invoke hashtable.
6499         
6500         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
6501         with several other methods (mono_marshal_get_xappdomain_dispatch,
6502         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
6503         and others) can generate a fast remoting wrapper for cross domain calls.
6504         More information can be found in docs/remoting.
6505         Other changes: Removed mono_find_method_by_name, and used
6506         mono_class_get_method_from_name instead.
6507         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
6508         is stored in the remoting invoke hashtable.
6509         
6510         * marshal.h: published the new method for getting the xdomain wrapper,
6511         and also added a method for getting the adequate wrapper for a given
6512         method and target.
6513         
6514         * object-internals.h, object.c: Added a couple of methods for capying and
6515         cloning arrays.
6516         Modified mono_install_remoting_trampoline, which takes the new remoting
6517         trampoline that has a remoting target as parameter.
6518         mono_class_proxy_vtable now also takes a remoting target as parameter, and
6519         will return the most suitable vtable for the target.
6520         Added mono_remote_class_vtable, which returns the vtable of a remote class
6521         (which can be the normal remoting vtable or the xdomain vtable).
6522         
6523         * threads.c: the xdomain invoke and dispatch wrappers must also be
6524         protected against interruptions.
6525
6526 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6527
6528         * icall.c: use memmove in BlockCopyInternal when the source and
6529         destination arrays are the same.
6530
6531 2004-11-09  Martin Baulig  <martin@ximian.com>
6532
6533         * class-internals.h (MonoGenericContainer): Removed `method' and
6534         `signature', replaced them with `is_method' and `is_signature'
6535         flags.  Added `context'.
6536
6537         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
6538         instead of a `MonoGenericContainer *'.
6539
6540         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
6541         for dynamic type parameters.
6542         (mono_metadata_load_generic_params): Setup `container->context'.
6543
6544         * reflection.c (mono_reflection_setup_generic_class): Setup
6545         `tb->generic_container->context'.
6546         (do_mono_reflection_bind_generic_parameters): Use
6547         mono_class_inflate_generic_type() to correctly inflate types,
6548         rather than using our own hack just for MONO_TYPE_VAR.
6549
6550 2004-11-09  Martin Baulig  <martin@ximian.com>
6551
6552         * class.c (mono_class_inflate_generic_method): Small fix; don't
6553         crash here.
6554
6555         * icall.c
6556         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
6557         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
6558         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
6559         (ves_icall_Type_BindGenericParameters): Likewise.
6560         (ves_icall_Type_get_IsGenericInstance): Likewise.
6561         (ves_icall_Type_GetGenericParameterPosition): Likewise.
6562         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
6563         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
6564         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
6565
6566 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
6567
6568         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
6569         assembly versions and public key tokens. Fixes #69113.
6570
6571 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
6572
6573         * metadata.c: fix bug introduced with the type cache changes
6574         on 2004-11-06.
6575
6576 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
6577
6578         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
6579         the MonoClass pointer instead of the token in exception clauses.
6580         * reflection.c: updates for the above and make the code not depend
6581         on the structure of MonoExceptionClause.
6582
6583 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
6584
6585         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
6586         Add support for dynamic assemblies. Fixes #69114.
6587
6588         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
6589
6590 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
6591
6592         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
6593         since most only those methods use it. the code member of
6594         MonoMethodPInvoke was dead, so that can be removed too. Also,
6595         remove inline_count (again, not used), and move slot so that it
6596         can share bits with some other flags. This saves 8 bytes in the
6597         structure and gives us about 50 kb back for mcs helloworld.cs
6598
6599         * *.[ch]: Do naming changes for the above.
6600
6601         * loader.c (mono_method_get_header): Lazily init the header
6602         on first access.
6603         (mono_get_method_from_token): don't init the header here
6604         (mono_free_method): the header may never be allocated
6605
6606         Overall, this saves 150 kb of unmanaged allocations
6607         for mcs helloworld.cs. That accounts for 10% of the unmanaged
6608         memory at runtime.
6609         
6610         * loader.c, loader.h (mono_method_get_header): new accessor.
6611
6612         * *.[ch]: use the above method. Prepares us to lazily load
6613         the header.
6614
6615         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
6616         three warnings, which are actual bugs (see 69206).
6617
6618         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
6619         unused. Saves a cool 4 bytes / method.
6620
6621 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
6622
6623         * metadata.c (builtin_types): Add types for System.Object here.
6624         (mono_metadata_parse_type_full): Cache MonoType*'s that are
6625         for a class or valuetype from klass->this_arg or klass->byval_arg.
6626
6627         On mcs for a hello world, this gets us down from 21836 MonoType's
6628         to 14560.
6629
6630         (mono_metadata_free_type): Account for the above change.
6631
6632 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
6633
6634         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
6635         exception instead of asserting if name is null.
6636         (ves_icall_System_AppDomain_GetData): Ditto.
6637
6638 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
6639
6640         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
6641         EnumBuilder.
6642
6643         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
6644         Return NULL when the domain does not have entry_assembly set.
6645
6646         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
6647         Add a 'resource_modules' argument.
6648         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
6649
6650         * reflection.c (mono_reflection_create_runtime_class): Move setting
6651         of wastypebuilder here, so mono_get_type_object () returns a MonoType
6652         for enums too.
6653
6654         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
6655         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
6656         Throw an ArgumentNullException if 'ptr' is null.
6657
6658         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
6659         assemblies here. Fixes #69020.
6660
6661 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
6662
6663         * reflection.c (build_compressed_metadata): Fix the previous patch for
6664         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
6665         the stack.
6666
6667 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
6668
6669         * assembly.c (mono_assembly_names_equal): Allow a match if one of
6670         the cultures is false. Fixes #69090.
6671
6672         * reflection.c (build_compressed_metadata): Fix invalid memory read 
6673         detected by valgrind.
6674         
6675         * reflection.c (mono_reflection_get_type): Avoid triggering a 
6676         TypeResolve multiple times for the same type. Fixes #65577.
6677
6678 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
6679
6680         * marshal.c: Avoid using ldftn to call managed functions. It is
6681         much slower than just a call.
6682
6683         * reflection.c (mono_module_get_object): free the basename we
6684         allocate here from glib.
6685         
6686         * reflection.c (ensure_runtime_vtable): make sure to free
6687         overrides.  Also, we were allocating an array of MonoMethod not an
6688         array of MonoMethod*.
6689
6690         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
6691
6692         * image.c (mono_image_close): free image->guid here.
6693
6694 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
6695
6696         * reflection.c: Fix some spec conformance issues with the PE file
6697         structures so mcs compiled apps run on the Net 2.0 beta.
6698
6699 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
6700
6701         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
6702         Implement this. Fixes #67264.
6703
6704         * debug-helpers.h debug-helpers.c marshal.c: Move 
6705         mono_find_method_by_name to debug-helpers.c.
6706
6707 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
6708
6709         * object.c (mono_release_type_locks): type_initialization_hash is
6710         a GHashTable.
6711
6712         * reflection.c object.c object-internals.h: Fix warnings.
6713
6714         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
6715         without accessors. Fixes #61561.
6716
6717         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
6718         application base from the root domain if not set. Fixes #65641.
6719         (mono_runtime_init): Fix warning.
6720
6721 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6722
6723         * appdomain.c: call mono_thread_pool_init.
6724         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
6725         of worker threads based on the number of CPUs and the environment
6726         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
6727         for non-windows (windows) systems.
6728
6729 2004-10-27  Chris Toshok  <toshok@ximian.com>
6730
6731         * mono-debug-debugger.c (write_class): don't call mono_class_init
6732         here, as even with the check for (!klass->init_pending), we get
6733         into a situation where we're hitting cycles in class
6734         initialization.  Fixes #68816.
6735
6736 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
6737
6738         * image.c: Avoid overwriting values in the loaded_images_hash when an
6739         assembly is loaded multiple times. Fixes #61152.
6740
6741         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
6742         so multiple satellite assemblies for the same name can be loaded.
6743         Fixes #68259.
6744
6745         * mono_domain_assembly_preload: Actually return the loaded assembly, 
6746         not NULL.
6747
6748         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
6749         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
6750
6751         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
6752         pending finalizers are not invoked after the appdomain has been 
6753         unloaded. Fixes #67862.
6754
6755 2004-10-22  Martin Baulig  <martin@ximian.com>
6756
6757         * mono-debug-debugger.c
6758         (mono_debugger_runtime_invoke): Don't box valuetypes.
6759
6760 2004-10-22  Chris Toshok  <toshok@ximian.com>
6761
6762         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
6763         don't hide private methods.
6764
6765 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
6766
6767         * icall.c: Allows the runtime to "share" (when known) the public key
6768         token of an assembly. This avoid the need to recalculate the token 
6769         (from the public key) in managed code.
6770
6771 2004-10-21  Chris Toshok  <toshok@ximian.com>
6772
6773         * debug-helpers.c (append_class_name): argh, revert last patch.
6774         
6775 2004-10-21  Chris Toshok  <toshok@ximian.com>
6776
6777         * debug-helpers.c (append_class_name): use '+' as the delimiter,
6778         not '/', so that it matches what the debugger uses to look up
6779         methods.
6780
6781 2004-10-21  Martin Baulig  <martin@ximian.com>
6782
6783         * mono-debug-debugger.c (mono_debugger_throw_exception): New
6784         public method; this is called each time an exception is thrown and
6785         allows the debugger to use exception catch points.
6786
6787 2004-10-21  Martin Baulig  <martin@ximian.com>
6788
6789         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
6790         the stack pointer and the exception object in some struct and pass
6791         that to the debugger.
6792
6793 2004-10-21  Chris Toshok  <toshok@ximian.com>
6794
6795         * mono-debug-debugger.c (do_write_class): add instance/static
6796         event support.  We don't expose "raise" or "other" yet.
6797         (event_is_static): new method.
6798
6799 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
6800
6801         * mono-debug-debugger.c
6802         (mono_debugger_handle_exception): Remove
6803         bogus return value for fussy compilers.
6804
6805 2004-10-20  Martin Baulig  <martin@ximian.com>
6806
6807         * mono-debug-debugger.c
6808         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
6809         (mono_debugger_handled_exception): Likewise.
6810
6811 2004-10-20  Martin Baulig  <martin@ximian.com>
6812
6813         * mono-debug-debugger.h (MonoDebuggerEvent): Added
6814         MONO_DEBUGGER_EVENT_EXCEPTION.
6815
6816         * mono-debug-debugger.c (mono_debugger_handle_exception): New
6817         public function to send the debugger a notification for an
6818         exception and inform it about a catch/finally clause.
6819
6820 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
6821
6822         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
6823         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
6824         fix 2.95 build. 
6825
6826         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
6827
6828 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
6829
6830         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
6831         marshalled as [In,Out]. Fixes #58325.
6832
6833 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
6834
6835         * reflection.c (mono_method_body_get_object): Implement some fields.
6836
6837 2004-10-12  Martin Baulig  <martin@ximian.com>
6838
6839         * reflection.c (mono_reflection_bind_generic_parameters): Small
6840         fix, correctly retrieve our parent from a generic instance.
6841
6842 2004-10-12  Martin Baulig  <martin@ximian.com>
6843
6844         * metadata.c (mono_metadata_generic_param_equal): We always have
6845         an owner.
6846
6847         * class.c
6848         (mono_class_from_generic_parameter): We need to have an owner.
6849         (my_mono_class_from_generic_parameter): Likewise.
6850
6851         * reflection.c (mono_reflection_setup_generic_class): Renamed to
6852         mono_reflection_create_generic_class() and added a new
6853         mono_reflection_setup_generic_class().  
6854         (mono_reflection_initialize_generic_param): If we're a nested
6855         generic type and inherited from the containing class, set our
6856         owner to the outer class.
6857
6858 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
6859
6860         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
6861
6862         * reflection.c (mono_method_body_get_object): New function to create
6863         a MethodBody object.
6864
6865         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
6866
6867 2004-10-11  Martin Baulig  <martin@ximian.com>
6868
6869         * metadata.c (_mono_metadata_type_equal): Renamed to
6870         do_mono_metadata_type_equal() and made static.
6871
6872 2004-10-11  Martin Baulig  <martin@ximian.com>
6873
6874         * appdomain.c: Bump corlib version number to 28.
6875
6876 2004-10-10  Martin Baulig  <martin@ximian.com>
6877
6878         * class-internals.h
6879         (MonoGenericInst): Added `MonoGenericContainer *container'.
6880         (MonoGenericMethod): Likewise.
6881         (MonoGenericContext): Likewise.
6882         (MonoGenericParam): Added `MonoGenericContainer *owner'.
6883
6884         * metadata.c
6885         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
6886         (do_mono_metadata_parse_generic_inst): Likewise.
6887         (mono_metadata_parse_type_full): New public method.  This is the actual
6888         mono_metadata_parse_type() implementation - with an additional
6889         `MonoGenericContainer *' argument.
6890         (mono_metadata_parse_array_full): Likewise.
6891         (mono_metadata_parse_signature_full): Likewise.
6892         (mono_metadata_parse_method_signature_full): Likewise.
6893         (mono_metadata_parse_mh_full): Likewise.
6894         (mono_type_create_from_typespec): Likewise.
6895         (mono_metadata_interfaces_from_typedef_full): New public method;
6896         this is similar to the other _full() methods, but we take a
6897         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
6898         (mono_metadata_parse_generic_param): Take an additional
6899         `MonoGenericContainer *' argument and lookup the MonoGenericParam
6900         from that container.
6901         (mono_metadata_generic_param_equal): New static method to compare
6902         two type parameters.
6903         (_mono_metadata_type_equal): New static method; takes an
6904         additional `gboolean signature_only' argument - if true, we don't
6905         compare the owners of generic parameters.
6906         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
6907         with a TRUE argument - do a signature-only comparision.
6908
6909         * loader.c: Use the new _full() methods and pass the
6910         MonoGenericContainer to them.
6911
6912         * object-internals.h (MonoReflectionTypeBuilder): Added
6913         `MonoGenericContainer *generic_container' field.
6914         (MonoReflectionMethodBuilder): Likewise.
6915
6916 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
6917
6918         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
6919         case initial images of dynamic assemblies.
6920
6921         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
6922
6923         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
6924
6925         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
6926         length of event->other array.
6927         (typebuilder_setup_events): Ditto.
6928
6929         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
6930         'assembly_by_name' and add an 'assemblies' list.
6931
6932         * assembly.h assembly.c: Add a new search hook for determining whenever
6933         an assembly is already loaded. Use this instead of searching in the
6934         loaded_assemblies list.
6935
6936         * domain.c appdomain.c: Implement the new search hook so loaded 
6937         assemblies are now scoped by appdomain. Fixes #67727.
6938
6939 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
6940
6941         * threads.c (mono_thread_attach): Initialize synch_lock field so
6942         mono_thread_detach works again.
6943
6944         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
6945         'lib' too. Fixes #63130.
6946
6947 2004-10-06  Jackson Harper  <jackson@ximian.com>
6948
6949         * culture-info-tables.h: regenerated.
6950
6951 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
6952
6953         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
6954         implemented by other interfaces in the result. Fixes #65764.
6955         
6956         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
6957         Handle unloadable modules without crashing.
6958
6959         * image.c (load_modules): Revert the previous patch since modules must
6960         have a fixed index inside the array.
6961         
6962         * image.c (load_modules): Don't include native modules in the modules
6963         array.
6964
6965 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
6966
6967         * reflection.h: Add param_defaults field.
6968
6969         * reflection.c: Add support for parameter defaults in dynamic methods.
6970         Fixes #64595.
6971
6972         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
6973         an empty string when a type has no namespace. Fixes #64230.
6974
6975 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
6976
6977         * tabledefs.h: Added "internal" security actions to support non-CAS
6978         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
6979         Note: they do not seems to be used anymore in 2.0 (new metadata format)
6980
6981 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
6982
6983         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
6984         constructor of abstract class. Fixes #61689.
6985
6986 2004-10-04  Martin Baulig  <martin@ximian.com>
6987
6988         * class-internals.h (MonoGenericContainer): New type.
6989         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
6990         `MonoGenericContainer *generic_container'.
6991         (MonoClass): Replaced `gen_params' and `num_gen_params' with
6992         `MonoGenericContainer *generic_container'.
6993
6994         * metadata.c (mono_metadata_load_generic_params): Return a
6995         `MonoGenericContainer *' instead of a `MonoGenericParam *';
6996         removed the `num' argument.
6997
6998 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
6999
7000         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
7001         for dynamic images.
7002
7003         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
7004         machine fields.
7005
7006         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
7007
7008         * reflection.c: Save pe_kind and machine values into the generated
7009         image file.
7010
7011         * appdomain.c: Bump corlib version number.
7012
7013         * object-internals.h: Reorganize layout of LocalBuilder.
7014
7015         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
7016         New helper function.
7017
7018         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
7019         created MonoType for dynamic types. Fixes #66180.
7020
7021 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
7022
7023         * threadpool.c: the ares hashtable needs a critical section around it.
7024         this prevents some nasty segfaults
7025
7026 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
7027
7028         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
7029         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
7030         bug 67324).
7031         
7032 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
7033
7034         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
7035         
7036 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
7037
7038         * image.c: Always canonicalize image file names, to avoid loading
7039         the same assembly twice when referenced using a relative path.
7040
7041 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
7042
7043         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
7044
7045         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
7046
7047         * marshal.c: Fix warnings.
7048
7049 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
7050
7051         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
7052         attempting to marshal the delegate_trampoline as the method_addr.
7053         This patch has a static hashtable of marshalled delegates so that 
7054         we can map delegate_trampoline addresses back to delegates.  This
7055         allows a delegate passed to managed code to be passed back into native
7056         code.  Fixes #67039
7057
7058 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
7059
7060         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
7061
7062         * reflection.c (method_encode_code): Align method headers properly.
7063         Fixes #66025.
7064
7065 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
7066
7067         * marshal.c: In the runtime invoke wrapper, reset the abort
7068         exception if it is cached. This avoids the automatic rethrowal of 
7069         the exception after the catch of the wrapper. Also check for pending
7070         interruptions before calling the managed method. This is done using
7071         the new method emit_thread_force_interrupt_checkpoint, since the
7072         normal checkpoint method is ignored when running the invoke wrapper.
7073         * object.c: If the abort exception is rethrown, set the abort_exc
7074         field of the thread, so it will be rethrown aftere every catch.
7075         * threadpool.c: Only run an interruption checkpoint if what has been
7076         requested is a stop of the thread (aborts will be ignored).
7077         * threads.c: By default, a thread will now never be interrumped while
7078         running the runtime invoke wrapper (this ensures that runtime_invoke
7079         will always return to the caller if an exception pointer is provided).
7080         There is a new special method mono_thread_force_interruption_checkpoint()
7081         to force an interruption checkpoint even if running a protected
7082         wrapper, which is used by the same runtime invoke wrapper to do a check
7083         at a safe point.
7084
7085 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
7086
7087         * object.c, object-internals.h: Implemented mono_release_type_locks,
7088         which releases the cctor locks held by a thread.
7089         * threads.c, threads.h: In thread_cleanup, release cctor locks held
7090         by a thread. Added mono_thread_exit() method to be used to safely stop
7091         a thread.
7092
7093 2004-09-28  Raja R Harinath  <rharinath@novell.com>
7094
7095         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7096         Move null check before dereference.  Avoid indexing beyond the end
7097         of the 'modules' array.
7098
7099 2004-09-28  Raja R Harinath  <rharinath@novell.com>
7100
7101         * metadata-internals.h (MonoImage): Add module_count field.
7102         * image.c (load_modules): Set image->module_count.
7103         (mono_image_load_file_for_image): Use image->module_count.
7104         * reflection.c (mono_image_load_module): Append to image->modules array 
7105         of dynamic assembly.
7106         (mono_module_get_object): Fix loop to actually increment index.
7107         Use image->module_count.
7108         * assembly.c (mono_assembly_load_references): Use image->module_count.
7109         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7110         Likewise.
7111
7112 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
7113
7114         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
7115         Avoid assert on generic types.
7116
7117 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
7118
7119         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
7120
7121         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
7122
7123         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
7124         function to convert a MarshalSpec structure to its managed counterpart.
7125
7126         * reflection.c: Fix warnings.
7127         
7128         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
7129         field.
7130
7131         * icall.c (mono_create_icall_signature): Fix build.
7132
7133 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
7134
7135         * icall.c: Add MakePointType icall.
7136
7137         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
7138         warnings.
7139
7140 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7141
7142         * threadpool.c: reuse allocated slots in the queue.
7143
7144 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
7145
7146         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
7147
7148         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
7149
7150         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
7151         previous change.
7152
7153         * tabledefs.h: Add constants for pinvoke attributes BestFit and
7154         ThrowOnUnmappableChar.
7155
7156         * icall.c (ves_icall_Type_GetPacking): New icall.
7157
7158 2004-09-24  Martin Baulig  <martin@ximian.com>
7159
7160         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
7161
7162 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7163
7164         * appdomain.c:
7165         (mono_domain_set): allow setting a domain that is being unloaded.
7166         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
7167         being unloaded.
7168
7169 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
7170
7171         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
7172         the GetCustomAttributes icall.
7173
7174 2004-09-23  Martin Baulig  <martin@ximian.com>
7175
7176         * object-internals.h (MonoReflectionGenericParam): Replaced
7177         'has_ctor_constraint', `has_reference_type' and `has_value_type'
7178         with `guint32 attrs'.
7179
7180 2004-09-23  Martin Baulig  <martin@ximian.com>
7181
7182         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
7183
7184 2004-09-23  Martin Baulig  <martin@ximian.com>
7185
7186         * object-internals.h (GenericParameterAttributes): New enum.
7187
7188 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
7189
7190         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
7191         
7192         * class.c (init_events): Fill out event->other field.
7193
7194         * class.c: Fix warnings.
7195
7196         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
7197
7198 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
7199
7200         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
7201         walk which doesn't supply the IL offset.
7202
7203 2004-09-22  Martin Baulig  <martin@ximian.com>
7204
7205         * reflection.c (mono_reflection_setup_internal_class): If we're
7206         System.ValueType, System.Object or System.Enum, set
7207         `klass->instance_size' and create the vtable.
7208         (mono_reflection_create_internal_class): If we're an enum type,
7209         get the base class from our current corlib.
7210
7211 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
7212
7213         * reflection.h (MonoResolveTokenError): New type.
7214
7215         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
7216         icall.
7217
7218         * icall.c: Add an 'error' argument to the ResolveToken icalls.
7219
7220 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
7221
7222         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
7223         Support also calling constructors, but only for already allocated objects.
7224
7225 2004-09-17  Geoff Norton <gnorton@customerdna.com>
7226
7227         * reflection.c (type_get_qualified_name): If the klass is null
7228         return the typename to avoid a NullRefEx.
7229         (encode_cattr_value): Get the qualified name of the boxed type,
7230         not the underlying enumtype.  Fixes #62984.
7231
7232 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
7233
7234         * marshal.c: Fix problems with previous checkin.
7235
7236 2004-09-21    <vargaz@freemail.hu>
7237
7238         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
7239         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
7240
7241         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
7242
7243 2004-09-21  Geoff Norton <gnorton@customerdna.com>
7244
7245         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
7246         should only return a type for pointers, arrays, and passbyref types.
7247         Fixes bug #63841.
7248
7249 2004-09-21  Martin Baulig  <martin@ximian.com>
7250
7251         * domain.c (mono_debugger_check_runtime_version): New public
7252         function.
7253
7254         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
7255
7256 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
7257
7258         * reflection.c: Added missing sort to the declarative security 
7259         attributes table. MS implementation stops seeing the attributes if the
7260         token number regress in the table (as shown by ildasm and permview).
7261
7262 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
7263
7264         * object-internals.h (MonoReflectionModule): Add 'token' field.
7265         
7266         * reflection.c (mono_reflection_get_token): Add support for Module
7267         and Assembly.
7268         (mono_module_get_object): Set 'token' field.
7269         (mono_module_file_get_object): Set 'token' field.
7270
7271         * icall.c: Add new Assembly and Module icalls.
7272
7273         * appdomain.c: Bump corlib version.
7274
7275 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
7276
7277         * loader.h loader.c class.h class.c: Add helper functions for obtaining
7278         tokens of metadata objects.
7279
7280         * reflection.h reflection.c (mono_reflection_get_token): New function
7281         to obtain the token of a metadata object.
7282
7283         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
7284
7285 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
7286
7287         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
7288         
7289         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
7290
7291 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
7292
7293         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
7294         * object-internals.h: Added 3 MonoArray* members to MonoReflection
7295         AssemblyBuilder to access the permissions set in the class lib.
7296         * reflection.c: Added security attributes encoding step in 
7297         mono_image_build_metadata.
7298         * tabledefs.h: Added new security actions defined in 2.0:
7299         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
7300
7301 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
7302
7303         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
7304         macro parameter.
7305
7306 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
7307  
7308         * locales.c: nullify the ICU_collator member of CompareInfo when it is
7309           finalized. There where random SIGSEVs at program termination, when
7310           an object being finalized was trying to do a string comparison and
7311           the current culture was already finalized.
7312  
7313 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7314
7315         * threads.c: call thread_cleanup before finishing the thread if we get
7316         there.
7317
7318 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
7319
7320         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
7321         assemblies from the parent. Fixes #65665.
7322
7323 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
7324
7325         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
7326         modifiers.
7327
7328 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
7329
7330         * reflection.h: add prototype for mono_get_dbnull_object
7331         * reflection.c: add prototypes for get_default_param_value_blobs 
7332         and mono_get_object_from_blob for fussier compilers
7333
7334 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
7335  
7336         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
7337         false deadlock checks in class initialization.
7338  
7339 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
7340
7341         * image.c (mono_image_addref): Fix comment.
7342
7343         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
7344         possible.
7345
7346 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
7347
7348         * reflection.c (mono_param_get_objects): Modified to return
7349         ParameterInfo.DefaultValue object.
7350
7351         (get_default_param_value_blobs):
7352         (mono_get_object_from_blob):
7353         (mono_get_dbnull_object): New helper routines. 
7354
7355         * object.c (mono_get_constant_value_from_blob): New helper routine
7356         carved out from get_default_field_value ()
7357
7358         * object-internals.h (mono_get_constant_value_from_blob): Added
7359         function declaration.
7360
7361 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
7362
7363         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
7364         referenced assemblies. Fixes #62135.
7365
7366         * exception.h exception.c (mono_get_exception_file_not_found2): New
7367         helper function.
7368
7369 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
7370
7371         * class.h class.c: Add mono_type_get_underlying_type ().
7372
7373 2004-09-09  Geoff Norton <gnorton@customerndna.com>
7374
7375         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
7376         Fix GetTypes() to support dynamically created assemblies.
7377
7378 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
7379
7380         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
7381         
7382         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
7383         previous patch.
7384
7385         * reflection.h reflection.c loader.c: Allow dynamic construction of
7386         pinvoke methods. Fixes #65571.
7387         
7388         * reflection.c (mono_reflection_get_type): Revert previous change since
7389         it causes regressions.
7390
7391 2004-09-08  Martin Baulig  <martin@ximian.com>
7392
7393         * class.c (class_compute_field_layout): Don't call
7394         mono_class_layout_fields() for open generic instances.
7395
7396 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
7397         * threads.c appdomain.c: fix typo in GC macro
7398
7399 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7400
7401         * threads.c: don't call mono_thread_detach() in start_wrapper(),
7402         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
7403
7404 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
7405
7406         * image.c (mono_image_close): Applied patch from 
7407         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
7408         assembly is loaded multiple times from data.
7409         
7410         * image.c (mono_image_open): Fix warning.
7411
7412 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7413
7414         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
7415         once. Fixes #58334.
7416         
7417         * reflection.c (mono_reflection_create_runtime_class): Initialize
7418         klass->nested_classes. Fixes #61224.
7419
7420 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
7421
7422         * threads.c: sched_yield() on exit, to allow threads to quit.
7423
7424 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7425
7426         * object.c (mono_unhandled_exception): Remove leftover debug code.
7427
7428 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
7429
7430         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
7431
7432 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7433
7434         * marshal.c (emit_marshal_array): Really null terminate string arrays.
7435         
7436         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
7437
7438 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
7439
7440         * marshal.c (emit_marshal_array): Null terminate string arrays.
7441         
7442         * marshal.c (raise_auto_layout_exception): Fix warning.
7443
7444         * reflection.c (mono_param_get_objects): Initialize the default value
7445         with DBNull.Value, not null. Fixes #62123.
7446
7447 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
7448
7449         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
7450         throw an exception with a cute explanation.
7451
7452 2004-09-06  Dick Porter  <dick@ximian.com>
7453
7454         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
7455         Close the new process's thread handle, as we don't use it.  The
7456         handle stays around forever otherwise.
7457
7458 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
7459
7460         * object.c (arith_overflow): Fix warning.
7461
7462         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
7463         calling conventions in method refs. Fixes #65352.
7464
7465         * reflection.c: Fix warnings.
7466
7467 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
7468
7469         * icall.c: Add a new icall for Array.Clear
7470
7471 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
7472
7473         * object.c: When allocating an array, we have to throw
7474         an overflow exception if any of the lengths are < 0.
7475
7476 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
7477
7478         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
7479         properly. Also move implementation of string array marshalling to 
7480         managed code. Fixes #42316.
7481
7482 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7483
7484         * assembly.c: provide more information when loading an assembly fails.
7485
7486 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7487
7488         * filewatcher.c: don't expect the development fam package to be
7489         installed.
7490
7491 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
7492
7493         * marshal.c: Make a copy of the signature cookie since it will be
7494         freed by the caller.
7495         
7496         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
7497
7498         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
7499
7500         * metadata.c (mono_metadata_free_marshal_spec): New function to free
7501         marshal specs.
7502
7503         * marshal.c: More refactoring.
7504         
7505         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
7506         smaller functions.
7507
7508 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
7509
7510         * object.c: In mono_message_invoke, fill the output parameter array after
7511           calling the managed method (it was done before the call). This fixes
7512           bug #59299.
7513
7514 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
7515
7516         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
7517         as well.
7518
7519 2004-09-02  Martin Baulig  <martin@ximian.com>
7520
7521         * class.c (mono_class_instance_size): Don't allow generic type
7522         definitions or open generic instances.
7523         (mono_class_array_element_size): If we're a value type, call
7524         mono_class_instance_size() on the original class.
7525
7526         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
7527         handle generic instances.
7528
7529         * mono-debug-debugger.c (write_type): Handle generic instances
7530         like classes.
7531
7532 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
7533
7534         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
7535         the allocation request fails. Fixes #65089.
7536
7537         * object.c (mono_runtime_free_method): Do not call mono_free_method.
7538         
7539         * object.c (mono_runtime_free_method): New function to free a dynamic
7540         method.
7541
7542         * marshal.c (mono_delegate_free_ftnptr): New function to free the
7543         delegate trampoline.
7544
7545         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
7546         with hasthis as dynamic,
7547
7548         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
7549
7550         * domain.c (mono_jit_info_table_remove): New function to remove an
7551         entry from the jit info table.
7552
7553         * class-internals.h (MonoMethod): Add 'dynamic' field.
7554
7555         * loader.c: Fix warnings.
7556
7557 2004-09-01  Martin Baulig  <martin@ximian.com>
7558
7559         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
7560         instead of mono_debugger_lock() because the latter one is a no-op
7561         unless running in the debugger.
7562
7563 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
7564
7565         * class.c (class_compute_field_layout): Classes with auto-layout or
7566         reference fields are not blittable.
7567         
7568 2004-09-01  Dick Porter  <dick@ximian.com>
7569
7570         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
7571         mono_image_get_filename() to get the assembly location.
7572
7573         * icall.c:
7574         * metadata.h: Fix compile warnings
7575
7576 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
7577
7578         * class.c (class_compute_field_layout): System.Object is blittable.
7579
7580         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
7581         as in/out. Fixes #59909.
7582
7583 2004-09-01  Martin Baulig  <martin@ximian.com>
7584
7585         * metadata.h (MONO_TYPE_ISREFERENCE): Call
7586         mono_metadata_generic_inst_is_valuetype() if we're a generic
7587         instance to check whether our underlying type is a reference type.
7588
7589 2004-09-01  Martin Baulig  <martin@ximian.com>
7590
7591         * metadata.c (mono_type_size): If we're a generic instance, call
7592         mono_class_value_size() for value types.
7593
7594 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
7595
7596         * marshal.c: Implement more custom marshalling functionality. Fixes
7597         #64915.
7598
7599 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
7600
7601         * mono-debug.c, debug-mono-symfile.c: add some locking love.
7602
7603 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
7604
7605         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
7606
7607         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
7608
7609         * icall.c: Fix some warnings.
7610
7611         * threads.c (abort_appdomain_thread): Fix unref errors.
7612         (mono_thread_current): Fix THREAD_DEBUG define.
7613
7614 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
7615
7616         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
7617
7618         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
7619
7620 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
7621
7622         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
7623         string arrays.
7624
7625 2004-08-28  Martin Baulig  <martin@ximian.com>
7626
7627         * metadata.c
7628         (mono_metadata_generic_inst_is_valuetype): New public function.
7629
7630         * metadata.h (MONO_TYPE_ISSTRUCT): Call
7631         mono_metadata_generic_inst_is_valuetype() if we're a generic
7632         instance to check whether our underlying type is a valuetype.
7633
7634 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
7635
7636         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
7637         #63768.
7638
7639 2004-08-25  Martin Baulig  <martin@ximian.com>
7640
7641         * loader.c (mono_get_method_from_token): Abstract methods can also
7642         be generic and thus have type parameters.
7643
7644         * metadata-internals.h
7645         (MonoDynamicImage): Added `GPtrArray *gen_params'.
7646
7647         * reflection.c (mono_image_get_generic_param_info): Don't create a
7648         metadata row, just add an entry to the `gen_params' array.
7649         (build_compressed_metadata): Sort the `gen_params' array and then
7650         actually create the metadata.
7651
7652 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7653
7654         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
7655
7656 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
7657
7658         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
7659
7660 2004-08-24  Martin Baulig  <martin@ximian.com>
7661
7662         * class.cs (mono_class_is_subclass_of): Like an interface, a
7663         generic instance also derives from System.Object.
7664
7665 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
7666
7667         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
7668         custom modifiers to be in any order. Fixes #61990.
7669
7670 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
7671
7672         * object.c: Register mono_object_new_fast icall.
7673         
7674         * object.c (mono_class_get_allocation_ftn): Return to calling
7675         mono_object_new_fast, since it seems faster to compute the object 
7676         size in unmanaged code than passing it as a parameter.
7677
7678         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
7679
7680         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
7681         this function with Boehm as the oom handler, so we don't have to check
7682         the result of GC_malloc.
7683
7684         * object.c: Remove checks for oom.
7685
7686         * object.h object.c (mono_class_get_allocation_ftn): New function to
7687         return the icall which can be used to allocate an instance of a given
7688         class. 
7689
7690         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
7691
7692         * class-internals.h: Add 'enabled' field.
7693
7694 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
7695
7696         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
7697
7698 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
7699         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
7700         value 0x0010.
7701
7702 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
7703
7704         * appdomain.c: use the Tls function for appdomain too,
7705         at Zoltan's request. Actually return in mono_context_get
7706
7707         * appdomain.c, profiler.c, threads.c: use __thread
7708
7709 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
7710
7711         * appdomain.c threads.c: Call GC_CreateThread on windows.
7712
7713         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
7714         multiple libraries since this don't work on windows.
7715
7716 2004-08-18  Martin Baulig  <martin@ximian.com>
7717
7718         * class-internals.h
7719         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
7720         MonoMethodHeader.
7721
7722         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
7723         MonoMethodNormal since we also need it for abstract and interface
7724         methods.
7725
7726         * reflection.c
7727         (build_compressed_metadata): Sort the GenericParam table.
7728         (mono_image_create_token): Added `gboolean create_methodspec'
7729         argument; this is false when generating a MethodImpl token.
7730         (reflection_methodbuilder_to_mono_method): Abstract and interface
7731         methods may also have generic parameters.
7732
7733 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
7734
7735         * appdomain.c: thread local alloc
7736
7737 2004-08-17  Martin Baulig  <martin@ximian.com>
7738
7739         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
7740
7741         * icall.c
7742         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
7743         argument.
7744
7745         * class.c (mono_type_get_full_name): New public function.
7746         (mono_type_get_name): Don't include the type arguments.
7747
7748 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
7749
7750         * Makefile.am: Build static versions of libmetadata and libmonoruntime
7751         for inclusion into the mono executable.
7752
7753 2004-08-16  Martin Baulig  <martin@ximian.com>
7754
7755         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
7756         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
7757
7758 2004-08-14  Martin Baulig  <martin@ximian.com>
7759
7760         * class.c (dup_type): Also copy the `byref' field.
7761
7762 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
7763
7764         * reflection.c (create_dynamic_mono_image): Revert the last change 
7765         since it breaks bootstrap.
7766
7767 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
7768
7769         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
7770
7771         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
7772         not free them with g_free.
7773
7774 2004-08-11  Martin Baulig  <martin@ximian.com>
7775
7776         * reflection.c (mono_reflection_setup_internal_class): Also call
7777         mono_class_setup_mono_type() if we already have a `tb->type.type'.
7778
7779 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
7780
7781         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
7782         called during default (first) AppDomain creation. Keep track of
7783         Evidence when loading assemblies.
7784
7785 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
7786
7787         * opcodes.c, opcodes.h: reduce runtime relocations.
7788
7789 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
7790
7791         * culture-info.h, locales.c: fixes and chages to sue the new
7792         optimized format of the locale data.
7793         * culture-info-tables.h: regenerated.
7794
7795 2004-08-06  Geoff Norton <gnorton@customerdna.com>
7796         
7797         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
7798
7799 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
7800
7801         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
7802         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
7803         * domain-internals.h: icall declaration.
7804         * icall.c: icall registration.
7805         * object-internals.h: New fields in MonoAssembly for CAS.
7806
7807 2004-08-05  Duncan Mak  <duncan@ximian.com>
7808
7809         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
7810         CEE_LDELEM_ANY.
7811
7812 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
7813
7814         * reflection.c: fix to deal with object[] arrays in custom ctors
7815         (bug #62550).
7816
7817 2004-08-05  Martin Baulig  <martin@ximian.com>
7818
7819         * class.c (mono_class_array_element_size): Added support for
7820         generic instances and correctly handle "recursive" types.
7821
7822 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
7823
7824         * assembly.c: Fix warnings.
7825
7826 2004-08-04  Martin Baulig  <martin@ximian.com>
7827
7828         * class.c
7829         (mono_type_get_name_recurse): Added `gboolean include_arity'
7830         argument specifying whether or not we should include the generic
7831         arity in the type name.
7832         (_mono_type_get_name): New static function.
7833         (mono_class_setup_vtable): If we're a generic instance, don't
7834         include the generic arity in the names of explicit method
7835         implementations.        
7836
7837 2004-08-03  Martin Baulig  <martin@ximian.com>
7838
7839         * class.c (mono_type_get_name_recurse): Enclose the generic type
7840         arguments in `<', '>'.
7841
7842 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7843
7844         * gc.c: make GC warning messages use the trace API, they are just
7845         noise to most of the users.
7846
7847 2004-08-03  Martin Baulig  <martin@ximian.com>
7848
7849         * debug-mono-symfile.c (read_string): Correctly read the string.
7850
7851 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
7852
7853         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
7854         
7855         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
7856         icalls.
7857         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
7858
7859 2004-07-30  Martin Baulig  <martin@ximian.com>
7860
7861         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
7862         Reflect latest symbol writer changes.   
7863
7864 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
7865
7866         * object.c: always create an object if null is passed
7867         to Invoke() where a valuetype is expected.
7868
7869 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
7870
7871         * marshal.c (mono_marshal_init): make managed
7872         signatures match native ones better for 64bits.
7873
7874 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7875
7876         * appdomain.c: hack to build correctly the private bin path on windows.
7877         Fixes bug #61991.
7878
7879 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
7880
7881         * assembly.c: Load mscorlib from the correct framework directory
7882           (mono/<version>/mscorlib.dll).
7883         * appdomain.h: Added prototypes for new functions.
7884         * internals.h: Added some prototypes.
7885         * domain.c: When initializing the runtime, get from the executable and
7886           the configuration files the runtime version that the app supports.
7887           Added support methods for reading app.exe.config. Added list of versions
7888           supported by the JIT. Added two new methods: mono_init_from_assembly,
7889           which initializes the runtime and determines the required version from
7890           the provided exe file, and mono_init_version, which initializes
7891           the runtime using the provided version.
7892         * icall.c: Get machine.config from version-specific directory.
7893         * reflection.c: When generating an image, embed the version number
7894           of the current runtime.
7895
7896 2004-07-28  Dick Porter  <dick@ximian.com>
7897
7898         * socket-io.c
7899         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
7900         returned sockaddr size before creating the remote address object.
7901         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
7902         61608.
7903
7904 2004-07-28  Dick Porter  <dick@ximian.com>
7905
7906         * locales.c (string_invariant_compare_char): Fix invariant char
7907         compares between upper and lower cases.  Fixes bug 61458.
7908
7909 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
7910         
7911         * marshal.c: actually cache stelem.ref wrappers.
7912         
7913 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
7914
7915         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
7916         sections and remove the mono_cli_rva_map () function.
7917
7918 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
7919
7920         * debug-mono-symfile.c: fix one more endianess issue, from a patch
7921         by Geoff Norton (<gnorton@customerdna.com>).
7922
7923 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7924
7925         * class.c: fix class loads for pointer types (typeof(int) !=
7926         typeof(int*)).
7927
7928 2004-07-27  Martin Baulig  <martin@ximian.com>
7929
7930         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
7931         reading the debugging information from an external ".mdb" file.
7932
7933 2004-07-24  Martin Baulig  <martin@ximian.com>
7934
7935         * reflection.c (mono_image_get_type_info): Only write a class
7936         layout entry if we actually have a size or a packing size.
7937
7938 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
7939
7940         * reflection.c (type_get_fully_qualified_name): 
7941         insert cast to get type checking of ?: with non-gcc compilers
7942
7943 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
7944
7945         * rand.c: use g_getenv for both lookups of
7946         MONO_EGD_SOCKET
7947
7948 2004-07-17  Martin Baulig  <martin@ximian.com>
7949
7950         * reflection.c (mono_reflection_bind_generic_method_parameters):
7951         Set `gmethod->reflection_info'.
7952
7953 2004-07-17  Martin Baulig  <martin@ximian.com>
7954
7955         * class.c (mono_class_create_from_typedef): Insert the newly
7956         created class into the hash table before computing the interfaces
7957         since we could be called recursively.
7958
7959 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
7960
7961         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
7962         function to implement stelem.ref in managed code
7963         * class-internals.h, debug-helpers.c: a new wrapper type
7964         for the above.
7965
7966 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
7967
7968         * gc.c: allow GC handles to work even when no GC is compiled in.
7969         Fix part of bug #61134 (GetAddrOfPinnedObject).
7970
7971 2004-07-13  Peter Williams  <peter@newton.cx>
7972  
7973         * process.c (complete_path): Make sure we don't attempt to execute
7974         directories.
7975  
7976 2004-07-12  Geoff Norton <gnorton@customerdna.com>
7977
7978         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
7979           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
7980           and will add/subtract the hour if needed
7981
7982 2004-07-12  Martin Baulig  <martin@ximian.com>
7983
7984         * reflection.c (mono_field_get_object): If we have
7985         `field->generic_info', take the attributes from
7986         `field->generic_info->generic_type'.    
7987
7988 2004-07-12  Martin Baulig  <martin@ximian.com>
7989
7990         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
7991         This function must be called before initializing the runtime.
7992         (mono_debug_init_1): New function; call this after initializing
7993         the runtime, but before loading the assembly.  It tells the
7994         debugger to load corlib and the builtin types.
7995
7996         * mono-debug-debugger.c: Did some larger changes in the debugging
7997         code; support recursive class declarations, make sure we actually
7998         add all classes.
7999
8000 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8001
8002         * debug-helpers.c: undo my previous patch and fixed the real issue in
8003         ../mini/exceptions-x86.c
8004
8005 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8006
8007         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
8008         when no HOME env. variable was set and a NullRef was thrown in a .cctor
8009         called from other .cctors.
8010
8011 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
8012
8013         * loader.c: Removed the mono_loader_wine_init hack now that we are
8014         doing a managed version of Windows.Forms.
8015
8016 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
8017
8018         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
8019         threadpool.c, threads.c: remove static data from rootset.
8020
8021 2004-07-09  Dick Porter  <dick@ximian.com>
8022
8023         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
8024         Don't do any more processing if the matched length was 0.  It was
8025         increasing the size of the string before.  Fixes bug 61167.
8026
8027 2004-07-09  Dick Porter  <dick@ximian.com>
8028
8029         * socket-io.h:
8030         * socket-io.c
8031         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
8032         Add support for SO_PEERCRED if its available.
8033
8034 2004-07-09  Peter Bartok <pbartok@novell.com>
8035         * loader.c: winelib.exe.so error message is now only displayed if
8036         MONO_DEBUG is set. To help us avoid questions when people are trying
8037         out the new Managed.Windows.Forms.
8038
8039 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
8040
8041         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
8042         for isinst and castclass wrappers.
8043
8044         * class-internals.h icall.c: Move registration and lookup of JIT icalls
8045         to libmetadata from the JIT, so they could be used by the marshalling
8046         code and the interpreter.
8047
8048         * marshal.c: Register marshalling related JIT icalls here instead of
8049         in mini.c. Use CEE_MONO_ICALL instead of the family of 
8050         CEE_MONO_PROC<x> opcodes to call marshalling functions.
8051
8052         * metadata.h: Remove unneeded marshalling conversions.
8053
8054         * opcodes.c: Update for new opcodes.
8055         
8056 2004-07-08  Martin Baulig  <martin@ximian.com>
8057
8058         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
8059         (mono_debug_get_domain_data): Make this function static.
8060
8061 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8062
8063         * gc.c, object.h: add nice GC handle API for embedders.
8064
8065 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
8066
8067         * reflection.c: more changes for the new api
8068
8069         * object.c: When we reflect on a field w/ a constant value, it
8070         will not have a memory location, so we must access metadata. Also,
8071         allow easier reading of strings so that we can read them from
8072         the constant data.
8073
8074         * class.c (mono_class_layout_fields): no need for literal fields here.
8075
8076         * class-internals.h: api changes for const fields
8077
8078         * icall.c (ves_icall_get_enum_info): use new apis for const fields
8079
8080 2004-07-06  Martin Baulig  <martin@ximian.com>
8081
8082         * mono-debug.h: Increment version number to 44.
8083
8084         * mono-debug.c (mono_debug_add_wrapper): The second argument is
8085         now a gpointer, rewrote this whole method.
8086
8087         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
8088         function.  Add information about the wrapper in a new "misc table".
8089
8090         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
8091         for the new misc table.
8092
8093 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
8094
8095         * metadata-internals.h image.c: Add a cache for helper signatures.
8096
8097         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
8098
8099 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
8100
8101         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
8102         delegates from a delegate. Fixes #61033.
8103         
8104         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
8105         marshalling of stringbuilder arrays. Fixes #59900.
8106
8107 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
8108
8109         * icall.c: Add EnumBuilder:setup_enum_type icall.
8110
8111 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
8112
8113         * icall.c: Added a new icall for the property version of
8114         OffsetOfStringData.
8115
8116 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
8117
8118         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
8119         it has a constant size across platforms.
8120
8121         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
8122         stack trace.
8123
8124 2004-06-29  Martin Baulig  <martin@ximian.com>
8125
8126         * mono-debug.c (mono_debug_add_method): Protect the whole function
8127         in mono_debugger_lock(), not just parts of it.
8128
8129 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8130
8131         * reflection.c: make sure padding bytes in heaps are zeroed.
8132
8133 2004-06-24  David Waite  <mass@akuma.org>
8134
8135         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
8136         image.c, loader.c, locales.c, marshal.c, metadata.c,
8137         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
8138         string-icalls.c, threads.c: change to C90-style comments from C99 /
8139         C++ -style
8140
8141 2004-06-24  Dick Porter  <dick@ximian.com>
8142
8143         * threads.c
8144         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
8145         return createdNew.  Fixes bug 60412.
8146
8147         * threads-types.h: 
8148         * icall.c: Add createdNew parameter to CreateMutex icall
8149
8150 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8151
8152         * reflection.c, object-internals.h: save default value in params.
8153
8154 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8155
8156         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
8157         no need to build a new path combining that with the application base.
8158         Fixes bug #60442.
8159
8160 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
8161
8162         * reflection.c: fixed minor standard compliance issues.
8163
8164 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8165
8166         * reflection.c: fixed issue with encoding some custom attributes
8167         (arrays in properties and fields, bug #60411).
8168
8169 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8170
8171         * reflection.c: fix start address when copying the public key token.
8172
8173 2004-06-23  Martin Baulig  <martin@ximian.com>
8174
8175         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
8176         the `exc' object in a static object to put it into the GC's root set.
8177
8178 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
8179
8180         * reflection.c: make mono_reflection_setup_internal_class ()
8181         callable a second time to setup a new parent class.
8182
8183 2004-06-23  Dick Porter  <dick@ximian.com>
8184
8185         * threads.c: Check for WAIT_IO_COMPLETION return values.
8186
8187 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
8188
8189         * appdomain.c: Removed the g_free on the public key token. Now copy 
8190         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
8191         * assembly.c: Added public key token string value when loading 
8192         assemblies. Fix bug #60439.
8193         * icall.c: Added missing informations (like public key) in 
8194         GetReferencedAssemblies. Fix #60519.
8195         * image.h: Changed definition for public key token from const char*
8196         public_tok_value to guchar public_key_token [17];
8197         * reflection.c: Updated for changes to public key token.
8198
8199 2004-06-22  Lluis Sanchez Gual
8200
8201         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
8202         for the field in base classes.
8203
8204 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8205
8206         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
8207         mark headers as not supported, they are installed only for use by the
8208         debugger.
8209
8210 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
8211
8212         * *.c, *.h: avoid namespace pollution in public headers.
8213
8214 2004-06-21  Martin Baulig  <martin@ximian.com>
8215
8216         * exception.c (mono_get_exception_security): It's in
8217         "System.Security", not in "System".
8218
8219         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
8220         the exception classes.
8221
8222 2004-06-21  Martin Baulig  <martin@ximian.com>
8223
8224         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
8225         Protect the exception object from being finalized.
8226
8227 2004-06-21  Martin Baulig  <martin@ximian.com>
8228
8229         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
8230         public function.
8231
8232 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
8233
8234         * reflection.c: Load the assembly in mono_reflection_type_from_name,
8235         if it was not loaded before. Fix parts of #60439.
8236
8237 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
8238
8239         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
8240         code that was broken since Ben's change: wrappers are now
8241         dependent on the method signature only again.
8242
8243 2004-06-21  Martin Baulig  <martin@ximian.com>
8244
8245         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
8246         added interface support.
8247
8248 2004-06-21  Martin Baulig  <martin@ximian.com>
8249
8250         * class.c (mono_vtable_get_static_field_data): New public method.
8251
8252 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
8253
8254         * filewatcher.c : Windows build fix to be compliant with API changes.
8255
8256 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8257
8258         * class.h, class.c: more accessors.
8259         * metadata.h, metadata.c: prepare for hiding MonoType and
8260         MonoMethodSignature: people should use the accessors from now on
8261         outside of the tree.
8262
8263 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8264
8265         * *.c, *.h: more API cleanups.
8266
8267 2004-06-18  Jackson Harper  <jackson@ximian.com>
8268
8269         * assembly.c: Trace loading assemblies.
8270         * loader.c: Trace loading native libraries.
8271         * mono-config.c: Trace loading config files.
8272         
8273 2004-06-18  Dick Porter  <dick@ximian.com>
8274
8275         * locales.c: Tell ICU the lengths of strings, it can cope with
8276         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
8277
8278 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
8279
8280         * image.c: swapped name/filename;
8281
8282 2004-06-18  Martin Baulig  <martin@ximian.com>
8283
8284         * mono-debug-debugger.c (write_class): Write the parent class at
8285         the end of the header.
8286
8287 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8288
8289         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
8290
8291 2004-06-17  Raja R Harinath  <rharinath@novell.com>
8292
8293         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
8294         (bundle_obj): New conditional define.
8295         (BUILT_SOURCES): Remove.
8296         ($(bundle_srcs)): Make parallel-make safe.
8297         (libmonoruntime_la_LIBADD): Make unconditional.
8298         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
8299         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
8300
8301 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
8302
8303         * culture-info-tables.h: It was inconsistent with the latest
8304           supp info files.
8305
8306 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
8307
8308         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
8309         be loaded.
8310
8311         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
8312         with gcc 2.95.
8313
8314 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8315
8316         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
8317         cleaned up public header threads.h.
8318
8319 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8320
8321         * Makefile.am, *.c, *.h: more API cleanups.
8322
8323 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
8324
8325         * Makefile.am: removed monosn from compilation.
8326         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
8327         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
8328         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
8329         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
8330         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
8331         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
8332
8333 2004-06-15  Jackson Harper  <jackson@ximian.com>
8334
8335         * assembly.c: Make locales lower case when searching the GAC for
8336         assemblies. gacutil will always make locales lowercase when
8337         installing so this effectively makes them case insensitive.
8338         
8339 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
8340
8341         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
8342         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
8343           parameter which allows to choose whether the wait can be interrupted or 
8344           not. Also added the method mono_monitor_enter(), which locks the monitor
8345           using an infinite wait and without allowing interruption.
8346           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
8347           interrupted.
8348         * object.h: Added new fields in MonoThread. suspend_event holds the event
8349           used to susped/resume the thread. synch_lock is the lock object to use for
8350           modifying the thread state.
8351         * threads.c: Use the new synch_lock object for locking, instead of "this",
8352           which can generate deadlocks.
8353           Moved thread state change in Thread.Sleep and Thread.Join from managed
8354           to unmanaged code. This avoids a deadlock when the thread was suspended
8355           just after acquiring the thread lock.
8356           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
8357           Implemented Thread.Suspend using an event instead of ThreadSuspend,
8358           which is not fully implemented in the io-layer.
8359         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
8360
8361 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
8362
8363         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
8364         threads-types.h: more API cleanups.
8365
8366 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8367
8368         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
8369         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
8370         threadpool.c, threads.c: first pass at the exported API cleanup.
8371
8372 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
8373
8374         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
8375
8376 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8377
8378         * icall.c: added internalGetHome.
8379
8380 2004-06-14  Dick Porter  <dick@ximian.com>
8381
8382         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
8383         possible to return successfully when '.' or '..' were the only
8384         entries in a directory, but were skipped.  The MonoIOStat was not
8385         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
8386         Fixes bug 59574.
8387
8388 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8389
8390         * reflection.c: make binaries run on .Net 1.1 by default.
8391
8392 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
8393
8394         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
8395
8396 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
8397
8398         * marshal.c: keep track of struct size with explicit layout
8399         (bug #59979).
8400
8401 2004-06-12  Martin Baulig  <martin@ximian.com>
8402
8403         * mono-debug-debugger.c: Comment out a debugging g_message().
8404
8405 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8406
8407         * reflection.c, reflection.h: do not free custom attrs that are cached.
8408         * icall.c: use braces to make code clearer.
8409
8410 2004-06-11  Martin Baulig  <martin@ximian.com>
8411
8412         * class.h (MonoInflatedField): New type.
8413         (MonoClassField): Replaced `MonoType *generic_type' with
8414         `MonoInflatedField *generic_info'.
8415
8416         * icall.c
8417         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
8418
8419 2004-06-11  Martin Baulig  <martin@ximian.com>
8420
8421         * reflection.c (mono_image_create_method_token): Correctly encode
8422         varargs methods.
8423
8424 2004-06-11  Martin Baulig  <martin@ximian.com>
8425
8426         * metadata.c (mono_metadata_parse_method_signature): When parsing
8427         a MethodDef which has VarArgs, also set sentinelpos if we don't
8428         have any parameters.
8429
8430 2004-06-11  Martin Baulig  <martin@ximian.com>
8431
8432         * verify.c (mono_method_verify): In CEE_CALL, use
8433         mono_method_get_signature() to get the method's signature, unless
8434         we're a PInvoke method.
8435
8436 2004-06-10  Jackson Harper  <jackson@ximian.com>
8437
8438         * assembly.c: Use <path>/lib/mono/gac for the extra paths
8439         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
8440         logical name as the supplied path is just a prefix to the gac not
8441         the direct path to it.
8442         
8443 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
8444
8445         * reflection.c: make the token for a created method match
8446         the token of the MethodBuilder it was created from
8447         (IKVM requires this behaviour now).
8448
8449 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
8450
8451         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
8452         reflection.c, socket-io.c: leak fixes.
8453
8454 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
8455
8456         * icall.c: handle sentinel pos in vararg methods in position different
8457         from 0.
8458
8459 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8460
8461         * culture-info-tables.h: freshly generated.
8462
8463 2004-06-09  Martin Baulig  <martin@ximian.com>
8464
8465         * loader.c (mono_get_method_constrained): Call `mono_class_init
8466         (constrained_class)'.   
8467
8468 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
8469
8470         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
8471         any methods. Fixes #59629.
8472
8473 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
8474
8475         * culture-info-tables.h: reflecting locale-builder updates.
8476
8477 2004-06-08  Dick Porter  <dick@ximian.com>
8478
8479         * object.h:
8480         * locales.c: Fixed compile warnings, including a real bug in
8481         CompareInfo_internal_compare.
8482         
8483 2004-06-08  Dick Porter  <dick@ximian.com>
8484
8485         * locales.c
8486         (ves_icall_System_Globalization_CompareInfo_internal_index):
8487         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
8488         Double-check the resuls of usearches, because ICU currently
8489         ignores most of the collator settings here.  Fixes bug 59720.
8490         
8491 2004-06-08  Dick Porter  <dick@ximian.com>
8492
8493         * locales.c
8494         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
8495         Fix memory leak and segfault-causing typo.  No idea how this one
8496         lasted so long without being noticed.
8497
8498 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
8499
8500         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
8501         any methods. Fixes #59629.
8502
8503 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8504
8505         * assembly.c:
8506         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
8507         own the critical section before). Removed dead code (that's done
8508         in the preload hook).
8509
8510         (mono_assembly_load_with_partial_name): call the preload hook.
8511
8512 2004-06-08  Martin Baulig  <martin@ximian.com>
8513
8514         * metadata.c (mono_metadata_signature_alloc): Default
8515         `sentinelpos' to -1.
8516
8517         * reflection.c (mono_image_get_array_token): Likewise.
8518
8519 2004-06-08  Martin Baulig  <martin@ximian.com>
8520
8521         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
8522
8523         * metadata.c (mono_metadata_parse_method_signature): When parsing
8524         a MethodDef which has VarArgs, set sentinelpos.
8525
8526         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
8527         `gint16' since we're using -1 for non-varargs methods.
8528
8529         * reflection.c
8530         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
8531         (method_encode_signature): Added varargs support.
8532         (method_builder_encode_signature): Likewise.
8533         (mono_image_get_varargs_method_token): New static method.
8534         (mono_image_create_method_token): New public method; this is
8535         called via an icall instead of mono_image_create_token() when
8536         calling a varargs method.       
8537
8538 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
8539
8540         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
8541
8542 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
8543
8544         * culture-info-tables.h : Reflecting the latest locale-builder that
8545           fixed empty array representation ({} to {0}).
8546
8547 2004-06-07  Jackson Harper  <jackson@ximian.com>
8548
8549         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
8550         looking up extra gac paths. This allows MONO_GAC_PATH to act
8551         exactly like a prefix.
8552         
8553 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
8554
8555         * reflection.c (mono_reflection_type_from_name): Make a copy of the
8556         type name before modifying it. Fixes #59405.
8557
8558 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
8559
8560         * culture-info.h: added fields for "all datetime patterns".
8561         * locales.c: (  ves_icall_System_Globalization_CultureInfo
8562           _construct_datetime_format ()): fill xxx_patterns fields.
8563         * object.h: added fields for "all datetime patterns" to
8564           MonoDateTimeFormatInfo.
8565         * culture-info-tables.h: reflecting locale-builder updates.
8566
8567 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
8568
8569         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
8570         the event has no add and remove methods. Fixes #59629.
8571
8572 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
8573
8574         * object.c: Fixed possible integer overflow when allocating large
8575         strings.
8576
8577 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
8578
8579         * culture-info-tables.h: reflecting locale-builder updates.
8580
8581 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
8582
8583         * culture-info-tables.h: reflecting locale-builder updates.
8584
8585 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
8586
8587         * culture-info-tables.h: reflecting locale-builder updates.
8588
8589 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
8590
8591         * threads.c: Made Thread.Sleep abortable.
8592
8593 2004-06-02  Martin Baulig  <martin@ximian.com>
8594
8595         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
8596
8597         * debug-mono-symfile.h: Bumped symbol file version number to 37.
8598
8599 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
8600
8601         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
8602
8603 2004-05-30  Jackson Harper  <jackson@ximian.com>
8604
8605         * reflection.c: Do not hardcode assembly versions or public key
8606         tokens anymore. All of this except the corlib section was dead
8607         code anyways.
8608         
8609 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
8610
8611         * object.c (mono_runtime_invoke_array): Automatically create boxed
8612         objects for byref valuetypes if needed. Fixes #59300.
8613         
8614         * object.c (mono_method_return_message_restore): Handle 
8615         MONO_TYPE_OBJECT as well.
8616
8617 2004-05-28  Jackson Harper  <jackson@ximian.com>
8618
8619         * reflection.c: The modified type encoding was causing build
8620         problems. Reverted for now.
8621         
8622 2004-05-28  Jackson Harper  <jackson@ximian.com>
8623
8624         * reflection.c/h: Take an assembly ref so that we dont create
8625         fully qualified names when encoding types in the same assembly as
8626         the custom attribute being emitted.
8627         * appdomain.c: Increment version number.
8628         
8629 2004-05-26  Duncan Mak  <duncan@ximian.com>
8630
8631         * icall.c
8632         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
8633         Set the full version number (major, minor, build, revision).
8634
8635 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
8636
8637         * marshal.c (emit_struct_conv): increment src/dst after blit
8638         (mono_marshal_get_managed_wrapper,
8639         mono_marshal_get_native_wrapper): make sure we have marshalling
8640         info before marshalling params (info computation affects
8641         blittable)
8642
8643         * class.c (class_compute_field_layout): correctly deal with
8644         blittable
8645         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
8646         value types (as per what windows dows by default)
8647         (mono_class_setup_mono_type): System.ValueType is blittable
8648         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
8649         blittable
8650
8651         * marshal.c (mono_marshal_load_type_info): flag types  as
8652         non-blittable if the native layout doesn't match the managed
8653         layout
8654
8655 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8656
8657         * appdomain.c: don't add stuff in the private search path that is
8658         above the application base. If application base is not set, there's
8659         no private search path.
8660
8661 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
8662
8663         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
8664         byref struct arguments in native->managed marshalling.
8665
8666 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
8667
8668         * marshal.c (mono_marshal_get_runtime_invoke): correctly
8669         cache methods using signature (special case for methods
8670         that are value type or string class)
8671         
8672         * image.c (mono_image_close): clean up allocated GSList's
8673         in runtime_invoke_cache.
8674
8675 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8676
8677         * mono-config.c: set the correct path for mono_cfg_dir on windows when
8678         there's no MONO_CFG_DIR environment variable defined.
8679
8680 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8681
8682         * threads.c: windows version must be >= 0x0500 to include OpenThread.
8683
8684 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
8685
8686         * threadpool.c: Really wait for 500ms after the async call, even if the wait
8687           is interrumped.
8688         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
8689           before waiting for it, and call CloseHandle after the wait to unref it.
8690           This will make sure that handles are not disposed too early.
8691
8692 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8693
8694         * appdomain.c:
8695         * appdomain.h:
8696         * icall.c: removed
8697         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
8698         needed now.
8699
8700         * object.c: se the application_base only for the domain that runs
8701         Main. Fixes bug #59216,
8702
8703 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8704
8705         * appdomain.c:
8706         * object.c: only the domain in which Main is run have
8707         SetupInformation.ConfigurationFile set, so moved a few lines from
8708         appdomain.c to object.c.
8709
8710 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8711
8712         * appdomain.c: we tried to load [name].(dll|exe), but according
8713         to bug #57710, we must also try [culture]/[name].(dll|exe) and
8714         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
8715         There's a test case attached to bug #58922.
8716
8717 2004-05-27  Dick Porter  <dick@ximian.com>
8718
8719         * icall.c:
8720         * file-io.c: Implemented icalls for locking and unlocking regions
8721         in a file.
8722         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
8723         FALSE on error (fixes both compiler warning and real bug.)
8724
8725 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
8726
8727         * culture-info-tables.h: reflecting locale-builder updates.
8728
8729           (Added missing ChangeLog entry for 05/26)
8730
8731 2004-05-27  Jackson Harper  <jackson@ximian.com>
8732
8733         * locales.c: Fix some cut and paste errors.
8734         
8735 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8736
8737         * mono-config.c: set the correct path for config. directory on windows.
8738
8739 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
8740
8741         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
8742           on win32.
8743
8744 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
8745
8746         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
8747         from pinvoke functions.
8748         
8749         * marshal.c (mono_ftnptr_to_delegate): Implement this.
8750
8751 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
8752
8753         * culture-info-tables.h: reflecting locale-builder updates.
8754
8755 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
8756
8757         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
8758         #59086.
8759
8760 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
8761
8762         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
8763         * icall.c: Modified icalls for RNG.
8764         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
8765         Windows (CryptoAPI).
8766
8767 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
8768
8769         * locales.c: Fix build.
8770
8771 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
8772
8773         * culture-info-tables.h: reflecting locale-builder updates.
8774
8775 2004-05-25  Jackson Harper  <jackson@ximian.com>
8776
8777         * locales.c: When creating the current culture use the $LANGs
8778         specific culture. So DateTimeFormat and NumberFormat entries are created.
8779         
8780 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
8781
8782         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
8783         a char array as parameter.
8784
8785 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
8786
8787         * image.c: In mono_image_open(), always use an absolute path name to
8788           look for already loaded images.
8789
8790 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
8791
8792         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
8793         missing in the windows build (like older cygwin include files).
8794
8795 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
8796
8797         * icall.c: Fixed check for possible integer overflow in Buffer_
8798         BlockCopy icall. Replaced comments style // by /* */.
8799
8800 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
8801
8802         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
8803         
8804         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
8805         check after MONO_VTADDR. Fixes pinvoke2.exe.
8806
8807         * marshal.h marshal.c metadata.h: Add beginnings of support for
8808         ftnptr -> delegate marshalling.
8809
8810 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
8811
8812         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
8813         * threads.c: Fix warnings.
8814
8815 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
8816
8817         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
8818         * icall.c: Registered icalls for Suspend and Resume.
8819         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
8820           Thread.Abort.
8821         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
8822         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
8823         * process.c: Use WaitForSingleObjectEx.
8824         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
8825           checkpoints.
8826         * threads.c, threads.h: Make use of new Ex wait methods. Improved
8827           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
8828           for Suspend and Resume. Added new mono_thread_stop, used for stoping
8829           background threads. Added basic support for Abort in Windows.
8830           Start new threads using a managed delegate invoke wrapper. This wrapper
8831           has an interruption checkpoint that is needed since an interruption
8832           can be requested before the thread leaves the unmanaged code that starts 
8833           the thread.
8834         * marshal.c: Added interruption checkpoint after every native call, and
8835           also before managed calls for wrappers called from unmanaged code to
8836           go into managed code.
8837         * object.h: Added new field in MonoThread to keep track of interruption
8838           requests.
8839
8840 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
8841
8842         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
8843         calls.
8844
8845 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8846
8847         * appdomain.c:
8848         * assembly.c:
8849         * gc.c:
8850         * locales.c:
8851         * mono-config.c:
8852         * rand.c: getenv -> g_getenv (windows!)
8853
8854         * process.c: complete_path is also used on non-windows platforms.
8855
8856 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8857
8858         * icall.c: new signature for Process_Start.
8859
8860         * process.[ch]: new signature for Process_Start. If we're on windows
8861         and UseShellExecute is false, we have to search for the program by
8862         ourselves if we don't get a full path.
8863
8864 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
8865
8866         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
8867         marshalling and call CleanUpNativeData if needed. Fixes #58646.
8868
8869 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8870
8871         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
8872         Fixes bug #58373.
8873
8874 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8875
8876         * process.c: use double quotes to quote program name and arguments on
8877         windows. Fixes bug #58575.
8878
8879 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8880
8881         * file-io.c: don't return "." and ".." when using windows Find*File.
8882
8883 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
8884
8885         * marshal.c: Don't pass wrappers to message init because method 
8886         addressed used to lookup metadata. part of remoting[2|3] fix.
8887
8888 2004-05-15  Jackson Harper  <jackson@ximian.com>
8889
8890         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
8891         path is essentially the same as MONO_PATH except that it points to
8892         GACs instead of lib directories.
8893         * loader.h: The user gac is gone so we dont need function to
8894         enable/disable it.
8895         * mono-config.c: user gac option is now gone.
8896         
8897 2004-05-15  Jackson Harper  <jackson@ximian.com>
8898
8899         * culture-info.h: Make defines more consistent, add calendar data
8900         to the culture info table.
8901         * culture-info-tables.h: Add basic calendar data. Basically
8902         everyone gets default gregorian until all the data is
8903         updated.
8904         * locales.c: Use the new consistent defines. Set calendar data for
8905         culture info objects.
8906         * object.h: add a field for calendar data to CultureInfo
8907         
8908 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
8909
8910         * image.c: image->runtime_invoke_cache is keyed on signatures now.
8911         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
8912         a signature.
8913         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
8914         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
8915         an extra param that is the pointer of the method to invoke. The IL for
8916         the invoke method is no longer specific to the method, but to the
8917         signature of the method. Thus, we can share the same code for multiple
8918         methods. This reduces the number of methods that have to be compiled.
8919
8920 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
8921
8922         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
8923
8924         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8925
8926         * icall.c: Optimize Buffer.BlockCopy.
8927
8928 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8929
8930         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
8931         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
8932         quote). Changed them to "MMMM yyyy".
8933
8934 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
8935
8936         * rand.c
8937         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
8938
8939 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
8940
8941         * reflection.h: Updated after changes to managed structures.
8942
8943         * appdomain.c: Bump corlib version.
8944
8945 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8946
8947         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
8948         windows.
8949
8950 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8951
8952         * Makefile.am: link to ../os/libmonoos.la on windows.
8953
8954         * assembly.c:
8955                 -If MONO_DEBUG, warn about non-existing directories in
8956                 MONO_PATH.
8957                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
8958                 compile time variable.
8959                 -Removed init_default_path and call mono_set_rootdir from
8960                 libmonoos.a instead (windows only).
8961
8962         * assembly.h: declare mono_assembly_getrootdir().
8963
8964         * domain.c:
8965         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
8966
8967         * loader.c: s/getenv/g_getenv/
8968
8969 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
8970
8971         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
8972
8973         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
8974
8975         * metadata.h: Add new marshalling conversions.
8976
8977         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
8978         function.
8979
8980         * reflection.c (mono_reflection_get_type): Lookup the type in all
8981         modules of a multi-module assembly. Fixes #58291.
8982
8983 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
8984
8985         * threads.c: Before aborting a background, set the StopRequested
8986         state.  This avoids throwing the Abort exception.
8987         In mono_thread_manage, don't continue with the shutdown until all
8988         aborted threads have actually stopped.
8989
8990 2004-05-10  Jackson Harper  <jackson@ximian.com>
8991
8992         * locales.c: Remove the modifier from culture names.
8993         
8994 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8995
8996         * Makefile.am: monosn is not installed any more. It has been deprecated
8997         in favor of sn.
8998
8999 2004-05-07  Jackson Harper  <jackson@ximian.com>
9000
9001         * locales.c
9002         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
9003         Fix array construction, add bailout if the length is 0.
9004
9005 2004-05-07  Dick Porter  <dick@ximian.com>
9006
9007         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
9008         machine doesn't have a DNS entry.  Patch by Urs Muff
9009         (umuff@quark.com), fixes bug 57928.
9010
9011 2004-05-06  Jackson Harper  <jackson@ximian.com>
9012
9013         * reflection.c: Handle null PublicTokens properly. alloc mem for
9014         assembly names culture so we dont crash when freeing it.
9015         
9016 2004-05-06  Jackson Harper  <jackson@ximian.com>
9017
9018         * assembly.c: Check the usergac when loading with partial names.
9019         
9020 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
9021
9022         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
9023         does nothing for now (not required for Linux/Windows) but the class
9024         library can call it (and a newer or modified runtime could need it).
9025         * icall.c: Registred icall.
9026
9027 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9028
9029         * loader.c: prints a message on module loading error we set MONO_DEBUG
9030         environment variable.
9031
9032 2004-05-05  Jackson Harper  <jackson@ximian.com>
9033
9034         * appdomain.c: Handle PublicKeyToken=null properly.
9035         
9036 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
9037
9038         * environment.c|h: Added icall ves_icall_System_Environment_
9039         GetOSVersionString to get the current OS version as a string.
9040         * icall.c: Registred icall.
9041
9042 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
9043
9044         * object.c: in mono_object_get_virtual_method(), take into account that
9045         non-virtual methods don't have a slot in the vtable. Check needed when
9046         the object is a proxy.
9047
9048 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
9049
9050         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
9051         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
9052
9053         * object.c (mono_class_compute_gc_descriptor): Fix warning.
9054
9055         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
9056         passed when a valuetype is expected.
9057
9058         * object.c (mono_unhandled_exception): Only set the exit code if the
9059         exception happens in the main thread. Fixes thread5.exe.
9060
9061         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
9062         invalid names. Fixes #58047.
9063
9064 2004-05-03  Jackson Harper  <jackson@ximian.com>
9065
9066         * assembly.c: This line was committed accidently and is unneeded.
9067         
9068 2004-05-03  Jackson Harper  <jackson@ximian.com>
9069
9070         * icall.c: Add new icall for Assembly::LoadWithPartialName
9071         * assembly.c/.h: new function that probes the GAC to load partial
9072         assembly names by Paolo Molaro.
9073         
9074 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9075
9076         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
9077         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
9078         (type_get_fully_qualified_name): Added PublicKeyToken when building a
9079         full type name.
9080
9081 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9082
9083         * appdomain.c: fixed check for 'neutral' culture and removed warning.
9084         * reflection.c: fix bug when parsing a full type name and Version is not
9085         the last thing in the string.
9086
9087 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
9088
9089         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
9090         crashes when it is freed.
9091
9092 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9093
9094         * assembly.c: print the compat warning to stderr.
9095
9096 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
9097
9098         * assembly.c (mono_assembly_load_references): Add a compatibility
9099         hack to run old applications that might be still referencing the
9100         3300-based assemblies, only do this for System.xxx.
9101
9102 2004-05-01  Jackson Harper  <jackson@ximian.com>
9103
9104         * appdomain.c: If the culture is neutral we set it to "".
9105         
9106 2004-04-29  Jackson Harper  <jackson@ximian.com>
9107
9108         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
9109
9110 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
9111  
9112         * string-icalls.c: added low overhead function for copying chars
9113         * icall.c: added needed icall for the above function
9114  
9115 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9116
9117         * icall.c: fix return value of get_global_assembly_cache.  Implemented
9118         Environment.GetLogicalDrives.
9119
9120 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
9121
9122         * rand.c: try and talk to egd or prngd
9123         for random bytes if opening devices fail.
9124
9125 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
9126
9127         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
9128         alignment for the type using the native alignment of its members 
9129         instead of using klass->min_align.
9130
9131         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
9132
9133 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9134
9135         * file-io.c:
9136         * socket-io.c: added check for sys/aio.h.
9137
9138 2004-04-28  Dick Porter  <dick@ximian.com>
9139
9140         * threads.c: Don't abort a thread thats already aborting, when
9141         terminating everything.
9142
9143 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9144
9145         * icall.c: added 2 new async calls for Socket.
9146
9147         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
9148         IO on *nix systems.
9149
9150         * threadpool.c: removed unused variable.
9151
9152 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
9153
9154         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
9155
9156 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9157
9158         * locales.c: put back string_invariant_tolower () and
9159         string_invariant_toupper ().
9160
9161 2004-04-26 David Waite <mass@akuma.org>
9162
9163         * file-io.h:
9164         * socket-io.h:
9165         * threads.h:
9166         * unicode.h: remove comma from end of enumeration declarations
9167
9168 2004-04-26 David Waite <mass@akuma.org>
9169
9170         * debug-mono-symfile.h:
9171         * decimal.c:
9172         * mono_debug.h:
9173         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
9174
9175
9176 2004-04-26  Jackson Harper  <jackson@ximian.com>
9177
9178         * appdomain.c: Increment version number.
9179         
9180 2004-04-26  Jackson Harper  <jackson@ximian.com>
9181
9182         * appdomain.c: Set assembly references public token value when
9183         PublicKeyToken is specified, not the hash_value. Free public token
9184         values when free assembly name data. Previously the public key
9185         token was hex decoded, however we are using hex encoded public key
9186         tokens, so this is not neccasary.
9187         * assembly.c: Lookup assemblies in the gac if their public token
9188         value is set. Add function to allow enabling user gac
9189         lookups. Specify whether or not the assembly was loaded from the
9190         GAC. Compare full assembly names when checking the cache for
9191         assemblies (Temporarily disabled see comment in code). Remove
9192         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
9193         specifies trace-loader they get extra info to stdout on the
9194         loading of assemblies.
9195         * image.h: Add a field for an assembly references public token
9196         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
9197         whether an assembly has been loaded from the GAC.
9198         * image.c: Remove a corlib -> mscorlib name mapping.
9199         * loader.h: Add function to enable/disable the user gac.
9200         * mono-config.c: Check if the usergac is enabled in the config
9201         file.
9202         * icall.c: New icall to determine whether or not an assembly has
9203         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
9204         * tabldefs.h: Add constant for assemblyref flag that specifies a
9205         full public key is used instead of a public token.
9206         * reflection.c: Remove mscorlib -> corlib mappings. Set
9207         PublicTokenValue instead of hash value. This value is a hex
9208         string so it does not need to be expanded.
9209
9210 2004-04-26  Martin Baulig  <martin@ximian.com>
9211
9212         * mono-debug-debugger.c (mono_debugger_initialize): Set
9213         `mono_debugger_initialized' before calling mono_debug_lock().
9214
9215 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
9216
9217         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
9218           InternalToUpper/InternalToLower.
9219         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
9220           removed invariant culture shortcut.  This is now done in managed code.
9221         * locales.c: (string_invariant_toupper/tolower) removed.
9222
9223 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9224
9225         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
9226         Added Poll internal call.
9227
9228         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
9229         call for Poll. Select was too heavy for polling a single socket.
9230
9231         * threadpool.[ch]: added mono_threadpool_cleanup.
9232         * threads.c: use it. Don't use Thread_Abort on windows.
9233
9234 2004-04-23  Martin Baulig  <martin@ximian.com>
9235
9236         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
9237
9238 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
9239
9240         * icall.c: Registred new icalls for key pair protection and added an
9241         icall for Environment.GetFolderPath on Windows.
9242         * security.c|h: Added new icalls for key pair protection.
9243
9244 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9245
9246         * socket-io.c: don't display the non-supported family warning for known
9247         families. Now this is not displayed on windows when checking support
9248         for IPv4/IPv6.
9249
9250 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9251
9252         * class.c: don't display the layout warning for static fields.
9253
9254 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
9255
9256         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
9257         * locales.c, locales.h: Added new icalls for culture-specific
9258         Char.ToLower and Char.ToUpper.
9259
9260 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9261
9262         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
9263         by David Waite.
9264
9265 2004-04-20  Martin Baulig  <martin@ximian.com>
9266
9267         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
9268         of the type name before passing it to mono_reflection_type_from_name().
9269
9270 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
9271
9272         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
9273         encodings here. Fixes #56965.
9274
9275 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
9276
9277         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9278         fix test on strstr result not that I can see anything that
9279         relies on the result.
9280
9281 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
9282
9283         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
9284         Fixes #57081.
9285
9286         * marshal.c (mono_marshal_get_string_encoding): New helper function.
9287
9288         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
9289         function to determine which marshalling to use for strings. Fixes
9290         #56965.
9291
9292         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
9293
9294         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
9295
9296 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
9297
9298         * icall.c: #include mono-config.h
9299
9300 2004-04-15  Jackson Harper  <jackson@ximian.com>
9301
9302         * culture-info-tables.h: Fix date formats for en-US culture.
9303         
9304 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
9305
9306         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
9307         ThreadPool.SetMinThreads.
9308         * threadpool.c: Implemented ThreadPool.GetMinThreads and
9309         ThreadPool.SetMinThreads.
9310
9311 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9312
9313         * mono-config.c: also load the .config file in the directory
9314         where the assembly was found.
9315
9316 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
9317
9318         * assembly.c: load per-assembly config files.
9319         * icall.c: decrapified code to get the config dir and moved to
9320         mono-config.c.
9321         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
9322         per-assembly config files. When doing a dll map lookup give precedence
9323         to the per-assembly data.
9324
9325 2004-04-14  Martin Baulig  <martin@ximian.com>
9326
9327         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
9328         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
9329         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
9330
9331         * mono-debugger-debugger.c: While the debugger is locked, remember
9332         whether the symbol tables have changes and send one single
9333         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
9334
9335 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
9336
9337         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
9338
9339         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
9340         function.
9341
9342         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
9343         account when marshalling string arrays. Fixes #56965.
9344
9345 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
9346
9347         * icall.c: Add new icalls mapping for security.
9348         * security.c|h: Add internal calls for WindowsIdentity,
9349         WindowsImpersonationContext and WindowsPrincipal.
9350
9351 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
9352
9353         * class.c: Added comment to ensure the System.MonoDummy class
9354         is removed when no longer necessary
9355
9356 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
9357
9358         * appdomain.c: Pass arguments to the bootstraping exceptions to
9359         minimize JITed methods at boot
9360
9361         * metadata.c (mono_exception_from_name_two_strings): Allow for the
9362         second string to be null.
9363
9364         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9365         Change the protocol to minimize the JIT methods at startup.  Now
9366         it Returns the internal codepage, if the value of "int_code_page"
9367         is 1 at entry, and we can not compute a suitable code page
9368         number, returns the code page as a string.
9369
9370 2004-04-13  Jackson Harper  <jackson@ximian.com>
9371
9372         * culture-info-tables.h: Fix number of decimal digits for all
9373         english locales.
9374
9375 2004-04-13  Jackson Harper  <jackson@ximian.com>
9376
9377         * icall.c: Clairfy out of sync error message. It is not always
9378         your corlib that is out of sync.
9379
9380 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
9381
9382         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
9383         properties when only the set accessor is overriden. Fixes #55874.
9384
9385 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
9386
9387         * assembly.c (mono_assembly_load_references): Make this thread safe.
9388         Fixes #56327.
9389
9390 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
9391
9392         * monosn.c: Add missing initialization calls.
9393
9394 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
9395
9396         * locales.c:
9397         ves_icall_System_Globalization_CultureInfo_construct_number_format
9398         Fix g_assert so it compiles on fussier compilers re int/ptr
9399         mismatch
9400
9401 2004-04-08  Dick Porter  <dick@ximian.com>
9402
9403         * socket-io.h:
9404         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
9405         53992.  Also rearrange the code so that the internal calls return
9406         an error value and exceptions are thrown from managed code.
9407
9408         * icall.c: Add type info to the socket icalls.
9409
9410 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9411
9412         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
9413         owes me a beer.
9414
9415 2004-04-07  Martin Baulig  <martin@ximian.com>
9416
9417         * class.c (mono_class_from_generic_parameter): Don't default
9418         `klass->parent' to `mono_defaults.object_type'.
9419
9420 2004-04-07  Martin Baulig  <martin@ximian.com>
9421
9422         * reflection.c (mono_reflection_initialize_generic_parameter): Set
9423         `param->pklass->reflection_info'.       
9424
9425 2004-04-07  Jackson Harper  <jackson@ximian.com>
9426
9427         * culture-info-tables.h: Fix date separator symbol.
9428         
9429 2004-04-07  Martin Baulig  <martin@ximian.com>
9430
9431         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
9432         from System.Type to System.MonoType.
9433
9434 2004-04-07  Martin Baulig  <martin@ximian.com>
9435
9436         * reflection.h
9437         (MonoReflectionGenericParam): Added `has_reference_type' and
9438         `has_value_type' fields.
9439
9440         * reflection.c (mono_image_get_generic_param_info): Encode the
9441         correct flags if we have the `class' or `struct' constraint.
9442
9443 2004-04-07  Martin Baulig  <martin@ximian.com>
9444
9445         * reflection.h
9446         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
9447
9448 2004-04-07  Jackson Harper  <jackson@ximian.com>
9449
9450         * appdomain.c: Revert extra patches, just wanted to bump the
9451         version number.
9452         
9453 2004-04-07  Jackson Harper  <jackson@ximian.com>
9454
9455         * Makefile.am: Add culture-info private headers.
9456         * icall.c: Add new icalls for contructing locales.
9457         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
9458         * locales.h: Declare new culture info construction methods.
9459         * object.h: Add new fields used to avoid the CultureMap to
9460         MonoCultureInfo.
9461         * culture-info.h: Definition of structs used in the culture info
9462         tables.
9463         * culture-info-tables.h: Autogenerated tables that contain culture
9464         info data. This file was generated with the locale-builder tool.
9465         * appdomain.c: Incement corlib version number.
9466         
9467 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
9468
9469         * appdomain.c: (mono_runtime_init) move mono_thread_init
9470         to before mono_object_new calls so critical sections
9471         are initialized before use.
9472
9473 2004-04-07  Martin Baulig  <martin@ximian.com>
9474
9475         * icall.c
9476         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
9477         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
9478         (ves_icall_MonoGenericParam_initialize): Removed.
9479         (monogenericparam_icalls): Removed.
9480         (generictypeparambuilder_icalls): Added new table for
9481         System.Reflection.Emit.GenericTypeParameterBuilder.
9482
9483         * reflection.c
9484         (mono_reflection_define_generic_parameter): Removed.
9485         (mono_reflection_initialize_generic_parameter): This is now called
9486         from GenericTypeParameterBuilder's .ctor.
9487
9488 2004-04-06  Martin Baulig  <martin@ximian.com>
9489
9490         * class.c (mono_class_init): Don't inflate nested classes in a
9491         generic instance.
9492         (mono_type_get_name_recurse): Include the generic arguments for
9493         generic instances and generic type declarations.
9494         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
9495         (_mono_class_get_instantiation_name): Removed.
9496         (mono_class_create_generic): Always use `gklass->name' as our name.
9497
9498         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
9499
9500         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
9501         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
9502         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
9503         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
9504         closed generic methods here.
9505
9506         * reflection.c
9507         (mono_reflection_generic_inst_get_nested_types): Removed.
9508         (inflate_mono_method): Copy the generic parameters from the
9509         MonoMethodHeader into out MonoGenericMethod.
9510
9511 2004-04-06  Martin Baulig  <martin@ximian.com>
9512
9513         * row-indexes.h
9514         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
9515
9516         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
9517
9518         * reflection.c (build_compressed_metadata): If we have any entries
9519         in the GenericParam, MethodSpec or GenericParamConstraint tables,
9520         set the header version to 1.1.
9521
9522 2004-04-06  Martin Baulig  <martin@ximian.com>
9523
9524         * class.c (mono_class_init): If we're a generic instance,
9525         initialize our nested classes, too.
9526         (_mono_class_get_instantiation_name): Deal with the new `!%d'
9527         suffix. 
9528
9529 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9530
9531         * process.c: quote the argument passed to the shell on windows.
9532
9533 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
9534
9535         * threads.c (mono_alloc_special_static_data): Allow this to be
9536         called during startup.
9537
9538 2004-04-02  Martin Baulig  <martin@ximian.com>
9539
9540         * icall.c
9541         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
9542
9543 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
9544
9545         * icall.c: Fix build.
9546
9547 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
9548
9549         * Makefile.am: Added security.c|h.
9550         * icall.c: Added icall for get_UserName;
9551         * security.c: New file for security related icalls. Added function
9552         get_UserName for System.Environment (fix #56144).
9553         * security.h: New. Header file for security.c
9554
9555 2004-04-02  Dick Porter  <dick@ximian.com>
9556
9557         * icall.c: Deleted the icalls that were obsoleted some time ago
9558         by the ICU string code, and which were mixed into the icall
9559         rearranging.  Fixes bug 55969.
9560
9561         * string-icalls.h: 
9562         * string-icalls.c: Deleted the code that those icalls reference.
9563
9564 2004-04-01  Martin Baulig  <martin@ximian.com>
9565
9566         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
9567
9568         * class.c (mono_class_from_generic_parameter): Don't set 
9569         TYPE_ATTRIBUTE_INTERFACE.
9570         (my_mono_class_from_generic_parameter): Likewise.
9571
9572 2004-04-01  Martin Baulig  <martin@ximian.com>
9573
9574         * loader.c (find_method): Added an optional `MonoClass *ic'
9575         argument to search in a specific interface.
9576         (mono_get_method_constrained): New public function.
9577
9578 2004-04-01  Martin Baulig  <martin@ximian.com>
9579
9580         * reflection.c (mono_image_get_generic_field_token): Use the
9581         `handleref' cache here.
9582
9583 2004-04-01  Martin Baulig  <martin@ximian.com>
9584
9585         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
9586
9587         * reflection.c (create_generic_typespec): Use the `typespec' hash
9588         here, not the `typeref' one.    
9589
9590 2004-04-01  Martin Baulig  <martin@ximian.com>
9591
9592         * class.c (mono_class_inflate_generic_type): Moved the
9593         functionality into a new static inflate_generic_type() which
9594         returns NULL if it didn't do anything.  Only increment the
9595         `mono_stats.inflated_type_count' if we actually inflated
9596         something.
9597         (mono_class_get_full): Check the classes type to see whether we
9598         need to inflate it; also inflate MONO_TYPE_(M)VAR.
9599
9600 2004-04-01  Jackson Harper  <jackson@ximian.com>
9601
9602         * reflection.c: Set culture for assembly references.
9603         
9604 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
9605
9606         * reflection.[ch], icall.[ch], Fix support for pinning variables.
9607
9608 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9609
9610         * assembly.c:
9611         (do_mono_assembly_open): the critical section also covers
9612         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
9613
9614 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9615
9616         * threads.c:
9617         (mono_manage_threads): abort the background threads when finishing.
9618         Fixes bug #47232.
9619
9620 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9621
9622         * gc.c: only close the done_event handle if there was no timeout.
9623         C-ified comments.
9624
9625 2004-03-30  Martin Baulig  <martin@ximian.com>
9626
9627         * icall.c (icall_entries): It's called "System.Activator", not
9628         "System.Activation".    
9629
9630 2004-03-30  Martin Baulig  <martin@ximian.com>
9631
9632         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
9633         (mono_class_create_from_typespec): Likewise.
9634
9635 2004-03-30  Martin Baulig  <martin@ximian.com>
9636
9637         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
9638         `has_ctor_constraint' and `initialized'.
9639
9640 2004-03-30  Martin Baulig  <martin@ximian.com>
9641
9642         * reflection.c (encode_new_constraint): New static function to add
9643         the constructor constraint attribute to a type parameter.
9644         (encode_constraints): Call encode_new_constraint() if necessary.
9645
9646         * reflection.h
9647         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
9648
9649         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
9650         
9651 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
9652
9653         * reflection.c, icall.c: add support for pinning variables. 
9654
9655 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
9656
9657         * marshal.c (mono_marshal_get_managed_wrapper):
9658         init bool local with zero rather than null.
9659
9660 2004-03-29  Martin Baulig  <martin@ximian.com>
9661
9662         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
9663         the "official" behavior here.
9664         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
9665
9666 2004-03-29  Martin Baulig  <martin@ximian.com>
9667
9668         * icall.c: Reflect latest API changes.
9669
9670 2004-03-29  Martin Baulig  <martin@ximian.com>
9671
9672         * loader.c (mono_get_method_from_token): Also call
9673         mono_metadata_load_generic_params () for abstract and interface
9674         methods; replace the type arguments in the method signature with
9675         the ones which are loaded from the metadata.
9676
9677 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
9678
9679         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
9680         of the lock is not the current thread. MS.NET don't do it, in spite of
9681         what the documentation says. See bug #56157.
9682
9683 2004-03-28  Martin Baulig  <martin@ximian.com>
9684
9685         * class.c (mono_class_init): Don't call init_properties() and
9686         init_events() for generic instances; set `prop->parent' when
9687         inflating properties.
9688
9689         * reflection.c (mono_generic_inst_get_object): Call
9690         `mono_class_init (ginst->klass)'.
9691         (mono_type_get_object): Only create a MonoGenericInst if your
9692         generic type is a TypeBuilder.
9693         (do_mono_reflection_bind_generic_parameters): Only set
9694         `ginst->is_dynamic' if our generic type is a TypeBuilder.
9695
9696 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
9697
9698         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
9699         Fixes #56091.
9700
9701 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9702
9703         * icall.c: added Kill_internal icall.
9704         * process.[ch]: added Kill_internal icall.
9705
9706 2004-03-25  Martin Baulig  <martin@ximian.com>
9707
9708         * class.h (MonoStats): Added `generic_instance_count',
9709         `inflated_method_count', `inflated_type_count' and
9710         `generics_metadata_size'.       
9711
9712 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9713
9714         * reflection.c: no warnings now.
9715
9716 2004-03-25  Martin Baulig  <martin@ximian.com>
9717
9718         * class.c (mono_class_get_full): New public function; does a
9719         mono_class_get(), but also takes a `MonoGenericContext *'.
9720
9721         * loader.c (mono_field_from_memberref): Renamed to
9722         `field_from_memberref', made static and added `MonoGenericContext *'
9723         argument.
9724         (mono_field_from_token): Added `MonoGenericInst *' argument.
9725         (method_from_memberef): Likewise.
9726         (mono_get_method_from_token): Likewise.
9727         (mono_get_method_full): New public function; does a
9728         mono_get_method(), but also takes a `MonoGenericContext *'.
9729
9730         * verify.c (mono_method_verify): Get the method's generic context
9731         and pass it to mono_field_from_token(), mono_get_method_full() and
9732         mono_class_get_full().
9733
9734 2004-03-25  Martin Baulig  <martin@ximian.com>
9735
9736         * class.c (mono_class_inflate_generic_type): Take a
9737         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
9738         `MonoGenericMethod *'.
9739
9740 2004-03-25  Martin Baulig  <martin@ximian.com>
9741
9742         * loader.h (MonoMethodInflated): Store the MonoGenericContext
9743         instead of the MonoGenericMethod here.
9744
9745 2004-03-25  Martin Baulig  <martin@ximian.com>
9746
9747         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
9748         each time we create a new MonoGenericInst, we also create a new
9749         context which points back to us.
9750
9751         * class.c (inflate_method): Use `ginst->context' instead of
9752         creating a new context.
9753
9754         * loader.c (method_from_memberref): Use
9755         `klass->generic_inst->context' instead of creating a new context.
9756
9757 2004-03-25  Martin Baulig  <martin@ximian.com>
9758
9759         * class.h (MonoGenericContext): New struct.
9760         (MonoGenericMethod): Removed `generic_inst'.
9761
9762         * class.c (mono_class_inflate_generic_method): Take a
9763         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
9764
9765 2004-03-25  Martin Baulig  <martin@ximian.com>
9766
9767         * loader.h (MonoMethodInflated): New typedef.
9768
9769         * metadata.h (MonoMethodSignature): Removed `gen_method', make
9770         `generic_param_count' consume just 30 bits, added `is_inflated'
9771         and `has_type_parameters' flags (one bit each).
9772
9773         * class.c (mono_class_inflate_generic_method): Create a
9774         MonoMethodInflated instead of a MonoMethodNormal and set
9775         `is_inflated' in the method signature.
9776
9777         * class.h (MonoGenericMethod): Removed `generic_method'.
9778
9779 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
9780
9781         * image.c: Make sure the name of a MonoImage is always an absolute path.
9782           This fixes bug #54415.
9783
9784 2004-03-24  Martin Baulig  <martin@ximian.com>
9785
9786         * class.c (mono_class_setup_vtable): If we're a generic instance,
9787         use our generic type's vtable size.
9788
9789 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
9790
9791         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
9792         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
9793         problems.
9794
9795 2004-03-23  Martin Baulig  <martin@ximian.com>
9796
9797         * class.h (MonoDynamicGenericInst): Added `int count_events' and
9798         `MonoEvent *events'.
9799
9800         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
9801         (typebuilder_icalls): Added "get_event_info"; calls
9802         mono_reflection_event_builder_get_event_info(). 
9803
9804         * reflection.c (mono_reflection_generic_inst_initialize): Added
9805         `MonoArray *events'.
9806         (mono_reflection_event_builder_get_event_info): New function.
9807
9808 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
9809
9810         * object.h: add mono_type_initialization_init
9811
9812         * object.c (mono_runtime_class_init): 
9813         implement class constructor synchronization rules
9814         to cope with threading issues.  
9815         add mono_type_initialization_init
9816
9817         * appdomain.c (mono_runtime_init): call 
9818         mono_type_initialization_init
9819
9820         * class.h: removing initializing field from MonoVTable
9821
9822 2004-03-23  Martin Baulig  <martin@ximian.com>
9823
9824         * class.c (my_mono_class_from_generic_parameter): Use
9825         `param->name' if it's not NULL. 
9826
9827 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
9828
9829         * class.c: do not insert non-virtual methods in the vtable.
9830         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
9831         that means the method is non-virtual. This never would have
9832         happened before.
9833
9834 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
9835
9836         * profiler.c: Added lock for accessing coverage_hash.
9837
9838 2004-03-22  Martin Baulig  <martin@ximian.com>
9839
9840         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
9841         `method->method->signature->generic_param_count != 0' to make it
9842         work for interface methods.
9843
9844 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9845
9846         * process.c: quote the string passed to the shell using g_shell_quote.
9847
9848 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9849
9850         * threads.c:
9851         (mono_threads_manage): don't remove the finalizer thread and self
9852         from the threads hash table so that mono_thread_manage can be called
9853         more than once.
9854
9855 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9856
9857         * process.c: quote the arguments when UseShellExecute is true. Fixes
9858         bug #55790.
9859
9860 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9861
9862         * threads.c: set mono_thread_detach as a cleanup routine for every
9863         thread. This way it's always executed upon thread termination, either
9864         aborted or finished normally. No more xsp hangs!
9865
9866 2004-03-17  Martin Baulig  <martin@ximian.com>
9867
9868         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
9869         `int count_nested' and a `MonoType **nested'.
9870
9871         * reflection.c (mono_reflection_bind_generic_parameters): Moved
9872         most of the functionality into a new static
9873         do_mono_reflection_bind_generic_parameters() and don't take a
9874         `MonoType *nested_in' argument any more.  Don't compute nested
9875         types here.
9876         (mono_reflection_generic_inst_get_nested_types): New public method
9877         to get nested types.
9878
9879         * class.c (mono_class_create_generic): Set `klass->nested_in' if
9880         we're a nested class.
9881
9882         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
9883         mono_reflection_generic_inst_get_nested_types() to compute the
9884         nested types.
9885
9886 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
9887
9888         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
9889         descriptive error message under windows.
9890         
9891 2004-03-17  Martin Baulig  <martin@ximian.com>
9892
9893         * class.c (dup_type): Added `const MonoType *original' argument;
9894         copy the attrs from the original type.
9895
9896 2004-03-17  Martin Baulig  <martin@ximian.com>
9897
9898         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
9899         `m->generic_inst_cache' here.
9900
9901 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
9902
9903         * exception.h exception.c: Add stack_overflow_exception.
9904
9905 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9906
9907         * threadpool.c:
9908         (overlapped_callback): call SetEvent *after* invoking the callback.
9909         No need to call CloseHandle.
9910
9911 2004-03-16  Martin Baulig  <martin@ximian.com>
9912
9913         * reflection.c (mono_image_get_fieldref_token): Take a
9914         `MonoReflectionField *' instead of a `MonoClassField *' and a
9915         `MonoClass *'; store the `MonoReflectionField *' in the hash.
9916
9917 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9918
9919         * appdomain.c: don't add the culture to the filename we're looking for
9920         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
9921
9922 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9923
9924         * locales.c: don't ignore symbols when doing case insensitive compares.
9925         Thanks Dick! Fixes bug #54046.
9926
9927         * threads.c: surround 'threads' usage with enter/leave in
9928         mono_thread_manage.
9929
9930 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
9931
9932         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
9933         implicitly marshalled as [Out]. Fixes #55450.
9934
9935         (mono_marshal_get_runtime_invoke): Zero out the result if there is
9936         an exception.
9937
9938 2004-03-16  Martin Baulig  <martin@ximian.com>
9939
9940         * class.c (mono_class_from_generic_parameter): Use the actual
9941         parameter name. 
9942
9943 2004-03-16  Martin Baulig  <martin@ximian.com>
9944
9945         * reflection.c (type_get_signature_size): New static function.
9946         Compues the size of the type in a method signature.
9947         (method_get_signature_size): New static function; calls
9948         type_get_signature_size() to compute the actual size of the
9949         method's signature.
9950         (method_encode_signature): Use method_get_signature_size() to get
9951         the signature's size rather than using `nparams * 10'.
9952
9953 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9954
9955         * file-io.h: define here WapiOverlapped on windows. I don't want the
9956         regular OVERLAPPED one.
9957
9958         * file-io.c:
9959         * threadpool.c: somehow, BindIoCompletionCallback is not found.
9960         Disabling AIO on windows.
9961
9962 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9963
9964         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
9965         bug #55385.
9966
9967 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9968
9969         * appdomain.c: upgraded corlib version.
9970
9971         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
9972         and BeginWrite. Allow opening files for asynchrnous operations.
9973
9974         * file-io.h: new struct that maps FileStreamAsyncResult.
9975         * icall.c: added new icalls.
9976         * process.[ch]: support setting child process environment variables
9977         and use the SHELL or COMSPEC when UseShellExecute is true.
9978
9979         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
9980         callback for async. IO is here and also BindHandle.
9981
9982         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
9983         from here.
9984
9985 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
9986
9987         * reflection.c (create_custom_attr): Allow len == 0.
9988
9989         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
9990         computation on big-endian machines.
9991
9992 2004-03-13  Martin Baulig  <martin@ximian.com>
9993
9994         * class.h (MonoGenericInst): Added `int count_ifaces'.
9995
9996         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
9997         `ginst->count_ifaces' instead `klass->interface_count' since we
9998         may get called before the vtable is created.
9999
10000         * loader.c (mono_method_get_param_names): If we're a generic
10001         instance, return and don't initialize the class.
10002
10003         * reflection.c (mono_reflection_setup_generic_class): Don't call
10004         ensure_runtime_vtable().
10005         (mono_reflection_bind_generic_parameters): Set
10006         `ginst->count_ifaces'.
10007
10008 2004-03-11  Jackson Harper <jackson@ximian.com>
10009
10010         * icall.c:
10011         * unicode.c:
10012         * unicode.h: Remove unused System.Char icalls.
10013         
10014 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
10015
10016         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
10017         code when we P/Invoke the first library in Windows.Forms, instead
10018         of when we first open the assembly.
10019
10020         * assembly.c: Drop the lookup from here.
10021
10022 2004-03-10  Martin Baulig  <martin@ximian.com>
10023
10024         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
10025         class for properties, fields and events.  Finally fixes #54945.
10026
10027 2004-03-10  Martin Baulig  <martin@ximian.com>
10028
10029         * metadata.c (mono_metadata_class_equal): New static function;
10030         checks whether two generic instances or two generic parameters are
10031         equal.
10032         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
10033         compare classes.        
10034
10035 2004-03-10  Martin Baulig  <martin@ximian.com>
10036
10037         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
10038
10039         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
10040         argument and write it into the `reflection_info' field.
10041
10042         * icall.c
10043         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
10044         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
10045
10046 2004-03-09  Jackson Harper  <jackson@ximian.com>
10047
10048         * char-conversions.h: use 8 bits for numeric data its all we need
10049         * icall.c: numeric data is only 8 bits now.
10050
10051 2004-03-09  Martin Baulig  <martin@ximian.com>
10052
10053         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
10054
10055         * class.c (init_properties, init_events): Initialize the new
10056         `parent' field.
10057
10058         * reflection.c (typebuilder_setup_properties): Likewise.
10059         (typebuilder_setup_events): Likewise.
10060
10061         * reflection.h (MonoEventInfo): Replaced `parent with
10062         `declaring_type' and `reflected_type'.
10063
10064         * icall.c (ves_icall_get_property_info): Distinguish between
10065         declaring and reflected type.
10066         (ves_icall_get_event_info): Likewise.
10067
10068 2004-03-09  Martin Baulig  <martin@ximian.com>
10069
10070         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
10071         (ves_icall_Type_GetField): Correctly set field->klass.
10072
10073 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
10074
10075         * loader.h: Fix warning.
10076
10077 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
10078
10079         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
10080         library routine if present.  Notice that it will still continue
10081         executing even if its missing, for those working on the Gtk#
10082         edition of Windows.Forms.
10083
10084         * assembly.c (do_mono_assembly_open): If loading the
10085         System.Windows.Forms call mono_loader_wini_init.
10086
10087 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
10088
10089         * class.h: Added MonoRemoteClass struct.
10090         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
10091         function for MonoStrings.
10092         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
10093         Added internal call for getting the proxy type.
10094         * marshal.c: Get the type of transparent proxies from its remote_class.
10095         Added methods that generate the IL for type checks and casts:
10096         mono_marshal_get_isinst, mono_marshal_get_castclass, 
10097         mono_marshal_get_proxy_cancast.
10098         * marshal.h: Declaration of the previous new methods.
10099         * object.c: Added new moethods for creating and updating MonoRemoteClass
10100         instances: mono_remote_class, mono_upgrade_remote_class, 
10101         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
10102         * verify.c: FIx transparent_proxy_fields layout.
10103         * appdomain.c: Bump corlib version.
10104
10105 2004-03-04  Jackson Harper  <jackson@ximian.com>
10106
10107         * icall.c: Add icall to access char conversion tables.
10108         * char-conversions.h: Character conversion tables.
10109         * Makefile.am: Add char-conversions.h private header file.
10110         
10111 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
10112
10113         * appdomain.c (unload_thread_main): Increase unloading timeout to
10114         10 sec as a temporary workaround for Nant problems.
10115
10116 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
10117
10118         * gc.c: Add checks for GC_enable and GC_disable.
10119
10120         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
10121         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
10122         (bug #54988).
10123         
10124 2004-02-27  Martin Baulig  <martin@ximian.com>
10125
10126         * reflection.c (mono_reflection_bind_generic_parameters): Take a
10127         `MonoReflectionType *' instead of a `MonoType *'.
10128
10129 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
10130
10131         * gc.c (run_finalize): Avoid finalizing the object representing the
10132         finalizer thread.
10133         (finalizer_thread): Fix warning.
10134
10135 2004-02-25  Martin Baulig  <martin@ximian.com>
10136
10137         * class.c (_mono_class_get_instantiation_name): Added `int offset'
10138         argument for nested types.
10139         (mono_class_create_generic): Added support for nested generictypes.
10140
10141         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
10142         `GList *nested'.
10143
10144         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
10145
10146         * reflection.c (method_encode_signature): Increase the minimum
10147         value of `size' from 10 to 11.
10148         (mono_reflection_bind_generic_parameters): Take `int type_argc'
10149         and `MonoType **types' arguments instead of the `MonoArray
10150         *types'; added `MonoType *nested_in'.  Recursively instantiate
10151         nested classes. 
10152
10153 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
10154
10155         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
10156         stack_overflow_ex members which are used by exception handling.
10157
10158         * appdomain.c (mono_runtime_init): Initialize the new members.
10159
10160         * gc.c (mono_gc_enable): New helper function.
10161         * gc.c (mono_gc_disable): New helper function.
10162
10163 2004-02-23  Martin Baulig  <martin@ximian.com>
10164
10165         * icall.c: I must have been really stupid - make it actually work
10166         this time ;-)
10167
10168 2004-02-23  Martin Baulig  <martin@ximian.com>
10169
10170         * loader.c (method_from_memberref): Only inflate the method if
10171         it's in another klass.
10172
10173 2004-02-23  Martin Baulig  <martin@ximian.com>
10174
10175         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
10176         (mono_class_init): If we're a generic instance and an interface,
10177         compute `class->interface_id'; also create `class->interfaces'
10178         here and inflate them.
10179
10180         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
10181         `ginst->is_open'.
10182         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
10183
10184         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
10185
10186 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
10187
10188         * reflection.c (method_encode_code): Improved the error message
10189         generated by the exception.
10190
10191 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10192
10193         * icall.c: Martin did not do what he said in the ChangeLog for
10194         2004-02-18, but put back the changes for properties and events.
10195         Commenting those changes out again and adding comment to bug #54518.
10196         
10197         * process.c: removed warning.
10198
10199 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
10200
10201         * marshal.c (emit_struct_conv): Print an error message instead of
10202         asserting when a type does not have the StructLayout attribute.
10203
10204 2004-02-20  Martin Baulig  <martin@ximian.com>
10205
10206         * reflection.c (mono_type_get_object): Also use the cache for
10207         generic instances.
10208         (mono_reflection_bind_generic_parameters): Always compute
10209         `ginst->ifaces'.        
10210
10211 2004-02-20  Martin Baulig  <martin@ximian.com>
10212
10213         * class.h (MonoGenericMethod): Removed `klass'.
10214
10215         * class.c (mono_class_inflate_generic_method): Added `MonoClass
10216         *klass' argument.
10217
10218 2004-02-20  Martin Baulig  <martin@ximian.com>
10219
10220         * reflection.c (method_encode_methodspec): Actually use the
10221         uninflated signature for the memberref.
10222
10223 2004-02-20  Martin Baulig  <martin@ximian.com>
10224
10225         * class.h (MonoGenericMethod): Removed `declaring'.
10226
10227         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
10228         is NULL, compute it here.
10229
10230 2004-02-20  Martin Baulig  <martin@ximian.com>
10231
10232         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
10233
10234         * metadata.c (mono_metadata_generic_inst_hash): New method.
10235         (mono_metadata_generic_inst_equal): New method.
10236
10237         * reflection.c (mono_reflection_bind_generic_parameters): Use the
10238         `klass->image->generic_inst_cache' cache to avoid creating
10239         duplicate MonoGenericInst's.
10240
10241         * class.c (mono_class_inflate_generic_type): Use the cache.
10242
10243 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
10244
10245         * object.c: fixed gc descriptor calculation for embedded valuetypes.
10246
10247 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10248
10249         * icall.c: added Socket.WSAIoctl icall.
10250
10251         * socket-io.[ch]: implemented
10252         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
10253
10254 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
10255
10256         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
10257
10258 2004-02-18  Urs C Muff  <umuff@quark.com>
10259
10260         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
10261         this work on PPC and other big-endian architectures.
10262
10263         * debug-mono-symfile.h: Prepended the names of all the `guint32'
10264         fields with an underscore to make sure they're only accessed by
10265         the read32() macro.
10266
10267 2004-02-18  Martin Baulig  <martin@ximian.com>
10268
10269         * icall.c: Put the klass->refclass changes back for methods and
10270         fields, but not for properties and events.  We're currently not
10271         distinguishing between DeclaringType and ReflectedType for
10272         properties and events, that's what caused the regressions.
10273
10274 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10275
10276         * object.c:
10277         (mono_async_result_new): the handle can be NULL.
10278
10279         * threadpool.c: Use an event instead of a semaphore, don't initialize
10280         it until needed. This saves quite a few semaphores from being created
10281         when using the threadpool.
10282
10283 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
10284
10285         * object.c (mono_string_is_interned_lookup): Fix interning of long
10286         strings. Fixes #54473.
10287
10288         * domain.c (ldstr_equal): Optimize if the two strings are equal.
10289
10290         * icall.c: Revert the klass->refclass changes since they introduce
10291         regressions (bug #54518).
10292
10293 2004-02-18  Martin Baulig  <martin@ximian.com>
10294
10295         * class.c (mono_class_init): If we're a generic instance and don't
10296         come from a TypeBuilder, inflate our members here.
10297         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
10298         (mono_class_create_generic): New public method.
10299         (mono_class_initialize_generic): Removed.
10300         (get_instantiation_name): Renamed to
10301         _mono_class_get_instantiation_name() and made it public.
10302
10303 2004-02-18  Martin Baulig  <martin@ximian.com>
10304
10305         * class.c (mono_class_inflate_generic_type): Clear the new
10306         instance's `nginst->klass' when inflating a generic instance.
10307         (mono_class_is_subclass_of): Added (basic) support for generic
10308         instances.
10309
10310 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
10311
10312         * appdomain.h, domain.c: use a MonoCodeManager instead of a
10313         MonoMempool to hold compiled native code.
10314
10315 2004-02-17  Martin Baulig  <martin@ximian.com>
10316
10317         * class.h (MonoDynamicGenericInst): Added `count_properties' and
10318         `properties'.
10319
10320         * reflection.c (mono_reflection_generic_inst_initialize): Added
10321         `MonoArray *properties' argument.
10322
10323         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
10324
10325 2004-02-17  Martin Baulig  <martin@ximian.com>
10326
10327         * icall.c (ves_icall_Type_GetFields): Renamed to
10328         ves_icall_Type_GetFields_internal() and added a
10329         `MonoReflectionType *rtype' argument; pass it to
10330         mono_field_get_object() to set the field's "reflected" type.
10331         (ves_icall_Type_GetConstructors): Likewise.
10332         (ves_icall_Type_GetEvents): Likewise.
10333         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
10334         argument; pass it to mono_method_get_object() to set the method's
10335         "reflected" type.       
10336
10337 2004-02-17  Martin Baulig  <martin@ximian.com>
10338
10339         * class.h (MonoDynamicGenericInst): New type.
10340         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
10341
10342         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
10343         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
10344         (ves_icall_MonoGenericInst_GetFields): New interncall.
10345
10346         * class.c (mono_class_from_generic): Don't call
10347         mono_class_initialize_generic() if this is a dynamic instance;
10348         ie. it's being created from a TypeBuilder.
10349         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
10350         `class->byval_arg.type'.
10351
10352         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
10353         to `inflate_method' and made static.
10354         (mono_reflection_inflate_field): Removed.
10355         (mono_reflection_generic_inst_initialize): New public method.
10356
10357         * reflection.h (MonoReflectionGenericInst): Removed `methods',
10358         `ctors' and `fields'; added `initialized'.
10359
10360 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
10361
10362         * debug-helpers.c (mono_method_full_name): Fix output for empty
10363         namespaces.
10364
10365 2004-02-12  Martin Baulig  <martin@ximian.com>
10366
10367         * class.h (MonoClassField): Added `MonoType *generic_type'.
10368
10369         * reflection.c (mono_image_get_fieldref_token): Added support for
10370         instantiated generic types.
10371         (field_encode_inflated_field): Removed.
10372         (mono_image_get_inflated_field_token): Removed.
10373         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
10374
10375         * reflection.h (MonoReflectionInflatedField): Removed.
10376
10377 2004-02-12  Martin Baulig  <martin@ximian.com>
10378
10379         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
10380         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
10381
10382         * reflection.c (mono_image_get_methodspec_token): Take a
10383         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
10384         (mono_image_create_token): Check whether we have a
10385         `method->signature->gen_method' and call
10386         mono_image_get_methodspec_token() if appropriate.
10387         (inflated_method_get_object): Removed.
10388         (mono_reflection_bind_generic_method_parameters): Return a
10389         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
10390         (mono_reflection_inflate_method_or_ctor): Likewise.
10391
10392         * reflection.h (MonoReflectionInflatedMethod): Removed.
10393
10394 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
10395
10396         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
10397         for custom valuetype marshalling.
10398
10399         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
10400
10401 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10402
10403         * icall.c: fixed WSAGetLastError_internal name.
10404
10405 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
10406
10407         * threads.c (mono_thread_attach): Allow this to be called multiple
10408         times for a thread.
10409         
10410         * threads.c (build_wait_tids): Do not wait for ourselves.
10411
10412         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
10413         appdomain list is empty.
10414
10415         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
10416         memory returned by mono_string_builder_to_utf16, since it points into
10417         managed memory. Thanks to Bernie Solomon for noticing this.
10418
10419         * icall.c: Add AppDomainSetup icalls.
10420
10421         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
10422
10423         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
10424         types.
10425
10426         * reflection.c (reflection_methodbuilder_to_mono_method): Save
10427         custom attributes to the method_aux struct. Also fix array indexes etc.
10428
10429         * loader.c (mono_method_get_param_names): Make dynamic case work again.
10430         
10431 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
10432
10433         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
10434         (both static and runtime) and reduce startup time.
10435
10436 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
10437
10438         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
10439         AsAny marshalling conversion instead of crashing.
10440
10441         * marshal.c: Fix warnings.
10442
10443 2004-02-09  Martin Baulig  <martin@ximian.com>
10444
10445         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
10446
10447         * reflection.h (MonoReflectionInflatedMethod): Removed the
10448         `declaring' field, it's now in the unmanaged MonoGenericMethod.
10449
10450         * reflection.c (method_encode_methodspec): Removed the `method'
10451         argument; we get it from `gmethod->declaring'.
10452         (inflated_method_get_object): Removed the `declaring' argument.
10453
10454 2004-02-09  Martin Baulig  <martin@ximian.com>
10455
10456         * class.h (MonoGenericMethod): New type.
10457         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
10458         `generic_method'.
10459
10460         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
10461         a `MonoGenericMethod *gen_method' one.
10462
10463         * class.c (mono_class_inflate_generic_type): Take an additional
10464         `MonoGenericMethod * argument.  This is only non-NULL if we're
10465         inflating types for a generic method.   
10466         (mono_class_inflate_generic_signature): Renamed to
10467         inflate_generic_signature() and made static; take a
10468         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
10469         (inflate_generic_header): Take a `MonoGenericMethod *' argument
10470         instead of a `MonoGenericInst *' one.
10471         (mono_class_inflate_generic_method): Likewise.
10472
10473         * reflection.c (encode_generic_method_sig): Take a
10474         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
10475         (method_encode_methodspec): Likewise.
10476         (inflated_method_get_object): Likewise. 
10477
10478         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
10479         field with a `MonoGenericMethod *gmethod' one.  
10480
10481 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
10482
10483         * class.h (mono_class_has_parent): add parens to expansion
10484         so you can ! this.
10485
10486 2004-02-08  Martin Baulig  <martin@ximian.com>
10487
10488         * image.h (MonoImage): Removed `generics_cache'.
10489
10490         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
10491         instead of a `MonoType *' argument; removed the `inflate_methods'
10492         argument.  Don't inflate methods here.
10493
10494         * loader.c (find_method): If it's a generic instance, call
10495         mono_class_init() on the `sclass->generic_inst->generic_type'.
10496
10497         * metadata.c (mono_type_size): Make this work on uninitialized
10498         generic instances; call it on the `ginst->generic_type's class.
10499
10500         * reflection.c (mono_reflection_bind_generic_parameters): Call
10501         mono_class_from_generic() to create the `ginst->klass'.
10502
10503 2004-02-08  Martin Baulig  <martin@ximian.com>
10504
10505         * class.h (MonoClass): Changed type of `generic_inst' from
10506         `MonoType *' to `MonoGenericInst *'.
10507
10508 2004-02-08  Martin Baulig  <martin@ximian.com>
10509
10510         * icall.c (ves_icall_Type_BindGenericParameters): Just call
10511         mono_type_get_object(), this is now creating a `MonoGenericInst'
10512         for MONO_TYPE_GENERICINST.
10513         (ves_icall_MonoGenericInst_GetParentType): Likewise.
10514         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
10515
10516         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
10517         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
10518         (inflated_method_get_object): Added `MonoClass *refclass' argument.
10519         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
10520         and reflected type.
10521
10522         * reflection.h (MonoReflectionInflatedMethod): Removed
10523         `declaring_type' and `reflected_type'.
10524
10525 2004-02-08  Martin Baulig  <martin@ximian.com>
10526
10527         * class.h (MonoGenericInst): Added `MonoType *parent' and
10528         `MonoType **ifaces'.
10529
10530         * reflection.h (MonoReflectionGenericInst): Removed `klass',
10531         `parent' and `interfaces'.
10532
10533         * reflection.c (mono_reflection_bind_generic_parameters): Take a
10534         `MonoType *' argument and return a `MonoType *'.
10535
10536         * icall.c
10537         (ves_icall_MonoGenericInst_GetParentType): New interncall.
10538         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
10539
10540 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
10541
10542         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
10543         valuetype marshalling.
10544
10545 2004-02-06  Martin Baulig  <martin@ximian.com>
10546
10547         * class.c
10548         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
10549         (my_mono_class_from_generic_parameter): Likewise.
10550
10551 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
10552
10553         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
10554         contents of the symbol files lazily.
10555
10556         * object.h (MonoThread): Add 'name' and 'name_len' fields.
10557
10558         * threads.h threads.c icall.c: New icalls for getting and setting the
10559         threads name.
10560
10561 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
10562
10563         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
10564         Raise an exception when the domain is not found.
10565
10566 2004-02-03  Martin Baulig  <martin@ximian.com>
10567
10568         * reflection.c (mono_image_get_methodspec_token): Use the
10569         uninflated signature; fixes gen-33.
10570
10571 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
10572
10573         * gc.c threads.c: Make the finalizer thread a normal managed thread so
10574         the finalizer code can use thread functionality.
10575
10576         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
10577         the finalizer thread.
10578
10579         * threads.c: Make some functions more robust.
10580
10581         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
10582
10583         * metadata.h: Add new marshalling conventions.
10584
10585         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
10586         stringbuilder marshalling. Fixes #53700.
10587
10588         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
10589
10590         * reflection.c (mono_image_get_type_info): Save declarative security
10591         info.
10592
10593         * reflection.c (mono_image_get_field_info): Handle uninitialized 
10594         unmanaged fields as well.
10595
10596         * appdomain.c: Bump corlib version.
10597
10598 2004-02-01  Martin Baulig  <martin@ximian.com>
10599
10600         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
10601         method type arguments.  
10602
10603 2004-01-30  Duncan Mak  <duncan@ximian.com>
10604
10605         * marshal.h: Add prototype for
10606         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
10607         and
10608         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
10609         fix the build.
10610
10611 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
10612
10613         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
10614         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
10615
10616 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
10617
10618         * marshal.c (mono_marshal_get_native_wrapper): Add support for
10619         custom marshalling of valuetypes.
10620
10621         * marshal.c: Fix some warnings.
10622
10623 2004-01-29  Martin Baulig  <martin@ximian.com>
10624
10625         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
10626         for generic method parameters.
10627
10628         * reflection.c (method_encode_methodspec): Write the uninflated
10629         signature into the methodspec table.
10630         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
10631         is always the uninflated method.
10632         (reflection_methodbuilder_to_mono_method): Copy the generic
10633         parameters from the MethodBuilder into `header->gen_params'.
10634
10635 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
10636
10637         * class.c (mono_class_from_generic_parameter): Fix warning.
10638
10639 2004-01-27  Martin Baulig  <martin@ximian.com>
10640
10641         * class.c (mono_class_from_generic_parameter): Don't create
10642         `klass->methods' here.  
10643
10644 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
10645
10646         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
10647         extension since it does not work with libraries named lib<FOO>.dll.so.
10648
10649 2004-01-25  Martin Baulig  <martin@ximian.com>
10650
10651         * class.c (mono_class_inflate_generic_type): Added support for
10652         MONO_TYPE_GENERICINST.
10653
10654         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
10655         inflate methods on open constructed types.      
10656
10657 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10658
10659         * object.c: fire ProcessExit event in the root AppDomain after running
10660         Main. Fixes bug #53299.
10661
10662 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
10663
10664         * socket-io.c: include the new socket-wrappers.h header.
10665         Use the wrappers instead of the unix socket functions to make the code
10666         more clear.
10667
10668 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
10669
10670         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
10671
10672         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
10673         Fixes #22532.
10674
10675 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
10676
10677         * reflection.c (mono_image_create_pefile): Handle the case when the
10678         entry point is not a MethodBuilder.
10679
10680         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
10681         field to ReflectionMethod since it is not allways a builder.
10682
10683         * reflection.c (type_get_fully_qualified_name): New helper function to
10684         return the fully qualified name of a type.
10685
10686         * reflection.c (encode_marshal_blob): Always emit the fully qualified
10687         type name for custom marshallers.
10688
10689         * reflection.c (mono_marshal_spec_from_builder): Ditto.
10690
10691         * class.c (mono_class_setup_vtable): If a parent class already 
10692         implements an interface, use the implementing methods from that class.
10693         Fixes #53148.
10694
10695 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10696
10697         * threadpool.c: just return instead of ExitThread to allow for thread
10698         clean up earlier.
10699
10700 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
10701
10702         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
10703         when closing resource modules.
10704
10705         * reflection.c (mono_image_create_pefile): Handle the case when the
10706         entry point is not a MethodBuilder.
10707
10708         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
10709         field to ReflectionMethod since it is not allways a builder.
10710
10711 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
10712
10713         * marshal.c (mono_marshal_get_managed_wrapper): 
10714         mono_marshal_alloc takes native int so CONV_I
10715         the arg for 64bits.
10716
10717 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
10718
10719         * reflection.c (fixup_cattrs): New function to fixup the methoddef
10720         tokens in the cattr table. Fixes #53108.
10721
10722 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10723
10724         * loader.c: don't trim ".dll" before looking up in the config file.
10725         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
10726
10727 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
10728
10729         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
10730         Return the module which contains the resource as well.
10731         (ves_icall_System_Reflection_Module_Close): New icall.
10732
10733         * appdomain.c: Bump corlib version number.
10734
10735         * image.c (mono_image_addref): New public function.
10736
10737         * assembly.c: Call mono_image_addref.
10738
10739         * reflection.c (mono_module_get_object): Increase reference count of 
10740         the image.
10741
10742         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
10743         Fixes #22532.
10744
10745         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
10746         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
10747         proper exceptions on DllImport problems.
10748
10749 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
10750
10751         * class.c, metadata.c: eliminate CSIZE macro.
10752
10753 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
10754
10755         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
10756         * object.h: Added async_callback field in MonoAsyncResult.
10757         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
10758         * verify.c: Added async_callback in MonoAsyncResult layout.
10759
10760 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
10761
10762         * reflection.c (mono_reflection_get_custom_attrs): Add support
10763         for Modules.
10764
10765 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
10766
10767         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
10768         marshalling.
10769         (mono_marshal_method_from_wrapper): Add null pointer check.
10770
10771 2004-01-16  Martin Baulig  <martin@ximian.com>
10772
10773         * debug-mono-symfile.h: Set version number to 36 and reflect
10774         latest symbol writer changes.
10775
10776 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
10777
10778         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
10779         multi-dimensional arrays.
10780         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
10781         (mono_class_from_mono_type): Use bounded_array_class_get.
10782         
10783         * class.c (mono_bounded_array_class_get): New function which takes
10784         a 'bounded' bool argument to distinguish vectors from one dimensional
10785         arrays.
10786
10787         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
10788         bounded_array_class_get if the array has bounds.
10789
10790         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
10791         Search modules loaded using AssemblyBuilder:AddModule as well.
10792
10793 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10794
10795         * appdomain.c: increased corlib version.
10796         * filewatcher.c: removed g_print.
10797         * icall.c:
10798         (get_property_info): only allocate what is actually requested.
10799         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
10800
10801 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10802
10803         * Makefile.am: added filewatcher.[ch]
10804         * filewatcher.[ch]: FileSystemWatcher runtime support.
10805         * icall.c: added new FSW icalls.
10806
10807 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
10808
10809         * string-icalls.c: fix stringbuilder regression as suggested by
10810         Iain McCoy <iain@mccoy.id.au>.
10811
10812 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
10813
10814         * process.c (process_read_stringtable_block): Recognize '007f' as
10815         a language neutral stringtable block.
10816
10817 2004-01-12  Patrik Torstensson
10818
10819         * object.h (MonoStringBuilder) : Changed layout to support our
10820         new stringbuilder class.
10821         * marshal.c: Change marshalling to support the new layout of 
10822         string builder.
10823         * appdomain.c: increased version number because new layout of
10824         string builder.
10825
10826 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
10827
10828         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
10829         assembly name as an string instead of an AssemblyName, since it is
10830         easier to extract info from it.
10831
10832         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
10833         the culture subdirectories too. Fixes #52231.
10834
10835 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10836
10837         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
10838         It takes 2 new parameters with an optional name for the method to look
10839         for and case ignoring info.
10840
10841         * threadpool.c: removed unused variable.
10842
10843 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10844
10845         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
10846         It takes 2 new parameters with an optional name for the property to look
10847         for and case ignoring info.
10848         Fixes bug #52753.
10849
10850 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
10851
10852         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
10853         Fix #52451.
10854
10855 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10856
10857         * appdomain.c:
10858         * assembly.c: escape the uri before passing it to g_filename_from_uri.
10859         Fixes bug #52630.
10860
10861 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
10862
10863         * reflection.c: Add support for more than one unmanaged resource.
10864
10865         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
10866         in field->def_value, as done in all other cases.
10867
10868         * reflection.c (mono_reflection_get_custom_attrs): Add support for
10869         TypeBuilders.
10870
10871         * reflection.c (mono_reflection_create_runtime_class): Remove 
10872         errorneous assignment to klass->element_class, since it is already
10873         done in mono_reflection_setup_internal_class.
10874
10875 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10876
10877         * gc.c: added missing LeaveCriticalSection.
10878         * icall.c: indented a couple of lines.
10879         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
10880         if we call EndInvoke inside a callback. Fixes bug #52601.
10881
10882 2004-01-07  Martin Baulig  <martin@ximian.com>
10883
10884         * mono-debug-debugger.h
10885         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
10886
10887 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
10888
10889         * appdomain.c: Use messages in NotImplementedException.
10890
10891         * exception.c (mono_get_exception_not_implemented): Now this takes
10892         a message argument.
10893
10894         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
10895         exception instead of g_asserting an aborting when something is not
10896         implemented.
10897
10898         Add some inline docs.
10899
10900 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
10901
10902         * reflection.h: Update after changes to object layout.
10903
10904         * reflection.c: Implement saving of unmanaged aka win32 resources.
10905
10906         * appdomain.c: Bump version number.
10907
10908         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
10909         Handle missing domains gracefully.
10910
10911 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
10912
10913         * file-io.c : On Windows, there are much more invalid_path_chars.
10914
10915 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
10916
10917         * class.h, object.c: prepare for GetType () speedup.
10918
10919 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
10920
10921         * profiler.c: workaround for --profile null reference exception on
10922           cygwin. Patch by Patrik Torstensson.
10923
10924 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
10925
10926         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
10927         make work for unaligned access.
10928
10929 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
10930
10931         * class.c: small cleanup (class->fields [i] -> field).
10932         * image.c: check address of metadata is valid.
10933
10934 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
10935
10936         * assembly.h assembly.c (mono_assembly_loaded): New public function to
10937         search the list of loaded assemblies.
10938
10939         * reflection.c (mono_reflection_type_from_name): Use 
10940         mono_assembly_loaded instead of mono_image_loaded.
10941
10942         * reflection.c: Fix warnings.
10943
10944 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
10945
10946         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
10947         is dynamic. This is needed since an assembly can contain both dynamic and
10948         non-dynamic images.
10949
10950         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
10951         assembly->dynamic.
10952
10953         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
10954
10955         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
10956         to store modules loaded using AddModule.
10957
10958         * reflection.c (mono_image_fill_file_table): Generalize this so it works
10959         on Modules.
10960
10961         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
10962
10963         * reflection.c (mono_image_fill_export_table_from_module): New function to
10964         fill out the EXPORTEDTYPES table from a module.
10965
10966         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
10967         into a separate function. Also handle loaded non-dynamic modules.
10968
10969         * reflection.c (mono_image_basic_init): Fix memory allocation.
10970
10971         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10972
10973         * assembly.c (mono_assembly_load_references): Make this public.
10974
10975 2003-12-19  Martin Baulig  <martin@ximian.com>
10976
10977         * class.c (mono_class_initialize_generic): Made this static, take
10978         a `MonoGenericInst *' instead of a `MonoClass *'.
10979         (mono_class_from_generic): Call mono_class_initialize_generic()
10980         unless we're already initialized or being called from
10981         do_mono_metadata_parse_generic_inst().
10982
10983         * class.h (MonoGenericInst): Added `initialized' and
10984         `init_pending' flags.
10985
10986         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
10987         `mono_class_init (gklass)' or mono_class_initialize_generic()
10988         here; set `generic_inst->init_pending' while parsing the
10989         `type_argv'.
10990
10991 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
10992
10993         * locales.c: include string.h for memxxx prototypes
10994
10995 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
10996
10997         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
10998         constructor when accessing literal fields.
10999
11000 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
11001
11002         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11003
11004         * reflection.c (assembly_add_resource_manifest): New function to fill
11005         the MANIFESTRESOURCE table.
11006
11007         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
11008
11009         * reflection.h: Update to changes in class layout.
11010
11011         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
11012         Reenable call to mono_runtime_is_shutting_down ().
11013
11014         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
11015         determine if the runtime is shutting down.
11016
11017 2003-12-16  Jackson Harper <jackson@ximian.com>
11018
11019         * icall.c: comment out call to mono_runtime_is_shutting_down to
11020         fix build.
11021         
11022 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
11023
11024         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
11025         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
11026
11027 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
11028
11029         * reflection.c: move definition of swap_with_size
11030         to before its first call
11031
11032 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
11033
11034         * appdomain.c (mono_runtime_is_shutting_down): New public function.
11035
11036         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
11037         icall.
11038
11039         * object.c: Fix warnings.
11040
11041         * icall.c (ves_icall_Type_Get...): Only consider inherited static
11042         members if FlattenHierarchy is set.
11043
11044         * reflection.c (mono_image_add_decl_security): New function to emit
11045         declarative security.
11046
11047         * reflection.h reflection.c: Add support for declarative security.
11048
11049         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11050         
11051 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
11052
11053         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11054         
11055         * appdomain.c verify.c: Moved corlib version checking into its own
11056         function in appdomain.c since it needs to create vtables etc.
11057
11058 2003-12-13  Patrik Torstensson <p@rxc.se>
11059
11060         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
11061         instead of unwrapped server.
11062
11063 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
11064
11065         * verify.c (check_corlib): Fix field index.
11066
11067 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
11068
11069         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
11070         GetGacPath icall.
11071
11072 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
11073
11074         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
11075         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
11076         cope with sizeof(size_t) != sizeof(guint32).
11077
11078 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11079
11080         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
11081         in case of failure.
11082
11083 2003-12-10  Mark Crichton <crichton@gimp.org>
11084
11085         * icall.c: removed the GetNonZeroBytes.  We now handle this case
11086         in managed code.
11087
11088         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
11089
11090 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
11091
11092         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
11093         marked as deleted.
11094
11095 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
11096
11097         * verify.c (check_corlib): Handle the case when the version field is 
11098         initialized by a static constructor.
11099
11100 2003-12-08  Patrik Torstensson  <p@rxc.se>
11101
11102     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
11103
11104 2003-12-08  Martin Baulig  <martin@ximian.com>
11105
11106         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
11107         a MonoReflectionGenericParameter, also take the parameter index
11108         and name as arguments.
11109         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
11110         (ves_icall_MonoGenericParam_initialize): New interncall.
11111         (ves_icall_Type_make_byref_type): New interncall.
11112
11113         * reflection.h (MonoReflectionGenericParam): Derive from
11114         MonoReflectionType, not just from MonoObject.  Added `refobj' and
11115         `index' fields.
11116
11117         * reflection.c (mono_reflection_define_generic_parameter): Create
11118         and return a new MonoReflectionGenericParam; don't initialize the
11119         constraints here.
11120         (mono_reflection_initialize_generic_parameter): New public method;
11121         initializes the constraints and creates the `param->pklass'.
11122
11123 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
11124
11125         * reflection.h reflection.c: Use the new fields 'num_types', 
11126         'num_fields' and 'num_methods' to track the number of types etc.
11127
11128         * verify.c (check_corlib): Check corlib version number.
11129
11130 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
11131
11132         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
11133         function works on all methods.
11134
11135 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
11136
11137         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
11138         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
11139         the custom_type_info flag of the transparent proxy.
11140         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
11141         objects that supports IRemotingTypeInfo.
11142         * object.h: Added custom_type_info field in transparent proxy.
11143
11144 2003-12-06  Martin Baulig  <martin@ximian.com>
11145
11146         * class.c (mono_class_create_from_generic): Removed.
11147         (mono_class_from_generic): Check `ginst->klass' before doing
11148         anything else.  This is important to fully support "recursive"
11149         generic types.
11150
11151         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
11152         empty `generic_inst->klass' before doing anything else.
11153
11154 2003-12-06  Dick Porter  <dick@ximian.com>
11155
11156         * verify.c: 
11157         * object.h:
11158         * icall.c:
11159         * locales.c: Use C structs to access class fields.  Don't do a
11160         conversion between MonoString and UChar because both are
11161         platform-endian UTF-16.  Compare now takes startindex and count
11162         parameters.  Add a char overload for IndexOf.  Speed up the
11163         invariant string IndexOf.
11164
11165 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
11166
11167         * Makefile.am (monosn_LDADD): Fix parallel build.
11168
11169 2003-12-04  Martin Baulig  <martin@ximian.com>
11170
11171         * icall.c
11172         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11173         (ves_icall_Type_make_array_type): New interncall.       
11174
11175 2003-12-04  Martin Baulig  <martin@ximian.com>
11176
11177         * locales.c: also change it in the !HAVE_ICU case.
11178
11179 2003-12-04  Dick Porter  <dick@ximian.com>
11180
11181         * icall.c:
11182         * locales.c: construct_compareinfo is now in CompareInfo, not
11183         CultureInfo.
11184
11185 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
11186
11187         * image.c (mono_image_load_file_for_image): Cache loaded images in the
11188         image->files array.
11189
11190         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
11191         table as well.
11192
11193         * assembly.c (mono_assembly_load_references): Only load references
11194         once.
11195
11196         * class.c (mono_class_from_name): Avoid linear search of the 
11197         EXPORTEDTYPE table.
11198
11199         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
11200
11201 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
11202
11203         * image.h (MonoImage): Add 'field_cache' field.
11204
11205         * loader.c (mono_field_from_token): Cache field lookups.
11206         
11207         * reflection.c (mono_module_get_object): Fix name property.
11208
11209         * icall.c (ves_icall_get_enum_info): Update after changes to 
11210         mono_metadata_get_constant_index ().
11211
11212         * icall.c: Get rid of get_type_info icall, use a separate icall for
11213         each type property to avoid needless memory allocations. Fixes #51514.
11214
11215         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
11216         to avoid needless binary searches.
11217
11218         * class.c (class_compute_field_layout): Move the initialization of
11219         field->def_value to mono_class_vtable ().
11220
11221         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
11222         non-corlib types.
11223
11224         * object.c (mono_object_allocate): Make it inline.
11225
11226         * object.c (mono_object_allocate_spec): Make it inline.
11227         
11228 2003-12-02  Dick Porter  <dick@ximian.com>
11229
11230         * locales.c (create_NumberFormat): NumberFormatInfo construction.
11231         Patch by Mohammad DAMT (mdamt@cdl2000.com).
11232
11233 2003-12-01  Dick Porter  <dick@ximian.com>
11234
11235         * threads.c: Fix signature and call in CreateMutex and
11236         CreateEvent.
11237
11238 2003-12-01  Dick Porter  <dick@ximian.com>
11239
11240         * icall.c: 
11241         * locales.c: Implement string compares and searching
11242
11243         * object.h: Add extra Thread field
11244
11245 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
11246
11247         * reflection.c (fixup_method): Add support for MonoCMethod.
11248
11249 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
11250
11251         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
11252
11253         * reflection.c (assembly_name_to_aname): Allow extra characters in
11254         assembly names. Fixes #51468.
11255
11256 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
11257
11258         * exception.c (mono_exception_from_name_domain): New helper function.
11259
11260         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
11261         exception object in the correct domain.
11262
11263         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
11264         formatting + make a copy a the input data.
11265
11266         * loader.c (mono_get_method_from_token): Methods which contain
11267         native code do not have entries in the ImplMap.
11268
11269         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
11270         Thanks to Gonzalo for spotting this.
11271         
11272         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
11273         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
11274
11275         * assembly.h (mono_assembly_load_from): Split the second part of 
11276         assembly loading into a new public function.
11277
11278         * exception.h (mono_get_exception_bad_image_format): New function.
11279
11280 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
11281
11282         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
11283         Enumerate all modules inside a dynamic assembly. Fixes #51293.
11284         
11285         * icall.c: Add new icall for creating dynamic methods.
11286
11287         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
11288
11289         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
11290
11291         * reflection.c (mono_reflection_create_dynamic_method): New icall to
11292         create a dynamic method.
11293
11294         * reflection.c (resolve_object): New helper function.
11295
11296         * reflection.c: Generalize ReflectionMethodBuilder and the functions
11297         which manipulate it so they can also work on dynamic methods.
11298
11299         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
11300         creating the MonoReflectionMethodAux structure if it is not needed.
11301         
11302         * reflection.h verify.c: Update after changes to object layout.
11303
11304         * reflection.c (method_builder_encode_signature): Fix compilation on
11305         gcc 2.95.x.
11306
11307 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
11308
11309         * appdomain.h: Added support for context static fields. Added static_data
11310           field to MonoAppContext and renamed thread_static_fields to a more
11311           generic special_static_fields in MonoAppDomain, since it can now contain
11312           context static fields.
11313         * domain.c: Updated hashtable name.
11314         * object.c: Replaced field_is_thread_static() for a more generic
11315           field_is_special_static() which also checks for context static attribute.
11316           In mono_class_vtable(), added support for static context fields.
11317         * threads.c: Changed methods that manage thread static fields to more
11318           generic methods so they can be reused both for thread and context static
11319           data.
11320         * threads.h: Declared some new methods.
11321
11322 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
11323
11324         * reflection.h: Update after changes to the managed types.
11325
11326         * reflection.c (encode_custom_modifiers): New helper function.
11327
11328         * reflection.c (method_encode_signature): Emit custom modifiers.
11329
11330         * reflection.c (field_encode_signature): Emit custom modifiers.
11331
11332 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
11333
11334         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
11335
11336         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
11337         implementation.
11338
11339         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
11340         icall.
11341
11342         * object.c (mono_field_get_value_object): New function.
11343
11344         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
11345         specific.
11346
11347 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
11348
11349         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
11350         return a preallocated out-of-memory exception instance.
11351
11352         * object.c (out_of_memory): Use the new function.
11353
11354         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
11355         flag is before the custom modifiers. Fixes #49802.
11356
11357 2003-11-16  Martin Baulig  <martin@ximian.com>
11358
11359         * class.c (mono_class_is_open_constructed_type): Implemented the
11360         MONO_TYPE_GENERICINST case.
11361
11362 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
11363
11364         * assembly.c (mono_assembly_fill_assembly_name): New function to
11365         fill out the MonoAssemblyName structure.
11366         (mono_assembly_open): Use the new function.
11367
11368         * icall.c (fill_reflection_assembly_name): New helper function.
11369
11370         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
11371         new function.
11372
11373         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
11374
11375 2003-11-15  Martin Baulig  <martin@ximian.com>
11376
11377         * class.c (mono_class_is_open_constructed_type): New public
11378         function; checks whether a type is an open constructed type,
11379         ie. whether it still contains type parameters.
11380         (mono_class_inflate_generic_type): If we're a type parameter and
11381         the inflated type is also a MONO_TYPE_(M)VAR, return the original
11382         type.
11383
11384         * class.h (MonoGenericInst): Added `guint32 is_open'.
11385
11386         * loader.c (method_from_methodspec): Check whether we're an open
11387         or closed constructed type and set `ginst->is_open'.
11388
11389         * reflection.c (mono_reflection_bind_generic_parameters): Check
11390         whether we're an open or closed constructed type and set
11391         `ginst->is_open'.
11392         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
11393         from open constructed types.
11394
11395 2003-11-15  Martin Baulig  <martin@ximian.com>
11396
11397         * reflection.c (mono_reflection_bind_generic_parameters): If we're
11398         a generic instance (instead of a generic type declaration) with
11399         unbound generic parameters, bind them to our actual types.
11400
11401 2003-11-14  Martin Baulig  <martin@ximian.com>
11402
11403         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
11404
11405         * reflection.c (mono_reflection_bind_generic_parameters): If we're
11406         an interface type, populate `res->interfaces' with instantiated
11407         versions of all the interfaces we inherit.
11408
11409 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
11410
11411         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
11412         when MONO_PATH is set but doesn't contain the install dir.
11413
11414 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11415
11416         * icall.c:
11417         (ves_icall_Type_GetInterfaces): don't return an interface twice when
11418         it's also implemented in base classes. Fixes bug #50927.
11419
11420 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
11421
11422         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
11423         if this method is called from a finalizer. Fixes #50913.
11424
11425 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
11426
11427         * threads.c: Implement VolatileRead/VolatileWrite
11428
11429         * icall.c: Add new icalls for VolatileRead/VolatileWrite
11430
11431 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
11432
11433         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
11434         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
11435         2.95.3.
11436
11437         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
11438         from Peter Ross (pro@missioncriticalit.com).
11439         
11440 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
11441
11442         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
11443
11444 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
11445
11446         * assembly.c (mono_assembly_load_references): Disable check because it
11447         triggers on older corlibs which lots of people have.
11448
11449 2003-11-12  Jackson Harper  <jackson@ximian.com>
11450
11451         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
11452         load corlib.dll if mscorlib.dll is not found.
11453         * assembly.h: Remove corlib name define.
11454         * class.c:
11455         * domain.c:
11456         * image.c: Change corlib name to mscorlib.
11457         
11458 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
11459
11460         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
11461
11462 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
11463
11464         * appdomain.h: Added loader_optimization here to sync with the C#
11465         code, and add disallow_binding_redirects field.
11466
11467 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
11468
11469         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
11470
11471         * reflection.c (mono_image_build_metadata): Fix crash on modules
11472         with no types.
11473
11474         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
11475
11476         * icall.c (ves_icall_get_method_info): Return callingConvention as
11477         well.
11478
11479         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
11480         namespaces from the EXPORTEDTYPE table as well.
11481
11482         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
11483         from all modules inside the assembly.
11484         
11485 2003-11-11  Martin Baulig  <martin@ximian.com>
11486
11487         * reflection.c (mono_reflection_bind_generic_parameters): Make
11488         this work for interfaces.
11489
11490 2003-11-11  Martin Baulig  <martin@ximian.com>
11491
11492         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
11493
11494 2003-11-11  Martin Baulig  <martin@ximian.com>
11495
11496         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
11497         "MonoInflatedMethod" and "MonoInflatedCtor".
11498
11499 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
11500
11501         * reflection.c (resolution_scope_from_image): Use the assembly table
11502         from the manifest module, since other modules don't have it.
11503
11504         * debug-helpers.c (mono_type_full_name): New helper function.
11505
11506         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
11507
11508         * image.c (mono_image_load_file_for_image): New public function which
11509         is a replacement for the load_file_for_image in class.c.
11510
11511         * assembly.c (mono_assembly_load_module): A wrapper for the function
11512         above which does assembly association and reference loading too.
11513
11514         * class.c (mono_class_from_name): Call mono_assembly_load_module.
11515
11516 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11517
11518         * appdomain.c: not all of the attributes for the full assembly name
11519         are required and the order doesn't matter. Fixes bug #50787.
11520
11521 2003-11-10  Dick Porter  <dick@ximian.com>
11522
11523         * locales.c: Use platform-endian UTF16
11524
11525 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
11526
11527         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
11528         
11529 2003-11-10  Martin Baulig  <martin@ximian.com>
11530
11531         * metadata.c
11532         (mono_metadata_load_generic_params): Make this actually work.
11533
11534         * reflection.c (mono_reflection_bind_generic_parameters): If our
11535         parent is a generic instance, pass all the `types' to it, no
11536         matter whether it has the same number of type parameters or not.
11537
11538 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
11539
11540         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
11541
11542         * assembly.c (mono_assembly_load_references): Move the image<->assembly
11543         assignment code to this function so it gets called recursively for all
11544         modules.
11545
11546         * image.c (load_modules): Remove the assembly assignment since it is
11547         now done by mono_assembly_load_references.
11548         
11549         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
11550         Add 'module' argument.
11551         (mono_module_get_types): New helper function.
11552         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
11553
11554 2003-11-08  Martin Baulig  <martin@ximian.com>
11555
11556         * class.c (mono_class_inflate_generic_method): Interface method
11557         don't have a header.
11558
11559         * reflection.c (mono_image_get_methodspec_token): Take an
11560         additional `MonoGenericInst *' argument instead of reading it from
11561         the header; this is necessary to support interfaces.
11562         (mono_image_create_token): Pass the `MonoGenericInst *' from the
11563         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
11564         (inflated_method_get_object): Take an additional `MonoGenericInst *'
11565         argument.
11566
11567         * reflection.h (MonoReflectionInflatedMethod): Added
11568         `MonoGenericInst *ginst'.
11569
11570 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
11571
11572         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
11573
11574 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
11575
11576         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
11577
11578 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
11579
11580         * reflection.c 
11581         (reflection_methodbuilder_from_method_builder):
11582         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
11583         initialize a ReflectionMethodBuilder structure.
11584         (mono_image_get_methodbuilder_token):
11585         (mono_image_get_ctorbuilder_token): New functions to emit memberref
11586         tokens which point to types in another module inside the same assembly.
11587
11588         * reflection.c: Use the new helper functions.
11589         
11590         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
11591
11592         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
11593         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
11594
11595         * reflection.c (resolution_scope_from_image): Emit a moduleref if
11596         neccesary.
11597
11598         * reflection.c (mono_image_build_metadata): Emit metadata only for the
11599         current module. Emit the manifest only for the main module.
11600
11601         * reflection.c (mono_image_create_token): Add assertion when a 
11602         memberref needs to be created.
11603
11604         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
11605
11606         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
11607         larger buffer for the custom attribute blob. Fixes #50637.
11608         
11609 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11610
11611         * threadpool.c: notify listener on async processing handles after
11612         invoking the async callback. Thanks to Zoltan.
11613
11614 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
11615
11616         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
11617         avoid code duplication.
11618
11619         * reflection.h (MonoDynamicImage): New type which is currently unused,
11620         but will be used through the ref.emit code in place of 
11621         MonoDynamicAssembly.
11622
11623         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
11624         object layout.
11625
11626         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
11627         a MonoDynamicImage instead of just a MonoImage.
11628         
11629         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
11630         icalls to ModuleBuilder but keep their semantics, so they will work
11631         with moduleb->assemblyb. This will change later.
11632         
11633 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
11634
11635         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
11636         object layout.
11637
11638         * reflection.c (mono_image_build_metadata): Avoid creation of a default
11639         main module, since it is now done by the managed code.
11640
11641 2003-11-03  Martin Baulig  <martin@ximian.com>
11642
11643         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
11644         `ginst->klass' here.
11645         (method_encode_methodspec): Don't use the `ginst->generic_method's
11646         klass if it's a generic instance, use `ginst->klass' in this case.
11647
11648 2003-11-03  Martin Baulig  <martin@ximian.com>
11649
11650         * reflection.c (mono_image_get_generic_method_param_info):
11651         Removed, use mono_image_get_generic_param_info() instead.
11652         (mono_image_get_type_info): Write the GenericParam table before
11653         the Method table.  This is neccessary because in the GenericParam
11654         table, type parameters of the class (ie. '!0' etc.) must come
11655         before the ones from its generic methods (ie. '!!0' etc).
11656
11657 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
11658
11659         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
11660
11661 2003-11-02  Martin Baulig  <martin@ximian.com>
11662
11663         * reflection.c (create_generic_typespec): Take a
11664         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
11665         the generic parameters from it.
11666
11667 2003-11-02  Martin Baulig  <martin@ximian.com>
11668
11669         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
11670         instead of a `MonoClassField *' since we just need the type.
11671         (create_generic_typespec): New static function.  Creates a
11672         TypeSpec token for a generic type declaration.
11673         (mono_image_get_generic_field_token): New static function.
11674         (mono_image_create_token): If we're a FieldBuilder in a generic
11675         type declaration, call mono_image_get_generic_field_token() to get
11676         the token.
11677
11678 2003-11-02  Martin Baulig  <martin@ximian.com>
11679
11680         * reflection.h
11681         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
11682         `MonoReflectionGenericInst *declaring_type' and
11683         `MonoReflectionGenericInst *reflected_type' fields.
11684
11685         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
11686         `MonoReflectionGenericInst *declaring_type' and a
11687         `MonoReflectionGenericInst *reflected_type' argument instead of a
11688         single `MonoReflectionGenericInst *type' one.  Set
11689         `res->declaring_type' and `res->reflected_type' from them.
11690         (mono_reflection_inflate_field): Likewise.      
11691
11692 2003-11-02  Martin Baulig  <martin@ximian.com>
11693
11694         * class.c (mono_class_setup_vtable): Don't store generic methods
11695         in the vtable.  
11696
11697 2003-11-02  Martin Baulig  <martin@ximian.com>
11698
11699         * reflection.h (MonoReflectionGenericInst): Added
11700         `MonoReflectionType *declaring_type'.
11701
11702         * reflection.c (mono_reflection_bind_generic_parameters): Use
11703         `if (tb->parent)' instead of `klass->parent'.
11704
11705 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
11706
11707         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
11708         with an empty ASSEMBLY table.
11709
11710         * reflection.c (mono_image_build_metadata): Avoid using the same loop
11711         variable in the inner and outer loops.
11712
11713 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
11714
11715         * metadata.h (mono_metadata_make_token): Put parentheses around macro
11716         argument.
11717
11718         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
11719         
11720         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
11721         icalls. Instead, do everything in managed code. This is needed since
11722         it is hard to restore the original domain etc. in unmanaged code in the
11723         presence of undeniable exceptions.
11724
11725         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
11726         New icalls to push and pop appdomain refs.
11727
11728 2003-10-31  Martin Baulig  <martin@ximian.com>
11729
11730         * class.c (inflate_generic_type): Renamed to
11731         mono_class_inflate_generic_type() and made it public.
11732
11733         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
11734         New interncall.
11735
11736         * loader.c (mono_field_from_memberref): Also set the retklass for
11737         typespecs.
11738
11739         * fielder.c (mono_image_get_inflated_field_token): New static
11740         method; creates a metadata token for an inflated field.
11741         (mono_image_create_token, fixup_method): Added support for
11742         "MonoInflatedField".
11743         (fieldbuilder_to_mono_class_field): New static function.
11744         (mono_reflection_inflate_field): New public function.
11745
11746         * reflection.h
11747         (MonoReflectionGenericInst): Added `MonoArray *fields'.
11748         (MonoReflectionInflatedField): New typedef.     
11749
11750 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
11751
11752         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
11753         for Solaris and other platforms without s6_addr16
11754
11755 2003-10-30  Martin Baulig  <martin@ximian.com>
11756
11757         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
11758         argument instead of two.
11759         (mono_class_inflate_generic_signature): Likewise.
11760         (inflate_generic_header): Likewise.
11761         (mono_class_inflate_generic_method): Likewise.  In addition, if
11762         `ginst->klass' is set, it becomes the new `method->klass'.
11763
11764         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
11765         field.
11766
11767         * reflection.c (encode_generic_method_sig): Write a 0xa as the
11768         first byte. [FIXME]
11769         (method_encode_methodspec): If we have generic parameters, create
11770         a MethodSpec instead of a MethodRef.
11771         (fixup_method): Added support for "MonoInflatedMethod" and
11772         "MonoInflatedCtor".
11773         (mono_image_create_token): Added support for "MonoInflatedMethod"
11774         and "MonoInflatedCtor".
11775         (inflated_method_get_object): New static function; returns a
11776         managed "System.Reflection.MonoInflatedMethod" object.
11777         (mono_reflection_bind_generic_method_parameters): Return a
11778         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
11779         (mono_reflection_inflate_method_or_ctor): Likewise.
11780         (mono_image_get_generic_method_param_info): Initialize unused
11781         fields to zero.
11782         (mono_image_get_generic_param_info): Likewise.
11783
11784         * reflection.h (MonoReflectionInflatedMethod): New public
11785         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
11786         "S.R.MonoInflatedCtor" classes.
11787
11788         * loader.c (method_from_memberref): If we're a TypeSpec and it
11789         resolves to a generic instance, inflate the method.
11790
11791 2003-10-28  Dick Porter  <dick@ximian.com>
11792
11793         * object.c (mono_runtime_run_main): Convert command-line arguments
11794         into utf8, falling back to the user's locale encoding to do so.
11795
11796 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
11797
11798         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
11799         at this time.
11800
11801         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
11802
11803         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
11804         up icalls at method definition time. Partially fixes #33569.
11805
11806 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
11807
11808         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
11809         marshalling of arrays. Fixes #50116.
11810
11811         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
11812
11813         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
11814         points to a vtable in the dying appdomain.
11815
11816         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
11817         listeners into unmanaged code inside the lock.
11818
11819         * object.c (mono_class_vtable): Turn off typed allocation in non-root
11820         domains and add some comments.
11821
11822 2003-10-25  Martin Baulig  <martin@ximian.com>
11823
11824         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
11825
11826         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
11827
11828         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
11829         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
11830         currently parsing.  Create the generic class and store it in
11831         `generic_inst->klass' before parsing the type arguments.  This is
11832         required to support "recursive" definitions; see mcs/tests/gen-23.cs
11833         for an example.
11834         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
11835         to support recursive typespec entries.
11836
11837         * class.c (mono_class_setup_parent): If our parent is a generic
11838         instance, we may get called before it has its name set.
11839         (mono_class_from_generic): Splitted into
11840         mono_class_create_from_generic() and mono_class_initialize_generic().
11841
11842 2003-10-25  Martin Baulig  <martin@ximian.com>
11843
11844         * icall.c (ves_icall_Type_BindGenericParameters): Return a
11845         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
11846         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
11847         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
11848
11849         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
11850         (create_typespec): Likewise.
11851         (mono_reflection_bind_generic_parameters): Return a
11852         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
11853         (mono_reflection_inflate_method_or_ctor): New public function.
11854
11855         * reflection.h (MonoReflectionGenericInst): New typedef.        
11856
11857 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
11858
11859         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
11860         inside the domain lock. Fixes #49993.
11861         
11862         * object.c (mono_class_vtable): When typed allocation is used, 
11863         allocate vtables in the GC heap instead of in the mempool, since the
11864         vtables contain GC descriptors which are used by the collector even
11865         after the domain owning the mempool is unloaded.
11866
11867         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
11868
11869         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
11870         reflect what it does. Also invalidate mempools instead of freeing
11871         them if a define is set.
11872
11873         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
11874         of the appdomain.
11875         
11876         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
11877         hold the finalizable objects in this domain.
11878
11879         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
11880         appdomain.
11881
11882         * appdomain.c (mono_domain_set): New function to set the current
11883         appdomain, but only if it is not being unloaded.
11884
11885         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
11886         appdomain which is being unloaded.
11887         
11888         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
11889         unloading of the root appdomain.
11890
11891         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
11892         icall to execute a method in another appdomain. Intended as a 
11893         replacement for InternalSetDomain, which can confuse the code 
11894         generation in the JIT.
11895
11896         * appdomain.c (mono_domain_is_unloading): New function to determine
11897         whenever an appdomain is unloading.
11898
11899         * appdomain.c (mono_domain_unload): New function to correctly unload
11900         an appdomain.
11901
11902         * assembly.c (mono_assembly_load_references): Check that an assembly
11903         does not references itself.
11904
11905         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
11906         domain manually, it asks the finalizer thread to do it, then waits for
11907         the result. Also added a timeout.
11908
11909         * icall.c: Register the new icalls.
11910
11911         * threads.h threads.c: Export the mono_gc_stop_world and 
11912         mono_gc_start_world functions.
11913         
11914         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
11915         function to fill out the mempool with 0x2a.
11916
11917 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
11918
11919         * reflection.h (MonoReflectionMethodAux): New structure to store
11920         information which is rarely used, thus is not in the MonoMethod
11921         structure.
11922
11923         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
11924         store the aux info.
11925
11926         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
11927         and marshalling info into the aux structure.
11928
11929         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
11930         from the aux structure.
11931
11932         * loader.c (mono_method_get_param_names): Retrieve the param names from
11933         the aux structure.
11934         
11935 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
11936
11937         * exception.h exception.c: Add AppDomainUnloadedException && fix 
11938         warning.
11939
11940 2003-10-21  Dick Porter  <dick@ximian.com>
11941
11942         * socket-io.c
11943         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
11944         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
11945
11946 2003-10-21  Martin Baulig  <martin@ximian.com>
11947
11948         * reflection.c (mono_reflection_bind_generic_parameters):
11949         `klass->parent' is NULL for interfaces.
11950
11951 2003-10-21  Martin Baulig  <martin@ximian.com>
11952
11953         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11954
11955 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
11956
11957         * exception.c (mono_exception_from_name_msg): New helper function for
11958         creating exceptions and initializing their message field.
11959
11960         * exception.c: Simplify functions using the new helper.
11961
11962         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
11963         New function.
11964
11965         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
11966         mono_raise_exception, since otherwise gcc doesn't generate the function
11967         epilog for raise_exception, confusing the stack unwinding in the JIT.
11968         Fixes #45043.
11969
11970         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
11971         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
11972         Fixes #49499.
11973
11974 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11975
11976         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
11977         utf8.
11978
11979 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
11980
11981         * icall.c: Removed GetUninitializedObject method because
11982           AllocateUninitializedClassInstance does the same.
11983
11984 2003-10-18  Martin Baulig  <martin@ximian.com>
11985
11986         * class.c (inflate_generic_signature): Renamed to
11987         mono_class_inflate_generic_signature() and made it public.
11988         (my_mono_class_from_generic_parameter): New static function; if we
11989         don't already have the generic parameter's MonoClass, create a
11990         very simple one which is just used internally in the runtime and
11991         not passed back to managed code.
11992
11993         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
11994
11995         * metadata.h (MonoMethodSignature): Moved the
11996         `MonoGenericParam *gen_params' to the MonoMethodHeader.
11997         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
11998
11999         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
12000         ves_icall_MonoMethod_GetGenericArguments(); this is now an
12001         interncall on the MonoMethod class, not on MethodInfo.
12002         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
12003         calling mono_reflection_bind_generic_method_parameters() directly.
12004
12005         * loader.c (mono_method_get_signature): If this is a MethodSpec;
12006         return the already computed `method->signature'.
12007         (method_from_methodspec): New static function to load a method
12008         from a MethodSpec entry.
12009         (mono_get_method_from_token): Call the new method_from_methodspec()
12010         for MethodSpec tokens.  
12011         (mono_get_method_from_token): If we're a generic method, load the
12012         type parameters.
12013
12014         * reflection.c (mono_image_get_memberref_token): Allow
12015         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
12016         table.
12017         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
12018         (mono_image_create_token): First check whether it's a generic
12019         method (so we'd need to create a MethodSpec), then do the other
12020         two alternatives.
12021         (mono_reflection_bind_generic_method_parameters): Return a
12022         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
12023         called directly from the interncall.
12024
12025 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
12026
12027         * reflection.c (load_public_key): Move loading of the public key
12028         into managed code.
12029
12030         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
12031
12032         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
12033         fields.
12034
12035         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
12036         culture, hash_alg and public_key. Fixes #49555.
12037
12038 2003-10-17  Martin Baulig  <martin@ximian.com>
12039
12040         * class.h (MonoGenericInst): Moved this declaration here and added
12041         `MonoMethod *generic_method'.
12042
12043         * icall.c
12044         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
12045         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
12046
12047         * metadata.c (mono_metadata_type_equal): Two types of
12048         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
12049         index; ie. don't compare the address of the `MonoGenericParam'
12050         structure.
12051         (mono_metadata_load_generic_params): Removed the `MonoMethod
12052         *method' argument.
12053
12054         * metadata.h (MonoGenericInst): Moved declaration to class.h.
12055         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
12056
12057         * reflection.c (method_encode_signature): Encode the number of
12058         generic parameters.
12059         (encode_generic_method_sig): New static function.
12060         (method_encode_methodspec): New static function; creates an entry
12061         in the MethodSpec table for a generic method.
12062         (mono_image_get_methodspec_token): New static function.
12063         (mono_image_create_token): Call mono_image_get_methodspec_token()
12064         for generic methods.
12065         (mono_reflection_bind_generic_method_parameters): New public
12066         function.  Instantiates a generic method.
12067
12068 2003-10-16  Martin Baulig  <martin@ximian.com>
12069
12070         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
12071         *gen_params' here from MonoMethodHeader.
12072
12073         * metadata.c (mono_metadata_parse_method_signature): If we have
12074         generic parameters, initialize `method->gen_params' and then set
12075         the correct `type->data.generic_param' in all the parameters.
12076
12077 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
12078
12079         * threads.c (mono_threads_get_default_stacksize): New function to 
12080         return the default stacksize.
12081
12082         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
12083         termination of the finalizer thread, since the previous method had
12084         race conditions. Fixes #49628.
12085
12086         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
12087         as for the other managed threads.
12088
12089 2003-10-16  Martin Baulig  <martin@ximian.com>
12090
12091         * class.c (inflate_generic_signature): Copy `generic_param_count'
12092         and `gen_params'.
12093
12094         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
12095         New interncall.
12096
12097         * metadata.c (mono_metadata_parse_method_signature): Actually set
12098         the `method->generic_param_count' here.
12099         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
12100
12101 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
12102
12103         * object.h: Add a new field to TypedRef to simplify the implementation
12104         of the REFANY opcodes in the JIT.
12105
12106         * icall.c: Make use of the new field.
12107
12108         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
12109         dynamically.
12110
12111 2003-10-15  Martin Baulig  <martin@ximian.com>
12112
12113         * class.c (mono_class_from_gen_param): Renamed to
12114         mono_class_from_generic_parameter() and moved most of the
12115         functionality from mono_reflection_define_generic_parameter()
12116         here; ie. we create a "real" class here.
12117         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
12118         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
12119         previously been called.
12120
12121         * class.h (MonoGenericParam): Moved the declaration of this struct
12122         here from metadata.h and added `MonoMethod *method'.
12123
12124         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
12125         interncall.
12126
12127         * loader.c (mono_get_method_from_token): If we have any generic
12128         parameters, call mono_metadata_load_generic_params() to read them
12129         from the MONO_TABLE_GENERICPAR.
12130
12131         * metadata.c (mono_metadata_load_generic_params): Added
12132         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
12133
12134         * metadata.h (MonoMethodSignature): Replaced
12135         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
12136         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
12137
12138         * reflection.c (mono_reflection_define_generic_parameter): Moved
12139         most of the functionality into the new
12140         mono_class_from_generic_parameter(); set the `method' field if
12141         we're a method parameter.       
12142
12143 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
12144
12145         * marshal.c (emit_struct_conv): if native size is 0
12146         emit no code.
12147
12148 2003-10-14  Martin Baulig  <martin@ximian.com>
12149
12150         * icall.c: The generics API has changed in the spec since it was
12151         added to System.Type; these modifications make it match the spec
12152         again.
12153         (ves_icall_Type_GetGenericParameters): Renamed to
12154         `ves_icall_Type_GetGenericArguments'.
12155         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
12156         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
12157         `ves_icall_MonoType_get_HasGenericArguments'.
12158         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
12159         `ves_icall_MonoType_get_IsGenericParameter'.
12160         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
12161         this is no interncall anymore.
12162         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
12163         `ves_icall_TypeBuilder_get_IsGenericParameter'.
12164
12165 2003-10-14  Martin Baulig  <martin@ximian.com>
12166
12167         * reflection.c (mono_reflection_bind_generic_parameters): Also
12168         inflate generic methods if we're reading the class from IL.
12169
12170 2003-10-13  Martin Baulig  <martin@ximian.com>
12171
12172         * reflection.c (mono_reflection_define_generic_parameter): This
12173         method isn't called directly from the icall anymore; take a
12174         `MonoReflectionAssemblyBuilder *' so we can use this for type and
12175         method generic parameters.
12176         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
12177         (method_builder_encode_signature): Encode generic parameters.
12178         (mono_image_get_method_info): Write generic params to the
12179         MONO_TABLE_GENERICPARAM table.
12180
12181         * reflection.h (MonoReflectionMethodBuilder): Added
12182         `MonoArray *generic_params'.
12183
12184         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
12185
12186         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
12187         wrapper for mono_reflection_define_generic_parameter().
12188         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
12189
12190 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
12191
12192         * marshal.h: Add missing function to fix build.
12193
12194         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
12195         the SetLastError pinvoke attribute.
12196
12197         * marshal.c (mono_marshal_set_last_error): New helper function called
12198         by the generated code.
12199         
12200         * marshal.c (mono_mb_emit_branch): New helper function.
12201
12202         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
12203
12204         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12205         classes as parameters and return values of delegates. Fixes #29256. 
12206
12207 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
12208
12209         * locales.c: use gint32 in non HAVE_ICU case
12210
12211 2003-10-11  Martin Baulig  <martin@ximian.com>
12212
12213         * mono-debug.c (mono_debug_add_method): Added a workaround for
12214         bug #48591.
12215
12216 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
12217
12218         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
12219         delegates passed to native code must use the STDCALL calling 
12220         convention. Fixes #35987.
12221
12222 2003-10-10  Martin Baulig  <martin@ximian.com>
12223
12224         * class.c (inflate_generic_type): If we're inflating for a generic
12225         type instance (and not for a generic method), return
12226         MONO_TYPE_MVAR unchanged.
12227
12228 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12229
12230         * string-icalls.c: Join ignores null strings in the source array.
12231         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
12232         * threads.c: GetAvailableTheads is slightly more accurate.
12233
12234 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
12235
12236         * threads.h threads.c : add mono_threads_set_default_stacksize
12237         and pass default to CreateThread calls.
12238
12239 2003-10-09  Dick Porter  <dick@ximian.com>
12240
12241         * icall.c:
12242         * locales.h:
12243         * locales.c: Internal calls for constructing CultureInfo and
12244         related objects from libicu (if its available.)
12245
12246 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
12247
12248         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
12249
12250 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12251
12252         * threadpool.c: added an argument to async_invoke_thread that is the
12253         item to process, pass the MonoAsyncResult to the thread start function
12254         when creating a new thread. This way we don't need to acquire any lock
12255         when we're creating a new thread. Readded a semaphore for faster
12256         response times (instead of that Sleep i added).
12257
12258 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
12259
12260         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
12261         get daylight change dates better on Windows, fix handling
12262         of platforms without tm_gmtoff.
12263
12264 2003-10-06  Martin Baulig  <martin@ximian.com>
12265
12266         * class.c (inflate_generic_method): Renamed to
12267         mono_class_inflate_generic_method() and made public.
12268         (mono_class_init): Don't inflate the generic methods here.
12269         (mono_class_from_generic): Added `gboolean inflate_methods'
12270         argument.  Inflate the methods here.
12271
12272         * loader.c (mono_method_get_param_names): Ignore instances of
12273         generic types for the moment.
12274
12275         * reflection.c (fixup_method): Added support for inflated methods.
12276         (mono_image_create_token): Use mono_image_get_methodref_token()
12277         for inflated methods.
12278         (mono_custom_attrs_from_param): Ignore instances of generic types
12279         for the moment.
12280         (mono_reflection_bind_generic_parameters): New public function.
12281         Moved all the functionality from
12282         ves_icall_Type_BindGenericParameters() here and added support for
12283         dynamic types.
12284         (mono_reflection_define_generic_parameter): Initialize
12285         `klass->methods' here.
12286
12287         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
12288         functionality into mono_reflection_define_generic_parameter().
12289         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
12290         TypeBuilder, return that TypeBuilder.
12291
12292 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12293
12294         * appdomain.c: removed mono_delegate_semaphore.
12295
12296         * threadpool.c:
12297         (mono_thread_pool_add): moved hash table creation inside and the thread 
12298         creation outside of the critical region.
12299         (mono_thread_pool_finish): removed obsolete code.
12300         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
12301         continue or exit the thread depending on the queue.
12302
12303 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
12304
12305         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
12306         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
12307         handle more bool marshalling options
12308
12309 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
12310
12311         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
12312         arrays of structs. Also add a more descriptive error message when
12313         a structure member is marshalled as LPArray.
12314
12315 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
12316
12317         * marshal.c (mono_marshal_get_native_wrapper): Add support for
12318         marshalling arrays of complex types. Fixes #29098. Also remove an
12319         usused and incomplete function.
12320
12321 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
12322
12323         * gc.c: report heap_size - free_bytes as total memory allocated
12324         (bug#49362).
12325
12326 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
12327
12328         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
12329         fix timezone handling problems on Windows.
12330         
12331         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
12332         asserts when the year is outside the range handled by ms the functions.
12333
12334         * class.c (setup_interface_offsets): If the class is an interface,
12335         fill out its interface_offsets slot.
12336
12337 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12338
12339         * threadpool.c: mark threadpool threads as background.
12340
12341 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
12342
12343         * decimal.c - define DECINLINE to nothing if not using GCC
12344
12345 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
12346
12347         * assembly.c: More refcount fixes.
12348
12349 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12350
12351         * string-icalls.c: if we're not trimming, return the same string.
12352         When not splitting, don't create a new string.
12353
12354 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12355
12356         * image.c:
12357         (mono_image_open): increment the ref_count inside the critical section.
12358
12359 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
12360
12361         * image.c (mono_image_open): Fix reference counting bug.
12362
12363 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
12364
12365         * marshal.c (mono_marshal_type_size) struct alignment changed for 
12366         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
12367         64bits. Avoid leak in mono_marshal_get_native_wrapper when
12368         mono_lookup_pinvoke_call throws.        
12369
12370 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
12371
12372         * reflection.c (mono_reflection_parse_type): Fix #49114.
12373
12374         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
12375         temporary workaround for cygwin header problem.
12376
12377         * object.c (mono_object_isinst): Synchronize this with the code
12378         generated by the JIT for casts.
12379
12380 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
12381
12382         * reflection.c (encode_type): Fix #38332.
12383
12384 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
12385
12386         * marshal.c (mono_marshal_method_from_wrapper): New function to return
12387         the original method from the wrapper method.
12388
12389 2003-09-25  Martin Baulig  <martin@ximian.com>
12390
12391         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
12392         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
12393         (ves_icall_Type_get_IsGenericInstance): New interncall.
12394
12395 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
12396
12397         * object.c: fix cast warning in big endian code.
12398
12399 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
12400
12401         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
12402         
12403 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12404
12405         * assembly.c: don't call check_env from mono_assembly_load. It's
12406         already done once in mono_assemblies_init and may cause headaches when
12407         multiple threads are loading assemblies.
12408
12409 2003-09-19  Martin Baulig  <martin@ximian.com>
12410
12411         * reflection.c (mono_reflection_define_generic_parameter): Don't
12412         allocate `klass->methods', set `klass->flags' to
12413         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
12414
12415 2003-09-18  Martin Baulig  <martin@ximian.com>
12416
12417         * class.c (mono_class_init): Don't create `class->methods' if it's
12418         already initialized.
12419
12420         * metadata.c (mono_metadata_load_generic_params): Make this
12421         actually work.
12422
12423         * reflection.c (mono_reflection_define_generic_parameter): Set
12424         parent class and interfaces from the constraints.
12425
12426         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
12427         to keep this struct in sync with the declaration in TypeBuilder.cs.
12428
12429 2003-09-17  Martin Baulig  <martin@ximian.com>
12430
12431         * metadata.h (MonoType): Replaced the data's `int type_param'
12432         field with `MonoGenericParam *generic_param'.
12433         (MonoGenericParam): Added `MonoClass *klass'.
12434
12435         * class.c (mono_class_from_gen_param): Removed the
12436         `MonoImage *image' and `int type_num' arguments.
12437
12438         * metadata.c (mono_metadata_parse_generic_param): New static
12439         method; creates a MonoGenericParam which just contains the index.
12440         (do_mono_metadata_parse_type): Call
12441         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
12442         MONO_TYPE_MVAR.
12443
12444         * reflection.c (mono_image_typedef_or_ref): Generic type
12445         parameters may be in the same assembly, but never use a typedef
12446         for them.
12447         (mono_reflection_define_generic_parameter): We're now creating a
12448         "real" class for the type parameter; it's now safe to call
12449         mono_class_from_mono_type() on the class'es type, it'll do the
12450         right thing.
12451
12452 2003-09-16  Martin Baulig  <martin@ximian.com>
12453
12454         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
12455         `symfile->range_entry_size' and `symfile->class_entry_size' here;
12456         the `symfile' data structure must be fully initialized before it
12457         gets added to the table.
12458
12459 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
12460
12461         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
12462
12463         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
12464         class init trampolines.
12465
12466 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
12467
12468         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
12469         to the built-in profiler to turn off time and allocation profiling
12470         respectively.
12471
12472 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
12473
12474         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
12475         g_direct_equal.
12476
12477         * debug-helpers.c (mono_method_full_name): Print the wrapper type
12478         in human readable form.
12479
12480 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
12481
12482         * reflection.c icall.c: Fixed warnings.
12483
12484         * image.c (load_class_names): Use a temporary hash table to hold the
12485         namespaces in order to avoid doing many string comparisons.
12486
12487         * image.h: Fix typo.
12488
12489         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
12490         Pass NULL instead of g_direct_equal to the GHashTable constructor 
12491         since the NULL case is short-circuited inside g_hash_table_lookup, 
12492         leading to better performance.  
12493
12494         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
12495         obtain the first custom attribute for a given index. Depends on the
12496         CustomAttribute table being sorted by the parent field.
12497
12498         * reflection.c (mono_custom_attrs_from_index): Use the new function 
12499         for better performance.
12500
12501 2003-09-07  Martin Baulig  <martin@ximian.com>
12502
12503         * class.c (mono_class_init): If we're a generic instance, inflate
12504         all our methods instead of loading them from the image.
12505         (mono_class_from_generic): Set `class->methods = gklass->methods'.
12506
12507 2003-09-07  Martin Baulig  <martin@ximian.com>
12508
12509         * mono-debug-debugger.c: Added support for constructors.
12510
12511 2003-09-06  Martin Baulig  <martin@ximian.com>
12512
12513         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
12514         New interncall.
12515
12516         * reflection.c (mono_reflection_setup_generic_class): Call
12517         ensure_runtime_vtable() to create the vtable.
12518
12519 2003-09-05  Martin Baulig  <martin@ximian.com>
12520
12521         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
12522         MONO_TYPE_MVAR.
12523
12524 2003-09-04  Martin Baulig  <martin@ximian.com>
12525
12526         * reflection.c (mono_reflection_define_generic_parameter): Generic
12527         parameters start with zero.
12528
12529 2003-09-04  Martin Baulig  <martin@ximian.com>
12530
12531         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12532
12533         * reflection.h (MonoReflectionGenericParam): New typedef.
12534         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
12535         the generic parameters from the managed TypeBuilder.
12536
12537         * reflection.c (mono_reflection_define_generic_parameter): New function.
12538         (mono_reflection_create_runtime_class): Encode generic parameters.
12539         (mono_reflection_setup_generic_class): New function; this is
12540         called after adding adding all generic params to the TypeBuilder.
12541         (encode_type): Added MONO_TYPE_VAR.
12542
12543 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12544
12545         * class.h class.c (mono_class_needs_cctor_run): Moved this method
12546         here from the JIT.
12547
12548         * assembly.h assembly.c: Moved the AOT loading code into an assembly
12549         load hook.
12550
12551 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
12552
12553         * reflection.h reflection.c class.h class.c: Delete duplicate 
12554         definition of mono_type_get_name () from reflection.c and export the
12555         one in class.c.
12556
12557         * class.c: Class loading fixes from Bernie Solomon 
12558         (bernard@ugsolutions.com).
12559
12560         * reflection.c: Endianness fixes from Bernie Solomon 
12561         (bernard@ugsolutions.com).
12562         
12563 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
12564
12565         * assembly.h assembly.c: Define a file format version for AOT
12566         libraries.
12567         
12568         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
12569
12570         * appdomain.h (MonoJitInfo): New field to determine whenever the
12571         code is domain neutral.
12572         
12573 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
12574
12575         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
12576
12577 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
12578
12579         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
12580         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
12581         Avoid caching the result since strings must be domain specific. Fixes
12582         #48050.
12583
12584 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
12585
12586         * marshal.c (mono_marshal_init): Make this callable multiple times
12587         since it is hard to find a correct place to call it.
12588
12589         * object.c (mono_runtime_class_init): Execute static constructors in
12590         the correct appdomain.
12591
12592         * image.c (build_guid_table): Handle the case when multiple images have
12593         the same GUID.
12594
12595 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12596
12597         * icall.c: added a couple of icalls for System.Web.
12598
12599 2003-08-28  Martin Baulig  <martin@ximian.com>
12600
12601         * icall.c (ves_icall_Type_BindGenericParameters): Use
12602         `klass->generic_inst' instead of `&klass->byval_arg' in the
12603         mono_type_get_object() call.  The returned type must be
12604         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
12605
12606 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
12607
12608         * NOTES: New file.
12609
12610         * object.c (mono_class_proxy_vtable): Make it thread safe.
12611
12612         * pedump.c: Fix warning.
12613
12614         * object.c appdomain.h: Get rid of metadata_section. 
12615         It is no longer needed and it was causing deadlocks with domain->lock.
12616
12617         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
12618
12619 2003-08-26  Martin Baulig  <martin@ximian.com>
12620
12621         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
12622
12623 2003-08-26  Martin Baulig  <martin@ximian.com>
12624
12625         * pedump.c (main): Call mono_metadata_init(),
12626         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
12627         and mono_loader_init().
12628
12629 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
12630
12631         * loader.h: Add missing include to fix build.
12632
12633         * image.h: mono_image_load_references is no more.
12634
12635         * assembly.c: Reworked assembly loading to make it really thread safe.
12636         After these changes, the assembly returned by mono_assembly_open is
12637         fully initialized, i.e. all its references assemblies are loaded.
12638
12639         * assembly.c (mono_image_load_references): Renamed to 
12640         mono_assembly_load_references, and made private, since clients no
12641         longer need to call it.
12642
12643         * class.c: Removed calls to mono_assembly_load_references, since it was
12644         a source of deadlocks.
12645
12646         * loader.h loader.c class.h class.c: Protect data structures using a 
12647         new lock, the loader lock.
12648
12649         * class.c (mono_class_setup_vtable): Create temporary hash tables and
12650         GPtrArrays only when needed.
12651
12652         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
12653         into empty structures by mcs. Fixes pinvoke7.cs.
12654         
12655         * domain.c (mono_init): Call a new initialization function.
12656
12657         * appdomain.c (mono_runtime_init): Call the new initializer function
12658         of the marshal module.
12659
12660         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
12661         inserted into empty structures by mcs. Fixes pinvoke7.cs.
12662
12663         * marshal.h marshal.c: Added locks around the wrapper caches to make
12664         this module thread safe.
12665
12666         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
12667         this argument. Fixes pinvoke1.exe.
12668
12669 2003-08-25  Lluis Sanchez <lluis@ximian.com>
12670
12671         * object.h: Added call_type field to MonoMethodMessage and the corresponding
12672         enumeration of values. Removed fields to store remote call output values in
12673         MonoAsyncResult. Not needed any more.
12674         * object.c: Initialize call_type and async_result fields in mono_message_init.
12675         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
12676         dispatching the message.
12677         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
12678         async call to finish. To do it use a message with EndInvoke call type.
12679
12680 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
12681
12682         * loader.h loader.c (mono_method_hash_marhal_info): New function which
12683         determines whenever a method has marshalling info.
12684
12685 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12686
12687         * assembly.c: fix the build on windows.
12688
12689 2003-08-22 Lluis Sanchez <lluis@ximian.com>
12690
12691         * object.cs: Fixed bug #47785.
12692
12693 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
12694
12695         * string-icalls.c (StringReplace): If their are no occurances of
12696         the old string found return a reference to the supplied
12697         string. This saves some memory and matches MS behavoir.
12698         
12699 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12700
12701         * socket-io.c: fixed compilation for systems that define AF_INET6
12702         and don't define SOL_IP/SOL_IPV6.
12703
12704 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
12705
12706         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
12707         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
12708
12709         * rawbuffer.c rawbuffer.h: Make this module thread safe.
12710
12711         * domain.c: Make this module thread safe.
12712
12713         * domain.c (mono_init): Call new initialization function.
12714
12715         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
12716         reference types too. Fixes #38812.
12717
12718         * image.c (mono_image_init): Fixed warnings.
12719
12720         * class.c (mono_class_from_typeref): Handle assembly load failure
12721         correctly.
12722
12723         * appdomain.c (add_assemblies_to_domain): Handle the case when
12724         the references of an assembly are not yet loaded.
12725
12726         * metadata.c image.c assembly.c: Moved initialization of global
12727         variables to a separate function called at startup since lazy 
12728         initialization of these variables is not thread safe.
12729         
12730         * image.c assembly.c: Made this module thread safe by adding locks in 
12731         the appropriate places.
12732
12733         * domain.c (mono_init): Call the new initialization functions of the
12734         three modules.
12735
12736 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
12737
12738         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
12739           make a direct call. It is proxy's work to make the call asynchronous.
12740           mono_delegate_end_invoke(): If the targe is a proxy, just collect
12741           the return values.
12742         * object.cs: mono_method_call_message_new(): read AsyncResult and
12743           state object from parameters list, if this info is requested.
12744         * object.h: Added fields to store remote call output values in
12745           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
12746
12747 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
12748
12749         * object.h: add needed fields to MonoThread.
12750         * threads.c, threads.h: allow registering a function to cleanup data
12751         allocated per thread by the JIT.
12752
12753 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12754
12755         * loader.h: portability fix by Bernie Solomon
12756         * <bernard@ugsolutions.com>.
12757
12758 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
12759
12760         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
12761         return a MonoArray. This simplifies the code and also ensures that
12762         the cache allways contains an object reference as a value.
12763
12764         * icall.c (ves_icall_get_parameter_info): Simplified using the new
12765         function.
12766
12767 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12768
12769         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
12770         fixes a problem with byte ordering when getting the address family for
12771         a socket.
12772
12773 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
12774
12775         * .cvsignore: Added monosn.
12776
12777         * reflection.h reflection.c loader.c: Added support for parameter
12778         marshalling to dynamically created types. Fixes #47295.
12779
12780 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
12781
12782         * rand.c: remove useless warnings.
12783
12784 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12785
12786         * class.c: implemented ldtoken for methods and fieldrefs.
12787
12788 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12789
12790         * threadpool.c: when mono_async_invoke was called, no one took care of
12791         monitoring the queue. So if the method invoked took some time and we
12792         got new async invoke requests after 500 ms (the thread created waited
12793         that long in WaitForSingleObject), the new async invoke was not called
12794         until the previous one finished.
12795
12796         This is fixed now. Thanks to Totte for helping with it.
12797
12798 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12799
12800         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
12801
12802 2003-08-11  Martin Baulig  <martin@ximian.com>
12803
12804         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
12805
12806 2003-08-06  Martin Baulig  <martin@ximian.com>
12807
12808         * mono-debug-debugger.c: Added support for static fields,
12809         properties and methods.
12810
12811 2003-08-06  Martin Baulig  <martin@ximian.com>
12812
12813         * mono-debug-debugger.c: Don't store the MonoString's vtable to
12814         make this work for applications with multiple application domains.
12815
12816 2003-08-04  Martin Baulig  <martin@ximian.com>
12817
12818         * mono-debug-debugger.c: Completely reworked the type support; the
12819         most important thing is that we're now just using one single
12820         `MonoType' instance per type.
12821
12822 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
12823
12824         * mono-endian.h, mono-endian.c, icall.c: Added icall
12825         ves_icall_System_Double_AssertEndianity to assert double word endianity
12826         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
12827
12828 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12829
12830         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
12831         support, icalls and fixes.
12832
12833 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
12834
12835         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
12836         classes that are a punctuation character in .NET is not the same a
12837         g_unichar_ispunct.
12838
12839 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12840
12841         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
12842
12843 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
12844
12845         * icall.c: Add new MemCopy internalcall.
12846         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
12847         Simplified code; It is not necessary to handle all the cases here,
12848         as the C# code takes care of it.  Only handle the case of the name
12849         resource embedded into the assembly.
12850
12851         Changed signature to return the data pointer and the size of the
12852         data. 
12853
12854 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
12855
12856         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
12857         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
12858
12859 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
12860
12861         * socket-io.c: ignore EINTR error in select.
12862
12863 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
12864
12865         * class.h, class.c: removed unused subclasses field in MonoClass.
12866
12867 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
12868
12869         * icall.c: improve fix of get_base_definition(). If the parent class
12870           doesn't have the mehod, look at the parent of the parent.
12871         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
12872           to check if a parameter is an in or out parameter
12873           (PARAM_ATTRIBUTE_IN is not set by default).
12874           mono_method_return_message_restore(): Use mono_class_value_size to
12875           get the size of a value type. mono_type_stack_size (parameterType)
12876           does not return the correct value if parameterType is byRef.
12877           mono_load_remote_field(), mono_load_remote_field_new(),
12878           mono_store_remote_field(), mono_store_remote_field_new():
12879           raise exception if the remote call returns an exception.
12880
12881 2003-07-28  Martin Baulig  <martin@ximian.com>
12882
12883         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
12884         method.  This is a wrapper around mono_runtime_invoke() which
12885         boxes the instance object if neccessary.
12886
12887 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12888
12889         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
12890         metadata.h, row-indexes.h, verify.c: first cut of generics support.
12891
12892 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12893
12894         * icall.c: disable mcs bug workaround.
12895
12896 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
12897
12898         * object.c (mono_runtime_class_init): Take the metadata_section
12899         mutex before obtaining the domain mutex.
12900
12901         * appdomain.h: Added definition of metadata_section mutex here. 
12902
12903         * object.c: define metadata_mutex here.
12904
12905 2003-07-24  Ravi Pratap  <ravi@ximian.com>
12906
12907         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
12908         fixed.
12909
12910 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
12911
12912         * reflection.c: Fix bug #46669
12913
12914 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12915
12916         * exception.c:
12917         * exception.h:
12918         * icall.c:
12919         * object.h: fill in the type name for TypeLoadException.
12920
12921 2003-07-23  Ravi Pratap  <ravi@ximian.com>
12922
12923         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
12924         relationship between TypeBuilders while compiling corlib) and bug
12925         45993 (Array types returned from the runtime while compiling
12926         corlib were from the loaded corlib).
12927
12928 2003-07-22  Martin Baulig  <martin@ximian.com>
12929
12930         * mono-debug-debugger.c: Reworked the type support a bit more;
12931         distinguish between types and classes.
12932
12933 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
12934
12935         * icall.c: add IsArrayImpl icall.
12936
12937 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
12938
12939         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
12940         initializing real_size only once. Also fix bug #46602.
12941
12942 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
12943
12944         * object.c: Renamed mono_metadata_section to metadata_section.
12945
12946 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
12947
12948         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
12949           empty array if the type is an array. Fixed.
12950           ves_icall_MonoMethod_get_base_definition: if the base method
12951           is abstract, get the MethodInfo from the list of methods of
12952           the class.
12953         * reflection.c: ParameterInfo.PositionImpl should be zero-based
12954           and it was 1-based. Fixed in mono_param_get_objects.
12955
12956 2003-07-20  Martin Baulig  <martin@ximian.com>
12957
12958         * mono-debug.h: Set version number to 31.
12959         (mono_debug_init): Added `MonoDomain *' argument.
12960
12961         * mono-debug-debugger.c: Reworked the type support; explicitly
12962         tell the debugger about builtin types; pass the `klass' address to
12963         the debugger.
12964
12965 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
12966
12967         * image.c: Allow new metadata tables to be loaded without a
12968         warning. Also update the warning message to give the new constant value.
12969                 
12970 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
12971
12972         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
12973         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
12974         array type representation changes.
12975
12976 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
12977
12978         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
12979         on Environment.Exit () call.
12980
12981 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12982
12983         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
12984         requires a matching corlib.
12985
12986 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
12987
12988         * Changelog: My editor decided to add a CR to each line. Sorry about that.
12989           Committed again without the CRs.
12990         
12991 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
12992
12993         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
12994           getting it from the "this" socket instance. Did not work
12995           if the socket is a subclass of Socket.
12996           Also fixed bug #35371.
12997
12998 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
12999
13000         * metadata.c: fixed size for TypedByRef.
13001         * loader.c: when searching for a method, consider the vararg amrker.
13002         * unicode.c, decimal.c: constify some arrays.
13003
13004 2003-07-15  Dick Porter  <dick@ximian.com>
13005
13006         * socket-io.c: Fixed compilation for gcc < 3.2.
13007
13008         Fixed compilation for machines that don't have AF_INET6 (thanks to
13009         Bernie Solomon <bernard@ugsolutions.com> for that part.)
13010
13011         Fixed compile warnings.
13012         
13013         Fixed formatting and line endings.
13014
13015 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
13016
13017         * socket-io.h:
13018         * socket-io.c: Added IPv6 support.
13019
13020 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
13021
13022         * class.c (mono_class_is_assignable_from): New function to implement
13023         the is_assignable_from logic. Used by mono_object_isinst, 
13024         Type::IsAssignableFrom () and the interpreter.
13025
13026         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
13027         Object, even interfaces.
13028         
13029         * object.c (mono_object_isinst): Implement in terms of 
13030         is_assignable_from.
13031
13032         * icall.c (ves_icall_type_is_assignable_from): New icall.
13033
13034 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
13035
13036         * domain.c (foreach_domain): fix compiler warning.
13037
13038 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
13039
13040         * image.c (load_metadata_ptrs): use g_strndup because strndup is
13041         not available on all plattforms
13042
13043 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
13044
13045         * image.h image.c: Store the metadata version string in MonoImage.
13046         * icall.c: New icall to retrieve the image version.
13047         * reflection.c (create_dynamic_image): Fill in the image version field
13048         * reflection.c (build_compressed_metadata): Use the image version
13049         from the image structure.
13050
13051 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13052
13053         * appdomain.c: modified comment.
13054         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
13055         That will be its last iteration when mono_gc_cleanup is called from
13056         mono_runtime_cleanup and before the domain is unloaded.
13057
13058         Fixes bug #45962.
13059
13060 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
13061
13062         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
13063         attributes.
13064
13065 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13066
13067         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
13068         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
13069         Bernie Solomon <bernard@ugsolutions.com>.
13070
13071 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13072
13073         * object.c, object.h: provide mono_object_new_fast() for faster
13074         allocation in some special cases.
13075
13076 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13077
13078         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
13079         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
13080
13081 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13082
13083         * threadpool.c: fix leaks.
13084
13085 2003-07-01  Dick Porter  <dick@ximian.com>
13086
13087         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
13088         using MonoGHashTables.  Fixes threadpool bug posted to list.
13089
13090 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13091
13092         * image.h, image.c: added support to load an assembly from a byte array.
13093         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
13094         assembly bundle support.
13095
13096 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
13097
13098         * threadpool.c (mono_thread_pool_add): keep a reference to the
13099         AsyncResult to prevent GC
13100
13101 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13102
13103         * class.c: leak fix.
13104
13105 2003-06-25  Dick Porter  <dick@ximian.com>
13106
13107         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
13108         for the async object, the WaitHandle object will close the handle.
13109         Fixes bug 45321.
13110
13111 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13112
13113         * class.c: in mono_array_class_get (), lookup from the hash with the
13114         same type we insert: this works around a bug in
13115         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
13116         lluis. The real fix will have to wait for after the release.
13117
13118 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13119
13120         * icall.c: fix memory leak when getting type members.
13121
13122 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13123
13124         * reflection.c: added more pubtoken special cases.
13125
13126 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13127
13128         * class.c: handle field offset correctly when class size
13129         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
13130
13131 2003-06-20  Martin Baulig  <martin@ximian.com>
13132
13133         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
13134         *image' field.
13135
13136 2003-06-20  Martin Baulig  <martin@ximian.com>
13137
13138         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
13139
13140 2003-06-20  Martin Baulig  <martin@ximian.com>
13141
13142         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
13143         just distinguish between variables in registers and variables at
13144         an offset relative to a register.
13145
13146 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13147
13148         * icall.c: #ifdef out latest changes until mcs is fixed.
13149
13150 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13151
13152         * icall.c: return members in metadata order.
13153
13154 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13155
13156         * icall.c: avoid infinite loop in GetTimeZoneData.
13157
13158 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13159
13160         * icall.c: added Marshal.Prelink/All icalls.
13161
13162 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13163
13164         * object.c, object.h: fix warnings and do some overflow checking
13165         when creating arrays.
13166
13167 2003-06-17  Dick Porter  <dick@ximian.com>
13168
13169         * file-io.h:
13170         * file-io.c: File attributes need to be tweaked slightly when
13171         passed from the managed to the w32 world.
13172
13173 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13174         * profiler.h profiler-private.h profiler.c: Rework last patch
13175         based on suggestion by Paolo.
13176         
13177 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13178
13179         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
13180         instruction level coverage data collection.
13181         * profiler.h profiler.c (: Added new callback function which can be
13182         used by the profiler to limit which functions should have coverage
13183         instrumentation.
13184         * profiler.c (mono_profiler_load): Call g_module_build_path to
13185         generate the file name of the profiler library.
13186
13187 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13188
13189         * profiler.c, profiler.h, profiler-private.h: added basic block 
13190         coverage profiling API.
13191
13192 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
13193
13194         * reflection.c (mono_reflection_create_runtime_class): Add support
13195         for events in dynamically generated code.
13196
13197         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
13198         not allocated.
13199
13200 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13201
13202         * icall.c: when getting timezone info, return reasonable values if we
13203         can't get the actual data.
13204
13205 2003-06-14  Dick Porter  <dick@ximian.com>
13206
13207         * threads.c (start_wrapper): Remove the reference to the thread
13208         object in the TLS data, so the thread object can be finalized.
13209         This won't be reached if the thread threw an uncaught exception,
13210         so those thread handles will stay referenced :-( (This is due to
13211         missing support for scanning thread-specific data in the Boehm GC
13212         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
13213
13214 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
13215
13216         * reflection.c: ensure streams and tables are first allocated with
13217         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
13218
13219 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13220
13221         * icall.c: fixed GetElementType for byrefs (bug# 44792).
13222
13223 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
13224
13225         * reflection.c (mono_reflection_create_runtime_class): Add support for
13226         properties to dynamically created classes.
13227         * reflection.c: Fix a few places where non-MonoObjects were inserted
13228         into the tokens hashtable.
13229
13230 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13231
13232         * object.c: some support to handle out of memory exceptions.
13233
13234 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
13235
13236         * marshal.c (mono_marshal_get_native_wrapper): support reference
13237         return types
13238
13239 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13240
13241         * object.h, object.c: more portability stuff from Bernie Solomon.
13242         Unexport mono_object_allocate(). Added mono_object_unbox ().
13243         Set exitcode when an unhandled exception is thrown.
13244
13245 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
13246
13247         * marshal.c (mono_marshal_get_native_wrapper): use custom
13248         marshaler for return types.
13249
13250 2003-06-10  Dick Porter  <dick@ximian.com>
13251
13252         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
13253         ip_mreq is available
13254
13255 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13256
13257         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
13258         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
13259         by Bernie Solomon <bernard@ugsolutions.com>.
13260
13261 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
13262
13263         * gc.c (mono_gc_init): Avoid error message on shutdown when
13264         GC_DONT_GC=1 is used.
13265
13266         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
13267         New icall to return the GUID of a module.
13268
13269 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13270
13271         * class.c: ensure instance size always includes the parent's size
13272         even whem class size is set explicitly (fixes bug#44294).
13273
13274 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13275
13276         * profiler.h, profiler.c: made the simple profiler thread-safe,
13277         get more accurate timing info. Allow the loading of an
13278         externally-developed profiler module.
13279
13280 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
13281
13282         * marshal.c (mono_marshal_get_native_wrapper): improved
13283         class/byref arguments.
13284         (mono_marshal_get_native_wrapper): better string marshaling support.
13285
13286 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13287
13288         * class.c: ensure .pack and .size are handled correctly and
13289         simplified layout of static fields.
13290
13291 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13292
13293         * appdomain.c
13294         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
13295
13296         * loader.c (mono_lookup_pinvoke_call): look for modules in the
13297         current directory (fix bug 44008)
13298
13299 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
13300
13301         * marshal.c (mono_marshal_get_native_wrapper): started support for
13302         custom marshalers.
13303         (mono_delegate_to_ftnptr): consider marshalling specifications
13304
13305 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13306
13307         * reflection.c, reflection.h: emit custom marshal info.
13308
13309 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13310
13311         * object.c: free the GError.
13312         * icall.c: added CloseEvent_internal.
13313         * threads.[ch]:
13314         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
13315         call.
13316
13317 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
13318
13319         * loader.c (mono_method_get_signature): Add support for dynamic
13320         assemblies.
13321
13322 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13323
13324         * reflection.c: fixed bug #43905.
13325
13326 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13327
13328         * class.c, domain.c, icall.c, metadata.h, object.h: support for
13329         handling TypedReference and ArgIterator.
13330         * loader.c, loader.h: added function to get signature at call site.
13331
13332 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13333
13334         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
13335         data readonly. Buglets and warning fixes. Some MethodSpec support.
13336
13337 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13338
13339         * class.h, class.c, object.c: remove relative numbering support.
13340
13341 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
13342
13343         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
13344         free the string, until we get a chance to fix Gtk#
13345
13346 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13347
13348         * marshal.c: revert last patch.
13349
13350 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13351
13352         * icall.c: updates for new mono_class_vtable() not calling
13353         the type constructor anymore.
13354
13355 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13356
13357         * object.h, object.c: separate vtable creation from type
13358         initialization. Make running the .cctor thread safe.
13359
13360 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
13361
13362         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
13363
13364 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
13365
13366         * loader.c (mono_get_method): consider calling convention
13367
13368 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
13369
13370         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
13371         to return the invisible global type for a module.
13372
13373         * reflection.c (mono_image_build_metadata): Emit global fields too.
13374
13375 2003-05-20  Peter Williams  <peterw@ximian.com>
13376
13377         * loader.c (mono_lookup_internal_call): Add a few newlines.
13378
13379 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
13380
13381         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
13382         literal strings.
13383
13384         * appdomain.c (set_domain_search_path): Recalculate search path when
13385         AppDomainSetup.PrivateBinPath changes.
13386
13387         * object.c (mono_class_compute_gc_descriptor): It turns out some
13388         parts of the class libs (like System.Thread) holds pointers to
13389         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
13390         to treat native int a pointer type here.
13391         
13392 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
13393
13394         * appdomain.h, domain.c: add hashtable for jump target resolution.
13395
13396 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
13397
13398         * reflection.h reflection.c icall.c: Added new icalls 
13399         GetManifestResourceInfoInternal, GetModulesInternal and support
13400         infrastructure.
13401
13402 2003-05-16  Dick Porter  <dick@ximian.com>
13403
13404         * icall.c:
13405         * file-io.h:
13406         * file-io.c: Implement System.IO.MonoIO::GetTempPath
13407
13408 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
13409
13410         * object.c: mono_store_remote_field: little fix to previous patch.
13411
13412 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13413
13414         * class.c: add constructors to array classes.
13415         * icall.c: special case array construction for InternalInvoke (),
13416
13417 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
13418
13419         * class.h class.c reflection.c object.c: Added support for field
13420         defaults in dynamically generated classes.
13421
13422 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13423
13424         * reflection.c: properly encode charset for ddlimport.
13425
13426 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13427
13428         * threads.c: allow compiling without GC.
13429
13430 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13431
13432         * appdomain.h, object.c, object.h, threads.c, threads.h: added
13433         handling of thread static data.
13434
13435 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13436
13437         * reflection.h, reflection.c: added mono_custom_attrs_free ().
13438
13439 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
13440
13441         * class.c (mono_array_class_get): always set the serializable flags
13442         (mono_array_class_get): always set the SEALED attribute for array types
13443
13444 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
13445
13446         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
13447         attributes (fix for bug 42021).
13448
13449 2003-05-12  Dick Porter  <dick@ximian.com>
13450
13451         * gc.c: Don't run finalizers when the finalizer thread is
13452         finishing up, because the default domain has already been
13453         destroyed.
13454
13455 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
13456
13457         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
13458         value is null, we should throw an exception.   This is slightly
13459         different than the other conventions used for the constructor.
13460
13461 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13462
13463         * socket-io.c: fixed windows build.
13464
13465 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13466
13467         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
13468
13469 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
13470
13471         * object.c (mono_string_new_wrapper): Compatibility fix for MS
13472         compilers.
13473
13474 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
13475
13476         * class.c (mono_class_layout_fields): Add experimental GC aware
13477         auto layout facility. Requires class library changes to work correctly.
13478
13479         (mono_class_setup_vtable): Avoid overriding explicit interface
13480         method implementations. Fixes iface3.exe test.
13481
13482         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
13483         object reference.
13484         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
13485         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
13486
13487         * metadata.h: Add new type classification macro which determines
13488         whenever the type holds an object reference.
13489
13490 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
13491
13492         * marshal.c (mono_marshal_get_native_wrapper): cleanups
13493
13494 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
13495
13496         * gc.c (finalizer_thread): Work around a GC bug.
13497
13498 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
13499
13500         * marshal.c (emit_struct_conv): allow unions
13501
13502         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
13503
13504 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
13505
13506         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
13507
13508 2003-05-06  Martin Baulig  <martin@ximian.com>
13509
13510         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
13511
13512 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13513
13514         * socket-io.c:
13515         (Select_internal): allow NULLs, don't create arrays if not needed.
13516         Coupled with Socket.cs changes.
13517
13518         * threadpool.c:
13519         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
13520         register a finalizer for it that will close the semaphore handle. This
13521         fixes the leak and make Lupus' test run with > 4080 loops.
13522
13523 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
13524
13525         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
13526         Jerome Laban (bug #42287)
13527
13528 2003-05-02  Martin Baulig  <martin@ximian.com>
13529
13530         * debug-mono-symfile.h
13531         (MonoSymbolFile): Moved declaration into mono-debug.h.
13532         (MonoDebugMethodJitInfo): Likewise.
13533         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
13534         argument.
13535         (_mono_debug_address_from_il_offset): Take a
13536         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
13537
13538         * mono-debug.h
13539         (MonoDebugDomainData): New struct.
13540         (mono_debug_get_domain_data): New function.
13541         (mono_debug_add_method): Take an additional `MonoDomain *'
13542         argument.
13543         (mono_debug_source_location_from_address): Likewise.
13544         (mono_debug_il_offset_from_address): Likewise.
13545         (mono_debug_address_from_il_offset): Likewise.
13546
13547 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
13548
13549         * reflection.c: one more check for null type in custom attrs.
13550
13551 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13552
13553         * reflection.c: avoid warning (comparison is always false due to limited
13554         range of data type).
13555
13556 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13557
13558         * icall.c: throw an exception in Type.GetField if the argument 'name'
13559         is NULL.
13560
13561 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
13562
13563         * reflection.c: fixed handling of enums in named arguments to custom
13564         attributes (bug #42123).
13565
13566 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13567
13568         * reflection.c: use the right array element type and handle
13569         a null for a Type argument, too.
13570
13571 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
13572
13573         * reflection.c: handle arrays as arguments to custom attributes.
13574
13575 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
13576
13577         * reflection.c: handle a string value in a custom attr
13578         ctor that takes an object.
13579
13580 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
13581
13582         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
13583         (fix bug #42063)
13584
13585 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
13586
13587         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
13588
13589 2003-04-27  Martin Baulig  <martin@ximian.com>
13590
13591         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
13592         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
13593         MONO_DEBUGGER_EVENT_BREAKPOINT.
13594         (mono_breakpoint_trampoline_code): Removed.
13595         (mono_debugger_event_handler): The last argument is now a
13596         `guint32'.
13597         (mono_debugger_insert_breakpoint_full): Removed the
13598         `use_trampoline' argument.
13599         (mono_debugger_method_has_breakpoint): Likewise.
13600         (mono_debugger_trampoline_breakpoint_callback): Renamed to
13601         mono_debugger_breakpoint_callback(); take the method and
13602         breakpoint number as arguments.
13603
13604 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13605
13606         * metadata.c: fix off by one when loading parameters attributes.
13607
13608 2003-04-24  Martin Baulig  <martin@ximian.com>
13609
13610         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
13611
13612 2003-04-24  Martin Baulig  <martin@ximian.com>
13613
13614         * mono-debug-debugger.c: Moved all code which interacts with the
13615         Mono Debugger here.
13616
13617         * debug-mono-symfile.c: This code now just deals with the symbol
13618         file itself, the debugger code is now in mono-debug-debugger.c.
13619
13620 2003-04-23  Martin Baulig  <martin@ximian.com>
13621
13622         * mono-debug.c (mono_debug_source_location_from_il_offset):
13623         New method; like mono_debug_source_location_from_address(), but
13624         takes an IL offset instead of a machine address.
13625
13626 2003-04-23  Martin Baulig  <martin@ximian.com>
13627
13628         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
13629         `line' field; this is now computed by the debugger.
13630
13631 2003-04-23  Martin Baulig  <martin@ximian.com>
13632
13633         * mono-debug.[ch]: New files.  This is the new debugging interface.
13634
13635         * mono-debug-debugger.[ch]: New files.  Moved all code which
13636         interacts with the Mono Debugger here.
13637
13638 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
13639
13640         * domain.c (mono_init): initialize mono_defaults.monitor_class
13641
13642 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
13643
13644         * reflection.c (method_encode_code): Add a spicy exception to help
13645         future compiler authors.
13646
13647 2003-04-21  Martin Baulig  <martin@ximian.com>
13648
13649         * icall.c
13650         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
13651         Make this work with relative pathnames; g_filename_to_uri() needs
13652         an absolute filename.
13653
13654 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
13655
13656         * icall.c: Track name changes in Object and ValueType.
13657
13658 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
13659
13660         * metadata.c (mono_type_stack_size): size should be a multiple of
13661         sizeof (gpointer)
13662
13663 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13664
13665         * gc.c:
13666         (internal_domain_finalize): moved into mono_domain_finalize. No need
13667         to create another thread because the finalizers will be run in the
13668         finalizer thread.
13669         
13670         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
13671         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
13672         to be run (MS does this too).
13673
13674 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
13675
13676         * object.c (mono_class_compute_gc_descriptor): Update comment.
13677
13678         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
13679
13680         * image.h: Add synchronized wrapper cache.
13681
13682         * image.c (do_mono_image_open): Initialize cache.
13683
13684         * reflection.c (create_dynamic_mono_image): Initialize cache.
13685
13686 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13687
13688         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
13689         ves_icall_System_Buffer_ByteLengthInternal.
13690
13691 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13692
13693         * reflection.c: setup klass->nested_in earlier. Allow
13694         a dash in the assembly name.
13695
13696 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
13697
13698         * metadata.c (mono_type_to_unmanaged): dont access
13699         type->data.klass for MONO_TYPE_OBJECT
13700         (mono_type_to_unmanaged): consider System.Delegate class
13701
13702 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
13703
13704         * class.c: just setup supertypes in the proper place instead of
13705         initializing the full element class for arrays.
13706
13707 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13708
13709         * class.c: ensure the element class of arrays is initialized.
13710         Setup the supertype info for array classes, too.
13711
13712 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
13713
13714         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
13715
13716 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13717
13718         * Makefile.am: re-added -m option when running cygpath. This way,
13719         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
13720         separator.
13721         * mono-config.c: same codepath for locating mono config file for WIN32
13722         and the rest.
13723         * assembly.c: if mono_assembly_setrootdir is called, don't override
13724         the value set.
13725
13726 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13727
13728         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
13729         MONO_ASSEMBLIES variable.
13730
13731 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13732
13733         * icall.c: added Assembly::GetNamespaces() icall.
13734
13735 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13736
13737         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
13738
13739 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
13740
13741         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
13742         * object.c: fixed bug in the construction of vtable for proxies
13743
13744 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
13745
13746         * object.c (mono_array_new): Mark mono_array_new as an icall.
13747
13748 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13749
13750         * class.c: fixed test for public method when overriding interfaces.
13751         Closes bug #40970.
13752
13753 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13754
13755         * appdomain.h, domain.c: added mono_domain_foreach() to
13756         be able to access the currently loaded appdomains.
13757         * object.c: make string interning work across sppdomains.
13758         Mark some functions for use as icalls.
13759
13760 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
13761
13762         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
13763
13764         * reflection.h reflection.c: Allocate long living data using 
13765         GC_MALLOC_ATOMIC so the collector does not need to scan it.
13766
13767         * reflection.c: Double the allocation size in streams instead of
13768         increasing it, to prevent unneccesary copying on large assemblies.
13769         
13770         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
13771         creation if the assembly does not have the Run flag set.
13772
13773 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13774
13775         * class.h: avoid the C++ keywords in header files (Jerome Laban
13776         spotted and fixed this).
13777
13778 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13779
13780         * object.c:
13781         (mono_unhandled_exception): fill in the arguments for the
13782         UnhandledException event. Only trigger that event for the default
13783         domain (as MS does).
13784
13785 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
13786
13787         * object.c: Improve typed allocation stuff based on suggestions from
13788         Paolo. Also turn it on if the GC library supports it.
13789
13790 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
13791
13792         * object.c object.h class.h: Added experimental typed allocation
13793         facility using the interfaces in gc_gcj.h.
13794
13795         * os/gc_wrapper.h: Added new include files.
13796         
13797 2003-04-03  Martin Baulig  <martin@ximian.com>
13798
13799         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
13800         which is not yet enabled by default.
13801
13802         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
13803         functions.
13804         (mono_gc_lock, mono_gc_unlock): New static functions.
13805
13806         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
13807         functions; stop/start the world for the garbage collector.  This
13808         is using the windows API; we need to complete the SuspendThread()/
13809         ResumeThread() implementation in the io-layer to make this work on Unix.
13810         (mono_gc_push_all_stacks): New public function; tells the garbage
13811         collector about the stack pointers from all managed threads.
13812
13813 2003-04-03  Martin Baulig  <martin@ximian.com>
13814
13815         * object.h (MonoThread): Added `gpointer stack_ptr'.
13816
13817         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
13818
13819 2003-04-03  Martin Baulig  <martin@ximian.com>
13820
13821         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
13822
13823 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
13824
13825         * reflection.c (typebuilder_setup_fields): Initialize field.first and
13826         field.last.
13827
13828 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
13829
13830         * loader.c (mono_lookup_internal_call): Report the corlib that is
13831         out of sync.
13832
13833 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
13834
13835         * icall.c (ves_icall_type_GetTypeCode): fixed check for
13836         System.DBNull (it's class not valuetype).
13837
13838 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13839
13840         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
13841         if the array method was already assigned a token (fixes bug#40646).
13842
13843 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
13844
13845         * reflection.c (mono_reflection_get_type): Attempt type resolve even
13846         if no assembly is given.
13847
13848 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
13849
13850         * metadata.h: Added the new tables.
13851
13852         * row-indexes.h: Added definitions for new tables.
13853
13854         * metadata.c: Add schemas for new tables, and add support for
13855         computing the sizes of them.
13856
13857         * class.c: Update for handling the new type cases.
13858
13859 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
13860
13861         * metadata.h (MONO_TYPE_IS_VOID): new macro
13862
13863 2003-03-31  Martin Baulig  <martin@ximian.com>
13864
13865         * threads.h (MonoThreadCallbacks): Added `thread_created'.
13866
13867         * threads.c (mono_thread_new_init): Call `thread_created' in the
13868         mono_thread_callbacks.
13869
13870 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
13871
13872         * loader.h: added marshalbyrefobject_class to mono_defaults
13873         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
13874         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
13875           generation of output parameters.
13876           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
13877         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
13878           contextbound and the target object belongs to the context of the caller.
13879         * object.h: added context and unwrapped_server variables in MonoRealProxy.
13880         * object.c: Implemented support for interfaces and abstract classes
13881           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
13882           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
13883
13884 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
13885
13886         * class.h class.c (mono_class_is_subclass_of): New function.
13887         
13888         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
13889         routines for most common case (calls from ArrayList::ToArray).
13890
13891         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
13892         routine so programs which call Environment::Exit() can be profiled.
13893
13894         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
13895         Added MONO_ARCH_SAVE_REGS.
13896
13897         * icall.c (ves_icall_type_is_subtype_of): Use new function.
13898
13899 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
13900
13901         * blob.h: Add a couple of new MonoType types definitions.
13902
13903         * tabledefs.h: Add a couple of new call convs.
13904
13905 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
13906
13907         * reflection.h (MonoReflectionDynamicAssembly): track changes in
13908         the layout of the class.
13909
13910         * reflection.c (alloc_table): double the size on overflow to avoid
13911         unnecessary copying.
13912
13913         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
13914         avoid filling out metadata tables and blobs. Also set mb->ilgen to
13915         null so it can be garbage collected.
13916         
13917 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
13918
13919         * reflection.c (mono_reflection_get_type): Return the resolved type
13920         only if it is in the assembly we searched.
13921
13922         * reflection.c (ensure_runtime_vtable): Initialize method slots.
13923
13924         * class.c (mono_class_setup_vtable): Set the slot of the overriding
13925         method.
13926
13927 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13928
13929         * appdomain.c:
13930         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
13931         the right one is 'file:///blah', but MS allows it.
13932         * assembly.c:
13933         (mono_assembly_open): allow 'file://blah'
13934
13935         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
13936
13937 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
13938
13939         * socket-io.c: fixes bug #40310.
13940
13941 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
13942
13943         * reflection.c (mono_reflection_parse_type): handle deeply nested
13944         types correctly.
13945
13946         * reflection.c (mono_image_create_token): Use unique token values
13947         since they will be put into a hash table.
13948
13949         * class.c (mono_class_setup_vtable): If a method occurs in more than
13950         one place in the vtable, and it gets overriden, then change the
13951         other occurances too.
13952
13953         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
13954         object as return type.
13955
13956 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
13957
13958         * icall.c: Deleted "ToString" implementation for double and float
13959         because they are full implemented in managed code.
13960
13961 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13962
13963         * reflection.c, reflection.h: implemented and exported functions
13964         to retrieve info about custom attributes.
13965
13966 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13967
13968         * appdomain.c: moved Uri handling to assembly.c
13969         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
13970         work when using a file Uri in *nix and windows.
13971
13972         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
13973         GetReferencedAssemblies.
13974
13975 2003-03-18  Dick Porter  <dick@ximian.com>
13976
13977         * icall.c: Rename a couple of internal calls
13978
13979         * threads.c: Set the thread state to Stopped when a thread exits.
13980         Fixes bug 39377.
13981
13982 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
13983
13984         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
13985         New icall.
13986
13987         * object.c (mono_class_vtable): fix warning.
13988
13989 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
13990
13991         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
13992
13993         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
13994         memory.
13995         (method_encode_clauses): Create exception info structures in the right
13996         order.
13997         (mono_reflection_setup_internal_class): Initialize supertypes field.
13998
13999         * class.c object.c: Handle interfaces which implement other interfaces 
14000         correctly.
14001
14002         * class.h class.c: Move the supertypes array initialization code into 
14003         a separate function so it can be used for dynamic types too. Also call
14004         it earlier, in mono_class_init(), since it can be used before the
14005         type is initialized.
14006
14007 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14008
14009         * Makefile.am:
14010         * assembly.c:
14011         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
14012
14013         * appdomain.c:
14014         * appdomain.h:
14015         * marshal.c:
14016         * object.c: remove warnings.
14017
14018 2003-03-13  Martin Baulig  <martin@ximian.com>
14019
14020         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
14021         (MonoDebugLexicalBlockEntry): New types.
14022
14023         * debug-mono-symfile.c
14024         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
14025
14026 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14027
14028         * process.c: ret can be any non-zero value accroding to MS doc.
14029
14030 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
14031
14032         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
14033         fixing a warning for a miss-used prototype, would have cause
14034         random memory corruption.
14035
14036 2003-03-07  Martin Baulig  <martin@ximian.com>
14037
14038         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
14039         getting really annoying ....
14040
14041 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
14042
14043         * reflection.c (fixup_method): added support for array methods.
14044
14045 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14046
14047         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
14048         (pointed out by Michael Adams).
14049
14050 2003-03-04  Dick Porter  <dick@ximian.com>
14051
14052         * icall.c: Temporarily reverted the Double and Single ToString()
14053         change, because it broke nunit.
14054
14055 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
14056
14057         * object.h, threads.h: make include files compatible with C++
14058         (patch by Jerome Laban <jlaban@wanadoo.fr>).
14059
14060 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14061
14062         * icall.c: Erased ToString helper functions for Double and Single.
14063         Now, that implementations ar all in managed code (Double and Single
14064         Formatters).
14065
14066 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
14067
14068         * appdomain.c: Added method for initializing the default context of
14069         a domain. Added internal call for getting the default context.
14070         * appdomain.h: Added context variable in MonoDomain struct.
14071         * domain.c: mono_domain_set also sets the default context of the domain
14072         * icall.c: Mapped internal method InternalGetDefaultContext.
14073         * object.c: mono_object_get_virtual_method returns always a remoting
14074         wrapper if the object is a transparent proxy.
14075         mono_runtime_invoke_array: when creating an object by calling the
14076         constructor, if the created object is a proxy, then the constructor should
14077         be called using the a remoting wrapper.
14078
14079 2003-03-03  Dick Porter  <dick@ximian.com>
14080
14081         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
14082         variable so it compiles on solaris.  Problem spotted by
14083         Christopher Taylor <ct@cs.clemson.edu>
14084
14085 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14086
14087         * appdomain.c:
14088         (get_info_from_assembly_name): don't leak value.
14089
14090         * icall.c:
14091         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
14092         result.
14093
14094 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14095
14096         * assembly.c: export mono_image_load_references ().
14097         * class.c: handle function pointers. mono_class_from_name() now
14098         supports nested type names directly.
14099
14100 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
14101
14102         * reflection.h reflection.c: Encode already created dynamic methods 
14103         and fields correctly as a DEF instead of a REF.
14104
14105         * reflection.c: Get rid of the force_ref argument to 
14106         mono_image_typedef_or_ref since it was wrong in the first place.
14107
14108         * string-icalls.c: add error checking to string constructors according
14109         to the MSDN docs.
14110
14111         * reflection.c: Emit types in the order their TypeBuilders were 
14112         created. Previously, a new table index was assigned to each type before
14113         the tables were emitted. This was wrong because the signature blob
14114         might already refer to a type by its original table index.
14115
14116 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
14117
14118         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
14119         change.
14120         
14121 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14122
14123         * Makefile.am: make assemblies dir have \ instead of / on windows.
14124
14125 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
14126
14127         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
14128         iterate over the NESTEDCLASS table using a linear search since the
14129         table is not guaranteed to be sorted by the secondary key.
14130
14131         * class.c (mono_class_create_from_typedef): fixed up call to
14132         mono_metadata_nesting_typedef.
14133         
14134 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
14135
14136         * marshal.c (mono_string_to_byvalstr): clear the memory as
14137         suggested by Jerome Laban <jlaban@wanadoo.fr>
14138
14139 2003-02-26  Dick Porter  <dick@ximian.com>
14140
14141         * process.c: Cope with padding in .rsrc blocks
14142
14143 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
14144
14145         * metadata.h: reverted the filter_len change, it breaks reflection
14146         
14147 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
14148
14149         * metadata.h: added a new field to store the filter_len
14150         
14151
14152 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14153
14154         * reflection.c: handle custom attributes for types and members
14155         created with Reflection.Emit (bug#38422).
14156
14157 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
14158
14159         * reflection.c: define RTSpecialName automatically for constructors for
14160         compatibility with MS.NET.
14161
14162         * reflection.c (mono_reflection_create_runtime_class): initialize
14163         nested_in field of dynamically created classes.
14164
14165 2003-02-22  Martin Baulig  <martin@ximian.com>
14166
14167         * debug-mono-symfile.h: Incremented version number.
14168
14169 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
14170
14171         * object.h icall.c process.c: fix warnings.
14172
14173 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
14174
14175         * appdomain.h appdomain.c:
14176         (mono_domain_try_type_resolve): split the 
14177         name_or_tb argument into a name and a tb argument.
14178         (mono_domain_has_type_resolve): new function to check whenever the
14179         application has registered a TypeResolve event handler.
14180         
14181         * icall.c reflection.h reflection.c: move the type resolve logic into
14182         mono_reflection_get_type () so it will be invoked when 
14183         Assembly::GetType () is called.
14184
14185         * reflection.c:
14186         (mono_reflection_get_type): renamed to get_type_internal.
14187         (mono_reflection_get_type): fixed type name generation so it works 
14188         for nested types too.
14189         (mono_reflection_get_type): call has_type_resolve () to avoid the 
14190         costly type name generation if there is no resolve event handler.
14191
14192 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14193
14194         * class.c, image.c: load exported types from file references.
14195
14196 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
14197
14198         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
14199           used to cache the managed methods used to create proxies and make 
14200           remote invocation of methods.
14201         * class.h: Added in MonoVTable a flag to indicate that a class needs 
14202           to be remotely created.
14203         * object.c: Modified the method mono_class_vtable(). It now initializes 
14204           the remote flag of the vtable. Modified mono_object_new_specific(), 
14205           so now it checks the remote flag.
14206         * icall.c: Added a couple of internal methods, one for enabling instance 
14207           creation interception for a type, and one for creating objects bypassing
14208           the remote check.
14209
14210 2003-02-18  Martin Baulig  <martin@ximian.com>
14211
14212         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
14213         New interncall to get a method's metadata token.
14214
14215         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
14216         New interncall for the debugger.
14217
14218 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
14219
14220         * class.c (mono_class_setup_vtable): allocate supertype array
14221
14222 2003-02-18  Martin Baulig  <martin@ximian.com>
14223
14224         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
14225
14226 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14227
14228         * reflection.c:
14229         (assembly_name_to_aname): jump over unknown properties (i've found
14230         something like: 'type, assembly, version=xxx, custom=null, public...',
14231         so now will ignore custom=null and still get the rest of the values).
14232
14233 2003-02-17  Dick Porter  <dick@ximian.com>
14234
14235         * threads.c: Have Thread.Start() wait for a semaphore to signal
14236         that the thread has set up all its local data.  This fixes bug
14237         34323, where Abort() raced the new thread's TLS data.
14238
14239         Also removes the handle_store() call from start_wrapper, because
14240         threads are now always created suspended and there is no longer a
14241         race between the parent and child threads to store the info.
14242
14243 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
14244
14245         * image.c: explain the #- heap issue in a message, hopefully
14246         avoiding FAQs on mono-list.
14247
14248 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14249
14250         * icall.c:
14251         (GetEntryAssembly): if the domain has not invoked
14252         AppDomain.ExecuteAssembly yet, return the assembly of the default
14253         AppDomain.
14254
14255 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
14256
14257         * class.c (mono_ldtoken): make it work in dynamic assemblies.
14258
14259 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14260
14261         * metadata.c, reflection.c: simple speedup to type hash
14262         and equals code.
14263
14264 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
14265
14266         * image.c, image.h, class.c, assembly.c: move module loading
14267         to MonoImage. When loading metadata, consider alignemnet from
14268         the start of metadata, not from the metadata address in memory.
14269
14270 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
14271
14272         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
14273         AssemblyBuilder objects. Factored out custom attribute creation into
14274         a separate function.
14275         (create_custom_attr): new function to create custom attributes.
14276
14277 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
14278
14279         * Makefile.am: Got tired of typing the full pathname to pedump.
14280         Until there is another option, am installing this.
14281
14282 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
14283
14284         * class.c (class_compute_field_layout): always set field->parent 
14285         (mono_ldtoken): use mono_defaults.fieldhandle_class;
14286
14287 2003-02-11  Dick Porter  <dick@ximian.com>
14288
14289         * threads-types.h:
14290         * monitor.c: Rewrote Monitor, making lock much faster and
14291         Pulse/Wait work as specified.  Also uses much fewer handles, and only
14292         creates them as needed.
14293
14294         * exception.c: Added SynchronizationLockException
14295
14296         * threads.c: Deleted old Monitor implementation.  The new one is
14297         in a new file.
14298
14299 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14300
14301         * class.c: handled TypedReference type code. Set the correct size for
14302         class data. Setup interface_offsets for interface classes, too.
14303
14304 2003-02-09  Martin Baulig  <martin@ximian.com>
14305
14306         * debug-mono-symfile.h: Reflect latest symbol writer changes.
14307
14308 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
14309
14310         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
14311         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
14312         * object.c: fixed mono_object_get_virtual_method () for interfaces.
14313         * verify.c: check for code that runs after the end of the method.
14314
14315 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14316
14317         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
14318         "System.Math::Round2".
14319         * sysmath.h: Added Floor, Round and Round2 definitions.
14320         * sysmath.c: Modified certain functions that were not 100% compliant
14321         with MS.NET (math precision) and added the implementation of Floor,
14322         Round and Round2.
14323
14324 2003-02-07  Martin Baulig  <martin@ximian.com>
14325
14326         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
14327
14328 2003-02-07  Martin Baulig  <martin@ximian.com>
14329
14330         * debug-mono-symfile.c: Reflected latest symwriter changes.
14331         (mono_debug_create_mono_symbol_file): Removed.
14332         (mono_debug_open_mono_symbol_file): Take an argument which
14333         specifies whether to create a dynamic symbol file.
14334
14335 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
14336
14337         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
14338
14339 2003-02-05  Martin Baulig  <martin@ximian.com>
14340
14341         * reflection.c (mono_image_build_metadata): Make this public,
14342         protect it against being called multiple times, don't create
14343         resources and don't build the compressed metadata here.
14344         (mono_image_create_pefile): Do this here.
14345
14346         * icall.c
14347         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
14348
14349 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14350
14351         * socket-io.c: fixed bug #36322.
14352
14353 2003-02-06  Piers Haken <piersh@friskit.com>
14354
14355         * appdomain.[ch]:
14356         * class.h:
14357         * debug-mono-symfile.c:
14358         * icall.c:
14359         * loader.c:
14360         * mono-config.c:
14361         * monosn.c:
14362         * reflection.c:
14363         * socket-io.c: warning cleanups
14364
14365 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
14366
14367         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
14368         function. works like remoting invoke, but does a check for the Proxy first.
14369
14370 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
14371
14372         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
14373
14374 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
14375
14376         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
14377         array of pointers.
14378         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
14379         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
14380
14381         * object.c (mono_store_remote_field_new): used by the new jit
14382         instead of mono_store_remote_field
14383         (mono_load_remote_field_new): used by the new jit
14384         instead of mono_load_remote_field
14385
14386 2003-02-05  Patrik Torstensson
14387
14388         * appdomain.c: changed unload to take the domain id instead
14389         of domain
14390         
14391         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
14392
14393
14394 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14395
14396         * appdomain.c: don't look for assemblies in ApplicationBase if
14397         PrivateBinPathProbe is set.
14398
14399 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14400
14401         * object.c: make the first argument in main_args contain the absolute
14402         path to the assembly. Fixes bug #37511.
14403
14404 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14405
14406         * icall.c: get correct UTC offset for countries not using daylight
14407         time saving. Fixes bug #30030.
14408
14409 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14410
14411         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
14412         and 1 are the family).
14413
14414 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
14415
14416         * icall.c (ves_icall_InternalExecute): removed wrong assertion
14417
14418         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
14419
14420 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
14421
14422         * reflection.c: added support for SignatureHelper tokens, which is
14423         needed by the Calli opcode.
14424
14425         * reflection.h: track changes to SignatureHelper class.
14426
14427         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
14428
14429 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14430
14431         * appdomain.c: fixed loading assemblies from PrivateBinPath.
14432
14433 2003-02-03  Patrik Torstensson
14434         * appdomain.[c|h], domain.c : 
14435          - Added support for getting a domain via domain id
14436          - Support for setting and getting domain from System.AppDomain 
14437            (used in cross appdomain channel)
14438          - Added support for get/set for a MonoAppContext on a thread 
14439            (Context class in System.Runtime.Remoting.Contexts),
14440          - Removed hack in Get/SetData and ExecuteAssembly.
14441         
14442         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
14443         the managed world to get control when a proxy is created.
14444
14445         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
14446         
14447 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
14448
14449         * icall.c
14450         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14451         Populate the codebase field as well.
14452
14453 2003-02-02  Martin Baulig  <martin@ximian.com>
14454
14455         * debug-mono-symfile.c
14456         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
14457         (mono_debug_symfile_add_method): Allow interncalls.
14458
14459 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14460
14461         * icall.c: throw parse exception if strtod fails or the string is empty.
14462
14463 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
14464
14465         * marshal.c: handle object type separately from defined
14466         class types.
14467
14468 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
14469
14470         * marshal.c: handle NATIVE_LPSTR for strings when it's
14471         explicitly specified.
14472
14473 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
14474
14475         * reflection.c, reflection.h, icall.c: setup the reflection
14476         handle cache for ModuleBuilders and AssemblyBuilders.
14477
14478 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
14479
14480         * reflection.c (reflection_methodbuilder_to_mono_method): set
14481         pinvoke flag
14482
14483 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14484
14485         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
14486
14487 2003-01-29  Dick Porter  <dick@ximian.com>
14488
14489         * threads.c: No need for the fake_thread kludge now that Thread
14490         doesn't run a class constructor
14491         
14492 2003-01-29  Dick Porter  <dick@ximian.com>
14493
14494         * threads.c: Use g_direct_hash instead of the rather bogus
14495         g_int_hash
14496
14497 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
14498
14499         * marshal.c (mono_marshal_get_native_wrapper): add check for null
14500         (fix pinvoke12.exe)
14501         (mono_marshal_get_struct_to_ptr): generate valid IL code
14502         (mono_marshal_get_ptr_to_struct): generate valid IL code
14503         (*): correctly set sig->pinvoke, we need to memdup the signature
14504         to do that
14505
14506 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14507
14508         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
14509         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
14510
14511 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
14512
14513         * profiler.c: provide more callers information.
14514
14515 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
14516
14517         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
14518
14519         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
14520
14521         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
14522
14523 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
14524
14525         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
14526         exception instead of going into an infinite loop on dates which it 
14527         can't yet handle.
14528
14529         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
14530         out-of-range exception if needed.
14531
14532         * class.c (mono_class_setup_vtable): allow a virtual method to provide
14533         an implementation for an interface method and to override an inherited
14534         method at the same time. 
14535         Imagine a scenario when a virtual method is used to override a
14536         virtual abstract method in a parent class, and this same method 
14537         provides an implementation for an method inherited from an interface. 
14538         In this case, the interface resolution code will set im->slot, which 
14539         means that the virtual method override pass will skip this method 
14540         which means a pointer to the abstract method inherited from the parent
14541         will remain in the vtable of this non-abstract class.
14542
14543         * class.c: (mono_class_setup_vtable): continue search for a real 
14544         method if only an abstract method is found.     
14545
14546 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
14547
14548         * reflection.c: add size to encoding for ByValStr and ByValArray
14549         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
14550
14551 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
14552
14553         * class.c (mono_class_setup_vtable): pass the override info as an
14554         argument.
14555
14556         * class.c (mono_class_setup_vtable): set the slot of overriding methods
14557         correctly.
14558         
14559         * reflection.c (ensure_runtime_vtable); add support for method 
14560         overrides.
14561         
14562 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
14563
14564         * reflection.c (resolution_scope_from_image): Hack to work to work with
14565         dynamic assemblies.
14566
14567         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
14568         added a 'force_ref' argument to force this function to allways return 
14569         a TypeRef. This is needed by mono_image_get_memberref_token ().
14570         
14571 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
14572
14573         * reflection.c (mono_image_get_type_info): interfaces really don't have
14574         a parent.
14575
14576         * reflection.c (mono_image_basic_init): fill out missing fields of
14577         image structure.
14578
14579         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
14580         dynamic assemblies. This is required so dynamic assemblies show up in
14581         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
14582         Type::GetType() etc. This is consistent with MS behaviour.
14583
14584         * image.c image.h reflection.c: add newly created classes to the name 
14585         cache so mono_class_get () will find them.      
14586
14587 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
14588
14589         First part of changes to get IKVM.NET running under mono.
14590         
14591         * appdomain.h, appdomain.c: added new function 
14592         mono_domain_try_type_resolve() which will emit TypeResolve events. 
14593         This function will call AppDomain::DoTypeResolve to do the actual work.
14594
14595         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
14596         moved existing code dealing with dynamic tokens to a new function 
14597         called mono_reflection_lookup_dynamic_token (). This function will 
14598         raise TypeResolve events when appropriate. Since reflection.c is not 
14599         part of libmetadata, a new hook function called 
14600         mono_lookup_dynamic_token() is added to class.c which will call this.
14601
14602         * assembly.h assembly.c: make the invoke_load_hook function public,
14603         so it can be called for dynamic assemblies.
14604
14605         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
14606
14607         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
14608         type isn't found.
14609
14610         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
14611         MonoGHashTable, since it contains pointers to objects which the GC 
14612         needs to track.
14613
14614         * assembly.c (search_loaded): remove unused variable.
14615         
14616 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
14617
14618         * object.c: fixed issue exposed by gcc-generated IL programs
14619         that use RVA data for pointers.
14620
14621 2003-01-25  Martin Baulig  <martin@ximian.com>
14622
14623         * threads.c (start_wrapper): Moved the initialization of
14624         `start_func' above the mono_new_thread_init() call to which we
14625         pass it as argument.
14626
14627 2003-01-24  Martin Baulig  <martin@ximian.com>
14628
14629         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
14630         the MonoThread pointer.
14631
14632 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
14633
14634         * icall.c: Rename `PowImpl' to Pow.
14635
14636 2003-01-23  Dick Porter  <dick@ximian.com>
14637
14638         * threads.c (start_wrapper): Create a Thread object if needed, so
14639         the Main() thread can do the class initialisation in a subthread
14640         that has been set up to allow managed code execution.
14641
14642         Pass the thread ID instead of the MonoThread pointer to the thread
14643         start and attach callbacks.  This change is required, because the
14644         jit thread start callback must be called _before_ the Thread
14645         object can be created.
14646         
14647         (mono_thread_init): Removed much object creation code that is no
14648         longer needed.  No managed code is called from here now.
14649
14650         * object.c (mono_runtime_exec_managed_code): Create a subthread
14651         for Main, and call back to the runtime to use it.
14652         Set the exit code when Main exits.
14653
14654         * gc.c: Make sure domain finalisation happens in a subthread.
14655         Re-enable threaded GC, fixing bug 31333 (again).
14656
14657         * environment.c: System.Environment internall calls (so far just
14658         ExitCode is here, the others are still in icall.c)
14659
14660         * appdomain.c (mono_runtime_cleanup): All threads running managed
14661         code should have finished before mono_runtime_cleanup() is
14662         reached, so no need to clean up threads.
14663
14664 2003-01-22  Martin Baulig  <martin@ximian.com>
14665
14666         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
14667         `gpointer func' arguments.      
14668         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
14669         but added `MonoThread *thread' argument.
14670         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
14671
14672         * threads.c (mono_new_thread_init): Added `gpointer func' argument
14673         and pass it to the mono_thread_start_cb callback.
14674         (mono_install_thread_callbacks): New public function to install a
14675         set of callbacks which are set by the debugger.
14676         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
14677
14678 2003-01-22  Martin Baulig  <martin@ximian.com>
14679
14680         * Makefile.am: Install debug-mono-symfile.h.
14681
14682 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
14683
14684         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
14685
14686 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
14687
14688         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
14689         * class.c (mono_ptr_class_get): correctly set access levels of pointers
14690         (mono_array_class_get): correctly set access levels of arrays
14691
14692 2003-01-20      Patrik Torstensson
14693         * image.h (MonoAssemblyName): changed major, minor, build, revision
14694         from signed to unsigned.
14695
14696 2003-01-20  sean kasun <skasun@azstarnet.com>
14697
14698         * reflection.c (load_cattr_value): Now this handles
14699         MONO_TYPE_SZARRAY.  Fixes bug #35629
14700
14701 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
14702
14703         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
14704         integer value
14705
14706 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14707
14708         * decimal.c: fixed bug #26056.
14709
14710 2003-01-17  Martin Baulig  <martin@ximian.com>
14711
14712         * gc.c: Raise an ExecutionEngineException instead of using g_error().
14713
14714 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14715
14716         * exception.[ch]:
14717         (mono_get_exception_type_initialization): new function.
14718
14719         * object.c: throw a TypeInitializationException when an exception is
14720         thrown invoking the class constructor.
14721
14722 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14723
14724         * reflection.c: fixed attribute reading.
14725
14726 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14727
14728         * icall.c:
14729         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
14730         provided, look for the type in the calling assembly and then in
14731         mscorlib; if the assembly name is provided, only try that one.
14732
14733 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14734
14735         * object.c: register the vtable before there is a chance it's
14736         queried again recursively.
14737
14738 2003-01-13  Duncan Mak  <duncan@ximian.com>
14739
14740         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
14741         gc-internal.h. 
14742         
14743 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
14744
14745         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
14746
14747 2003-01-11  Martin Baulig  <martin@ximian.com>
14748
14749         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
14750         this to 20 for the release.
14751
14752 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
14753
14754         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
14755
14756         * loader.c (mono_method_get_marshal_info): bug fix
14757
14758         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
14759         structures with explicit layout
14760
14761 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14762
14763         * profiler.c: made the output more readable (and sorted). 
14764         Added caller information for the allocation profiler.
14765
14766 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
14767
14768         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
14769
14770 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14771
14772         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
14773         to get value types.
14774         
14775 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
14776
14777         * object.c, profiler.h, profiler.c, profiler-private.h:
14778         Added object allocation profiler.
14779
14780 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
14781
14782         * reflection.h, reflection.c: handle global methods.
14783         Compress blob entries.
14784
14785 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
14786
14787         * marshal.c: fix compilation.
14788
14789 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
14790
14791         * loader.c (mono_method_get_marshal_info): impl.
14792
14793         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
14794
14795 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14796
14797         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
14798         for reference types.
14799
14800 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
14801
14802         * loader.c: fixed off by one error in loaded parameter names.
14803
14804 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
14805
14806         * marshal.c (mono_marshal_get_icall_wrapper): like
14807         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
14808         instead of a MonoMethod.
14809
14810 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14811
14812         * decimal.c: fixed bug #36537.
14813
14814 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
14815
14816         * marshal.c: throw a missing method exception if a
14817         P/Invoke method is not found.
14818
14819 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14820
14821         * icall.c: allow a null this for constructors.
14822
14823 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14824
14825         * icall.c: raise the proper exceptions if the arguments to the
14826         internal Invoke are incorrect.
14827
14828 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
14829
14830         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
14831
14832 2003-01-03  Martin Baulig  <martin@ximian.com>
14833
14834         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
14835
14836 2002-12-31  Martin Baulig  <martin@ximian.com>
14837
14838         * debug-mono-symfile.c: Completely rewrote the type section.
14839         Instead of using individual malloc()ed fields, we use one big
14840         continuous memory area and offsets into this area.
14841         See the comments in the source code for details.
14842
14843 2002-12-30  Martin Baulig  <martin@ximian.com>
14844
14845         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
14846
14847 2002-12-30  Martin Baulig  <martin@ximian.com>
14848
14849         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
14850         line number table in this data blob instead of using an external
14851         pointer.
14852
14853 2002-12-28  Martin Baulig  <martin@ximian.com>
14854
14855         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
14856
14857 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
14858
14859         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
14860         as a boxed return type.
14861
14862 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
14863
14864         * appdomain.c
14865         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
14866         g_build_filename to properly get separators on the filename created.
14867
14868         * object.h: Small change, introduce MonoMarshalByRefObject to
14869         track the layout of that structure in the C# universe as we make
14870         changes there.
14871
14872 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
14873
14874         * object.c: removed assert to allow static fields on interfaces.
14875         * loader.c: a TypeSpec may be used for any type, not just arrays.
14876
14877 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
14878
14879         * class.c, class.h: added mono_class_array_element_size ().
14880         Ignore static methods in interfaces.
14881
14882 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14883
14884         * threads.c: fixed the build under cygwin.
14885
14886 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
14887
14888         * reflection.c: handle nullref constants. Allocate keys for
14889         reflection handles with the GC.
14890
14891 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14892
14893         * threads.c, threads.h: added mono_thread_get_abort_signal()
14894         to get a suitable signal for thread abort.
14895
14896 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14897
14898         * metadata.c: fix handling of ExportedType table.
14899
14900 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14901
14902         * icall.c: added WriteWindowsDebugString internal call.
14903
14904 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14905
14906         * reflection.h: added fields to match C# implementation.
14907
14908 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14909
14910         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
14911
14912 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
14913
14914         * gc.h, gc-internal.h: Rename header for GC internal calls to
14915         gc-internal.h from gc.h as to not clash with Boehm GC having its
14916         header installed as <gc.h> in outside include paths.
14917         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
14918         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
14919
14920 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14921
14922         * icall.c: assign minor, build and revision in FillName.
14923
14924 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
14925
14926         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
14927         Added support for running code generated by Reflection.Emit.
14928
14929 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14930
14931         * appdomain.c: check for NULL argument in LoadFrom.
14932
14933 2002-12-10  Dick Porter  <dick@ximian.com>
14934
14935         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
14936
14937 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14938
14939         * appdomain.c: fix buglet when building exe file name.  Handle full
14940         assembly name (needed after latest changes to AssemblyName).
14941         * image.c:
14942         (mono_image_close): free some hashtables.
14943
14944 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
14945
14946         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
14947         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
14948         on some systems (redhat 7.3) 
14949
14950 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
14951
14952         * threads.c: delete the critical section of a sync block,
14953         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
14954
14955 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
14956
14957         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
14958
14959 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14960
14961         * appdomain.[ch]: handle the assembly preload event to try loading the
14962         assemblies using the paths we have in the current domain.
14963
14964         * assembly.[ch]: created an assembly preload hook that is called to try
14965         loading the assembly by other means that the ones provided here.
14966
14967         * domain.c: initialize the domain search path.
14968
14969         From now on, assemblies (TODO: except corlib and System) are loaded
14970         according to these rules when using mono_assembly_load ():
14971
14972                 1. It tries to load the assembly from the ApplicationBase
14973                 of the current domain appending .dll and .exe (TODO: have to
14974                 try loading from name/name.dll and name/name.exe).
14975
14976                 2. It tries the search path specified in PrivateBinPath for the
14977                 current domain (if any).
14978
14979                 3. Previous behavior.
14980
14981 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
14982
14983         * icall.c: implemented GetInterfaceMap() related icall.
14984         * domain.c, loader.h: load MethodInfo in mono_defaults.
14985
14986 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
14987
14988         * gc.c: disable the finalizer thread for now, untill all the issues
14989         with it are resolved.
14990
14991 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
14992
14993         * string-icalls.c: handle embedded nulls in string ctor when the
14994         length is specified.
14995
14996 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
14997
14998         * class.c: look for explicit interface implementation in parent
14999         classes, too.
15000
15001 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
15002
15003         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
15004
15005 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
15006
15007         * gc.c: protect handles with a critical section.
15008
15009 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15010
15011         * icall.c:
15012         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
15013         parameters. If no assembly specified, try getting the type from all
15014         the assemblies in the current domain, else, load the assembly and get
15015         the type from it.
15016
15017 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15018
15019         * marshal.c: applied patch from Aleksey Demakov that fixes
15020         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
15021
15022 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15023
15024         * icall.c: fixed get_location.
15025
15026 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
15027
15028         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
15029         declarations to make it work with older gcc. 
15030
15031         * loader.c (mono_get_method): set signature->pinvoke for native calls
15032
15033 2002-11-20  Dick Porter  <dick@ximian.com>
15034
15035         * threads.c (mono_thread_init): Set the main thread's handle
15036
15037 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
15038
15039         * gc.c: allow compilation without GC support. Changed to match the
15040         mono coding style.
15041
15042 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15043
15044         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
15045
15046 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
15047
15048         * reflection.c: set a public key token on the core assemblies.
15049
15050 2002-11-18  Dick Porter  <dick@ximian.com>
15051
15052         * threads.c: Split out some thread initialisation so that other
15053         files can set the start callback function.
15054
15055         * gc.c: Run finalisers in a separate thread, to avoid stack
15056         overflow.  Fixes bug 31333.
15057
15058         * appdomain.c: Set up GC finalisation thread.
15059
15060         * reflection.c: 
15061         * object.c: 
15062         * domain.c: Use gc.h macros for GC_malloc
15063         
15064 2002-11-15  Dick Porter  <dick@ximian.com>
15065
15066         * threadpool.c: 
15067         * threads.c:
15068         * appdomain.c: Removed mono_runtime_init_with_attach(),
15069         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
15070         merging the extra parameter with the existing function.  Removed
15071         unneeded code in mono_thread_attach().
15072
15073 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
15074
15075         * image.c (mono_image_loaded_by_guid): a method to get loaded
15076         images by guid. 
15077         (load_metadata_ptrs): we store the guid as string.
15078
15079 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
15080
15081         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
15082
15083         * metadata.c (mono_guid_to_string): imported method form Zoltan
15084         Varga (slightly modified)
15085
15086         * assembly.c (mono_assembly_open): load precompiled code
15087
15088         * loader.h (MonoMethod): we store the method token for use in the
15089         aot compiler. 
15090
15091 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15092
15093         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
15094         the hook function called when an assembly is loaded.
15095         
15096         * domain.c: Modified file.
15097         (mono_domain_assembly_load): removed hash table insertion of assemblies.
15098
15099         Fixes bug #33196.
15100
15101 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
15102
15103         * reflection.c: Map PEFileKind to the value expected by the WinNT
15104         image loader. 
15105
15106 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15107
15108         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
15109         Read until the buffer is filled completely.
15110
15111 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15112
15113         * icall.c: implemented MonoType.InternalGetEvent ().
15114
15115 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15116
15117         * appdomain.c: implemented InitAppDomainSetup. Delayed
15118         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
15119         the entry_assembly.
15120
15121         * assembly.c: base_dir is now an absolute path ending with
15122         G_DIR_SEPARATOR.
15123
15124         * icall.c: modified get_location according to the above changes.
15125
15126         * object.c: init AppDomain.SetupInformation for the default domain after
15127         we have the entry assembly.
15128
15129         * domain.c: when unloading a domain, setup = NULL.
15130
15131 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
15132
15133         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
15134
15135 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
15136
15137         * object.h, object.c: introduced mono_object_get_virtual_method ()
15138         to lookup the method invoked on an object when a callvirt is done on
15139         a method.
15140         * icall.c: make MethodInfo::Invoke() always do a virtual call.
15141
15142 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15143
15144         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
15145         current domain when loaded an assembly and failed to load it.
15146
15147         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
15148
15149 2002-10-31  Dick Porter  <dick@ximian.com>
15150
15151         * icall.c: 
15152         * file-io.h: 
15153         * file-io.c: Return the error status in a parameter, as the
15154         GetLastError() value has long since been blown away if we try and
15155         look it up in a subsequent internal call invocation.  Delete the
15156         GetLastError() internal call, because it's useless.
15157
15158 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
15159
15160         * class.[ch]: added cast_class to fix bug 29517
15161
15162 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
15163
15164         * marshal.c: create valid IL code in the filter clause:
15165         the new JIT is less forgiving:-)
15166
15167 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15168
15169         * icall.c: removed get_property internal call.
15170
15171 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
15172
15173         * appdomain.h domain.c: Added an ID to appdomains.
15174         
15175         * threads.c threads.h icall.c: Implement icall
15176         Thread:GetDomainID(), and remove unused icall 
15177         CurrentThreadDomain_internal.
15178
15179 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15180
15181         * icall.c: Don't recurse through the base types in GetConstructor.
15182         Fixes bug #32063. 
15183
15184 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15185
15186         * mempool.h, mempool.c: added mono_mempool_empty() and
15187         mono_mempool_stats().
15188
15189 2002-10-23  Dick Porter  <dick@ximian.com>
15190
15191         * file-io.c: 
15192         * file-io.h: 
15193         * icall.c: Added MonoIO.GetFileType internal call
15194
15195 2002-10-17  Dick Porter  <dick@ximian.com>
15196
15197         * appdomain.c (mono_runtime_cleanup): Don't signal the async
15198         delegate semaphore before waiting for all threads to finish,
15199         because new threads can also call async delegates.  Fixes bug
15200         32004.
15201
15202         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
15203         of 3 seconds, in case another async job is queued.  (This part is
15204         needed because the bug fix reintroduced the 3s exit lag.)  This
15205         makes the mono_runtime_shutdown flag superfluous.
15206
15207 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15208
15209         * reflection.c: include ehader size in method section headers.
15210         Really check for suplicated modules entries.
15211
15212 2002-10-17  Martin Baulig  <martin@gnome.org>
15213
15214         * debug-mono-symfile.c: Added back support for locals.
15215
15216 2002-10-14  Martin Baulig  <martin@gnome.org>
15217
15218         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
15219         MONO_TYPE_VOID.
15220
15221 2002-10-14  Martin Baulig  <martin@gnome.org>
15222
15223         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
15224         mono_class_get() instead of looking in the class cache. 
15225
15226 2002-10-13  Martin Baulig  <martin@gnome.org>
15227
15228         * debug-mono-symfile.c: Set version number to 28, include the
15229         signature in method names.
15230
15231 2002-10-13  Martin Baulig  <martin@gnome.org>
15232
15233         * debug-mono-symfile.h: Set version number to 27.
15234
15235 2002-10-11  Martin Baulig  <martin@gnome.org>
15236
15237         * gc.c: Don't register/unregister NULL pointers as disappearing links.
15238
15239 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15240
15241         * metadata.c, metadata.h: added helper function to allocate signatures.
15242
15243 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15244
15245         * icall.c: added internal call to get the location of machine.config.
15246
15247 2002-10-08  Martin Baulig  <martin@gnome.org>
15248
15249         * debug-mono-symfile.c: Ignore classes with a pending init for the
15250         moment.
15251
15252 2002-10-03  Dick Porter  <dick@ximian.com>
15253
15254         * threads.c: Freebsd pthread_t is a pointer
15255
15256 2002-10-03  Dick Porter  <dick@ximian.com>
15257
15258         * socket-io.c: Implemented GetHostName_internal
15259
15260 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15261
15262         * mono-config.c:
15263         (mono_config_parse_file): don't leak the text.
15264
15265 2002-10-02  Martin Baulig  <martin@gnome.org>
15266
15267         * debug-mono-symfile.c: Added support for methods.
15268
15269 2002-10-01  Martin Baulig  <martin@gnome.org>
15270
15271         * debug-mono-symfile.c: Don't emit methods and line numbers for
15272         the dynamic symbol file, just write the type table.  We can easily
15273         have an external helper program which creates a symbol file for an
15274         IL file.        
15275
15276 2002-10-01  Dick Porter  <dick@ximian.com>
15277
15278         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
15279         Only add the handle to the cleanup array when we're about to
15280         launch the thread.  Bug 31425 deadlocked when the test was run on
15281         mono under w32.
15282
15283 2002-10-01  Martin Baulig  <martin@gnome.org>
15284
15285         * debug-mono-symfile.c: Added support for properties.
15286
15287 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15288
15289         * reflection.c: unaligned store fix from Mark Crichton
15290         <crichton@gimp.org>.
15291
15292 2002-09-27  Martin Baulig  <martin@gnome.org>
15293
15294         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
15295         New interncall.
15296
15297 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
15298
15299         * assembly.h, assembly.c: use a sane API to hook into the assembly
15300         loading process instead of a useless special-purpouse hack
15301         (ngen needs a hook, too, for example).
15302
15303 2002-09-27  Dick Porter  <dick@ximian.com>
15304
15305         * threads.c (mono_thread_init): Call GetCurrentProcess() so
15306         io-layer can set up some process handle info.  Not needed on w32,
15307         but doesn't hurt either.
15308
15309         * process.c: Pass the program name in the second parameter to
15310         CreateProcess, so the path is searched.  Include the working
15311         directory. Implemented process name, process enumeration, and some
15312         process detail internal calls.
15313         
15314         * icall.c: Added internal calls for process lookup, and some
15315         process details
15316
15317 2002-09-26  Martin Baulig  <martin@gnome.org>
15318
15319         * assembly.c (mono_install_open_assembly_hook): New global
15320         function to install a function to be invoked each time a new
15321         assembly is loaded.
15322         (mono_assembly_open): Run this callback function if set.
15323
15324         * debug-mono-symfile.c: Put back line numbers for the dynamic
15325         symbol file and also record the .il file as source file.  This
15326         allows us to install the temporary symbol file as `file.dbg' just
15327         like a compiler-generated one.
15328
15329 2002-09-26  Nick Zigarovich <nick@chemlab.org>
15330
15331         * Corrected typo in gc.c (BOHEM vs BOEHM).
15332
15333 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15334
15335         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
15336         GetProperties. Also avoid calling g_slist_length in GetProperties and
15337         GetMethods.
15338
15339 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15340
15341         * reflection.c: avoid unaligned stores (bug spotted by
15342         Mark Crichton  <crichton@gimp.org>).
15343
15344 2002-09-25  Martin Baulig  <martin@gnome.org>
15345
15346         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
15347         instead of guint64 for addresses and added prologue/epilogue info.
15348
15349 2002-09-25  Martin Baulig  <martin@gnome.org>
15350
15351         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
15352         store line number info.  For the dynamic symbol file, we only need
15353         to provide the JIT generated dynamic line number info for the dynamic
15354         symbol file.
15355
15356 2002-09-25  Martin Baulig  <martin@gnome.org>
15357
15358         * debug-mono-symfile.h: Incremented version number.
15359
15360 2002-09-24  Martin Baulig  <martin@gnome.org>
15361
15362         * class.c (mono_debugger_class_init_func): New global function
15363         pointer variable.
15364         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
15365         call it.
15366
15367         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
15368         function.  This is called via the mono_debugger_class_init_func
15369         hook to add all types to the dynamic type table.
15370         (ves_icall_MonoDebugger_GetType): New interncall to get a class
15371         from its metadata token.
15372
15373         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
15374         New interncall for the debugger.
15375
15376 2002-09-24  Nick Drochak <ndrochak@gol.com>
15377
15378         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
15379         before using it in case it is null.
15380         
15381 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15382
15383         * metadata.c: allow custom modifiers in local var signatures
15384         (bug spotted by Zoltan Varga).
15385
15386 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15387
15388         * class.c: deal with the <Module> class that may have a NULL vtable.
15389         Eliminate warnings.
15390
15391 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15392
15393         * image.c, image.h: more strong name helpers.
15394         * monosn.c: more work: convert pem keys to cryptoapi format.
15395
15396 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15397
15398         * string-icalls.c: speedup IndexOf.
15399
15400 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15401
15402         * icall.c: updates from Zoltan.2.Varga@nokia.com.
15403
15404 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15405
15406         * icall.c: cleanup: use mono_object_domain ().
15407
15408 2002-09-23  Martin Baulig  <martin@gnome.org>
15409
15410         * debug-mono-symfile.c: Improved type support.
15411
15412 2002-09-22  Martin Baulig  <martin@gnome.org>
15413
15414         * debug-mono-symfile.c: Added support for reference types and strings.
15415
15416 2002-09-22  Martin Baulig  <martin@gnome.org>
15417
15418         * debug-mono-symfile.c: Started to work on the type table.
15419
15420 2002-09-21  Martin Baulig  <martin@gnome.org>
15421
15422         * debug-mono-symfile.c: Largely reworked the symbol table format.
15423         The symbol table is now incrementally updated each time a new
15424         method is added.  We're now also using our own magic and version
15425         so that you don't need to recompile all your classes if the
15426         dynamic table changes.
15427         (mono_debug_update_mono_symbol_file): Removed.
15428         (mono_debug_symfile_add_method): New function to add a method.
15429
15430 2002-09-21  Martin Baulig  <martin@gnome.org>
15431
15432         * icall.c
15433         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
15434         New interncall.
15435
15436         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
15437         New interncall to get a method from its metadata token.
15438
15439 2002-09-21  Martin Baulig  <martin@gnome.org>
15440
15441         * debug-mono-symfile.c: Create type table.
15442
15443 2002-09-20  Martin Baulig  <martin@gnome.org>
15444
15445         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
15446
15447 2002-09-20  Martin Baulig  <martin@gnome.org>
15448
15449         * debug-mono-symfile.c: Provide information about params and locals.
15450
15451 2002-09-20  Martin Baulig  <martin@gnome.org>
15452
15453         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
15454         New interncall.
15455
15456         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
15457         interncall to get a method from its metadata token.
15458
15459 2002-09-20  Martin Baulig  <martin@gnome.org>
15460
15461         * debug-mono-symfile.c: Added a few checks for method->header
15462         being non-NULL.  This should never happen, but for the moment
15463         let's use a g_warning() rather than a g_assert().
15464
15465 2002-09-19  Mark Crichton  <crichton@gimp.org>
15466
15467         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
15468         even if support for it isn't present.  Added an #ifdef to fix this.
15469
15470         * socket-io.c: Added checks back for Solaris support.
15471
15472 2002-09-19  Martin Baulig  <martin@gnome.org>
15473
15474         * debug-mono-symfile.c (read_string, write_string): Reflect latest
15475         changes in the symbol file format.
15476
15477 2002-09-18  Martin Baulig  <martin@gnome.org>
15478
15479         * debug-mono-symfile.c: Set version number to 21.
15480
15481 2002-09-18  Dick Porter  <dick@ximian.com>
15482
15483         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
15484         on netbsd.  Fixes bug 30051.
15485
15486 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15487
15488         * reflection.c:
15489         (set_version_from_string): little fix.
15490
15491 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15492
15493         * monosn.c, Makefile.am: added strong name utility.
15494         * reflection.h, reflection.c: implemented delayed signing,
15495         locale, version and hash id assembly attributes.
15496
15497 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
15498
15499         * loader.c, metadata.c: load param attributes in signatures.
15500
15501 2002-09-16  Martin Baulig  <martin@gnome.org>
15502
15503         * debug-mono-symfile.c: Added string table with all method names.
15504
15505 2002-09-14  Martin Baulig  <martin@gnome.org>
15506
15507         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
15508         fast method lookup.
15509
15510 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
15511
15512         * reflection.c: record the public key token of referenced assemblies.
15513
15514 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15515
15516         * image.c, image.h: added functions to get the strong name and the
15517         public key of an assembly.
15518         * pedump.c: use them.
15519
15520 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
15521
15522         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
15523
15524 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
15525
15526         * marshal.c (mono_marshal_get_managed_wrapper): Added
15527         MONO_TYPE_BOOLEAN 
15528
15529 2002-09-11  Martin Baulig  <martin@gnome.org>
15530
15531         * gc.c: Call GC_unregister_disappearing_link() on all links when
15532         finalizing them, this is necessary to aviod a crash in boehm's
15533         finalize handler.
15534
15535 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15536
15537         * gc.c: handle GetTarget for finalized objects spotted and fixed by
15538         nick@chemlab.org.
15539
15540 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
15541
15542         * icall.c: implemented MonoType::Module.
15543         * reflection.c, reflection.h: mono_module_get_object () from
15544         Tomi Pakarinen <tomi.pakarinen@welho.com>.
15545
15546 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
15547
15548         * icall.c: ignore overridden methods in GetMethods ().
15549         Fix for FieldInfo::SetValue().
15550         * object.c: handle float/double in runtime invoke.
15551
15552 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
15553
15554         * object.c: allow a constructor to be called again on an object.
15555
15556 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15557
15558         * class.h, class.c: move field layout code to it's own function and
15559         export it. Get an interface id earlier. Move fields in MonoClass
15560         so they are more cache friendly and align the bitfields.
15561         * loader.c: temporary handle get_param_names() for a runtime method.
15562         * reflection.c, reflection.h: more code to handle runtime creation of
15563         types.
15564
15565 2002-09-09  Martin Baulig  <martin@gnome.org>
15566
15567         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
15568         signature with the pinvoke field being set for the actual call.
15569
15570 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15571
15572         * icall.c: removed some unused icalls. Start of map of glib charsets
15573         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
15574
15575 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15576
15577         * debug-helpers.c: break infinite loop (found and fixed by
15578         Holger Arnold <harnold@gmx.de>).
15579
15580 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
15581
15582         * icall.c: target may be null in create_delegate.
15583
15584 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15585
15586         * marshal.c: handle a boolean return type.
15587
15588 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15589
15590         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
15591
15592 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15593
15594         * gc.c: fix weakreferences.
15595
15596 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
15597
15598         * icall.c: added icall to get default codepage.
15599
15600 2002-09-03  Dick Porter  <dick@ximian.com>
15601
15602         * threads.h: 
15603         * threads.c: Use MonoThread instead of MonoObject where
15604         apropriate.
15605
15606         Store running thread objects in a hash table, so that we have all
15607         the info to hand when waiting for them to finish
15608         (means we don't need OpenThread() any more, so mingw builds should
15609         be fully functional again.)
15610
15611         * verify.c:
15612         * object.h: Added thread ID to MonoThread
15613
15614 2002-09-03  Martin Baulig  <martin@gnome.org>
15615
15616         * icall.c (System.Reflection.Assembly::get_location): New interncall.
15617
15618 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15619
15620         * icall.c: fixed leak in get_temp_path. Thanks lupus.
15621
15622 2002-09-03  Martin Baulig  <martin@gnome.org>
15623
15624         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
15625         argument to store the end address of the disassembled instruction.
15626
15627         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
15628         here from debug-symfile.h.
15629         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
15630         JIT into this struct.
15631         (MonoSymbolFile): Added `char *image_file' field.
15632         (MonoDebugGetMethodFunc): Removed.
15633         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
15634         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
15635         (mono_debug_find_method): New method.
15636
15637         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
15638         create a full symbol file.
15639         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
15640         and static symbol files.
15641         (mono_debug_find_method): The symbol file keeps an internal method hash,
15642         call this to get a MonoDebugMethodInfo from a MonoMethod.
15643
15644         * debug-symfile.[ch]: Removed.
15645
15646 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
15647
15648         * image.c (do_mono_image_open): Remove linker version check.
15649
15650 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
15651
15652         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
15653         wrappers for instance methods.
15654         
15655 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15656
15657         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
15658
15659 2002-08-28  Dick Porter  <dick@ximian.com>
15660
15661         * Makefile.am: Export HOST_CC for w32 builds
15662
15663 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15664
15665         * file-io.c process.c: MonoString are null terminated, no
15666         need for mono_string_to_utf16() anymore.
15667
15668 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15669
15670         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
15671
15672 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
15673
15674         * icall.c, reflection.h: speedup System.MonoType.
15675
15676 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15677
15678         * reflection.c: allow null as the value of a string argument in
15679         custom attributes constructors.
15680
15681 2002-08-27  Martin Baulig  <martin@gnome.org>
15682
15683         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
15684         `trampoline_address' field.
15685
15686 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
15687
15688         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
15689         check (fixes bug #29486) 
15690
15691 2002-08-27  Martin Baulig  <martin@gnome.org>
15692
15693         * debug-mono-symfile.c: Changed the file format in a way that allows us
15694         open it read-only and to use a specially malloced area for all the
15695         dynamic data.  We can now also generate a symbol file on-the-fly if we're
15696         debugging IL code and there is no MCS generated symbol file for it.
15697
15698 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
15699
15700         * object.c: added a define for a good string and array
15701         creation speedup (not enabled by default because we need to deal with
15702         the synch stuff).
15703
15704 2002-08-26  Martin Baulig  <martin@gnome.org>
15705
15706         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
15707         function to create a dynamic symbol file.  This is used by the
15708         debugger to create a symbol file for IL code on-the-fly.
15709
15710 2002-08-26  Martin Baulig  <martin@gnome.org>
15711
15712         * loader.c (mono_lookup_pinvoke_call): Include the error message
15713         from g_module_error() in the error message.
15714
15715 2002-08-24  Martin Baulig  <martin@gnome.org>
15716
15717         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
15718         function to update the symbol file.  The symbol file is mmap()ed
15719         writable, but private.  This allows us to install the symbol file
15720         together with the assembly.
15721
15722 2002-08-24  Martin Baulig  <martin@gnome.org>
15723
15724         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
15725         but they can read the new symbol file format which mcs is now creating.
15726
15727         * debug-symfile.c (mono_debug_find_source_location): Moved to
15728         debug-mono-symfile.c; this is now operating on the new symbol file.
15729
15730 2002-08-23  Martin Baulig  <martin@gnome.org>
15731
15732         * debug-helpers.c (mono_method_desc_from_method): New function to get
15733         a MonoMethodDesc from a MonoMethod.
15734
15735 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15736
15737         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
15738         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
15739
15740 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
15741
15742         * string-icalls.[ch]: make helper methods static.
15743
15744 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15745
15746         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
15747         types to it and to SetValueInternal.
15748
15749         * object.c: Moved handle_enum label to its proper place. This was the
15750         f... bug! ;-)
15751
15752         This time i compiled mcs and gtk-sharp and they both work.
15753
15754 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15755
15756         * icall.c: reverted partially my previous patch until 
15757         object.c:set_value handles enums correcly.
15758
15759 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15760
15761         * icall.c:
15762         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
15763         (ves_icall_System_Environment_get_MachineName): removed warning when
15764         compiling under cygwin.
15765
15766 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15767
15768         * object.c: fixed field_get_value() for reference types.
15769
15770 2002-08-22  Dick Porter  <dick@ximian.com>
15771
15772         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
15773         Don't free a buffer while it's still needed.  Patch from Jonathan
15774         Liger <Jonathan.liger@wanadoo.fr>
15775
15776 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
15777
15778         * icall.c (ves_icall_System_Environment_get_Platform): Add new
15779         internal call.
15780
15781 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
15782
15783         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
15784         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
15785
15786         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
15787         we call unmanaged code which throws exceptions.
15788
15789 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15790
15791         * appdomain.h: added per-domain entry_assembly.
15792         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
15793         arguments.
15794         * icall.c: Assembly::GetEntryAssembly icall.
15795         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
15796         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
15797
15798 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15799
15800         * appdomain.h, gc.c: added mono_domain_finalize ().
15801
15802 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15803
15804         * object.c:
15805         (mono_print_unhandled_exception): changed g_warning by g_printerr
15806         because g_log has a 1024 characters limit (yeah, i got a big stack
15807         trace). Don't print exception name, that should be in ToString 
15808         returned string.
15809
15810 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15811
15812         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
15813         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
15814
15815 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15816
15817         * object.c:
15818         (mono_print_unhandled_exception): after previous commit, i realized
15819         that MS calls ToString on the exception. I changed this function to
15820         do that. This way we get stack_trace for free.
15821
15822 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15823
15824         * object.c:
15825         (mono_print_unhandled_exception): invoke Message property instead of
15826         getting 'message' field from Exception. Don't allocate memory for
15827         'trace' and 'message' if not needed.
15828
15829 2002-08-18  Dick Porter  <dick@ximian.com>
15830
15831         * unicode.c: Fix asserts to match Encoder.cs checks
15832
15833 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15834
15835         * marshal.c: fix unaligned store issue and a few wrong
15836         opcode argument types.
15837
15838 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15839
15840         * icall.c: added GetUninitializedObjectInternal internal call.
15841
15842 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
15843
15844         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
15845         to the right domain.
15846
15847 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
15848
15849         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
15850
15851         * class.c (class_compute_field_layout): set blittable to false for Strings
15852
15853         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
15854
15855 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15856
15857         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
15858         first chunk of code to create types at runtime. Code to
15859         handle ReflectedType/DeclaringType. Make reflection handles
15860         domain specific.
15861
15862 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
15863
15864         * class.c: set correct name in arrays.
15865
15866 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
15867
15868         * appdomain.c (mono_domain_transfer_object): make it work with
15869         valuetypes. bug fixes.
15870
15871 2002-08-12  Dick Porter  <dick@ximian.com>
15872
15873         * object.h: Rename some parameters to avoid c++ keywords (Patch
15874         from Joseph Wenninger <kde@jowenn.at>)
15875
15876 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
15877
15878         * icall.c: added icall to implement Assembly.GetFile*.
15879
15880 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15881
15882         * reflection.h, reflection.c: code to embed managed resources.
15883
15884 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15885
15886         * class.c: move all the type size stuff into
15887         class_compute_field_layout().
15888
15889 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15890
15891         * class.c: ensure enums have always the correct instance size.
15892         * unicode.c: remove wrong assert.
15893
15894 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
15895
15896         * assembly.c: fix mem corruption issue.
15897         * image.h, image.c: added mono_image_get_resource () to access
15898         managed resources.
15899         * icall.c: implemented Assembly.EntryPoint property and some
15900         Managed Resources related internalcalls.
15901
15902
15903 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15904
15905         * image.c, image.h: impemented mono_image_get_entry_point ().
15906         * appdomain.c: use mono_image_get_entry_point.
15907
15908 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15909
15910         * reflection.c: support the object type argument when loading
15911         custom attributes.
15912
15913 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
15914
15915         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
15916         String as return type.
15917
15918 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
15919
15920         * reflection.c: fix encoding of named args for custom attrs to match
15921         the ms implementation. Read them back when instantiating custom
15922         attributes.
15923
15924 2002-08-02  Radek Doulik  <rodo@ximian.com>
15925
15926         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
15927         by Dietmar as quick fix
15928         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
15929         16 as stack size, used on more places as quick fix before Dietmar
15930         will fix it properly
15931
15932 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15933
15934         * object.h, object.c: added accessors for fields and properties.
15935
15936 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15937
15938         * class.c, class.h: made mono_class_get_field_from_name ()
15939         loop on parent types.
15940         Added mono_class_get_property_from_name ().
15941
15942 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15943
15944         * class.c, class.h: move the code to setup the type vtable in its own
15945         function so that it can be reused also for types created at runtime.
15946         Eliminate the "class" identifier from the header file.
15947         * reflection.c: setup the vtable for enums so that we can create
15948         objects for use in SetConstant ().
15949
15950 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
15951
15952         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
15953         instead of the delegate itself as this pointer (bug #28383)
15954
15955 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
15956
15957         * marshal.c (mono_marshal_get_managed_wrapper): added return type
15958         conversions.
15959
15960 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15961
15962         * loader.c: don't set the pinvoke bit on icalls.
15963
15964 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
15965
15966         * debug-helpers.c (mono_method_full_name): only print a number to
15967         indicate wrapper type (so that the output is more readable in traces).
15968
15969 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
15970
15971         * class.c (mono_class_init): include method override patch from Paolo
15972
15973 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
15974
15975         * icall.c: fixed GetTypeCode().
15976
15977 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
15978
15979         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
15980         use real delegate invoke function to make it work with multicast
15981         delegates (fix bug# 28291).
15982
15983 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
15984
15985         * object.c: load constant strings.
15986
15987 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15988
15989         * reflection.c: no magic numbers.
15990         * tabledefs.h: security action enum.
15991
15992 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15993
15994         * assembly.c: fix possible memory corruption.
15995
15996 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15997
15998         * reflection.h, reflection.c: added support for linking resources.
15999         * verify.c: check we have an updated corlib.
16000
16001 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
16002
16003         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
16004         string arrays.
16005         (mono_marshal_string_array): null terminate unmanaged string arrays.
16006         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
16007
16008 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16009
16010         * icall.c: Type.GetType () can now return also types from the
16011         calling assembly.
16012
16013 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16014
16015         * loader.h, loader.c: stack walking support.
16016         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
16017         GetCallingAssembly.
16018
16019 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
16020
16021         * marshal.c: added optimisations for blittable types 
16022
16023         * class.c (mono_array_class_get): do not set blittable attribute on arrays
16024         (mono_class_setup_mono_type): set blittable attribute for single
16025         and double.
16026
16027         * marshal.c (mono_string_utf8_to_builder): impl.
16028         (mono_string_builder_to_utf8): impl.
16029         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
16030
16031 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
16032
16033         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
16034         (mono_marshal_get_managed_wrapper): impl. byref types
16035
16036 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16037
16038         * icall.c:
16039         (search_method): don't display debug message. 
16040
16041 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
16042
16043         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
16044
16045 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16046
16047         * appdomain.c: set the missing filename when throwing exception.
16048
16049 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
16050
16051         * metadata.c (mono_type_size): code cleanup
16052         (mono_type_stack_size): removed some test code
16053
16054 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
16055
16056         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
16057         mono_get_exception_file_not_found now.
16058
16059         * exception.c (mono_exception_from_name_two_strings): New version
16060         that will call a constructor with two string arguments. 
16061         (mono_get_exception_file_not_found): New helper routine, used to
16062         report file-not-found errors.
16063
16064 2002-07-20  Dick Porter  <dick@ximian.com>
16065
16066         * process.h:
16067         * process.c: Pass file handles to CreateProcess
16068         
16069         * icall.c:
16070         * file-io.h:
16071         * file-io.c: Implemented CreatePipe
16072
16073 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
16074
16075         * metadata.c (mono_get_param_info): set alignment for value types
16076
16077 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16078
16079         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
16080         Constify mono_domain_assembly_open().
16081         * loader.c: handle null namespace in icalls.
16082
16083 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
16084
16085         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
16086         (emit_str_to_ptr_conv): marshal object as structs
16087
16088         * metadata.c (mono_type_to_unmanaged): marshal object as structs
16089
16090         * marshal.c (mono_marshal_get_runtime_invoke): support value types
16091
16092 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
16093
16094         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
16095         (mono_marshal_get_native_wrapper): we an now return value types
16096
16097 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16098
16099         * verify.c: more checks implemented.
16100
16101 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
16102
16103         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
16104         (fix bug #27695)
16105         (mono_marshal_get_native_wrapper): allow byref arguments
16106         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
16107         impl. PtrToStringXXX methods
16108         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
16109         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
16110         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
16111         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
16112         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
16113
16114 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16115
16116         * reflection.c: fix buglet in parsing an assembly name.
16117
16118 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
16119
16120         * marshal.c (emit_ptr_to_str_conv): first impl.
16121
16122 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16123
16124         * object.c, class.h: cache the vtable in the class as suggested by
16125         vargaz@freemail.hu (Zoltan Varga).
16126
16127 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16128
16129         * class.h, loader.c: added mono_field_from_token().
16130         * verify.c: first cut of type checking code.
16131
16132 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
16133
16134         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
16135
16136 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
16137
16138         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
16139         (fix bug #27782)
16140         (mono_marshal_get_remoting_invoke): impl.
16141         (mono_delegate_begin_invoke): impl.
16142         (mono_mb_emit_save_args): impl.
16143         (mono_delegate_end_invoke): impl.
16144         (mono_marshal_get_delegate_begin_invoke):
16145         (mono_marshal_get_delegate_end_invoke):
16146         (mono_marshal_get_delegate_invoke): generate a special name for
16147         those methods (including the signature) and associate them whith
16148         the delegate class. 
16149
16150 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
16151
16152         * reflection.[ch]: 
16153         (mono_reflection_type_from_name): now it has a MonoImage parameter
16154         which is used as the default image to search the type in. If the image
16155         is NULL or getting the type from it fails, it defaults to corlib.
16156
16157         * icall.c: changed 1 call to mono_reflection_type_from_name to match
16158         new parameter.
16159
16160 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16161
16162         * reflection.c: update the parameter table index.
16163
16164 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16165
16166         * domain.c: don't include the mark byte in the string hash.
16167
16168 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16169
16170         * icall.cs: icall for Type.GetTypeCode ().
16171         * verify: a couple of fixes and disabled local initialization checks.
16172
16173 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
16174
16175         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
16176
16177         * debug-helpers.c (mono_method_full_name): print the type of the
16178         runtime wrapper
16179
16180         * metadata.c (mono_signature_hash): a hash function for signatures
16181         (mono_signature_hash): better hash algorithm
16182
16183         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
16184
16185         * debug-helpers.c (mono_method_full_name): this can now generate
16186         method names with signatures
16187
16188         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
16189         method dont have this pointers.
16190
16191 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16192
16193         * reflection.c: fixup typebuilder tokens.
16194         * image.c: fix buglet.
16195         * marshal.h: remove whitespace.
16196         * metadata.h, metadata.c: reinstate code that was removed.
16197         * verify.c: handle catch directives and fix another couple of bugs.
16198
16199 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
16200
16201         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
16202         (mono_marshal_get_native_wrapper): make it comp. with the old code
16203         (mono_marshal_get_native_wrapper): support boolean
16204         (mono_marshal_get_managed_wrapper): support more types
16205
16206 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
16207
16208         * class.c (class_compute_field_layout): compute class->blittable attribute.
16209
16210 2002-07-09  Dick Porter  <dick@ximian.com>
16211
16212         * threads.c: Make the thread cleaning up cope with threads that
16213         call ExitThread()
16214
16215 2002-07-08  Radek Doulik  <rodo@ximian.com>
16216
16217         * reflection.c (method_encode_code): use non-translated values to
16218         compute finally_start, this fixes exception handling on ppc, yay!
16219
16220         * decimal.h (struct signscale): fix endianess
16221
16222 2002-07-07  Radek Doulik  <rodo@ximian.com>
16223
16224         * reflection.c: swap box_val and not val
16225
16226 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16227
16228         * reflection.c, reflection.h: handle full assembly info in type name.
16229         Handle Type arguments when loading custom attributes.
16230         * icall.c: updated to use new mono_reflection_type_from_name () method.
16231
16232 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16233
16234         * loader.c:
16235         (method_from_memberref): also print assembly name when method not found.
16236
16237 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16238
16239         * icall.c:
16240         (ves_icall_TypeGetProperties): fixed bug #27473. 
16241
16242 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16243
16244         * reflection.c: display image name and token when cannot find the
16245         .ctor for an attribute.
16246
16247 2002-07-05  Martin Baulig  <martin@gnome.org>
16248
16249         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16250
16251 2002-07-04  Dick Porter  <dick@ximian.com>
16252
16253         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
16254         compile on mingw.  This will cause mingw builds to not wait for
16255         subthreads to terminate after the main thread does.  I've lodged a
16256         bug with the mingw developers for them to wrap OpenThread().
16257
16258 2002-07-03  Dick Porter  <dick@ximian.com>
16259
16260         * threads.c: Store thread IDs instead of handles, because
16261         GetCurrentThread() returns a pseudohandle and therefore stores
16262         useless values.  mono_thread_cleanup() continues checking the
16263         array of threads until it is empty, to cope with subthreads
16264         spawning new threads after the main thread has finished.
16265
16266         * profiler.h:
16267         * profiler.c:
16268         * profiler-private.h: Pass the thread ID to thread profiler
16269         functions, instead of a handle
16270
16271 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16272
16273         * verify.c: fixes to make it more usable.
16274         * pedump.c: added --verify code to verify IL code in an assembly.
16275
16276 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16277
16278         * reflection.c: turn errors into warnings to allow compiling corlib.
16279
16280 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16281
16282         * reflection.c: add special cases to compile corlib.
16283
16284 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16285
16286         * reflection.c: handle properties with only a set method.
16287
16288 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16289
16290         * opcodes.h: add enum with opcodes in opval order.
16291
16292 2002-07-01  Dick Porter  <dick@ximian.com>
16293         
16294         * object.h:
16295         * object.c (mono_runtime_run_main): Removed unneeded argument
16296
16297 2002-06-28  Martin Baulig  <martin@gnome.org>
16298
16299         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16300
16301 2002-06-27  Dick Porter  <dick@ximian.com>
16302
16303         * threads.c: Store the handle in both the parent thread and in the
16304         subthread, to minimise the time between starting a new thread and
16305         storing its ID.
16306
16307 2002-06-26  Dick Porter  <dick@ximian.com>
16308
16309         * appdomain.c (mono_runtime_cleanup): Close the socket library
16310         after all the threads have finished, not before
16311
16312 2002-06-26  Martin Baulig  <martin@gnome.org>
16313
16314         * debug-symfile.c (mono_debug_find_source_location): Added
16315         `guint32 *line_number' argument.  If it's not NULL, store the line number
16316         there and return the file name without the line number.
16317
16318 2002-06-25  Dick Porter  <dick@ximian.com>
16319
16320         * icall.c:
16321         * process.h:
16322         * process.c: Process forking and other support functions
16323
16324 2002-06-25  Dick Porter  <dick@ximian.com>
16325
16326         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
16327         things dont happen when the image is closed.
16328         (mono_image_lookup_resource): Walk the resource section looking
16329         for a particular entry
16330
16331         * cil-coff.h: PE resource section decoding
16332
16333 2002-06-25  Dick Porter  <dick@ximian.com>
16334         
16335         * assembly.h:
16336         * assembly.c: 
16337         (mono_assembly_foreach): Accessor functions to walk the list of
16338         loaded assemblies
16339         (mono_assembly_set_main):
16340         (mono_assembly_get_main): Process methods need to know which
16341         assembly is the "main" one
16342
16343         * object.c (mono_runtime_run_main): Record the main assembly
16344
16345         * debug-helpers.c: Fix typo
16346
16347 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
16348
16349         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
16350         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
16351
16352 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16353
16354         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
16355
16356 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
16357
16358         * image.c (do_mono_image_open): Initialize reference count,
16359         otherwise we leak the MonoImage.
16360
16361 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16362
16363         * reflection.c: small tweak to handle self-hosting.
16364
16365 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16366
16367         * reflection.c: fix type name parse code.
16368
16369 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16370
16371         * reflection.c: break out of the loop.
16372         * image.c: special case corlib.
16373
16374 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16375
16376         * reflection.c: add all the custom attrs at the end to ensure the
16377         ctors have been properly initialized when the attributes are defined
16378         in the current assembly.
16379
16380 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16381
16382         * reflection.c: handle correctly multiple-nested types.
16383
16384 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
16385
16386         * row-indexes.h: fix typos.
16387         * reflection.c: adjust for typos and fix method_def_or_ref
16388         encoding in MethodImpl table.
16389
16390 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16391
16392         * reflection.c: fix entry point patching (thanks Serge!).
16393
16394 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
16395
16396         * verify.c: add check for System.Exception
16397
16398 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16399
16400         * image.c, class.c: minifix for code just c&p'ed.
16401         * reflection.c: warning fix.
16402         * object.h, loader.h, domain.c: load also StringBuilder.
16403
16404 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16405
16406         * marshal.h, marshal.c: some support code to handle complex marshaling.
16407
16408 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16409
16410         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
16411         Better signatures with vtable error dump.
16412
16413 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
16414
16415         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
16416
16417 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
16418
16419         * icall.c (ves_icall_Type_GetField): impl.
16420
16421 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16422
16423         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
16424         to retrieve a marshal description blob for a field or param.
16425
16426 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16427
16428         * reflection.h, reflection.c: change order of nested type emission
16429         to avoid table corruption. The NestedTypes table is sorted.
16430         * icall.c: change order of GetConstructor results to workaround mcs bug.
16431
16432 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16433
16434         * reflection.h, reflection.c: handle field and param marshal
16435         information.
16436
16437 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16438
16439         * icall.c, marshal.c marshal.h: more Marshal class implementation.
16440
16441 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16442
16443         * reflection.c: fix call convention.
16444
16445 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16446
16447         * reflection.h, reflection.c: mono_image_get_memberref_token()
16448         takes a type instead of a class, now. Added
16449         mono_image_get_array_token() to create tokens for the special
16450         multi-dim array methods.
16451
16452 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16453
16454         * assembly.c: handle modules (no assembly table). Split
16455         loading references in its own function.
16456         * class.c: handle moduleref resolution scope.
16457         * image.c, image.h: cache module name in image.
16458
16459 2002-06-07  Martin Baulig  <martin@gnome.org>
16460
16461         * reflection.c (mono_image_get_type_info): Only add a class layout entry
16462         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
16463
16464 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16465
16466         * icall.c: more signature fixes that used uint instead of int.
16467
16468 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16469
16470         * reflection.c: fixed signature of field refs.
16471
16472 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16473
16474         * class.c, reflection.c: handle typerefs of nested types
16475         (both on read and when writing files).
16476
16477 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
16478
16479         * icall.c: fix method signatures that tried to workaround the previous
16480         typo, d'oh!
16481
16482 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16483
16484         * debug-helpers.c: fix typo.
16485
16486 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16487
16488         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
16489         rewrote the PE/COFF writing code (our programs are understood by the
16490         ms runtime, now).
16491
16492 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16493
16494         * gc.c, gc.h, icall.c: weakreference support.
16495
16496 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16497
16498         * Makefile.am, mono-config.c: use $(sysconfdir).
16499
16500 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16501
16502         * icall.c: changed default precision of Double.ToString() to 15.
16503         Fixed memory leak. Unified with Single.ToString.
16504
16505 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
16506
16507         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
16508
16509 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16510
16511         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
16512         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
16513         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
16514         and myself.
16515
16516 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16517
16518         * debug-symfile.c, sysmath.c: yet more compilation fixes.
16519
16520 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16521
16522         * reflection.c, socket-io.c: more compilation fixes.
16523
16524 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16525
16526         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
16527         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
16528         unicode.c: warning and compiler compatibility fixes.
16529
16530 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16531
16532         * class.h, metadata.c: fixed warnings/compilation errors.
16533
16534 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16535
16536         * Makefile.am, mono-config.c, mono-config.h: configuration file
16537         support routines.
16538         * loader.c, loader.h: make Dll mapping configurable at runtime in the
16539         config file. Export methods to insert and lookup mappings.
16540
16541 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16542
16543         * reflection.c: handle types and boxed objects in custom attr
16544         constructors.
16545
16546 2002-05-30  Martin Baulig  <martin@gnome.org>
16547
16548         * debug-symfile.c
16549         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
16550
16551 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
16552
16553         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
16554         to lookup the implmap row for a P/Invoke method.
16555         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
16556         P/Invoke method from the runtime on an as needed basis.
16557
16558 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
16559
16560         * metadata.c (mono_metadata_parse_signature): impl.
16561
16562 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16563
16564         * class.c: handle .pack directive.
16565
16566 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16567
16568         * object.c: initialize static fields with RVA data.
16569
16570 2002-05-25  Martin Baulig  <martin@gnome.org>
16571
16572         * debug-symfile.c
16573         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
16574
16575 2002-05-24  Martin Baulig  <martin@gnome.org>
16576
16577         * debug-symfile.c
16578         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
16579         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
16580         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
16581
16582 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16583
16584         * object.c: special case string ctros in invoke.
16585         * gc.c: silly whitespace changes.
16586
16587 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
16588
16589         * threadpool.[ch]: impl. a threadpool that can
16590         be used by mint and mono.
16591
16592 2002-05-22  Martin Baulig  <martin@gnome.org>
16593
16594         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
16595         The first argument is now a `MonoReflectionModuleBuilder *', the return
16596         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
16597         `methods' field to get the method builder.  The `token' argument is the
16598         unfixed token.
16599
16600         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
16601         invalid characters instead of g_assert_not_reached()ing.  This seems
16602         to be the behaviour of mscorlib.
16603
16604 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
16605
16606         * object.c (mono_runtime_invoke_array): applied patch from Rachel
16607         Hestilow to fix bug #25104
16608
16609 2002-05-21  Martin Baulig  <martin@gnome.org>
16610
16611         * debug-symfile.c (mono_debug_find_source_location): New function.
16612         Looks up an IL offset in the line number table and returns the source
16613         location as a string.
16614
16615 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16616
16617         * icall.c:
16618         (mono_double_ToStringImpl): changed %f by %g until we have something
16619         better.
16620
16621 2002-05-21  Nick Drochak  <ndrochak@gol.com>
16622
16623         * icall.c : Use different name for Math.Pow's icall.  Needed to check
16624         parameters first in C#.
16625
16626 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16627
16628         * icall.c, reflection.h: added icall to get info about an event.
16629
16630 2002-05-20  Radek Doulik  <rodo@ximian.com>
16631
16632         * object.c (mono_value_box): don't use memcpy for boxing on BIG
16633         endian
16634         (mono_value_box): don't use memcpy for small sizes on
16635         architectures with unaligned access
16636
16637 2002-05-20  Martin Baulig  <martin@gnome.org>
16638
16639         * reflection.c (mono_reflection_setup_internal_class): Don't crash
16640         if `tb->parent == NULL'.
16641         (mono_reflection_create_internal_class): New function.  This is
16642         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
16643         for enum types.
16644
16645         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
16646         New interncall.
16647
16648 2002-05-19  Martin Baulig  <martin@gnome.org>
16649
16650         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
16651         argument to get the length, don't default to the array length.
16652
16653 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
16654
16655         * assembly.c (mono_assembly_setrootdir): New function used to
16656         override the MONO_ASSEMBLIES directory.
16657
16658 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16659
16660         * icall.c: ValueType_GetHashCode() initialize local var.
16661
16662 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16663
16664         * reflection.c: sort custom attributes table.
16665
16666 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16667
16668         * reflection.c: support named args in custom attributes (write support).
16669
16670 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16671
16672         * reflection.c: fix finally position calculation.
16673
16674 2002-05-15  Radek Doulik  <rodo@ximian.com>
16675
16676         * reflection.c: fixed endianess at many places
16677
16678         * icall.c (ves_icall_InitializeArray): comment out debug msg
16679
16680 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
16681
16682         * object.c (mono_unhandled_exception): new function to handle
16683         unhandled exceptions.
16684         (mono_unhandled_exception): call the UnhandledException event.
16685         (mono_runtime_delegate_invoke): impl.
16686
16687 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
16688
16689         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
16690         returns the RVA, not the direct pointer to the data. Handle the case
16691         when the class size is fixed.
16692
16693 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16694
16695         * reflection.c: fix some endianess issues.
16696
16697 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
16698
16699         * object.c (mono_runtime_invoke): is now able to catch exceptions.
16700
16701         * threads.c (mono_thread_init): added a callback which is invoked
16702         at thread start.
16703
16704 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
16705         
16706         * icall.c: make GetHashCode return non-negative values.
16707
16708 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
16709
16710         * object.c, icall.c, gc.c: revert to address-based hashcode.
16711
16712 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
16713
16714         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
16715
16716 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16717
16718         * icall.c, class.c: special case <Module>.
16719
16720 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
16721
16722         * icall.c: fix bug in GetNow().
16723
16724 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
16725
16726         * object.c (mono_runtime_class_init): make sure that we call all
16727         static class constructors.
16728
16729 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16730
16731         * reflection.c: sort methodsemantics table.
16732
16733 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16734
16735         * reflection.h, reflection.c: honour init locals setting.
16736
16737 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
16738
16739         * icall.c: copied Double ToStringImpl for Single ToStringImpl
16740
16741 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16742
16743         * reflection.c: support ContructorBuilders in attribute blob creation.
16744
16745 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16746
16747         * reflection.c: some changes to build a binary that can be run
16748         directly in windows.
16749
16750 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
16751
16752         * loader.c: print a big message when an icall can't be found.
16753
16754 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16755
16756         * string-icalls.c: fix bug 24248.
16757
16758 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16759
16760         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
16761         icall.c, reflection.h: separate assembly loading by pathname and by
16762         assembly name. Use the MONO_PATH env var to search for assemblies.
16763
16764 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16765
16766         * assembly.c, image.h: add some support for assemblies
16767         with multiple modules.
16768         * class.c, class.h: export mono_class_from_typeref().
16769         * loader.c: remove duplicated code and use mono_class_from_typeref(),
16770         instead.
16771
16772 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16773
16774         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
16775         documentation says (the ECMA one is correct).
16776
16777 2002-05-02  Dick Porter  <dick@ximian.com>
16778
16779         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
16780         Don't name the synchronisation mutex.
16781
16782 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
16783
16784         * rand.c
16785         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
16786         Make the prototypes match.
16787         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
16788         Same.
16789
16790         * icall.c
16791         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
16792         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
16793         all systems have tm.tm_zone, so use strftime() with %Z to print
16794         the timezone abreviation into a temp string.
16795
16796         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
16797         rather than mono_array_addr() on a MonoString on Big Endian
16798         machines.
16799
16800 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
16801
16802         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
16803         fix bug 24041
16804
16805 2002-04-30  Dick Porter  <dick@ximian.com>
16806
16807         * socket-io.c: Cope with SOCKET being an integer rather than a
16808         pointer now.
16809
16810         * threads.c: Added Thread_free_internal, to deal with thread
16811         handle cleanup.  Moved calls to handle_store() and handle_remove()
16812         to start_wrapper(), so each can only be called once.  Allocate
16813         synchronisation blocks with GC_malloc(), and use GC finalisation
16814         to close the handles.
16815
16816         * icall.c: added System.Threading.Thread::Thread_free_internal
16817
16818 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16819
16820         * icall.c: support Environment.Exit, CommandLineArgs().
16821
16822 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16823
16824         * object.c, object.h: added mono_runtime_run_main () and
16825         mono_runtime_get_main_args () for use in System.Environment.
16826
16827 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16828
16829         * gc.c: fix thinko, enable actual finalization since the jit is now
16830         fixed.
16831
16832 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16833
16834         * gc.c, object.c: take into account that an object may be offset wrt the address
16835         returned by GC_malloc().
16836
16837 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
16838
16839         * image.c: handle files without entries in the assembly table (modules).
16840
16841 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
16842
16843         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
16844         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
16845         allowed to be null when it's System.Object class setup.
16846
16847 2002-04-27  Martin Baulig  <martin@gnome.org>
16848
16849         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
16850         if `tb->parent == NULL' rather than crashing.
16851
16852 2002-04-28  Nick Drochak  <ndrochak@gol.com>
16853
16854         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
16855         calling acos() where asin() should have been called.
16856
16857 2002-04-26  Martin Baulig  <martin@gnome.org>
16858
16859         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
16860         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
16861         there's a subdirectory called `System', but we don't want to read that
16862         subdirectory as an assembly.
16863
16864 2002-04-25  Martin Baulig  <martin@gnome.org>
16865
16866         * debug-symfile.c: Reflect latest MonoString changes.
16867
16868 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16869
16870         * rand.c, rand.h: instance method icalls need to have an explicit
16871         this pointer as first argument in the C implementation.
16872
16873 2002-04-25  Nick Drochak <ndrochak@gol.com>
16874
16875         * icall.c: Fix typo in map for GetNonZeroBytes
16876
16877 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
16878
16879         * string-icalls.c : String does now passes unit tests without any 
16880         errors, the following changes has been made:
16881         
16882         Implemented replace methods.
16883         Renaming of methods to (try) follow the standard.
16884         Fixed compare ordinal
16885         Made all memory allocated directly to function instead of via icall function.
16886         Small performance fix in is_in_array function
16887                         
16888  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
16889
16890         c (mono_string_Internal_ctor_charp_int_int):
16891         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
16892         sindex < 0, throw ArgumentOutOfRangeException instead of
16893         ArgumentNullException.
16894
16895         Added new check for length == 0, however
16896         I need to make it return String.Empty from the C code.
16897         
16898         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
16899         that calculate the length for us here.
16900         
16901         (mono_string_Internal_ctor_sbytep_int_int): Replaced
16902         mono_string_new_utf16 with mono_string_new, since value is utf8.
16903
16904 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16905
16906         * object.c: register the object for finalization if needed.
16907         Allocate one more char in the string for the terminating 0 char.
16908
16909 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16910
16911         * class.c, class.h, image.c: check if a type implemenst a destructor.
16912         Use the proper key for array class lookups.
16913         * icall.c: register the icalls in the System.GC class.
16914         * gc.c, gc.h: GC-related functions and icalls.
16915
16916 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16917
16918         * icall.c:
16919         * socket-io.c:
16920         * unicode.c: free some strings gotten from mono_string_to_utf8 and
16921         changed a couple of free () by g_free ().
16922
16923         * decimal.c: one-liner in the comments for decimal2string ().
16924
16925 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
16926
16927         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
16928
16929 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
16930
16931         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
16932         * object.c (mono_runtime_invoke_array) : handle null in params
16933
16934 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
16935
16936         * string-icalls.c: fixed bug in split (one off bug)
16937
16938 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
16939
16940         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
16941         * icalls.c: added String::Equals as internal method
16942
16943 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
16944
16945         * threads.c: fixed bug in the double interlocked functions
16946
16947 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
16948
16949         * threads.c: implemented all of the new interlocked icalls.
16950         * string-icalls.c: fix a bug in insert.
16951         * icalls.c: added the icalls for interlocked, removed old string functions.
16952         
16953 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
16954
16955         * loader.c: fix off-by-one error when reading argument names.
16956
16957 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16958
16959         * profiler.c: win32 counter implementation (untested).
16960         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
16961         (the latter needs testing and more complete impl. from win32 folks).
16962
16963 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
16964
16965         * object.c: mono_array_new_full workaround mono_array_class_get
16966         problem.
16967
16968 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
16969
16970         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
16971         * object.h (mono_string_chars): Changed casting type.
16972
16973 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
16974
16975         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
16976                            method signatures to use gunichar2 instead of gint16.
16977
16978 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
16979
16980         * object.h, object.c: domain-specific versions of mono_object_new and
16981         mono_array_new.
16982
16983 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
16984
16985         * object.c: changed String layout
16986
16987         * string-icalls.c (mono_string_Internal_ctor_chara): added
16988         internal string constructors.
16989
16990 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
16991
16992         * threads.c: pass 'this' to the thread start routine.
16993
16994 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16995
16996         * string-icalls.c: fix IndexOf and LastIndexOf. Now
16997         InternalCompareStr don't call twice mono_string_cmp_char for the last
16998         character. Improved performance in mono_string_cmp_char.
16999
17000 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17001
17002         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
17003         code into its own library: libmonoruntime.
17004
17005 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
17006
17007         * object.h, object.c: changed array format so that szarrays do not
17008         require a bounds structure.
17009         * icall.c, appdomain.c: support for new szarray format.
17010
17011 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17012
17013         * metadata.c: compare also the retuns type when comparing signatures:
17014         we didn't do this as an optimization since really overloaded methods
17015         must differ also in the arguments, but this doesn't work with
17016         low-level IL code (or when using explicit conversion operators: see
17017         bug#23498 for an example).
17018
17019 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17020
17021         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
17022
17023 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17024
17025         * icall.c: make MonoType::GetElementType its own icall.
17026
17027 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17028
17029         * icall.c: remove MonoMethod_get_Name().
17030         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
17031         object.
17032
17033 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17034
17035         * string-icalls.c: optimized a few methods.
17036
17037 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17038
17039         * icall.c: added all new string internal calls
17040         * string-icalls.c: added, new string internal call implementation.
17041         * object.c: added mono_string_new_size for allocating a string a size
17042
17043 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
17044
17045         * object.c (mono_object_isinst): use the same code as in the
17046         optimized x86 version.
17047
17048 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17049
17050         * profiler.c: TSC-based timer code (faster and more accurate).
17051         Not hooked up in configure, yet (set USE_X86TSC to 1).
17052
17053 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
17054
17055         * profiler.c, profiler.h: track time spent compiling methods.
17056         * threads.c: track thread creation/destruction.
17057
17058 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
17059
17060         * profiler.c, profiler.h, profiler-private.h: profiling interface
17061         and sample implementation. Moved here so that it can be used also by
17062         the jit.
17063
17064 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
17065
17066         * reflection.c, reflection.h: keep types and other handles separate in
17067         the hash tables for referred tokens. Add guid for modules.
17068
17069 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17070
17071         * assembly.c: fix bugs found with valgrind.
17072         * metadata.h, metadata.c: added mono_metadata_guid_heap().
17073
17074 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
17075
17076         * threads: added icall support for getting current domain for
17077                    the thread.
17078  
17079 2002-04-13  Martin Baulig  <martin@gnome.org>
17080
17081         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
17082         (MonoDebugVarInfo): Added `index' field for register based addresses.
17083         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
17084         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
17085         `MonoDebugVarInfo *params' and `guint32 this_offset' with
17086         `MonoDebugVarInfo *this_var'.
17087
17088         * debug-symfile.c (relocate_variable): New static function to write
17089         a location description for a local variable or method parameter.
17090
17091 2002-04-12  Martin Baulig  <martin@gnome.org>
17092
17093         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
17094         stack offset and begin/end scope address of a local variable.
17095         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
17096         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
17097         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
17098
17099         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
17100         Added new relocation types for start/end scope of a local variable.
17101
17102 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17103
17104         * object.h: add mono_object_domain() macro.
17105         * reflection.c: handle typespecs.
17106         * icall.c: MonoMethod::get_Name() implementation.
17107
17108 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17109
17110         * icall.c: String::GetHashCode() icall implementation.
17111
17112 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17113
17114         * icall.c: String::IndexOfAny icall.
17115         * object.c, object.h: make array->max_length more useful.
17116         Intrduced mono_object_class() and mono_string_length() macros.
17117
17118 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17119
17120         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
17121         instead of g_unichar_isdigit.
17122
17123 2002-04-11  Nick Drochak  <ndrochak@gol.com>
17124
17125         * icall.c: Implement a simple Double.ToString().
17126
17127 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17128
17129         * appdomain.h: only io-layer.h is supposed to be included.
17130         * icall.c: explicitly import environ. Fix warning.
17131
17132 2002-04-10  Nick Drochak  <ndrochak@gol.com>
17133
17134         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
17135                 return true even if it's not Daylight Savings time.
17136                 Only return false for the case where the function isn't
17137                 implemented for a plaform (read Windows).
17138
17139 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17140
17141         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
17142         data with a mutex.
17143
17144 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
17145
17146         * mempool.c (mono_mempool_alloc): only use g_malloc when
17147         absolutely necessary.
17148
17149 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
17150
17151         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
17152
17153         * class.c (mono_class_vtable): use domain mempool to allocate vtable
17154         (mono_class_proxy_vtable): use domain mempool
17155
17156 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17157
17158         * appdomain.h, appdomain.c: split initialization that requires the
17159         execution engine support into mono_runtime_init().
17160
17161 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
17162
17163         * class.c (mono_class_init): don't include vtable inside MonoClass
17164         to save some memory, gather some statistics.
17165         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
17166
17167 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17168
17169         * icall.c: internalcall implementation for ValueType.Equals().
17170
17171 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
17172
17173         * object.c (mono_message_init): moved 
17174         (mono_runtime_exec_main): new arch. independent impl.
17175         (mono_runtime_invoke_array): new method - like
17176         mono_runtime_invoke, but you can pass an array of objects.
17177         (mono_remoting_invoke): new arch. independent impl.
17178         (mono_message_invoke): new arch. independent impl.
17179         (mono_runtime_class_init): new arch. independent impl.
17180         (mono_runtime_object_init): new arch. independent impl.
17181
17182 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17183
17184         * metadata.c, object.c, reflection.c: documented the exported
17185         functions.
17186
17187 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17188
17189         * icall.c: simpler code to pass the assembly builder data to corlib.
17190         Implement GetNestedTypes() internalcall.
17191
17192 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17193
17194         * class.c: warn if a type can't be loaded.
17195
17196 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
17197
17198         * image.h: typedef MonoImageOpenStatus
17199         * types.h: removed unused file
17200         
17201 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
17202
17203         * icall.c: Enum_ToObject accepts enum value arguments.
17204
17205 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17206
17207         * class.c: move initialization of properties, events and nested
17208         classes, so that they happen for interfaces, too.
17209
17210 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17211
17212         * icall.c: cleanup some ugly casts in Array_SetValue*.
17213
17214 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17215
17216         * icall.c: the values array fro enums is of the correct type, now.
17217         Implement (correctly) getFullName instead of assQualifiedName for
17218         MonoType.
17219         * reflection.h, reflection.c: added mono_type_get_name ().
17220
17221 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17222
17223         * assembly.c, image.h: for each MonoImage, record from wich assembly
17224         it was loaded.
17225         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
17226         Make Type.Assembly work.
17227
17228 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
17229
17230         * debug-symfile.h: use char* instead of gpointer to avoid
17231         unnecessary casts.
17232
17233         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
17234
17235         * icall.c (ves_icall_InternalExecute): impl. FielSetter
17236         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
17237
17238 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
17239
17240         * icall.c (mono_message_init): impl. (code cleanup)
17241         (ves_icall_InternalExecute): impl. FieldGetter
17242
17243         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
17244         defined we call all (non-static)methods through the vtable. 
17245
17246 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
17247
17248         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
17249         finalizer even though the memory is still referenced (and the chunk of
17250         memory is not freed).
17251
17252 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
17253
17254         * assembly.c: fix brokeness.
17255
17256 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
17257
17258         * class.c: kill some warnings. Check explicit interface method
17259         implementation also without considering the namespace.
17260         Load also literal strings in static class data.
17261
17262 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
17263
17264         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
17265         (default_assembly_name_resolver): Make the resolver take the
17266         "base" directory where the assembly was originally defined, so we
17267         can load DLLs that are in the same directory as the assembly that
17268         is being referenced.
17269
17270 2002-03-28  Dick Porter  <dick@ximian.com>
17271
17272         * file-io.h: 
17273         * file-io.c:
17274         * socket-io.c: 
17275         * unicode.h: 
17276         * unicode.c: Warning cleanups
17277
17278 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
17279
17280         * object.h, reflection.h: use the correct type instead of MonoObject.
17281
17282 2002-03-28  Martin Baulig  <martin@gnome.org>
17283
17284         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
17285         (mono_debug_update_symbol_file): Initialize classes if necessary.
17286
17287 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17288
17289         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
17290         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
17291
17292 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
17293
17294         * assembly.h: fix function prototype.
17295         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
17296         * mono-endian.h: use const cast.
17297
17298 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
17299
17300         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
17301
17302 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17303
17304         * loader.c: don't assert when a typeref can't be loaded, give
17305         a chance to the runtime to trow an exception instead.
17306         * loader.h: fix warning.
17307
17308 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
17309
17310         * class.c (mono_class_proxy_vtable): added proxy support
17311
17312 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
17313
17314         * icall.c: removed last of PAL calls, added System.Environment
17315         * file-io.h, file-io.c: MonoIO implementation
17316         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
17317
17318 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17319
17320         * appdomain.c: do not use the byte marker in ldstr table lookup.
17321         * debug-helpers.c: allow two ':' to separate class and method name.
17322         * object.c: allocate arrays bounds with the GC, too.
17323         * verify: add a few more checks.
17324
17325 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
17326
17327         * reflection.c: output also literal strings. Allocate parameter data
17328         with GC_malloc() (thanks, Martin, for catching this!).
17329
17330 2002-03-26  Martin Baulig  <martin@gnome.org>
17331
17332         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
17333         include the `this' offset in the `param_offsets'.
17334
17335 2002-03-25  Martin Baulig  <martin@gnome.org>
17336
17337         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
17338         mono_debug_get_class() function to get the classes. Added new
17339         relocation types for arrays and strings.
17340         (mono_debug_get_class): New static function to search in all
17341         referenced assemblies for a metadata token.
17342
17343         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
17344
17345 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17346
17347         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
17348         hold gc-allocated objects. Make the string heap a stream like the
17349         others. Removed duplicated code when writing stream info.
17350         Added asserts to catch possible buffer overflows. Set the sorted map
17351         for tables that need sorting. Added some documentation.
17352
17353 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
17354
17355         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
17356         for interned strings and vtables.
17357
17358 2002-03-24  Martin Baulig  <martin@gnome.org>
17359
17360         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
17361         it in the array since it was created with g_slist_prepend().
17362
17363 2002-03-24  Martin Baulig  <martin@gnome.org>
17364
17365         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
17366         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
17367         (mono_debug_method_from_token): Renamed to
17368         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
17369         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
17370
17371         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
17372         relocation types.
17373
17374         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
17375
17376 2002-03-24  Martin Baulig  <martin@gnome.org>
17377
17378         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
17379         (mono_debug_method_from_token): New func.
17380
17381         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
17382         New interncall, calls mono_debug_local_type_from_signature().
17383         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
17384         calls mono_debug_method_from_token().
17385
17386 2002-03-23  Martin Baulig  <martin@gnome.org>
17387
17388         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
17389         specifies the number of bytes to be converted, not the array size.
17390         Return the number of chars, not the number of bytes.
17391         (ves_icall_iconv_get_chars): The `byteCount' argument
17392         specifies the number of bytes to be converted, not the array size.
17393
17394 2002-03-23  Martin Baulig  <martin@gnome.org>
17395
17396         * reflection.h (MonoReflectionSigHelper): New type.
17397
17398         * reflection.c (mono_reflection_sighelper_get_signature_local),
17399         (mono_reflection_sighelper_get_signature_local): New functions.
17400
17401         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
17402         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
17403         interncalls.
17404
17405 2002-03-23  Martin Baulig  <martin@gnome.org>
17406
17407         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
17408         is_writeable is set.
17409         (mono_raw_buffer_update): New function to write the modified map
17410         back to disk.
17411
17412         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
17413
17414         * debug-symfile.c (mono_debug_update_symbol_file): Call
17415         mono_raw_buffer_update() when done writing.
17416
17417 2002-03-23  Martin Baulig  <martin@gnome.org>
17418
17419         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
17420
17421         * debug-symfile.c: Added support for arguments and local variables.
17422
17423 2002-03-23  Dick Porter  <dick@ximian.com>
17424
17425         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
17426         protected by ifdefs, hence breaking the w32 build.
17427
17428 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17429
17430         * object.c: implement is_interned() the right way.
17431
17432 2002-03-21  Martin Baulig  <martin@gnome.org>
17433
17434         * debug-symfile.[ch]: New files to handle debugging information
17435         files. There's also support to dynamically update these symbol
17436         files to include machine dependent information.
17437
17438 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
17439
17440         * threads.c (mono_thread_create): new function to create thread
17441         from C
17442
17443 2002-03-20  Martin Baulig  <martin@gnome.org>
17444
17445         * icall.c (ves_icall_InternalInvoke): Create a new object if the
17446         method is a constructor.
17447         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
17448         points to ves_icall_InternalInvoke().
17449
17450 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
17451
17452         * file-io.c: Flush shouldn't throw exceptions.
17453
17454 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
17455
17456         * file-io.c: FileStream flush support; FileSetLength now
17457         restores file pointer.
17458
17459 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
17460
17461         * class.c: set image for pointer classes.
17462
17463 2002/03/19  Nick Drochak <ndrochak@gol.com>
17464
17465         * sysmath.c: Forgot one.
17466
17467 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
17468
17469         * sysmath.c: Avoid redefining existing names.
17470
17471 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
17472
17473         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
17474         handled by runtime as icall rather than dllimport from libm.so
17475         * file-io.c, file-io.h: fixed handle argument type.
17476
17477 2002-03-18  Dick Porter  <dick@ximian.com>
17478
17479         * reflection.c (mono_image_get_type_info): rename interface to
17480         iface, because of "#define interface struct" on windows.
17481
17482 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
17483
17484         * class.c, class.h: rename and export mono_ptr_class_get().
17485         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
17486         * reflection.c, reflection.h, icall.c: better/saner type name
17487         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
17488         method signatures.
17489
17490 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
17491
17492         * class.c (mono_class_init): removed hardcoded GHC_SLOT
17493
17494         * icall.c (ves_icall_InternalInvoke): impl.
17495
17496 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17497
17498         * reflection.c: output the interface map table, too.
17499
17500 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
17501
17502         * class.c (class_compute_field_layout): separate computation of 
17503         static field layout
17504
17505 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
17506
17507         * icall.c: added System.Buffer support.
17508         * file-io.c: moved file icalls from PAL to FileStream.
17509
17510 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
17511
17512         * icall.c (ves_icall_System_Object_GetHashCode): impl.
17513
17514 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
17515
17516         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
17517
17518 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17519
17520         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
17521
17522 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
17523
17524         * debug-helpers.{c,h}: moved here from monograph some useful functions
17525         to locate a method by name/signature in a class or image. Included
17526         also a small and flexible IL disassembler.
17527
17528 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17529
17530         * reflection.c: fixup tokens in methods with small header size, too.
17531
17532 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
17533
17534         * object.c (mono_string_to_utf8): remove assert(!error), instead
17535         print a warning. 
17536
17537 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
17538
17539         * icall.c: update to the new mono_Array_class_get interface.
17540
17541 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
17542
17543         * appdomain.c, object.c: Boehm-GC enable.
17544         * icall.c: make get_data_chunk() support split data requests.
17545         Ensure a class is initialized in more cases. Return only the first
17546         property found in GetProperties() or the compiler gets confused. 
17547         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
17548         * reflection.h, reflection.c: add fixup mechanism for field and method
17549         tokens. Initialize assembly->typeref in a single place. Output
17550         properties after events. Support custom attributes for events, too.
17551         Typo fix for paramter custom attrs.
17552
17553 2002-03-07  Martin Baulig  <martin@gnome.org>
17554
17555         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
17556
17557 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
17558
17559         * class.c (mono_array_class_get): fix. for multi. dim. arrays
17560
17561 2002-03-06  Martin Baulig  <martin@gnome.org>
17562
17563         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
17564         non-zero lower bounds. See testcases #F10-#F13.
17565
17566 2002-03-05  Martin Baulig  <martin@gnome.org>
17567
17568         * exception.c (mono_get_exception_argument_out_of_range): New exception.
17569
17570         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
17571         ves_icall_System_Array_GetValue(), only calculate the absolute array position
17572         here.
17573         (ves_icall_System_Array_SetValue): Likewise.
17574         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
17575         as argument and does the actual work. This function is used when copying a
17576         multi-dimensional array.
17577         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
17578         now do all the widening conversions of value types.
17579         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
17580
17581 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17582
17583         * class.c: remove some magic numbers and use the smbolic names,
17584         instead. Added init_events() to load event info at class init time.
17585         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
17586         and mono_metadata_methods_from_event().
17587         * reflection.h, reflection.c: added support for writing out the evnets
17588         related information.
17589
17590 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17591
17592         * reflection.h, icall.c: use a different method (GetInterfaces)
17593         to gather interface info and add isbyref, isprimitive and
17594         ispointer to the ves_icall_get_type_info() return value.
17595
17596 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
17597
17598         * class.h: stared adding support for events.
17599         * icall.c: split find_members implementation. Added debug icall to get
17600         the address of an object.
17601         * reflection.c: handle TypeBuilders in mono_type_get_object().
17602
17603 2002-03-01  Martin Baulig  <martin@gnome.org>
17604
17605         * icall.c (ves_icall_System_Array_GetLength): This must throw an
17606         ArgumentOutOfRangeException(), not an ArgumentException().
17607         (ves_icall_System_Array_GetLowerBound): Likewise.
17608         (ves_icall_System_Array_GetValue): Improved argument checking.
17609         (ves_icall_System_Array_SetValue): Improved argument checking.
17610
17611 2002-03-01  Martin Baulig  <martin@gnome.org>
17612
17613         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
17614         called with invalid arguments rather than just dying with g_assert().
17615         (ves_icall_System_Array_SetValue): Likewise.
17616         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
17617         raise a NotImplementedException instead.
17618         (ves_icall_System_Array_GetLength): Added argument checking.
17619         (ves_icall_System_Array_GetLowerBound): Added argument checking.
17620
17621 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
17622
17623         * object.h (mono_assert): new macros mono_assert and
17624         mono_assert_not_reached
17625
17626 2002-02-28  Martin Baulig  <martin@gnome.org>
17627
17628         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
17629         and "System::String::IsInterned" to "System::String::_IsInterned".
17630
17631 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
17632
17633         * icall.c: remove hacks for typebuilder. Added icall to create a
17634         modified type from a tybebuilder.
17635         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
17636         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
17637         to create a backing MonoClass for a TypeBuilder.
17638
17639 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17640
17641         * class.c, class.h: more refactoring of class init.
17642         Export mono_class_setup_mono_type() and mono_class_setup_parent().
17643
17644 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
17645
17646         * marshal.c, marshal.h: start of marshaling interface.
17647
17648 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
17649
17650         * icall.c: fix order in assembly qualified name icall.
17651
17652 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
17653
17654         * class.c: do not free str, since we store it in the hash table.
17655         * reflection.h: add label field to MonoILExceptionInfo.
17656         * reflection.c: handle references to more than one assembly. Handle
17657         case when there isn't a module created in the assembly.
17658
17659 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17660
17661         * class.c: Fix typo. Start refactoring of class init code.
17662
17663 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17664
17665         * appdomain.c: exit with 1 on error.
17666         * class.c: we already have the name in MonoClassField.
17667         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
17668         MonoStreamHeader instead of an offset of image->raw_metadata.
17669
17670 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
17671
17672         * appdomain.c (mono_init): Be even more descriptive about the error.
17673
17674 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
17675
17676         * appdomain.c: give the user an informative message when corlib can't
17677         be loaded.
17678
17679 2002-02-26  Martin Baulig  <martin@gnome.org>
17680
17681         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
17682         New icall to get the time zone data.
17683
17684 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17685
17686         * reflection.c: set virtual and raw size of section correctly.
17687         * threads.c: transfer domain information to newly created threads.
17688
17689 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
17690
17691         * class.c: when instancing a class in a domain, load the default
17692         vaules for static fields from the constant table. Fix System.Enum to
17693         not be an enum.
17694         * icall.c: implement Object::GetType() internalcall. Implemented
17695         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
17696         Fixed checking of binding flags in find_members().
17697         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
17698         * reflection.c: handle enumerations when writing to the constant
17699         table. Use a different object cache for types.
17700
17701
17702 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
17703
17704         * object.c (mono_object_isinst): fix for arrays
17705
17706         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
17707
17708 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
17709
17710         * object.c: don't use mprotect ()  and fix intern pool hash table
17711         lookup for big endian systems.
17712
17713 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17714
17715         * icall.c: change type_is_subtype_of () signature.
17716
17717 2002-02-21  Mark Crichton  <crichton@gimp.org>
17718
17719         * rand.c, rand.h: Added random number generator for
17720         System.Security.Cryptography classes.
17721
17722         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
17723
17724         * icall.c: Added System.Security.Cryptography calls.
17725
17726 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
17727
17728         * class.c, icall.c, metadata.c: better support for pointer types.
17729         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
17730         * reflection.c: Add support for getting custom attrs for properties
17731         and simplify some code.
17732
17733 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17734
17735         * icall.c: change getToken () and add custom attribute GetBlob()helper
17736         method.
17737         * reflection.h: add custom attrs array to the reflection builder structures.
17738         * reflection.c: encode and emit custom attributes for all the relevant
17739         reflection objects. Cache fieldref and methodref tokens. Change
17740         mono_image_create_token() interface to take a MonoDynamicAssembly.
17741         More complete custom attributes decoder. Load custom attributes for
17742         Assembly, Field, Method and Constructor objects, too. Make the
17743         returned array an Attribute[] one, not object[]. Added
17744         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
17745         custom attribute constructor.
17746
17747 2002-02-20  Dick Porter  <dick@ximian.com>
17748
17749         * icall.c:
17750         * rawbuffer.c:
17751         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
17752         problem code out for now).
17753
17754 2002-02-19  Radek Doulik  <rodo@ximian.com>
17755
17756         * object.c (mono_ldstr): use hash table to avoid multiple swapping
17757
17758 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
17759
17760         * icall.c: register the GetCustomAttributes method.
17761         * object.c, object.h: add mono_string_new_len ().
17762         * reflection.h, reflection.c: added mono_runtime_invoke(),
17763         mono_install_runtime_invoke(). Added
17764         mono_reflection_get_custom_attrs () to load custom attributes and
17765         create the attribute objects.
17766
17767 2002-02-19  Dick Porter  <dick@ximian.com>
17768         * threads-dummy-types.c:
17769         * threads-dummy-types.h:
17770         * threads-dummy.c:
17771         * threads-dummy.h:
17772         * threads-pthread-types.c:
17773         * threads-pthread-types.h:
17774         * threads-pthread.c:
17775         * threads-pthread.h:  Deleted obsolete files
17776
17777 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
17778
17779         * class.c (mono_class_vtable): runtime init the class when we
17780         allocate static class data.
17781
17782         * icall.c (ves_icall_System_Array_SetValue): check for null values.
17783
17784         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
17785         and String - but we will need generic marshalling support in the
17786         future. 
17787         (mono_init): set the domain name in a ms compatible way
17788
17789         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
17790         String[].
17791
17792 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
17793
17794         * object.c (mono_array_clone): use alloca() instead of g_malloc  
17795         for sizes
17796
17797         * appdomain.c (mono_domain_unload): impl.
17798
17799 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17800
17801         * appdomain.c, object.c: fix intern pool implementation.
17802         * class.c: fix alignment code.
17803
17804 2002-02-16  Radek Doulik  <rodo@ximian.com>
17805
17806         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
17807         and s2 > s1, just copy lower bytes to be compatible with little
17808         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
17809         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
17810
17811         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
17812         force big_endian to be 1 for big endian machines 
17813         (ves_icall_iconv_new_decoder): ditto
17814
17815 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
17816
17817         * socket-io.c (convert_sockopt_level_and_name): If the system
17818         doesn't define SOL_IP or SOL_TCP, get them by hand using
17819         getprotobyname() and caching the values (because this could be a
17820         slow operation).
17821         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
17822         Use the appropriate struct when the system does support it. Ie,
17823         not all systems have struct ip_mreqn so use struct ip_mreq when
17824         appropriate.
17825
17826 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
17827
17828         * reflection.c: handle finally clauses.
17829
17830 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
17831
17832         * socket-io.c: use g_snprintf() instead of snprintf.
17833
17834 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
17835
17836         * reflection.c (mono_param_get_objects): Cast second argument to
17837         mono_method_get_param_names to a const char** to silence the
17838         compiler warning.
17839
17840         * appdomain.c (mono_domain_assembly_open): Put parens around the
17841         truth statement in the for-loop.
17842
17843         * unicode.c (iconv_convert): Got rid of a compiler warning about
17844         int i being unused when the system has a new iconv.
17845         (iconv_get_length): Same.
17846
17847         * image.c (load_class_names): Cast the second argument to
17848         g_hash_table_insert() to char* to hush compiler warnings about the
17849         arg being a const.
17850         (mono_image_open): Same here.
17851
17852         * socket-io.c: Don't conditionally include sys/filio.h or
17853         sys/sockio.h here anymore since we now get them from
17854         io-layer/io-layer.h
17855         (inet_pton): If the system doesn't support inet_aton, implement
17856         using inet_addr and also #define INADDR_NONE if it isn't defined
17857         by the system.
17858
17859 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
17860
17861         * metadata.c, metadata.h: added function to get packing and size info
17862         of a typedef.
17863         * reflection.h, reflection.c: handle field RVA data. Save info about
17864         the table layout if needed. Assign typedef indexes to all the types
17865         before dumping the info about them to avoid forward reference problems.
17866
17867 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
17868
17869         * socket-io.c (convert_sockopt_level_and_name): ifdef
17870         SO_ACCEPTCONN because it is not defined on my system (old debian)
17871
17872 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17873
17874         * opcode.c: use stddef.h to get NULL.
17875
17876 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
17877
17878         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
17879         for FIONBIO, FIONREAD and SIOCATMARK.
17880         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
17881         define INADDR_NONE and besides, inet_addr() is deprecated and
17882         should not be used. Use inet_pton() instead - it also has the
17883         added bonus that it can easily handle IPv6 addresses as well.
17884         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
17885
17886 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
17887
17888         * decimal.c: remove _MSC_VER conditional.
17889
17890 2002-02-13  Dick Porter  <dick@ximian.com>
17891
17892         * socket-io.c: 
17893         * icall.c: Internal calls for Blocking, Select, Shutdown,
17894         GetSocketOption and SetSocketOption
17895
17896 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17897
17898         * assembly.cs: better resolver: use it instead of some kludgy
17899         code.
17900
17901 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
17902
17903         * reflection.c: the best way to speed-up the compiler is to avoid
17904         infinite loops.
17905
17906 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
17907
17908         * class.c (mono_class_vtable): changed the object layout
17909         (obj->vtable->class). 
17910         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
17911
17912 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17913
17914         * assembly.c: look for assemblies in the assembly dir, too.
17915
17916 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17917
17918         * class.c: fix thinko in mono_class_from_type().
17919
17920 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17921
17922         * exception.h, exception.c: added TypeLoadException.
17923         * object.h, object.c: added mono_array_clone ().
17924         * icall.c: handle throwOnError in AssemblyGetType().
17925         Added Array.Clone().
17926         * opcode.h, opcode.c: use a single value for the opcode val.
17927         Compile fix for non-gcc compilers.
17928
17929 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
17930
17931         * opcodes.c, opcodes.h: export interesting info about opcodes.
17932
17933 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
17934
17935         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
17936         icalls. 
17937
17938         * class.c (class_compute_field_layout): set element_class for enums
17939         (mono_class_create_from_typedef): set element_class for normal classes
17940
17941         * icall.c (ves_icall_System_Enum_get_value): impl.
17942
17943         * class.c (mono_class_create_from_typedef): do not set valuetype
17944         flag for System.ValueType and System.Enum
17945
17946 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
17947
17948         * unicode.c (iconv_convert): fix big endian problem.
17949
17950 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17951
17952         * class.c: add asserts if we are ever going to scribble over memory.
17953         * socket-io.c: not all systems have AF_IRDA defined.
17954
17955 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
17956
17957         * class.c (class_compute_field_layout): do not consider static
17958         fields to compute alignment
17959
17960 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
17961
17962         * appdomain.c (mono_appdomain_get): impl.
17963         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
17964
17965 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
17966
17967         * icall.c: ignore "file://" prefix when loading an assembly.
17968
17969 2002-01-23  Dick Porter  <dick@ximian.com>
17970
17971         * socket-io.c:
17972         * icall.c:
17973         * Makefile.am: Added socket support
17974
17975 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
17976
17977         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
17978         code back.  This should return the assemblies that are loaded by
17979         the runtime on behalf of an application domain. 
17980
17981         The current implementation is still broken, it just returns every
17982         assembly loaded, but until we get real applications domain this
17983         will do.
17984
17985 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
17986
17987         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
17988         AppDomain object.
17989
17990 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
17991
17992         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
17993         the mono_class_from_name lookup.
17994         (ves_icall_get_parameter_info): ditto.
17995         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
17996         method.
17997         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
17998
17999 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
18000
18001         * class.c: load also nested classes on class init.
18002         System.ValueType instance methods gets passed boxed
18003         values, unless methods in derived classed that get a pointer to the
18004         data.
18005         * icall.c: use better name parsing code in GetType().
18006         * image.c, image.h: add mono_image_loaded ().
18007         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
18008         * reflection.c, reflection.h: added mono_reflection_parse_type().
18009
18010 2002-01-22  Veronica De Santis <veron78@interfree.it>
18011
18012         * icall.c : Added mapping of internal calls for Manual and Auto reset events
18013         * threads.c : Added the implementation of internal calls for events
18014         * threads.h : Added prototypes of internal calls for events
18015         
18016 2002-01-21  Radek Doulik  <rodo@ximian.com>
18017
18018         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
18019
18020 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
18021
18022         * class.c (mono_class_init): set min_align to 1 (instead of 0)
18023         (mono_class_value_size): use min_align
18024
18025 2002-01-20  Dick Porter  <dick@ximian.com>
18026
18027         * threads.h:
18028         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
18029         so it compiles on w32.
18030
18031 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
18032
18033         * metadata.c (mono_type_stack_size): impl.
18034
18035         * class.c (mono_class_get_field): impl. memberref token
18036
18037 2002-01-16 Veronica De Santis <veron78@@interfree.it>
18038
18039         * icall.h : Added the internal calls mapping for CreateMutex_internal
18040                     and ReleaseMutex_internal.
18041         * threads.h : Added the prototype of mutexes internal calls.
18042         * threads.c : Added the implementations of mutexes internal calls.
18043
18044 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18045
18046         * metaparse.h: removed unused file.
18047         * reflection.c, reflection.h: added stream_data_align () function 
18048         to align data in streams and keep stream aligned. Add support for
18049         exception support in method headers.
18050
18051 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
18052
18053         * unicode.c: make iconv_convert () return the number of bytess written
18054         in the output buffer.
18055
18056 2002-01-15  Dick Porter  <dick@ximian.com>
18057         * threads.c: Make the runtime's idea of infinite timeouts coincide
18058         with the class library's
18059
18060         Fix a particularly egregious bug in mono_thread_cleanup(). That
18061         code was so utterly bogus it must have been written on a Monday.
18062
18063 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18064
18065         * reflection.h: add subtypes field to TypeBuilder.
18066         * reflection.c: encode constants for literal fields.
18067         Handle subtypes. Fix user string token (and add a zero byte)
18068         at the end.
18069         
18070 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
18071
18072         * class.c (mono_class_init): bug fix: assign slot numbers for
18073         abstract methods.
18074
18075 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18076
18077         * reflection.c: don't try to output a code RVA for abstract methods.
18078         Small fixes for method header format. Output parameter info to the
18079         ParamDef table. Save method overriding info to MethodImpl table.
18080         Fix property support. Allow typedef.extends to be a type in the
18081         building assembly.
18082         * verify.c: fix off-by-one error.
18083
18084 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
18085
18086         * class.c: fix mono_class_from_mono_type () for szarray types.
18087         Remove unused cache check in mono_class_from_type_spec().
18088         * icall.c: *type_from_name () functions handle simple arrays and byref.
18089         * reflection.c: handle byref and szarray types. Handle methods without
18090         body (gets P/Invoke compilation working). Handle types and fields in
18091         get_token ().
18092         * reflection.h: add rank to MonoTypeInfo.
18093
18094 2002-01-10  Dick Porter  <dick@ximian.com>
18095
18096         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
18097         internal calls
18098
18099 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18100
18101         * icall.c: initialize class in type_from_handle ().
18102         Loop also in parent classes for get_method ().
18103         * reflection.c: properly encode class and valuetype types.
18104         Start on encoding TypeBuilder types. Handle fieldrefs.
18105         Use correct length when registering a user string.
18106         Handle ConstructorBuilder and MonoMethod in get_token ().
18107         Make mono_type_get_object () aware of cached types.
18108         * object.c: back out change to mono_string_new ().
18109
18110 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
18111         * object.c: mono_string_new should return a NULL when the string 
18112         passed in is NULL -- not try to deference it.
18113         
18114 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18115
18116         * icall.c: hack to make IsSubType work for TypeBuilders.
18117         * reflection.c: emit constructors before methods.
18118         Retrieve param names in mono_param_get_objects().
18119
18120 2002/01/05  Nick Drochak  <ndrochak@gol.com>
18121
18122         * Makefile.am: fix list of headers and sources so automake 1.5
18123         doesn't complain. Removed \# at end of list.
18124
18125 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18126
18127         * reflection.c: get token for a method ref. Set return type of
18128         constructor to void.
18129         * loader.c: debug message.
18130         * class.c: typo fix.
18131
18132 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
18133
18134         * icall.c: fix array init with rank > 1. FindMembers
18135         loops in parent class as well.
18136         * image.c: do not insert nested types in name cache.
18137         * reflection.c: warning fix.
18138         * reflection.h: add override method (for interface impl).
18139
18140 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
18141
18142         * metadata.c: fix customattr decoding.
18143
18144 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
18145
18146         * rawbuffer.cs: Added native Win32 implementation, avoids using
18147         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
18148
18149 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
18150
18151         * class.c: make the low-level routines handle the cache.
18152
18153 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
18154
18155         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
18156
18157 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
18158
18159         * class.c: fix mono_array_element_size() for objects.
18160         * class.h, class.c: add properties to MonoClass and load them
18161         at init time.
18162         * icall.c: check with isinst() when assigning a value to an array
18163         instead of requiring the classes to match exactly.
18164         Implemented icall for System.Type::GetType().
18165         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
18166         enums. Handle bindingflags when looking for methods and fields.
18167         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
18168         and mono_metadata_methods_from_property().
18169         * reflection.h, reflection.c: added structures for propreties,
18170         parameters and enums. Implemented mono_property_get_object() and
18171         mono_param_get_objects().
18172
18173 2001-12-18  Dick Porter  <dick@ximian.com>
18174
18175         * file-io.c: Use mono_string_to_utf16() instead of
18176         mono_string_chars()
18177
18178         * object.c: Added mono_string_to_utf16(), which copies the non
18179         NULL-terminated MonoString into a new double-null-terminated
18180         buffer.
18181
18182 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
18183
18184         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
18185
18186 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
18187
18188         * file-io.c: raise exceptions if handle is invalid.
18189
18190 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
18191
18192         * assembly.c: yet another check for mscorlib.
18193         * class.c, class.h: load nesting info for classes.
18194         * icall.c: many new functions to support the Reflection classes.
18195         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
18196         * reflection.h, reflection.c: mono_image_create_token(),
18197         mono_assembly_get_object(), mono_type_get_object(),
18198         mono_method_get_object(), mono_field_get_object(): methods to return
18199         objects that parallel the C representation of assemblies, types,
18200         methods, fields.
18201
18202 2001-12-11  Dick Porter  <dick@ximian.com>
18203
18204         * icall.c:
18205         * file-io.c: Internal calls for file IO.
18206
18207 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
18208
18209         * tabledefs.h: missing FileAttributes.
18210         * verify.h, verify.c: use is_valid_string () to simplify and check for
18211         valid strings more correctly. Fix warnings and speeling.
18212         Check more tables: Filed, File, ModuleRef, StandAloneSig.
18213         Check code: branches, maxstack, method calls.
18214
18215 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
18216
18217         * object.c (mono_object_allocate): removed static, so that the jit
18218         can allocate value types.
18219
18220         * icall.c (ves_icall_System_DateTime_GetNow): impl.
18221
18222 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18223
18224         * class.c: init enum types right away and register the
18225         token->MonoClass map in mono_class_create_from_typedef ().
18226         * verify.h, verify.c: first cut of the verifier.
18227         * pedump.c: add --verify switch to verify metadata tables.
18228         * tabledefs.h: add some missing enums.
18229
18230 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
18231
18232         * class.c (mono_install_runtime_class_init): impl.
18233         (mono_class_init): renamed mono_class_metadata_init to
18234         mono_class_init, also removed the metadata_inited flag
18235
18236         * object.c (mono_object_isinst): use faster algorithm
18237
18238 2001-11-30  Radek Doulik  <rodo@ximian.com>
18239
18240         * mono-endian.h: reverted last change
18241         added function prototypes
18242
18243         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
18244         add mono-endian.c back
18245
18246         * mono-endian.c: returned back, as Paolo pointed out, it's needed
18247         for unaligned access, I've mistaked it with endianess. I am
18248         sorry.
18249         (mono_read16): fix reverted endianess
18250         (mono_read64): ditto
18251         (mono_read32): ditto
18252
18253 2001-11-30  Dick Porter  <dick@ximian.com>
18254
18255         * exception.c: Implement mono_exception_from_name()
18256
18257 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18258
18259         * metadata.h, metadata.c: remove params_size and locals_size and their
18260         calculation from the metadata code: they are only usefult to the
18261         interp.
18262
18263 2001-11-29  Radek Doulik  <rodo@ximian.com>
18264
18265         * object.c (mono_ldstr): swap bytes here, it's probably not the
18266         best place, but works for me now, I'll redo it once I know mono
18267         better, also note that I add PROT_WRITE and don't reset back, also
18268         note that it's only affects big endians, so x86 should be OK
18269
18270         * mono-endian.h (read16): use just glib macros for both endians
18271
18272         * mono-endian.c: removed as glib macros are used in in
18273         mono-endian.h so we don't need to care about endianess for read
18274         macros as glib does that for us already
18275
18276 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
18277
18278         * class.h, class.h: take minimum alignment into consideration so
18279         that the fields of a class remain aligned also when in an array.
18280
18281 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18282
18283         * loader.h, loader.c: add mono_method_get_param_names().
18284         * class.c: 0-init class fields.
18285
18286 2001-11-26  Dick Porter  <dick@ximian.com>
18287
18288         * icall.c:
18289         * threads-types.h:
18290         * threads.c: New file that handles System.Threading on all platforms
18291
18292         * object.c: 
18293         * object.h: Remove the synchronisation struct from MonoObject,
18294         replace it with a pointer that gets initialised on demand
18295
18296         * Makefile.am: Replace all the system-specific threading code with
18297         a single file that uses the new wrapper library
18298
18299 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
18300
18301         * class.c, class.h: add mono_install_trampoline() so that the runtime
18302         can register a function to create a trampoline: removes the ugly
18303         requirement that a runtime needed to export arch_create_jit_trampoline.
18304         * object.h, object.c: added mono_install_handler() so that the runtime
18305         can install an handler for exceptions generated in C code (with
18306         mono_raise_exception()). Added C struct for System.Delegate.
18307         * pedump.c: removed arch_create_jit_trampoline.
18308         * reflection.c: some cleanups to allow registering user strings and
18309         later getting a token for methodrefs and fieldrefs before the assembly
18310         is built.
18311         * row-indexes.h: updates and fixes from the new ECMA specs.
18312
18313 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
18314
18315         * class.h, class.c: add enum_basetype field to MonoClass.
18316         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
18317         to get index in the constant table reated to a field, param or
18318         property.
18319         * reflection.h, reflection.c: handle constructors. Set public-key and
18320         version number of the built assembly to 0.
18321         * row-indexes.h: update from new ECMA spec.
18322
18323 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18324
18325         * class.h, class.c: add a max_interface_id to MonoClass.
18326         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
18327         since it's used to do that. Added mono_type_type_from_obj().
18328         Make GetType() return NULL instead of segfaulting if the type was not
18329         found. Handle simple arrays in assQualifiedName.
18330         * object.h: add a struct to represent an Exception.
18331         * reflection.c: output call convention in method signature.
18332         Add code to support P/Invoke methods and fixed offsets for fields.
18333
18334 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
18335
18336         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
18337         the value.
18338         * icall.c: use mono_array_addr instead of array->vector: fixes the
18339         reflection image writing.
18340         * reflection.c: init call convention byte to 0 in method signature.
18341         Encode the property signature. Don't output property-related methods
18342         twice. Really process the properties for a type (don't cast a field to
18343         a property, my mom always told me that).
18344         Fix 64 bit issues in pointer alignment in a different and more
18345         readable way.
18346
18347 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
18348
18349         * loader.h: Removed type class from MonoDefaults, added monotype
18350
18351         * loader.c: Loaded MonoType, removed loading of Type
18352
18353         * icall.c (my_mono_new_object): Now returns a System.MonoType,
18354         and fills in System.Type._impl with a RuntimeTypeHandle rather
18355         than the actual MonoClass *
18356
18357         (ves_icall_type_from_handle): change from type_class to
18358         monotype_class
18359
18360         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
18361         implemented
18362
18363         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
18364         implemented
18365
18366         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
18367
18368         (ves_icall_System_Reflection_Assembly_GetType): implemented
18369
18370         (ves_icall_System_MonoType_assQualifiedName): implemented
18371
18372         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
18373
18374 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
18375
18376         * assembly.c (mono_assembly_open): Implement a cache for the
18377         assemblies. 
18378
18379         (mono_assembly_close): only destroy the assembly when the last
18380         reference is gone.
18381         
18382 2001-11-09  Dick Porter  <dick@ximian.com>
18383
18384         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
18385
18386 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
18387
18388         * class.c (mono_class_metadata_init): bug fix: compute the right slot
18389
18390 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18391
18392         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
18393         from Martin Weindel.
18394         * object.h: add mono_string_chars ().
18395
18396 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
18397
18398         * reflection.c (build_compressed_metadata): Eliminates warnings
18399         and uses 64-bit clean code.
18400
18401         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
18402         (mono_type_equal): Change signature to eliminate warnings.
18403
18404 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18405
18406         * icall.c, loader.c: remove the internalcall array constructors.
18407         Changes to match the new MonoArray structure.
18408         * object.h, object.c: an array object doesn't allocate an extra
18409         vector. Add mono_array_new_full () to create jagged arrays easily.
18410
18411 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18412
18413         * metadata.h, metadata.c: add mono_metadata_field_info () to
18414         retreive all the info about a field from vairous tables.
18415         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
18416         * class.h, class.c: augment MonoClassField with more info.
18417         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
18418         policy and load a field's RVA if needed.
18419
18420 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
18421
18422         * class.c (mono_class_metadata_init): create a trampoline for all
18423         virtual functions instead of actually compiling them.
18424
18425 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
18426
18427         * class.h, class.c: include name in MonoClassField.
18428         * class.c: fix fundamental type of System.Object and System.String.
18429         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
18430         tokens in ldtoken.
18431         * icall.c: remove internalcalls for the Reflection stuff that is now
18432         done in C# code.
18433         * loader.c: mono_field_from_memberref () implementation.
18434         * mono-endian.c: thinko (s/struct/union/g).
18435         * object.c, object.h: make the mono_string_* prototypes actually use
18436         MonoString instead of MonoObject.
18437         * reflection.c, reflection.h: updates for changes in the reflection
18438         code in corlib: we use C structures that map to the actual C# classes.
18439         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
18440         fat method header if needed and use the info from the ILGenerator for
18441         methods. Handle fields in types. Misc fixes.
18442
18443 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
18444
18445         * class.c (mono_class_metadata_init): bug fix: always allocate
18446         space for static class data
18447
18448 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
18449
18450         * class.c (mono_compute_relative_numbering): use relative
18451         numbering to support fast runtime type checks.
18452
18453 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
18454
18455         * class.c (mono_class_create_from_typeref): added debugging output
18456         to print class name when MonoDummy is returned instead of real class
18457
18458 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
18459
18460         * class.c (mono_class_metadata_init): interface offset table now
18461         contains pointers into the vtable - this is more efficient for the jit
18462
18463 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
18464
18465         * class.c (mono_class_metadata_init): use a temporary vtable (the
18466         old algorithm only worked for the interpreter, but not for the jit)
18467
18468 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
18469
18470         * loader.c (method_from_memberref): use mono_class_get to get the
18471         class of an array instead of using System.Array directly.
18472         (mono_get_method): also add MEMBERREF methods to the method cache
18473         which usefull for arrays.
18474
18475 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
18476
18477         * pedump.c (arch_compile_method): added to compute vtable entry
18478
18479         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
18480         number of interfaces.
18481         
18482         * class.h: merged MonoArrayClass into MonoClass
18483
18484         * class.c (mono_class_create_from_typedef): compute the vtable size and
18485         allocate space to include the vtable inside MonoClass
18486         (mono_class_metadata_init): initialize the vtable
18487
18488 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
18489
18490         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
18491         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
18492         * image.c: endian fixes by Laurent Rioux.
18493         * object.h, object.c: rename MonoStringObject to MonoString and
18494         MonoArrayObject to MonoArray. Change some function names to conform to
18495         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
18496         guint16* as first argument, so don't use char*.
18497         Provide macros to do the interesting things on arrays in a portable way.
18498         * threads-pthread.c: updates for the API changes and #include <sched.h>
18499         (required for sched_yield()).
18500         * icall.c: updates for the API changes above.
18501         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
18502         platforms that need them.
18503
18504 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
18505
18506         * class.c: set the correct type for all the fundamental
18507         type when loading the class.
18508
18509 2001-10-05  Dick Porter  <dick@ximian.com>
18510
18511         * threads-pthread.c (pthread_mutex_timedlock): Simple
18512         compatibility version for C libraries that lack this call.
18513
18514 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18515
18516         * class.c: MonoTypes stored in MonoClass are stored as
18517         fundamental MonoTypes when the class represents a
18518         fundamental type (System.Int32, ...).
18519         The TypeHandle return by ldtoken is a MonoType*.
18520         * icall.c: ves_icall_get_data_chunk () write out all the
18521         PE/COFF stuff. Implement ves_icall_define_method (),
18522         ves_icall_set_method_body (), ves_icall_type_from_handle ().
18523         * image.c: properly skip unknown streams.
18524         * loader.h, loader.c: add type_class to mono_defaults.
18525         * metadata.c, metadata.h: export compute_size () as
18526         mono_metadata_compute_size () with a better interface.
18527         Typo and C&P fixes.
18528         * pedump.c: don't try to print the entry point RVA if there is no entry point.
18529         * reflection.c, reflection.h: many cleanups, fixes, output method
18530         signatures and headers, typedef and typeref info, compress the metadata
18531         tables, output all the heap streams, cli header etc.
18532         * row-indexes.h: typo fixes.
18533
18534 2001-10-04  Dick Porter  <dick@ximian.com>
18535
18536         * object.h: Add a synchronisation mutex struct to MonoObject
18537
18538         * object.c (mono_new_object): Initialise the object
18539         synchronisation mutexes
18540
18541         * icall.c: System.Threading.Monitor internal calls
18542         
18543         * threads-pthread.h:
18544         * threads-pthread.c: System.Threading.Monitor internal calls
18545
18546         * threads-types.h: New file, includes the system-specific thread
18547         structures
18548         
18549         * threads-pthread-types.h:
18550         * threads-pthread-types.c: New files, handle pthread-specific
18551         synchronisation types
18552
18553         * threads-dummy-types.h: 
18554         * threads-dummy-types.c: New files of dummy support for
18555         thread-specific types
18556
18557         * metadata.c:
18558         * image.c:
18559         * pedump.c: include mono-endian.h not endian.h
18560         
18561         * Makefile.am: More threads files.
18562         Name mono-endian.h not endian.h
18563
18564 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
18565
18566         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
18567         stuff and implement a few more bits.
18568         * icall.c: a field needs to be dereferenced twice. Do not use the same
18569         name for two variables in the same scope.
18570         * image.c, image.h: cleanups.
18571
18572 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
18573
18574         * class.c (mono_class_metadata_init): bug fix: compute the right size
18575
18576 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
18577
18578         * icall.c: implemented some of the Reflection internalcalls.
18579         * image.c, image.h: start writing out the PE/COFF image.
18580         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
18581         that does the reverse than decode_blob_size ().
18582         * object.c: use mono_metadata_encode_value (). Move here
18583         temporary implementation of mono_string_to_utf8 ().
18584         * rawbuffer.c: make malloc_map static.
18585
18586 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18587
18588         * metadata.c: fix type comparison for arrays.
18589         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
18590         Added a couple of new classes to monodefaults.
18591         * icall.c: added a couple of Reflection-related internalcalls.
18592         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
18593         Added a byval_arg MonoType to MonoClass.
18594
18595 2001-09-28  Dick Porter  <dick@ximian.com>
18596
18597         * icall.c:
18598         * threads-pthread.h: 
18599         * threads-pthread.c: Implemented internal calls for
18600         LocalDataStoreSlot operations.  Applied mutexes around all shared
18601         data.  Reworked the thread creation and Start() operations to
18602         avoid a race condition.
18603         
18604         * threads-dummy.h:
18605         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
18606
18607 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
18608
18609         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
18610
18611 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
18612
18613         * class.c, loader.c: warn and return NULL instead of erroring out.
18614         * icall.c: added System.AppDomain::getCurDomain().
18615         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
18616
18617 2001-09-25  Dick Porter  <dick@ximian.com>
18618
18619         * threads-pthread.h:
18620         * threads-pthread.c: Implemented timed thread joining and added
18621         System.Threading.Thread::Join_internal internal call
18622
18623         * icall.c: Added System.Threading.Thread::Join_internal internal call
18624
18625         * threads-dummy.h:
18626         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
18627
18628 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
18629
18630         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
18631         mono_string_intern () to implement the semantics of the ldstr opcode
18632         and the interning of System.Strings.
18633         * icall.c: provide hooks to make String::IsIntern and String::Intern
18634         internalcalls.
18635
18636 2001-09-23  Dick Porter  <dick@ximian.com>
18637
18638         * threads-dummy.c: 
18639         * threads-dummy.h: New files of dummy threading routines
18640
18641         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
18642         support code based on system specifics
18643
18644         Rename PTHREAD_LIBS to THREAD_LIBS
18645         
18646 2001-09-23  Dick Porter  <dick@ximian.com>
18647
18648         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
18649         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
18650         internal calls.
18651         (mono_thread_init): Set up a Thread object instance to return when
18652         the main thread calls Thread.CurrentThread
18653         (mono_thread_cleanup): Wait for all subthreads to exit
18654
18655         * icall.c: New internal calls for System.Threading.Thread::Sleep
18656         (including Schedule) and CurrentThread
18657
18658         * threads.h: New file, to insulate thread-specific stuff from the
18659         rest of the code
18660
18661 2001-09-21  Dick Porter  <dick@ximian.com>
18662
18663         * threads-pthread.h: 
18664         * threads-pthread.c: New file, for handling pthreads-style
18665         threading support.  Start() now starts a new thread and executes
18666         the ThreadStart delegate instance.
18667
18668         * icall.c: Added the internalcall for
18669         System.Threading.Thread::Start_internal
18670
18671         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
18672
18673 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
18674
18675         * loader.c: work around the different signatures for delegates
18676         constructors csc generates in compiled code vs the ones compiled in mscorlib.
18677
18678 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
18679
18680         * class.h, class.c: add mono_class_get_field_from_name ().
18681         * *: Fix C comments and other ANSI C issues.
18682
18683 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
18684
18685         * endian.h, assembly.c: fix some endianness issues.
18686
18687 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
18688
18689         * loader.h, load.c: add delegate_class to mono_defaults.
18690         Handle runtime provided methods in mono_get_method ().
18691
18692 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
18693
18694         * loader.c (mono_get_method): use pinvoke for internal call
18695
18696         * icall.c: use pinvoke for internal call
18697
18698         * loader.c (method_from_memberref): set the method name
18699
18700 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
18701
18702         * metadata.c: help the compiler generate better code for
18703         mono_class_from_mono_type ().
18704
18705 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
18706
18707         * class.c (mono_class_metadata_init): delayed computing of the
18708         class size to mono_class_metadata_init ()
18709
18710 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
18711
18712         * class.c, class.h: add an interfaces member to MonoClass.
18713         * image.c, image.h: add assembly_name field to MonoImage
18714         from the assembly table.
18715         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
18716
18717 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
18718
18719         * class.c: Handle Array in mono_class_from_mono_type ().
18720         * metadata.c, pedump.c: some endian fixes.
18721
18722 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
18723
18724         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
18725         * metadata.c: fix small problem introduced with the latest commit.
18726
18727 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
18728
18729         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
18730         We don't need a MonoMetadata pointer anymore to compare signatures in
18731         mono_metadata_signature_equal (), update callers.
18732         Reduced memory usage an number of allocations for MonoMethodHeader and
18733         MonoMethodSignature.
18734
18735 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
18736
18737         * metadata.c: added compare for szarray.
18738
18739 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
18740
18741         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
18742         and add a couple more types to it and mono_defaults. Give an hint on
18743         classes that need implementing in our corlib and are referenced
18744         in mscorlib.
18745
18746 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
18747
18748         * class.h, class.c: keep track if a class is also an Enum.
18749         * loader.c: Implement a couple more types for use in libffi
18750         marshalling. Gives better diagnostics when failing to dlopen
18751         a library. Set method->klass for P/Invoke methods, too.
18752
18753 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
18754
18755         * class.c, class.h: add a MonoType this_arg to MonoClass that
18756         represents a pointer to an object of the class' type that
18757         can be used by the interpreter and later the type cache.
18758         Add best guess alignment info for valuetype objects.
18759
18760 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
18761
18762         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
18763         into MonoType: one less level of indirection and allocation and
18764         simplifies quite a bit of code. Added cache for MonoTypes that are
18765         used frequently, so that we don't need to allocate them all the time.
18766
18767 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
18768
18769         * class.c (mono_class_create_from_typedef): System.Enum is also a
18770         value type, although it does not derive from System.ValueType
18771         (maybe a bug in the ms compiler?)
18772
18773         * metadata.c (mono_type_size): return the right size for value types
18774
18775         * loader.c (mono_get_method): only initialize method header if not abstract
18776
18777         * class.c (mono_class_from_mono_type): use mono_default values. 
18778
18779 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
18780
18781         * *: use MonoClass pointers instead of <type_tokens>
18782         
18783         * class.h: new flag: metadata_inited.
18784
18785         * class.c (mono_class_metadata_init): impl.
18786         (mono_class_instance_size): impl.
18787         (mono_class_data_size): impl.
18788
18789 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18790
18791         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
18792         MonoClass now has the name and name_space fields. 
18793         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
18794         mono_get_method () takes and optional MonoClass as argument.
18795         Removed mono_typedef_from_name() and added mono_class_token_from_name()
18796         instead that takes advantage of a map from class names to typedef
18797         tokens in MonoImage.
18798
18799 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
18800
18801         * metadata.c: zero is not a valid alignment boundary.
18802         Merge MONO_TYPE_VOID in default decoding code.
18803
18804 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
18805
18806         * image.h: merged MonoMetadata into MonoImage
18807
18808         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
18809         identify the type of elements.
18810
18811 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
18812
18813         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
18814         * cil-coff.h: split MonoMSDOSHeader and add size info.
18815         * image.c: add some consistency checks.
18816         * metadata.c: fix row size computation: one programmer
18817         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
18818         add explanation for the locator routine.
18819         Fix decoding of size in method header.
18820         
18821 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
18822
18823         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
18824         (g_concat_dir_and_file): Bring g_concat_dir_and_file
18825         function from gnome-libs.  This uses the right path separator
18826         based on the OS, and also works around a bug in some systems where
18827         a double slash is not allowed. 
18828         (default_assembly_name_resolver): Use g_concat_dir_and_file
18829         (mono_assembly_open): ditto.
18830
18831 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
18832
18833         * metadata.c (mono_metadata_signature_equal): impl.
18834
18835         * *: void is now a realy MonoType (instead of using NULL)
18836         
18837         * metadata.c (do_mono_metadata_parse_type): use
18838         mono_metadata_parse_type to parse void value.
18839
18840 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
18841
18842         * metadata.c, metadata.h: in the signature and method header store
18843         only the space required for holding the loca vars and incoming arguments.
18844
18845 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
18846
18847         * metadata.c (do_mono_metadata_parse_type): treat void like any
18848         other type (instead of assigning NULL);
18849
18850 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
18851
18852         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
18853
18854 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
18855
18856         * image.c (do_mono_image_open): added a cache for arrays.
18857
18858 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
18859
18860         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
18861         decode a single column from a row in a metadata table and changes
18862         to take advantage of it in the typedef locator (gives a nice speed up).
18863         Store offset info for function params.
18864
18865 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
18866
18867         * image.h (MONO_IMAGE_IS_CORLIB): removed 
18868
18869 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
18870
18871         * assembly.c: how could mono_assembly_close () had ever worked?
18872         * metadata.c, metadata.h: provide offset info for local vars.
18873         Implement mono_type_size () to take care of alignment as well
18874         as size (it was mono_field_type_size in cli/class.c before).
18875
18876 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
18877
18878         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
18879
18880         * assembly.h (CORLIB_NAME): set to corlib.dll
18881
18882         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
18883
18884 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
18885
18886         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
18887         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
18888         tokentype.h: massive namespace cleanup.
18889
18890 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
18891
18892         * metadata.h, metadata.c: decode exception clauses when parsing method header.
18893
18894 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
18895
18896         * metadata.c (mono_metadata_free_type): added check for type !=
18897         NULL (void) before calling mono_metadata_free_type()
18898
18899 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
18900
18901         * metadata.h, row_indexes.h: added header with enumerations to use
18902         to index in the columns from tables in metadata and to decode coded
18903         tokens: we should start using this instead of embedding magic numbers
18904         all over the code.
18905
18906 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
18907
18908         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
18909         Move metadata_t info from cli_image_info_t to MonoImage, where
18910         it's easily accessible. Changed all the uses accordingly.
18911         Added the method and class caches to MonoImage.
18912         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
18913         and mono_metadata_decode_value () signature to be more consistent
18914         with the other parse functions (and simplify code). Taken advantage
18915         of zero-length array allocation with GCC. Removed reduntant (and
18916         wrong) MonoFieldType struct and use MonoParam instead. Changed
18917         mono_metadata_parse_field_type () to use common code for parsing.
18918         Added mono_metadata_typedef_from_field () and
18919         mono_metadata_typedef_from_method () to lookup a typedef index from a
18920         field or method token.
18921         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
18922
18923 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
18924
18925         * metadata.c (mono_metadata_parse_field_type): Implement. 
18926         (do_mono_metadata_parse_type): Split engine from
18927         mono_metadata_parse_type, so that we can create smaller structures
18928         for things that just have one pointer to the MonoType (look at
18929         the MonoFieldType)
18930
18931 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
18932
18933         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
18934         as Jan Gray found out, it is incorrect. 
18935
18936 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
18937
18938         * assembly.c: Implement asssembly loading.  This loads an image
18939         and loads all the referenced assemblies.  Come to think of it, we
18940         could always do lazy loading of the assemblies. 
18941
18942         * image.c (mono_image_open): Keep loaded images in a hashtable.
18943
18944         * image.h (MonoImage): Add reference count.
18945
18946 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
18947
18948         * assembly.c (mono_assembly_open): Keep track of the file name in
18949         case the assembly has no ASSEMBLY table.
18950
18951         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
18952         from get.c here.
18953
18954 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
18955
18956         * metadata.c, metadata.h: decode local vars in method header
18957         parse function. Change callers accordingly.
18958
18959 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
18960
18961         * metadata.h, cil-coff.h: protect against multiple inclusion.
18962         Added some new structures to hold information decoded from metadata:
18963         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
18964         and relevant decoding/free functions.
18965         * metadata.c: implement decoding functions. Add warning for out of bounds
18966         index in mono_metadata_locate(). Implement mono_get_method () to retreive
18967         all the info about a method signature and invocation. Remove check on
18968         uninitialized local var in parse_mh() and fix memory leak.
18969
18970 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
18971
18972         * metadata.h: More macros.
18973
18974         * tokentype.h: New file.
18975
18976 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
18977
18978         * assembly.c: added a consistency check and initialize
18979         some structures with g_new0().
18980         * metadata.c: fixed a couple more bugs in table size computation
18981         and add other checks for out-of bound access to metadata.
18982
18983 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
18984
18985         * metatada.c: fix bugs computing table sizes. Spew a
18986         warning when index in string heap is out of bounds.
18987
18988 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
18989
18990         * metadata.h: Add a couple of macros to manipulate tokens. 
18991
18992 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
18993
18994         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
18995         cli_section_tables).
18996
18997 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
18998
18999         * metadata.c (mono_metadata_user_string): New function, provides
19000         access to the UserString heap. 
19001
19002 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
19003
19004         * metadata.c: Add inline documentation.
19005
19006 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
19007
19008         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
19009         files. 
19010
19011 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
19012
19013         * typeattr.h: New file, TypeAttribute flags. 
19014
19015 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
19016
19017         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
19018         mono_assembly_ensure_section): Section loading code.
19019         (load_section_tables): Load the sections.
19020
19021         * mono/metadata/metadata.c (mono_metadata_locate_token,
19022         mono_metadata_locate): Functions to locate the information
19023         definition given a token or a table and an index.
19024         (mono_metadata_compute_table_bases): New.
19025         (compute_size): New function to compute the sizes of the various
19026         tables.
19027
19028         * mono/metadata/metadata.h: Finish listing the different index
19029         types. 
19030
19031         * mono/metadata/pedump.c: Improve to dump new information.
19032
19033 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
19034
19035         * mono/metadata/metadata.c: Entered all the tables matching
19036         Beta2. 
19037
19038         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
19039
19040
19041