2006-07-14 Dick Porter <dick@ximian.com>
[mono.git] / mono / metadata / ChangeLog
1 2006-07-14  Dick Porter  <dick@ximian.com>
2
3         * object.c (mono_type_initialization_cleanup): Fix a race
4         condition by temporarily commenting out the critical section
5         deletion.
6
7 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
8
9         * reflection.c (create_custom_attr): Fix some warnings.
10         (create_custom_attr_data): Ditto.
11         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
12         types. Fixes #78855.
13
14 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
15
16         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
17
18         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
19
20 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
21
22         * reflection.c (resolve_object): Add support for DynamicMethod.
23
24         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
25         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
26
27 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
28
29         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
30         don't leak GPtrArray's pdata has we have no use (nor free) for it.
31
32 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
33
34         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
35         Fixes #77888.
36
37 2006-06-30  Raja R Harinath  <rharinath@novell.com>
38
39         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
40         slightly: remove a shadow local variable.
41
42 2006-06-29  Raja R Harinath  <rharinath@novell.com>
43
44         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
45         definition that introduces the virtual function slot.
46         Also fix Coverity #105.
47
48 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
49
50         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
51         for dynamic assemblies. Fixes #78724.
52
53 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
54
55         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
56         Fixes #78722.
57
58 2006-06-21  Martin Baulig  <martin@ximian.com>
59
60         * reflection.c
61         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
62         fixes #76484.
63
64 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
65
66         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
67
68 2006-06-20  Raja R Harinath  <rharinath@novell.com>
69
70         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
71         nor TYPEREFs.
72         * class.c (mono_class_create_from_typespec): Add 'context' argument.
73         Inflate result if necessary.
74         (mono_class_get_full): Remove old version.  Rename from
75         'mono_class_get' and add 'context' argument.  Pass it to
76         ..._create_from_typespec.
77         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
78         (mono_ldtoken): Revert change below.
79
80 2006-06-20  Martin Baulig  <martin@ximian.com>
81
82         * class.c (mono_ldtoken): Don't pass the generic context to
83         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
84
85 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
86
87         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
88         and later freeing it. Fixes #78638.
89
90 2006-06-15  Miguel de Icaza  <miguel@novell.com>
91
92         * icall.c (mono_class_get_throw): Revert over-zealous error
93         throwing, the caller for mono_class_get_throw will cope with
94         errors when classes are not properly initialized already.
95
96         The code still copes with loader exceptions though.
97
98         Fixes the regression in reftype1 and reftype3 from the CAS tests.
99         
100 2006-06-14  Miguel de Icaza  <miguel@novell.com>
101
102         Fixes the `make run1' version of RuntimeAbort (to be commited,
103         source is in Bugzilla).
104         
105         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
106         FALSE on class loading failure instead of returning true.
107
108         * class.c (mono_class_create_from_typedef): It is possible for
109         mono_metadata_interfaces_from_typedef_full to fail if a class is
110         not found, cope with this.
111         
112
113 2006-06-14  Dick Porter  <dick@ximian.com>
114
115         * socket-io.c: 
116         * process.c: Fix a bunch of signed/unsigned warnings from gcc
117         4.1.1
118
119 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
120
121         * culture-info-table.h : oops, forgot to make it nsync with r61548.
122
123 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
124
125         * icall.c: Another fix for building mono in Visual Studio.
126
127 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
128
129         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
130         
131 2006-06-09  Martin Baulig  <martin@ximian.com>
132
133         * debug-mono-symfile.c: Put this back and really fix it this
134         time. Sorry for all the trouble.
135
136 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
137
138         * icall.c (mono_class_get_throw): Fix a warning.
139         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
140         ReflectionTypeLoadException if needed. Fixes #78606.
141
142         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
143         (mono_class_init): Ditto.
144
145         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
146         ref_only exceptions.
147         (mono_loader_clear_error): Make this work even if there is no error.
148
149 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
150
151         * object-internals.h marshal.c marshal.h icall.c: Implement method 
152         Marshal.GetComSlotForMethodInfo using internal call.
153
154 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
155
156         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
157         a function for signalling it.
158
159         * class.c (mono_class_from_typeref): Use the new kind of loader error when
160         a referenced assembly is not found.
161
162         * loader.c (mono_loader_error_prepare_exception): Add support for 
163         LOADER_ERROR_ASSEMBLY. Fix formatting.
164
165 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
166
167         * domain.c appdomain.c class-internals.h marshal.c: Add support 
168         for VARIANT marshalling on windows and increment corlib version
169         since Variant struct was added.
170
171 2006-06-03  Miguel de Icaza  <miguel@novell.com>
172
173         * debug-mono-symfile.c: Revert Martin's previous patch which broke
174         stack trace line information:
175
176         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
177         (Martin) when looking up B which is between A and C, return A not C.
178
179         Bug is #78573.
180
181         Thanks to Alexander Olk for tracking this down.
182
183 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
184
185         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
186         
187         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
188         avoid clobbering its value.
189         (mono_string_to_lpstr): Fix a warning on windows.
190
191 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
192
193         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
194
195         * reflection.c loader.c: Removed references to 'dummy' flag.
196
197         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
198
199         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
200         it gets GC tracking.
201
202         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
203         GC tracking.
204         
205         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
206
207         * marshal.c threadpool.c: Update callers of mono_async_result_new.
208
209         * appdomain.c: Bump corlib version.
210
211 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
212
213         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
214         CEE_STIND_REF when working with object references.
215
216 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
217
218         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
219         Fixes #78539.
220
221 2006-05-30  Miguel de Icaza  <miguel@novell.com>
222
223         * loader.c (method_from_memberref): Fix argument value for
224         mono_loader_set_error_method_load (I was passing the MonoClass
225         instead of the class name char *).
226
227 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
228
229         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
230         CEE_STIND_REF when working with object references.
231
232 2006-05-30  Martin Baulig  <martin@ximian.com>
233
234         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
235         mono_method_full_name() change and replace the ':' with a '.'
236         here.
237
238 2006-05-30  Martin Baulig  <martin@ximian.com>
239
240         * debug-mono-symfile.c
241         (mono_debug_symfile_lookup_location): Fix the algorithm:
242         when looking up B which is between A and C, return A not C.
243
244 2006-05-29  Martin Baulig  <martin@ximian.com>
245
246         * mono-debug.h
247         (MonoDebugMethodInfo): Make the typedef public.
248         (MonoDebugSourceLocation): New public struct.
249
250         * mono-debug.c
251         (mono_debug_source_location_from_address): Removed.
252         (mono_debug_source_location_from_il_offset): Removed.
253         (mono_debug_il_offset_from_address): Removed.
254         (mono_debug_address_from_il_offset): Removed.
255         (mono_debug_lookup_method): New public function.
256         (mono_debug_lookup_source_location): New public function; replaces
257         the old mono_debug_source_location_from_*() functions; see the
258         inline documentation.
259         (mono_debug_free_source_location): New public function.
260         (mono_debug_print_stack_frame): New public function; see the
261         inline documentation.
262
263         * debug-mono-symfile.c
264         (mono_debug_find_source_location): Renamed into
265         mono_debug_symfile_lookup_location(); only take a
266         `MonoDebugMethodInfo *' and an `offset' argument; added inline
267         documentation.
268         (mono_debug_find_method): Renamed into
269         mono_debug_symfile_lookup_method().
270
271 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
272
273         * assembly.c (mono_assembly_open_full): Dont overwrite the status
274         returned by mono_image_open_full ().
275
276         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
277         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
278         #78517.
279
280         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
281         #78518.
282
283 2006-05-27  Miguel de Icaza  <miguel@novell.com>
284
285         * class.c (mono_class_from_typeref): handle missing images
286         earlier, deals with bug #78418.   Refactor code; 
287
288         Fix a warning introduced in my previous commit (some stale code
289         from before I revisited my patch).
290
291         * class.c (mono_class_create_from_typedef): On failure, remove the
292         class from the MonoImage->class_cache as the class is not
293         initialized;   Fixes the leak pointed out by Paolo.
294
295 2006-05-25  Dick Porter  <dick@ximian.com>
296
297         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
298         DeleteCriticalSections until I figure out which one may still be
299         sometimes locked when mono_thread_cleanup is called.
300
301 2006-05-24  Dick Porter  <dick@ximian.com>
302
303         * threads.c (mono_thread_cleanup): Move the threading cleanup out
304         of mono_thread_manage and back into its own function, so it can be
305         called after the finalizer thread has finished.
306
307         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
308
309 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
310
311         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
312         Fixes #78495.
313
314         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
315         with non-blittable elements.
316         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
317
318 2006-05-24  Martin Baulig  <martin@ximian.com>
319
320         * mono-debug-debugger.h (MonoDebuggerEvent): Added
321         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
322
323         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
324         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
325         `mono_debugger_event_handler' to NULL.
326
327 2006-05-24  Martin Baulig  <martin@ximian.com>
328
329         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
330
331 2006-05-24  Martin Baulig  <martin@ximian.com>
332
333         * mono-debug-debugger.h
334         (mono_debugger_create_notification_function): Added
335         `MonoCodeManager *' argument.
336
337 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
338
339         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
340
341 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
342
343         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
344         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
345         implementation.
346
347 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
348
349         * icall.c: precise GC support: objects can't be stored in unmanaged
350         memory anymore, even if they are kept alive by other references: since
351         they can move the GC needs to be able to always find them.
352
353 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
354
355         * object.c: precise GC support for static fields. Support
356         for moving GCs: write barriers and pinned allocation for interned
357         strings.
358
359 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
360
361         * domain.c, domain-internals.h: precise GC support for the MonoDomain
362         structure.
363
364 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
365
366         * class.c, gc.c: sgen and precise GC updates.
367
368 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
369
370         * marshal.h, marshal.c: added write barrier wrapper and precise type
371         fixes.
372
373 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
374
375         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
376         support.
377
378 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
379
380         * reflection.c: precise and sgen GC updates.
381
382 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
383
384         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
385
386 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
387
388         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
389
390 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
391
392         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
393         MONO_TYPE_OBJECT. Fixes #78462.
394
395 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
396
397         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
398         and blittable types.
399
400 2006-05-17  Miguel de Icaza  <miguel@novell.com>
401
402         * class.c (mono_class_get_exception_for_failure): Implement parts
403         of a TODO: if the loader error is set (instead of the class
404         error), we return a Loader exception that can be properly thrown
405         elsewhere.
406
407         This was exposed by some Winforms 2.0 code that I tried to run
408         (Atsushi pointed me to it).
409
410 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
411
412         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
413         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
414         
415         * marshal.c (emit_marshal_vtype): Add limited support for 
416         UnmanagedType.LPStruct. Fixes #78427.
417
418         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
419         Applied a patch from kangaroo to fix #77523.
420
421 2006-05-17  Martin Baulig  <martin@ximian.com>
422
423         * threads.c
424         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
425         (debugger_thread_created): Removed.
426         (debugger_thread_exited): Removed.
427
428 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
429
430         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
431
432         * object-internals.h (MonoReflectionResource): Sync with managed version.
433
434 2006-05-12  Wade Berrier <wberrier@novell.com>
435
436         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
437
438 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
439
440         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
441         functions try to allocate from the image mempool.
442
443 2006-05-12  Dick Porter  <dick@ximian.com>
444
445         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
446
447 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
448
449         * object.c: The FieldGetter and FieldSetter methods require the full
450         name of the class, not only the name. Fixes bug #78277.
451
452 2006-05-11  Miguel de Icaza  <miguel@novell.com>
453
454         * loader.c (method_from_memberref): Do not pass the NULL klass to
455         mono_loader_set_error_() methods.  Pass the non-NULL value
456         (class). 
457
458 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
459
460         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
461         (mono_assembly_close): Null out assembly->image->references after freeing it.
462
463         * image.c (mono_image_close): Free image->references.
464         
465         * reflection.c (mono_image_basic_init): Fix a small memory leak.
466
467 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
468
469         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
470         before checking if it's NULL (g_assert).
471
472 2006-05-10  Martin Baulig  <martin@ximian.com>
473
474         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
475         I thought I already killed that two months ago, but now it somehow reappeared.
476
477 2006-05-10  Martin Baulig  <martin@ximian.com>
478
479         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
480
481 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
482
483         * reflection.c: Allocate memory for dynamically created methods in the image
484         mempools.
485
486 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
487
488         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
489         don't use the ad pointer before checking if it's NULL (g_assert).
490
491 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
492
493         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
494         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
495
496         * marshal.c: Allocate all signatures from mempools.
497
498         * marshal.c: Allocate some more signatures from mempools.
499
500 2006-05-09  Miguel de Icaza  <miguel@novell.com>
501
502         * object.c (mono_load_remote_field): The code used to provide a
503         temporary variable for returning results if the user did not
504         provide a result pointer.  But our temporary variable was allocted
505         on the satck.
506
507         Fix calling code to always pass a result area.   Coverity ID 103.
508
509 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
510
511         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
512         value, not the old. Fixes #78312.
513         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
514
515         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
516         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
517         per-image cache.
518
519         * assembly.c (mono_assembly_close): Free image->references.
520
521         * assembly.c (mono_assembly_names_equal): Fix a warning.
522         (mono_assemblies_cleanup): Cleanup more global data.
523
524         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
525
526         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
527         ptr_cache and image->modules.
528
529         * image.c (mono_image_init): Allocate array_cache lazily.
530         
531 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
532
533         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
534         behavior was changed recently and has bad side effects.
535
536 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
537
538         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
539         
540         * assembly.c (mono_assembly_close): Remove a debug printf.
541
542         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
543
544         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
545         to also allow for temporary references between mono_image_open ()/close ().
546
547         * domain.c (get_runtimes_from_exe): Add a FIXME.        
548
549 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
550
551         * marshal.c: Fix support for dynamic methods.
552
553         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
554
555         * marshal.c (mono_marshal_cleanup): New cleanup function.
556
557         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
558         image mempools.
559
560         * class.c (mono_class_init): Fix leaking class->nested_classes.
561
562         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
563
564         * image.c (mono_image_init): Initialize the new cashes.
565
566         * image.c (mono_image_close): Destroy the new cashes.
567
568         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
569
570         * mempool.c (mono_mempool_strdup): New helper function.
571
572         * class-internals.h: Add prototype for mono_loader_unlock ().
573
574         * domain.c (mono_jit_info_table_find): Fix a warning.
575         (mono_debugger_check_runtime_version): Ditto.
576
577         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
578         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
579         functions to these modules.
580
581         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
582         metadata modules.
583         
584         * marshal.c (mono_free_bstr): Fix a warning.
585
586         * assembly.c (mono_assembly_open_full): Fix another small leak.
587
588         * object.c: Fix some unload leaks in the remoting code.
589
590         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
591         function.
592
593         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
594
595         * reflection.c: Fix some unload leaks in dynamic assemblies.
596
597 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
598
599         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
600         * marshal.h: Add BSTR support on Win32
601         * icall.c: Add BSTR icalls
602         * metadata.h: Add BSTR enums
603
604 2006-04-28  Miguel de Icaza  <miguel@novell.com>
605
606         Work to catch the crash from #76795 and turn it into an
607         exception.   As I stubbed out pieces of the VisualBasic support,
608         I found a number of places where the code was failing and I added
609         checks to those places. 
610         
611         * metadata.c (do_mono_metadata_parse_generic_class): Make this
612         function return a status code.  If we fail to parse the signature
613         from mono_metadata_parse_generic_inst, return FALSE.
614
615         * loader.c (mono_get_method_from_token): If we fail to load the
616         method (mono_class_get) return NULL.   
617
618         * (method_from_memberref): Return NULL if we are unable to parse
619         the method signature
620
621         (mono_loader_error_prepare_exception): Since we now use the
622         loader_error flag internally to stop processing, and obtaining
623         exceptions that might be thrown will walk this code path the
624         proper way of going from a MonoLoaderError into a
625         MonoException was convoluted.   This new routine encapsulates the
626         process of turning the error into an exception and *clearing* the
627         error afterwards.
628         
629 2006-04-27  Miguel de Icaza  <miguel@novell.com>
630
631         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
632         with missing assemblies), and to cope with:
633
634                 * Missing fieldref from a non-existing assembly.
635                 * Missing methodref from a non-existing assembly.
636
637         The first batch of work to address *some* of the issues from 76661.
638         
639         * object.c (mono_class_create_runtime_vtable): If we fail to
640         initialize the class raise the exception here. 
641
642         * metadata.c (mono_class_get_overrides_full): If any methods fail
643         to load return the failure to the caller.
644
645         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
646         flagging assemblies that failed to load.   
647
648         Do not crash if we are unable to load the assembly.
649
650         (mono_assembly_close): Do nothing with REFERENCE_MISSING
651         assemblies. 
652
653         * loader.c (mono_loader_set_error_type_load): Change the
654         convention to always pass unallocated strings, so we make our own
655         copies (I know our own code had duplicated strings before, but
656         this keeps the normal conventions).
657         (method_from_memberref): Call mono_loader_set_error_method_load
658         for all possible failures of loading the class. 
659         Remove assert, turn into a loader error.
660
661         (mono_loader_error_to_exception): Move this routine from mini
662         (mini_loader_error_to_exception) there was no need to have that in
663         mini. 
664
665         * class.c (mono_class_from_typeref): If we were not able to load
666         the assembly with mono_assembly_load_reference, call the
667         mono_loader_set_error_type_load to register the problem.
668
669         (mono_class_setup_fields): If we fail to load the type from
670         mono_metadata_parse_type_full, call mono_class_set_failure and
671         break from the loop.
672
673         If class->exception_type is set, we do not layout the fields as
674         that might crash the runtime, and instead return (from breaking
675         from the previous loop).
676
677         (mono_class_setup_vtable): This now returns a boolean indicating
678         whether the table was properly setup.   The decision is driven by
679         mono_class_get_overrides_full which might run into non-existing
680         methods. 
681         
682         (mono_class_init): Returns TRUE on success or FALSE if there was a
683         problem in loading the type (incorrect assemblies, missing
684         assemblies, methods, etc).
685
686         When we call mono_class_setup_fields we also check for a potential
687         error inside this call (either a class exception or a general
688         loader exception).
689
690         (mono_class_create_from_typedef): If the parent fails to load
691         (calling mono_class_get_full) return NULL.
692         
693         ** Important **
694
695         calls to mono_metadata_parse_type_full should be checked
696         everywhere and set the mono_class_set_failure
697         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
698
699         The current patch checks the places where my manually constructed
700         tests show the errors are showing up, but we should do it
701         everywhere. 
702
703         ** Important2 **
704
705         mono_class_init return values should be tested everywhere, like
706         the previous case this is something that we should audit
707         everywhere and not only on the cases exposed by the tests I
708         created. 
709
710 2006-04-26  Miguel de Icaza  <miguel@novell.com>
711
712         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
713         boolean parameter and instead pass the information on `options'
714         parameter (FileOptions).
715
716         * icall.c: Register the new signature for MonoIO.Open.
717
718         * debug-helpers.c (dis_one): Trying to understand how coverity
719         works.  Fix Run 5, item 78.
720
721 2006-04-26  Dick Porter  <dick@ximian.com>
722
723         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
724         dereference.
725
726 2006-04-25  Martin Baulig  <martin@ximian.com>
727
728         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
729
730         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
731         debugger_thread_created().
732         (debugger_gc_push_all_stacks): Don't handle the main thread in any
733         special way.
734         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
735         (mono_debugger_finalize_threads): New function; undo the effects
736         of mono_debugger_init_threads().
737         (mono_debugger_create_all_threads): Removed.
738
739 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
740
741         * image.c (mono_image_close): Tidy up trace messages.
742
743         * assembly.c (mono_assembly_close): Ditto.
744
745         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
746         no longer references an already freed assembly. Fixes #78168.
747
748 2006-04-21  Dick Porter  <dick@ximian.com>
749
750         * threads.c (mono_thread_detach): Fix reference counting when
751         detaching threads.
752
753 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
754
755         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
756         #78155.
757
758 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
759
760         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
761         (mono_type_to_stind): Ditto.
762
763         * marshal.c: Use the new helper functions to simplify code.
764
765         * image.c (mono_image_close): Add some code for help debug assembly unloading
766         problems.
767
768         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
769         image mempool.
770
771         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
772         assembly was already loaded in another appdomain. Fixes #78083.
773
774 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
775
776         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
777         referenced assemblies.
778         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
779
780         * domain.c (mono_domain_free): Add a trace message.
781
782         * appdomain.c (add_assemblies_to_domain): Ditto.        
783
784         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
785         field.  
786
787 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
788
789         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
790
791 2006-04-12  Martin Baulig  <martin@ximian.com>
792
793         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
794         `USE_INCLUDED_LIBGC'.   
795
796 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
797
798         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
799         the patch contains ../ and a small directory name later. Hopefully fixes
800         #78035.
801
802 2006-04-10  Martin Baulig  <martin@ximian.com>
803
804         Clean up the debugger's thread-handling code.
805
806         The debugger's thread-handling code has been moved from
807         ../mini/debug-debugger.c to threads.c.  We now iterate directly
808         over the `threads' hash, keep track of exiting threads and also
809         use proper locking.
810
811         We can now debug XSP and XSP based applications with the debugger.
812
813         * object-internals.h (MonoThread): Added `gpointer end_stack'.
814
815         * threads.h
816         (MonoThreadCallbacks): Removed; this was only used by the debugger.
817         (mono_install_thread_callbacks): Likewise.      
818
819         * threads.c (mono_thread_callbacks): Removed.
820         (debugger_thread_created, debugger_thread_exited): New static functions.
821         (start_wrapper): Call debugger_thread_created().
822         (thread_cleanup): Call debugger_thread_exited().
823         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
824         (mono_debugger_init_threads): New public function.
825         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
826         iterate directly over the `threads' hash and also use proper locking.
827
828         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
829
830         * mono-debug-debugger.h
831         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
832
833 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
834
835         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
836         argument type=array. Fixes #78057.
837
838 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
839
840         * culture-info-table.h : regenerated. Fixed bug #69652.
841
842 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
843
844         * loader.c metadata.c: Reapply a variant r59116.
845         
846         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
847
848         * class.c (mono_class_setup_interface_offsets): New internal function.
849
850         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
851         interfaces too. Fixes #77398.
852
853         * reflection.c (encode_cattr_value): Add support for 
854         parameter type=object, argument type=array.
855         (load_cattr_value): Ditto. Fixes #77916.
856
857         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
858         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
859
860         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
861         a byval char array and CharSet is Ansi.
862
863         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
864
865 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
866
867         * metadata.c: Add some locking comments.
868         
869         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
870         mempool.
871         (mono_metadata_free_method_signature): Don't free the signature itself.
872
873         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
874
875         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
876         reference the same MonoImage.
877         (mono_assembly_load_from_full): Add an assert.
878
879 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
880
881         * image.c (mono_image_close): Don't put the image we are about to free into the
882         loaded_images_guid_hash.
883
884         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
885         to reduce code duplication.
886
887         * marshal.c: Register the native functions called by this module as icalls, to
888         somewhat centralize the creation of MonoMethodSignature's.
889
890         * loader.c (mono_method_signature): Add a cache for method signatures.
891
892         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
893         the parameter attributes of a method.
894         (mono_metadata_parse_method_signature_full): Refactored the computation of
895         parameter attributes into a separate function. Also avoid one allocation in
896         most cases.
897
898         * assembly.c (mono_assembly_close): Ditto.
899
900         * image.c (mono_image_close): Log trace messages with INFO level.
901
902         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
903
904         * image.c reflection.c: Correct reference counting of image modules.
905         
906         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
907         of this function from the image mempool.
908         
909         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
910         to allow more cached types to be used.
911
912         * mono-debug.c (mono_debug_add_method): Appled patch from
913         David S. Miller  <davem@sunset.davemloft.net>: Access 
914         minfo->lexical_blocks[] entry elements using read32().
915
916 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
917
918         * loader.c (mono_free_method): No longer free the method header for non-dynamic
919         methods as it is allocated from the mempool.
920
921         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
922         image mempool.
923
924         * metadata-internals.h: Add comments describing the reference counting scheme
925         used for MonoImage and MonoAssembly.
926
927         * image.c assembly.c reflection.c: Rework reference counting of images and 
928         assemblies so they are freed when the runtime is shut down. Free some 
929         additional memory structures when an image is unloaded.
930         
931 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
932
933         * class.c loader.c reflection.c: Allocate more data structures in
934         the image mempool.
935
936 2006-03-31  Miguel de Icaza  <miguel@novell.com>
937
938         * icall.c
939         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
940         build on pre glib 2.4 systems.
941
942 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
943
944         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
945
946         * icall.c: Fix some warnings.
947
948 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
949
950         * culture-info-table.h : regenerated.
951
952 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
953
954         * threads.c, object-internals.h, verify.c: changed the culture caching
955         code to use a normal MonoArray for storage so the GC can keep track of
956         them easily. Fixed bits of the cache logic, too and simplified the
957         code.
958
959 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
960
961         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
962         thread for non-Boehm GCs.
963
964 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
965
966         * domain.c, object.c, domain-internals.h: reduce the amount of memory
967         needed to keep track of the data for static fields.
968
969 2006-03-29  Raja R Harinath  <rharinath@novell.com>
970
971         Fix #75172
972         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
973         for interface classes.  Use 'num_methods' instead.
974         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
975         before using '->vtable_size' field.
976
977 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
978
979         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
980         doesn't contain managed pointers, so use a normal hashtable.
981
982 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
983
984         * reflection.c, class-internals.h, domain.c: fixed handling of types
985         used as values for objects in custom attributes (bug #77915):
986
987 2006-03-24  Martin Baulig  <martin@ximian.com>
988
989         * class.c (mono_class_setup_fields): Added support for generic
990         instances; fixes #77580.
991
992 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
993
994         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
995
996 2006-03-24  Dick Porter  <dick@ximian.com>
997
998         * file-io.c (get_file_attributes): More stat macro breakage.
999         Fixes bug 77759.
1000
1001 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
1002
1003         * profiler.c: added the file=filename option in the default profiler
1004         to output the profile data to filename.
1005
1006 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1007
1008         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
1009         bug #77877.
1010
1011 2006-03-22  Martin Baulig  <martin@ximian.com>
1012
1013         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
1014         allocated `MonoClassField *' in `fb->handle'.
1015
1016 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1017
1018         * class.c, image.c, metadata-internals.h: implemented new mechanism to
1019         allocate interface ID to save memory and allow better ID reuse on
1020         appdomain unload. setup_generic_vtable () removal from Martin.
1021
1022 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1023
1024         * object.h, appdomain.c, domain.c, exception.c, icall.c,
1025         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
1026         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
1027         write barriers for reference stores with managed objects accessed with
1028         C structures in the runtime and in embedding programs.
1029
1030 2006-03-20  Raja R Harinath  <rharinath@novell.com>
1031
1032         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
1033         'interface_id' and 'max_interface_id' fields of MonoClasses
1034         representing open generic types.
1035
1036 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
1037
1038         * object.h, object.c, icall.c: added functions to deal with
1039         storing valuetypes that contain references in managed objects.
1040         * reflection.c, string-icalls.c, threads.c, marshal.c: small
1041         fixes and comments around uses of mono_array_addr ().
1042
1043 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
1044
1045         * object.h, icall.c, monitor.c: object.GetHashCode ()
1046         implementation that supports the moving garbage collector.
1047
1048 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
1049
1050         * icall.c, threads-types.h, threads.c: implemented finalizer for
1051         LocalDataStoreSlot.
1052
1053 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
1054
1055         * metadata.c (mono_type_size): Add a fixme.
1056         (mono_type_stack_size): Ditto.
1057
1058         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
1059         'type_forwarders' field.
1060
1061         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
1062         attribute from net 2.0.
1063
1064         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
1065         from class.c.
1066
1067         * class.c (mono_class_setup_fields): Fix a warning.
1068         
1069         * class.c (mono_class_from_name): Add support for assemblyref entries
1070         in the EXPORTEDTYPE table.
1071
1072         * reflection.c: Add support for handling type forwarders under net 2.0.
1073
1074         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
1075         
1076 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
1077
1078         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
1079         overwriting entries in ModuleBuild->types, also clean up the code
1080         a little. Fixes #77774.
1081
1082 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
1083
1084         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
1085         load friend assembly info when present.
1086
1087 2006-03-14  Raja R Harinath  <rharinath@novell.com>
1088
1089         Fix crasher on gtest-158.cs.
1090         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
1091         the return value if the MonoClass we want is yet in an
1092         inconsistent state.
1093         * class.c (mono_class_create_from_typedef): Add an comment
1094         explaining an order dependency between mono_class_setup_parent and
1095         mono_class_setup_mono_type.
1096
1097 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
1098
1099         * class.c: documentation updates and events bug fix.
1100
1101 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1102
1103         * class.c: some cleanup, locking fixes.
1104
1105 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
1106
1107         * class.c: fix the generics code to setup nested
1108         type info to the instantiated type (bug #77770).
1109
1110 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1111
1112         * marshal.c: fixed a few type correctness issues.
1113
1114 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1115
1116         * loader.c: the Set/Get/Addrtess array methods should be public.
1117
1118 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
1119
1120         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
1121         
1122         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
1123         info->wrapper.
1124
1125 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
1126
1127         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
1128
1129         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
1130
1131         * mempool.c (mono_mempool_alloc): Speed this up a bit.
1132         (mono_mempool_alloc0): Ditto.
1133
1134 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1135
1136         * socket-io.c:
1137         (create_object_from_sockaddr): it was allocating 4 extra bytes
1138         for the AF_UNIX data. Fixes bug #77747.
1139
1140 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
1141
1142         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
1143
1144 2006-03-09  Dick Porter  <dick@ximian.com>
1145
1146         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
1147         Fixes bug 76966 again.
1148
1149 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
1150
1151         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
1152         names from r57532
1153         * appdomain.c: Bumped corlib version to 48 (due to r57532)
1154
1155 2006-03-07  Martin Baulig  <martin@ximian.com>
1156
1157         * object.c
1158         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
1159
1160 2006-03-07  Martin Baulig  <martin@ximian.com>
1161
1162         * class.c
1163         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
1164         regression introduced in r56970; see gtest-252.cs.
1165
1166         * loader.c (mono_get_method_constrained): Correctly handle generic
1167         methods; see gtest-253.cs.
1168
1169 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
1170
1171         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
1172
1173 2006-03-04  Martin Baulig  <martin@ximian.com>
1174
1175         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
1176         compute the parent type at runtime, just like we're already doing
1177         it for interfaces.
1178
1179         * reflection.c
1180         (mono_reflection_bind_generic_parameters): Don't compute the
1181         parent type anymore.
1182
1183         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
1184
1185 2006-03-04  Martin Baulig  <martin@ximian.com>
1186
1187         * mono-debug-debugger.h
1188         (mono_debugger_create_notification_function): Allocate memory at
1189         runtime and return a pointer to it.
1190
1191 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
1192
1193         * assembly.c: Fix windows build.
1194         
1195         * assembly.c: Fix build.
1196
1197         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
1198
1199         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
1200         
1201 2006-03-03  Dick Porter  <dick@ximian.com>
1202
1203         * process.c
1204         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
1205         Check parameters before dereferencing them.  Fixes Aaron's part of
1206         bug 77393.
1207
1208 2006-03-03  Raja R Harinath  <rharinath@novell.com>
1209
1210         Fix performance regression.
1211         * loader.c (find_method_in_class): Add 'from_class' argument.
1212         Rename 'klass' argument to 'in_class'.  The signature is compared
1213         against the method in 'in_class', and the corresponding method is
1214         returned from 'from_class'.
1215         (find_method): Walk both 'in_class' and 'from_class' in parallel.
1216         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
1217         type definition and generic instantiation in parallel.
1218         (mono_get_method_constrained): Update to changes.
1219
1220 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
1221
1222         * threads.c: make sure the domain is correct, too when doing
1223         mono_thread_attach ().
1224
1225 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
1226
1227         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
1228         windows. Fixes #77683.
1229
1230 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
1231
1232         * object.h, *: introduced specific way to set elements of an array
1233         of references to be used as write barrier. Still need to audit the
1234         uses of mono_array_addr.
1235
1236 2006-03-01  Miguel de Icaza  <miguel@novell.com>
1237
1238         * object-internals.h: New field to cache the assmebly name, patch
1239         from Tambet Ingo (tambet@ximian.com)
1240
1241 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1242
1243         * decimal.h, class-internals.h, metadata-internals.h,
1244         file-io.h: mark a few function declarations as internal, to
1245         reduce the number of PLT entries.
1246
1247 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1248
1249         * file-io.c: fix typo in warning message.
1250
1251 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
1252
1253         * loader.c: on unix, lookup the "*A" version of a function
1254         if charset is auto as a second option before failing.
1255
1256 2006-02-28  Raja R Harinath  <rharinath@novell.com>
1257
1258         * class.h (mono_class_inflate_generic_method): Revert to two
1259         argument version.
1260         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
1261         (mono_class_inflate_generic_method_full): Add.
1262         * class.c (mono_class_inflate_generic_method_full): Rename from
1263         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
1264         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
1265         * loader.c, reflection.c: Update to changes.
1266
1267 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
1268
1269         * icall.c: const fixes and small improvements.
1270
1271 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1272
1273         * threadpool.c: for asynchronous connect(), enable the same workaround
1274         for BSD 6 as for the Mac. Fixes bug #77637.
1275
1276 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
1277
1278         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
1279         formatted classes. Fixes #77524.
1280
1281 2006-02-24  Raja R Harinath  <rharinath@novell.com>
1282
1283         * class.c (inflate_generic_type): Add a couple more
1284         micro-optimizations.
1285         (inflate_generic_context): Don't use the 'gmethod' from
1286         'inflate_with'.
1287         (mono_class_inflate_generic_method): If the method has generic
1288         parameters, but the passed-in context doesn't have a 'gmethod',
1289         create one.  Use the possibly simplified generic instantiation
1290         from the declaring class instead of the one passed in.
1291
1292 2006-02-24  Raja R Harinath  <harinath@gmail.com>
1293
1294         Make generic method signature and method header handling lazy.
1295         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
1296         (inflate_generic_header): Likewise.
1297         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
1298         parameter to avoid inflating types.
1299         (mono_get_inflated_method): Empty out.
1300         * class.h (mono_class_inflate_generic_method): Update to changes.
1301         * loader.c (mono_get_method_from_token): Don't parse signature for
1302         generic methods, nor methods of generic classes.
1303         (mono_method_signature): Rename from 'mono_method_signature'.
1304         Inflate signature on demand.
1305         (mono_method_get_header): Inflate method header on demand.
1306         * reflection.c: Update to changes.
1307
1308 2006-02-23  Raja R Harinath  <rharinath@novell.com>
1309
1310         * metadata.c (mono_metadata_inflate_generic_inst): If the
1311         instantiation is closed, don't bother expanding it in the new
1312         context.
1313         * class.c (inflate_generic_class): If the generic instantiation
1314         doesn't change after inflation, return the argument itself.
1315         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
1316         Add bounds checks.
1317         (inflate_generic_context): If neither the generic class nor the
1318         generic method instantiations change, return the original context.
1319         * reflection.c (mono_method_get_object): Do
1320         'mono_get_inflated_method' before accessing the ->klass field.
1321         (inflate_mono_method): Don't create a MonoGenericMethod unless
1322         necessary.
1323         (inflate_method): Don't pass a constructed type as the declaring
1324         type of a methodbuilder.
1325
1326 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
1327
1328         * object.c: fix memory overwrite.
1329
1330 2006-02-22  Dick Porter  <dick@ximian.com>
1331
1332         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
1333         it doesn't work any more.
1334         (mono_threads_request_thread_dump): Fix unused variable warnings.
1335
1336 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1337
1338         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
1339         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
1340         the public header file.
1341
1342 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
1343
1344         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
1345
1346 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
1347
1348         * class-internals.h, object.c: reduce the size of MonoVTable
1349         and store the interface_offsets array at negative offsets.
1350
1351 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
1352
1353         * metadata.c: tweak table descriptors data structures to reduce
1354         size and runtime relocations.
1355
1356 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1357
1358         * marshal.c: fix some types and opcodes to be type-safe
1359         in marshaling wrappers.
1360
1361 2006-02-21  Ankit Jain  <jankit@novell.com>
1362
1363         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
1364
1365 2006-02-21  Raja R Harinath  <rharinath@novell.com>
1366
1367         * metadata.c (get_constraints): Relax debugging checks for monodis.
1368
1369 2006-02-21  Ankit Jain  <jankit@novell.com>
1370
1371         * metadata.c (mono_metadata_load_generic_params): Move the code
1372         checking for ambiguous generic params from here to mono/dis/get.c
1373         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
1374
1375 2006-02-21  Raja R Harinath  <harinath@gmail.com>
1376
1377         Fix assertion triggered when compiling nemerle.
1378         * class.c (mono_get_shared_generic_inst): Rename from
1379         get_shared_inst and make non-static.
1380         * loader.c (mono_get_shared_generic_method): New.  Used to create
1381         the MonoGenericContext-equivalent of a MonoGenericContainer.
1382         (mono_get_method_from_token): Initialize the 'context' field of
1383         the created MonoGenericContainer.
1384         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
1385         * metadata.c (get_constraints): Add sanity check.
1386         * class-internals.h: Add new internal methods.
1387
1388         * reflection.c (verify_safe_for_managed_space): New sanity check.
1389         Currently checks that owner-less generic parameters aren't allowed
1390         in managed space.
1391         (mono_type_get_object): Use it.
1392         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
1393         that are now in mono_type_get_object.
1394         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
1395
1396 2006-02-19  Raja R Harinath  <harinath@gmail.com>
1397
1398         * metadata.c (mono_type_create_from_typespec): Rename from
1399         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
1400         argument and caching of types in the generic container.
1401         (unwrap_arrays, find_generic_param): Remove.
1402         * metadata-internals.h: Update.
1403         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
1404
1405 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
1406
1407         * class.c (mono_class_get_exception_for_failure): Fix a warning.
1408
1409         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
1410         return values. Fixes #77581.
1411
1412         * class.c (mono_fnptr_class_get): Switch name and name_space.
1413
1414         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
1415         classes and add support for [In, Out] attributes.
1416         (mono_marshal_free_asany): Ditto. Fixes #77524.
1417
1418 2006-02-18  Raja R Harinath  <harinath@gmail.com>
1419
1420         * class.c (mono_class_from_generic_parameter): Make more robust to
1421         incomplete MonoGenericContainers from monodis.
1422
1423 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1424
1425         * class-internals.h: added some more exception types.
1426         * class.c, metadata.c: added a few checks to handle missing
1427         types.
1428
1429 2006-02-17  Raja R Harinath  <rharinath@novell.com>
1430
1431         Use owner-less generic-params some more.
1432         * class.c (my_mono_class_from_generic_parameter): Remove.
1433         (mono_class_from_generic_parameter): Handle null image,
1434         param->name and param->owner.
1435         (mono_class_from_mono_type): Update.
1436         (mono_class_create_from_typespec): Remove 'container' parameter.
1437         If that parameter is non-null, the result is always inflated by
1438         'mono_class_get_full' anyway.
1439         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
1440         parameter.
1441         (mono_class_get_full): Update.
1442
1443         * class.c (inflate_generic_type) [GENERICINST]: If the generic
1444         instance is not open, don't bother inflating.
1445         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
1446         parse metadata for inflated classes.
1447         (_mono_class_get): Change GenericContext* parameter to
1448         GenericContainer*.
1449         (mono_class_create_from_typespec): Likewise.  Simplify, and
1450         implement trivially.  All the cases are handled in
1451         mono_class_from_mono_type.  Don't inflate returned class.
1452         (mono_class_get_full): Delegate GENERICINST optimization to
1453         inflate_generic_type.
1454         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
1455
1456 2006-02-16  Dick Porter  <dick@ximian.com>
1457
1458         * socket-io.c (create_object_from_sockaddr): Fix typo.
1459         (create_sockaddr_from_object): Check array lengths before
1460         potentially accessing items off the end.
1461         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
1462         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
1463         (ves_icall_System_Net_Sockets_Socket_Send_internal)
1464         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
1465         length checks to avoid wraparound overflows.
1466         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
1467         contents of the array of sockets
1468         (hostent_to_IPHostEntry2)
1469         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
1470         Check return value of inet_ntop ().
1471         (addrinfo_to_IPHostEntry): Fix typo
1472
1473 2006-02-16  Raja R Harinath  <rharinath@novell.com>
1474
1475         Type metadata parsing doesn't use generic-instantiation information.
1476         * metadata.c (mono_metadata_parse_array_full): Change
1477         MonoGenericContext* parameter to MonoGenericContainer*.
1478         (mono_metadata_parse_type_full): Likewise.
1479         (mono_type_create_from_typespec_full): Likewise.
1480         (mono_metadata_parse_mh_full): Likewise.
1481         (mono_metadata_parse_generic_inst): Likewise.
1482         (do_mono_metadata_parse_generic_class): Likewise.
1483         (do_mono_metadata_parse_type): Likewise.
1484         * metadata-internals.h: Update to changes.
1485         * class.c (mono_class_find_enum_basetype): Likewise.
1486         (mono_class_setup_fields): Likewise.
1487         (mono_class_create_from_typespec): Likewise.
1488         * loader.c (method_from_methodspec): Likewise.
1489         (mono_get_method_from_token): Likewise.
1490         (mono_method_get_header): Likewise.
1491
1492 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1493
1494         * marshal.c: handle additional GENERICINST case (patch from
1495         Thong Nguyen <tum@veridicus.com>).
1496         Fix a few cases where LDIND_I/STIND_I was used for references.
1497
1498 2006-02-16  Raja R Harinath  <rharinath@novell.com>
1499
1500         * reflection.c (mono_reflection_get_token): Remove unused variable.
1501
1502 2006-02-16  Martin Baulig  <martin@ximian.com>
1503
1504         * reflection.c (mono_reflection_get_token): Add support for fields
1505         in instantiated generic types.
1506
1507         * icall.c
1508         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
1509
1510 2006-02-15  Martin Baulig  <martin@ximian.com>
1511
1512         * icall.c
1513         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
1514         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
1515         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
1516         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
1517
1518 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
1519
1520         * class.c, metadata.c, metadata.h, object.c, icall.c,
1521         marshal.c: changed mono_type_get_underlying_type () to do
1522         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
1523         Fixed handling of instantiated generic valuetypes (bug #75479).
1524
1525 2006-02-15  Raja R Harinath  <rharinath@novell.com>
1526
1527         * metadata.c (mono_metadata_decode_signed_value): Simplify.
1528         Delegate to mono_metadata_decode_value, and work on the returned value.
1529
1530         * icall.c (ves_icall_MonoType_GetGenericArguments):
1531         Add consistency check here too.
1532         
1533 2006-02-15  Ankit Jain  <jankit@novell.com>
1534
1535         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
1536         char/short etc.
1537
1538 2006-02-15  Ankit Jain  <jankit@novell.com>
1539
1540         * metadata.c (mono_metadata_decode_signed_value): New function to decode
1541         signed values, used only for representing lower bounds of arrays.
1542         (mono_metadata_parse_array_full): Use new
1543         mono_metadata_decode_signed_value to decode lower bounds.
1544
1545 2006-02-14  Martin Baulig  <martin@ximian.com>
1546
1547         * reflection.c
1548         (mono_reflection_get_token): Support "MonoGenericMethod" and
1549         "MonoGenericCMethod" and allow generic instances / methods.
1550
1551 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
1552
1553         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
1554         to obtain the terminal size using an ioctl.
1555
1556         * object.c (mono_nullable_init): Revert this as nullable reference
1557         types are not valid.
1558         (mono_nullable_box): Ditto.
1559
1560 2006-02-09  Dick Porter  <dick@ximian.com>
1561
1562         * threads.c (mono_thread_detach): Drop a reference to the thread
1563         we're detaching.
1564
1565 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
1566
1567         * object.c (mono_nullable_init): Handle nullable reference types.
1568         (mono_nullable_box): Ditto. Fixes #77446.
1569
1570 2006-02-07  Martin Baulig  <martin@ximian.com>
1571
1572         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
1573
1574 2006-02-07  Ankit Jain  <jankit@novell.com>
1575
1576         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
1577         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
1578         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
1579         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
1580         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
1581         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
1582
1583 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
1584
1585         * class.c (mono_class_create_generic): Set type_token as well.
1586
1587         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
1588         compatible with MS.
1589
1590 2006-02-02  Martin Baulig  <martin@ximian.com>
1591
1592         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
1593         has never been used so far.
1594
1595 2006-02-02  Martin Baulig  <martin@ximian.com>
1596
1597         * mono-debug-debugger.h: Changed comment at the top of this file;
1598         the header is not installed, but it's safe to #include it from
1599         within the JIT.
1600
1601         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
1602         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
1603
1604 2006-02-02  Martin Baulig  <martin@ximian.com>
1605
1606         * mono-debug.h
1607         (MonoSymbolTable): Removed the `metadata_info' field.
1608
1609         * mono-debug.c
1610         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
1611
1612         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
1613         (mono_debugger_add_builtin_types): Removed.
1614         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
1615         (mono_debugger_create_notification_function): We now operate on a
1616         pre-allocated area; take a `gpointer' and return `void'.
1617
1618         * mono-debug-debugger.c
1619         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
1620         (mono_debugger_add_builtin_types): Removed.
1621
1622 2006-02-02  Martin Baulig  <martin@ximian.com>
1623
1624         * threads.c (mono_debugger_create_all_threads): New public method.
1625
1626 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1627
1628         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
1629         breaks on several platforms.
1630
1631 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
1632
1633         * assembly.c: the VS.NET build doesn't supply default values for
1634         MONO_ASSEMBLIES and MONO_CFG_DIR.
1635
1636 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
1637
1638         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
1639         helper function.
1640
1641         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
1642
1643         * loader.c (method_from_memberref): Fix a warning.
1644
1645         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
1646
1647         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
1648         with explicit layout. Fixes #77433.
1649
1650 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
1651
1652         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
1653         max_interface_id is initialized before using it. Fixes #77398.
1654         (ves_icall_Type_GetInterfaces): Ditto.
1655
1656 2006-01-30  Raja R Harinath  <rharinath@novell.com>
1657
1658         * metadata.c (mono_metadata_parse_method_signature_full): Don't
1659         allocate memory for parameter attributes when parsing memberref
1660         signatures.
1661         * loader.c (mono_loader_set_error_method_load): Don't warn.
1662         (method_from_memberref): Ensure MissingMethodException gets thrown
1663         if method is not found.  Make warning more informative.
1664
1665 2006-01-29  Raja R Harinath  <harinath@gmail.com>
1666
1667         Fix #77397
1668         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
1669         return true if is byref.
1670         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
1671         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
1672         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
1673
1674 2006-01-27  Raja R Harinath  <rharinath@novell.com>
1675
1676         Fix tests/find-method.2.il
1677         * loader.c (find_method, find_method_in_class): Remove is_inflated
1678         argument.  Revert 2006-01-18 change.
1679         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
1680         is generic, search for method in its generic definition.
1681         * class.c (mono_class_setup_vtable_general): Print generic
1682         arguments of generic types in debugging printf.
1683
1684 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
1685
1686         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
1687
1688         * threads.c (mono_threads_request_thread_dump): New helper function.
1689
1690 2006-01-25  Raja R Harinath  <rharinath@novell.com>
1691
1692         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
1693
1694 2006-01-25  Ankit Jain  <jankit@novell.com>
1695
1696         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
1697         move definition to ..
1698         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
1699         
1700 2006-01-25  Ankit Jain  <jankit@novell.com>
1701             Raja R Harinath  <rharinath@novell.com>
1702
1703         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
1704         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
1705         as necessary.
1706
1707 2006-01-25  Martin Baulig  <martin@ximian.com>
1708
1709         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
1710         `MonoDebuggerThread' into debug-debugger.c.
1711
1712 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
1713
1714         * profiler.c: fix printing of data.
1715
1716 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
1717
1718         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
1719           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
1720
1721 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
1722
1723         * object.c: fix deadlock related to string interning.
1724
1725 2006-01-23  Martin Baulig  <martin@ximian.com>
1726
1727         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
1728
1729         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
1730
1731 2006-01-23  Martin Baulig  <martin@ximian.com>
1732
1733         * mono-debug.h: Moved the prototypes of some functions which are
1734         used by the JIT here from mono-debug-debugger.h.
1735
1736 2006-01-21  Martin Baulig  <martin@ximian.com>
1737
1738         * Makefile.am: Don't install mono-debug-debugger.h.
1739
1740 2006-01-21  Martin Baulig  <martin@ximian.com>
1741
1742         * mono-debug-debugger.h: Enforce the private status of this header
1743         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
1744         Moved some stuff from mono-debugger-jit-wrapper.h here.
1745
1746 2006-01-20  Raja R Harinath  <rharinath@novell.com>
1747
1748         * class.c (mono_class_from_typeref): Add a sanity test to help
1749         catch lack of assembly load/search hooks.
1750
1751 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
1752
1753         * marshal.c (emit_struct_conv): Relax the fields with same offset
1754         check even more. Fixes #77230.
1755
1756 2006-01-18  Martin Baulig  <martin@ximian.com>
1757
1758         * loader.c (find_method_in_class): Added `gboolean is_inflated'
1759         argument; if false, we compare the uninstantiated signatures.
1760         (method_from_memberref): Compare the uninstantiated signatures;
1761         fixes #76417.
1762
1763 2006-01-18  Robert Jordan  <robertj@gmx.net>
1764
1765         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
1766         Clear the weak link. Fixes bug #77170.
1767
1768         * gc.c (mono_gchandle_free):
1769         Reflect *-gc.c changes (tiny optimization).
1770
1771 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
1772
1773         * metadata.c (mono_metadata_signature_dup): Applied patch from
1774         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
1775         Fixes #77288.
1776
1777 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
1778
1779         * marshal.c (emit_struct_conv): Allow fields with the same offset when
1780         marshalling from native to managed code. Fixes #77230.
1781
1782 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1783
1784         * threadpool.c: fix problem (Mac only) when more than one asynchronous
1785         connect. Fixes bug #77020.
1786
1787 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
1788
1789         * class.c: fixed id assignement for nested interfaces (bug #77275).
1790         Added also better info for --print-vtable debugging.
1791
1792 2006-01-12  Martin Baulig  <martin@ximian.com>
1793
1794         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
1795         interfaces on-the-fly; fixes #76625.
1796
1797         * class-internals.h
1798         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
1799         don't need that anymore.
1800
1801 2006-01-12  Miguel de Icaza  <miguel@novell.com>
1802
1803         * socket-io.c
1804         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
1805         To avoid initing the nested_classes when not needed I turned the
1806         PeerCredData as a toplevel internal class, as it has to be shared
1807         anyways. 
1808
1809         Fixes the CASA issue.
1810
1811 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
1812
1813         * domain.c: Accessors for MonoJitInfo
1814
1815         * profiler-private.h: Add jitinfo to the end jit hook
1816
1817         * profiler.[ch]: Define new hooks, called after jitting which give
1818         the MonoJitInfo that was compiled
1819
1820 2006-01-10  Martin Baulig  <martin@ximian.com>
1821
1822         * class.c (mono_class_setup_events): Add support for generic
1823         classes; fixes #76440.
1824
1825 2006-01-06  Raja R Harinath  <rharinath@novell.com>
1826
1827         Fix #77160.
1828         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
1829         on passed-in method.
1830
1831 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
1832
1833         * object.c (mono_runtime_invoke_array): Add Nullable support.
1834
1835         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
1836
1837 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
1838
1839         * file-io.c: Don't consider sockets as directory and avoid an endless
1840         loop. Fix bug #76966.
1841
1842 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
1843
1844         * object.c (mono_nullable_init): New helper function.
1845         (mono_nullable_box): Ditto.
1846
1847         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
1848
1849         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
1850
1851         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
1852         
1853 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
1854
1855         * class.c (mono_class_is_assignable_from): Make T assignable to 
1856         Nullable<T>.
1857
1858 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
1859
1860         * appdomain.c: Bump corlib version to 46.
1861         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
1862         serialization purpose) and changed ves_icall_System_Reflection_
1863         Assembly_get_code_base signature to accept a boolean (to escape, or 
1864         not, the assembly code base).
1865
1866 2005-12-23  Dick Porter  <dick@ximian.com>
1867
1868         * icall.c: 
1869         * threads-types.h: 
1870         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
1871         CreateEvent icall now returns "created" boolean parameter.
1872
1873 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
1874
1875         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
1876         #76967.
1877
1878         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
1879         when attr_klass is an interface. Fixes #77045.
1880
1881 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
1882
1883         * marshal.c (emit_struct_conv): Fix previous patch.
1884         
1885         * marshal.c (emit_struct_conv): Add a check for fields with the same
1886         offset.
1887
1888 2005-12-20  Raja R Harinath  <rharinath@novell.com>
1889
1890         Fix regression in Mono.C5.
1891         * class.c (mono_class_create_generic): If 'klass' is an interface
1892         set up the interface offsets.
1893         (mono_class_is_assignable_from): Don't throw away generic arguments.
1894
1895 2005-12-19  Raja R Harinath  <rharinath@novell.com>
1896
1897         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
1898         type parameters.
1899
1900 2005-12-15  Raja R Harinath  <rharinath@novell.com>
1901
1902         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
1903         dead store.
1904         (do_mono_metadata_parse_generic_class): Don't pass the current
1905         generic context when parsing the type being instantiated: it
1906         cannot use it, anyway.
1907
1908         * loader.c (method_from_memberref): Don't inflate a signature if
1909         it doesn't contain any type parameters.
1910
1911 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
1912
1913         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
1914
1915 2005-12-14  Martin Baulig  <martin@ximian.com>
1916
1917         * class.c
1918         (mono_type_get_name_recurse): Don't return null for type
1919         parameters and open generic classes.
1920         (mono_class_setup_methods): Don't exclude generic instances.
1921         (mono_get_unique_iid): Use different IDs for different
1922         instantiations of the same generic type.
1923         (mono_class_setup_vtable): Only use setup_generic_vtable() for
1924         open generic instances; create a normal vtable for closed generic
1925         instances.
1926         (mono_class_setup_vtable_general): We're now also called for
1927         closed generic instances.
1928
1929         * reflection.c
1930         (mono_reflection_bind_generic_parameters): Correctly use
1931         mono_metadata_lookup_generic_inst() everywhere.
1932
1933 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
1934
1935         * object.c (mono_class_create_runtime_vtable): Call 
1936         mono_class_setup_vtable ().
1937
1938         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
1939         function.
1940         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
1941         #76959.
1942
1943         * loader.c (mono_loader_set_error_type_load): Print the type load
1944         warnings to the console so they are more visible to the user.
1945         (mono_loader_set_error_method_load): Ditto.
1946
1947         * reflection.c (ensure_runtime_vtable): Revert the last change as it
1948         is still broken.
1949         
1950         * reflection.c (ensure_runtime_vtable): Fix build.
1951
1952         * reflection.c (ensure_runtime_vtable): Disable an optimization which
1953         doesn't work in all cases.
1954
1955 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
1956
1957         * object.c (mono_array_new_full): Treat a single dimensional array
1958         with 0 lower bounds as an szarray. Fixes #76973.
1959
1960         * reflection.c (custom_attr_visible): Really fix this.
1961
1962 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
1963
1964         * reflection.c (custom_attr_visible): Allow nested public attributes
1965         as well.
1966
1967         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
1968         interface check.
1969
1970 2005-12-12  Raja R Harinath  <harinath@gmail.com>
1971
1972         * class.c (set_generic_param_owner): Delete.
1973         (mono_class_create_from_typedef): Don't set ->owner field of
1974         generic parameters to "param containers" of enclosing classes.
1975         * reflection.c (mono_reflection_initialize_generic_parameter):
1976         Likewise.
1977
1978 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
1979
1980         * reflection.c (custom_attr_visible): Fix build.
1981
1982 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
1983
1984         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
1985         private attributes.
1986         
1987         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
1988         handling of null parameter defaults.
1989
1990 2005-12-09  Raja R Harinath  <rharinath@novell.com>
1991
1992         * class.c (mono_class_from_generic_parameter): Don't set
1993         klass->generic_container.
1994         (my_mono_class_from_generic_parameter): Likewise.
1995
1996 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
1997
1998         * reflection.c (load_public_key): Fix a warning.
1999         (method_encode_code): Fix unaligned accesses.
2000
2001 2005-12-07  Martin Baulig  <martin@ximian.com>
2002
2003         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
2004
2005         * reflection.c
2006         (write_generic_param_entry): Encode our custom attrs.
2007
2008         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
2009
2010 2005-12-07  Martin Baulig  <martin@ximian.com>
2011
2012         * reflection.c (encode_new_constraint): Removed; we don't use the
2013         `NewConstraintAttribute' anymore.
2014
2015 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
2016
2017         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
2018         not fire a TypeResolve event when Assembly.GetType () is called.
2019
2020 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
2021
2022         Beginning of support for nullable types in the runtime. Parts of
2023         this patch are from Martin.
2024
2025         * appdomain.c (MONO_CORLIB_VERSION): Bump
2026
2027         * domain.c (mono_init_internal): get the nullable type
2028
2029         * class.c (mono_class_is_nullable): New method
2030         (mono_class_get_nullable_param): New mehod
2031         (mono_class_create_generic): In types T? set cast_class to T
2032
2033         * class-internals.h (MonoDefaults): new nullable default class
2034         (mono_class_get_nullable_param, mono_class_get_nullable_param):
2035         new methods.
2036
2037 2005-12-05  Raja R Harinath  <rharinath@novell.com>
2038
2039         * metadata.c (select_container): New.  Refactor code to select the
2040         appropriate GenericContainer given the type of generic parameter
2041         we are looking for.
2042         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
2043         not a MonoGenericContext.  Use select_container.  Update parameters.
2044         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
2045         and MONO_TYPE_MVAR.
2046         (unwrap_arrays): Remove duplicate tests.
2047         (find_generic_param): Rename from 'has_same_context'.  Now walks a
2048         generic instantiated class to find any arguments that are generic
2049         parameters.
2050         (mono_type_create_from_typespec_full): Use find_generic_param to
2051         avoid evicting some generic instantiations from the typespec
2052         cache.
2053
2054 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
2055
2056         * reflection.c: fixed writing of doubles on ARM FPA.
2057
2058 2005-12-02  Robert Jordan  <robertj@gmx.net>
2059
2060         * icall.c: Fixed EventInfo.ReflectedType (#76829).
2061
2062 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2063
2064         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
2065         least on SUSE 10 they are not the same (on debian, they are just the
2066         same thing).
2067
2068 2005-12-01  Raja R Harinath  <rharinath@novell.com>
2069
2070         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
2071         DeclaringType for VARs and MVARs.
2072         * class.c (set_generic_param_owner): Fix initialization of owner
2073         fields.
2074
2075 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
2076
2077         * icall.c: fixed Enum.ToObject() to correctly convert the values.
2078
2079 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2080
2081         * threadpool.c: workaround for a bug that shows up on the Mac:
2082         select()+connect() on a blocking socket is not like it should
2083         be, so we proceed to connect() in that case, wasting the I/O
2084         threadpool thread until connect succeedes. Fixes bug #75436.
2085
2086 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2087
2088         * threadpool.c: fix typo when setting file descriptor states.
2089
2090 2005-11-28  Raja R Harinath  <rharinath@novell.com>
2091
2092         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
2093         * metadata.c (mono_metadata_parse_method_signature_full): Don't
2094         create a temporary signature container.
2095         (mono_metadata_parse_generic_param): Update to changes.
2096         (mono_type_create_from_typespec_full): Update to changes.
2097         * loader.c (method_from_memberref): Don't use a
2098         MonoGenericContainer while parsing a memberref signature.
2099         (method_from_methodspec): Remove dead-store of the 'container'
2100         variable.  It's overwritten before use.
2101
2102         * metadata.c (mono_type_create_from_typespec_full): Make debugging
2103         checks tighter.
2104         (mono_metadata_parse_generic_param): Likewise.
2105         * loader.c (find_method_in_class): Does not need a
2106         MonoGenericContainer.  Use 'mono_method_signature' rather than
2107         'mono_method_signature_full'.
2108         (find_method, mono_get_method_constrained, method_from_memberref):
2109         Update to changes.
2110
2111         * metadata.c (mono_type_create_from_typespec_full): Ensure that
2112         owner-less generic-parameters are never evicted from the typespec
2113         cache.
2114
2115         * loader.c (method_from_memberref): Don't use the current context
2116         when parsing signatures.
2117         (method_from_methodspec, mono_get_method_from_token): Update to changes.
2118
2119         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
2120         side-effects in g_assert.
2121         * loader.c (mono_get_method_from_token): Resolve klass earlier so
2122         that we don't potentially lose information.
2123
2124 2005-11-26  Dick Porter  <dick@ximian.com>
2125
2126         * icall.c:
2127         * threads.c: icalls to implement basic (ie, not named)
2128         System.Threading.Semaphore.
2129
2130 2005-11-24  Dick Porter  <dick@ximian.com>
2131
2132         * process.c
2133         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2134         Use GetProcessId() if it's available.
2135
2136 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
2137
2138         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
2139
2140 2005-11-23  Raja R Harinath  <rharinath@novell.com>
2141             Ankit Jain  <jankit@novell.com>
2142
2143         * loader.c (mono_get_method_from_token): Initialize 'method' field
2144         of all generic parameters before parsing the signature.  Remove
2145         code that "fixed"-up MVAR references.
2146
2147 2005-11-23  Ankit Jain  <jankit@novell.com>
2148
2149         * metadata.c (mono_metadata_has_generic_params):
2150         (mono_metadata_load_generic_param_constraints):
2151         (mono_metadata_load_generic_params): Move duplicate code ...
2152         (mono_metadata_get_generic_param_row): ... here. Returns the
2153         first row-id in GenericParam table for a given owner (token).
2154         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
2155         prototype.
2156
2157 2005-11-23  Raja R Harinath  <rharinath@novell.com>
2158             Ankit Jain  <jankit@novell.com>
2159
2160         * metadata.c (mono_metadata_class_equal): Pass signature_only when
2161         comparing VARs too.
2162         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
2163         type->data.generic_param only if the type is an MVAR.
2164         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
2165         leak owner-less VARs and MVARs into managed space.
2166
2167 2005-11-21  Martin Baulig  <martin@ximian.com>
2168
2169         * class-internals.h
2170         (MonoMethod): Moved the `generic_container' here from
2171         `MonoMethodNormal' since we now also need it for
2172         `MonoMethodPInvoke';
2173         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
2174         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
2175         an union containing both `MonoMethodNormal' and
2176         `MonoMethodPInvoke'.
2177
2178         * loader.c
2179         (mono_get_method_from_token): Allow implementing generic methods
2180         as interncalls.
2181
2182         * threads.c
2183         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
2184         icall.
2185
2186 2005-11-17  Dick Porter  <dick@ximian.com>
2187
2188         * icall.c: 
2189         * process.h: 
2190         * process.c: Split the Process Start_internal icall into
2191         ShellExecuteEx_internal and CreateProcess_internal, which are
2192         called depending on whether UseShellExecute is true.  Fixes bug
2193         76670.
2194
2195         * appdomain.c (MONO_CORLIB_VERSION): Incremented
2196
2197 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
2198
2199         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
2200         'msize' parameters, use the information in 'mspec' instead.
2201         (emit_object_to_ptr_conv): Ditto.
2202
2203         * marshal.c (emit_struct_conv): Handle explicit layout structs with
2204         fields out of order. Fixes #76733.
2205
2206 2005-11-17  Ankit Jain  <jankit@novell.com>
2207
2208         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
2209
2210 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
2211
2212         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
2213           bug #76575.
2214
2215 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
2216
2217         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
2218         for types with non-auto layout. Fixes #76717.
2219
2220 2005-11-16  Ankit Jain  <jankit@novell.com>
2221
2222         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
2223         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
2224         if generic_context is null.
2225           (mono_metadata_generic_param_equal): param->owner can be null.
2226           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
2227         null.
2228
2229 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
2230
2231         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
2232         the correct value.
2233
2234 2005-11-15  Martin Baulig  <martin@ximian.com>
2235
2236         * object.c (set_value): Use mono_class_from_mono_type() instead of
2237         the hack for generic instances; fixes #76136.
2238
2239 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
2240
2241         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
2242         fields.
2243
2244         * image.c (load_metadata_ptrs): Initialize the new fields.
2245
2246         * reflection.c (create_dynamic_mono_image): Ditto.
2247
2248         * reflection.c (build_compressed_metadata): Use the new fields.
2249
2250         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
2251         icall.
2252
2253         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
2254         icall.
2255         
2256 2005-11-15  Ankit Jain  <jankit@novell.com>
2257             Raja R Harinath  <harinath@gmail.com>
2258
2259         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
2260         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
2261         new per-generic_container cache if the cached MonoType's context matches
2262         the current context.
2263           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
2264         to the expected context.
2265           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
2266
2267 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2268
2269         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
2270         we changed the signature of an icall.
2271         * icall.c: Modify to mono_double_ParseImpl return true/false 
2272         depending on the success, instead of throwing the exception. This will
2273         help us in Double.TryParse methods.
2274         
2275 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
2276
2277         * marshal.c (emit_marshal_object): Throw an exception when
2278         marshalling 'object' instead of crashing. Fixes #76696.
2279
2280 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
2281
2282         * class-internals.h: Add prototype for mono_type_get_full_name ().
2283
2284 2005-11-11  Dick Porter  <dick@ximian.com>
2285
2286         * threads.c (mono_thread_manage): Make sure the main thread has
2287         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
2288
2289 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
2290
2291         * loader.c (mono_loader_set_error_type_load): Log a warning to the
2292         console about the missing type.
2293         (mono_loader_set_error_method_load): Ditto.
2294
2295 2005-11-09  Miguel de Icaza  <miguel@novell.com>
2296
2297         * mono-config.c (mono_get_config_dir): Set the system defaults if
2298         none is specified.
2299
2300         * assembly.c (mono_set_dirs): New API entry point to set the
2301         assembly and the config directory in one call
2302
2303 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
2304
2305         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
2306         the ftnptr was created from a delegate in a domain other than the
2307         current domain. Fixes #75377.
2308
2309         * exception.h exception.c: Add mono_get_exception_not_supported ().
2310
2311 2005-11-08  Martin Baulig  <martin@ximian.com>
2312
2313         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
2314
2315 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
2316
2317         * security-manager.h: Added definitions to deal with strongname key 
2318         pairs bigger (and smaller) than 1024 bits.
2319         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
2320         adjust wrt the public key length being used.
2321
2322 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
2323
2324         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
2325           Windows build (r51396-51397).
2326
2327 2005-11-03  Martin Baulig  <martin@ximian.com>
2328
2329         * class.c (mono_class_setup_vtable_general): Also add generic
2330         methods to the vtable; fixes #76581.
2331
2332 2005-11-01  Miguel de Icaza  <miguel@novell.com>
2333
2334         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
2335         sure that we lookup GetString method from the System.Text.Encoding
2336         class, not the derived class or we get an empty method.
2337
2338         Fixed class #76612.
2339
2340 2005-10-25  Miguel de Icaza  <miguel@novell.com>
2341
2342         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
2343         if it has been previously set (embedders). 
2344
2345         Make mono_set_rootdir available also on Unix.
2346
2347 005-10-24  Robert Jordan  <robertj@gmx.net>
2348
2349         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
2350
2351 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
2352
2353         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
2354         only calls which are made to native code use this flag.
2355
2356         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
2357
2358 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
2359
2360         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
2361         Add support for FieldBuilders.
2362
2363 2005-10-29  Martin Baulig  <martin@ximian.com>
2364
2365         * mono-debug.c
2366         (mono_debug_using_mono_debugger): New public method; returns
2367         whether we're running inside the debugger.
2368
2369 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
2370
2371         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
2372         for Method/Constructor/FieldBuilders.
2373
2374 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
2375
2376         * reflection.c (module_add_cattrs): Save custom attributes for global methods
2377         and fields as well.
2378
2379 2005-10-26  Martin Baulig  <martin@ximian.com>
2380
2381         * mono-debug-debugger.c
2382         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
2383
2384 2005-10-24  Raja R Harinath  <harinath@gmail.com>
2385
2386         * icall.c (base64_to_byte_array): Don't pass an out-of-range
2387         integer to isspace.
2388
2389 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
2390
2391         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
2392         when passing valuetypes byref. Fixes #76502.
2393
2394 2005-10-19  Jackson Harper  <jackson@ximian.com>
2395
2396         * profiler.c: Don't put a . in front of types that are not in a
2397         namespace.
2398
2399 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
2400
2401         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
2402
2403 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
2404
2405         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
2406         #76436.
2407         (mono_marshal_get_ldflda_wrapper): Fix a warning.
2408
2409 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2410
2411         * assembly.c metadata-internals.h icall.c: Define an additional
2412         parameter for mono_assembly_name_parse_full, so we can avoid creating
2413         S.R.AssemblyName.Version when no version info wasn't passed.
2414         
2415 2005-10-09  Miguel de Icaza  <miguel@novell.com>
2416
2417         * class.c (mono_type_get_full_name): Reimplement method that was
2418         removed. 
2419
2420         * image.c: Some docs
2421
2422 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
2423
2424         * profiler.c (output_newobj_profile): Fix printing of Total memory
2425         on x86.
2426
2427 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
2428
2429         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
2430
2431 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
2432
2433         * threads.c: remove debug output.
2434
2435 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
2436
2437         * threads.c (mono_thread_manage): Fix crashes if more than 64
2438         threads need to be aborted. Hopefully fixes #75899.
2439
2440         * assembly.c (mono_stringify_assembly_name): New helper function.
2441
2442         * class.c: Use mono_stringify_assembly_name instead of the similar
2443         static function.
2444
2445         * assembly.h assembly.c: Add support for calling a postload search 
2446         hook if an assembly cannot be loaded.
2447
2448         * appdomain.c: Register new search hooks which call the AssemblyResolve
2449         events in AppDomain. Fixes #75231
2450
2451 2005-10-07  Martin Baulig  <martin@ximian.com>
2452
2453         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
2454         methods without debug info.
2455
2456 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
2457
2458         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
2459         wrappers.
2460
2461 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2462
2463         * file-io.c: now that we return symlinks, use lstat and, when the file
2464         is a symbolic link, stat, to get the file attributes. Also avoid the
2465         conversion to/from utf16/external.
2466
2467 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
2468
2469         * class.c (mono_class_layout_fields): Compute klass->has_references
2470         correctly if an embedded valuetype is not yet initialized. Fixes
2471         #76331.
2472
2473 2005-10-04  Martin Baulig  <martin@ximian.com>
2474
2475         * metadata.c
2476         (mono_metadata_load_generic_param_constraints): New public
2477         function; splitted the constraints loading out from
2478         mono_metadata_load_generic_params().
2479
2480         * class.c (mono_class_create_from_typedef): Call
2481         mono_metadata_load_generic_param_constraints() after setting up
2482         the type and creating our parent; fixes #75329.
2483
2484 2005-10-04  Martin Baulig  <martin@ximian.com>
2485
2486         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
2487         non-dynamic parent classes.
2488
2489 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
2490
2491         * file-io.c : win32 build fix (ETXTBSY seems not found).
2492
2493 2005-10-04  Martin Baulig  <martin@ximian.com>
2494
2495         * reflection.c
2496         (mono_image_get_methodspec_token): Make the cache actually work;
2497         fixes #75974.
2498
2499 2005-10-04  Martin Baulig  <martin@ximian.com>
2500
2501         * class.c (mono_class_name_from_token): Removed the unneccessary
2502         `MonoGenericContext *' argument.
2503
2504 2005-10-04  Martin Baulig  <martin@ximian.com>
2505
2506         * loader.c
2507         (method_from_methodspec): Make the caching work again; fixes the
2508         performance regression from #76262.
2509
2510 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2511
2512         * file-io.c:
2513         * file-io.h:
2514         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
2515         GetFileSystemEntries that performs the same work but without going
2516         into io-layer, locking, etc.
2517
2518 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
2519
2520         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
2521         ThreadState_Stopped as well. Fixes #76047.
2522
2523 2005-09-29  Martin Baulig  <martin@ximian.com>
2524
2525         * class.c
2526         (inflate_generic_context): If the new context has a `gmethod', set
2527         its `container' that that gmethod's `container'.
2528
2529         * metadata.c
2530         (mono_metadata_parse_generic_param): Simplify things;
2531         `generic_container = generic_context->container;' is just fine.
2532
2533         * loader.c (method_from_methodspec): Code cleanups.
2534
2535 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
2536
2537         * decimal.c: fix warning (and let gcc generate correct
2538         code on ARM with optimizations).
2539
2540 2005-09-28  Martin Baulig  <martin@ximian.com>
2541
2542         * loader.c
2543         (method_from_memberref): Added `MonoGenericContext *class_context'
2544         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
2545         (method_from_methodspec): If we're a memberref, use the enclosing
2546         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
2547
2548 2005-09-28  Martin Baulig  <martin@ximian.com>
2549
2550         * object.c (mono_runtime_invoke_array): Added support for
2551         MONO_TYPE_GENERICINST; fixes #75917.
2552
2553 2005-09-27  Martin Baulig  <martin@ximian.com>
2554
2555         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
2556         `k->byval_arg.type' to determine the actual type.
2557
2558         * loader.c (method_from_methodspec): Removed some hacks.
2559
2560 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
2561
2562         * class-internals.h (mono_field_is_deleted): Do the test for
2563         rtspecialname before we check the actual name of the field. This
2564         prevents us from dereferencing a pointer into the string table,
2565         saving us from accessing a few pages
2566
2567         * *.c: Replace the use of {Enter,Leave}CriticalSection with
2568         macros. This will allow a deadlock debugger to easily be plugged
2569         in.
2570
2571 2005-09-27  Martin Baulig  <martin@ximian.com>
2572
2573         * loader.c (method_from_methodspec): Create a "signature"
2574         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
2575
2576 2005-09-27  Martin Baulig  <martin@ximian.com>
2577
2578         * class.c
2579         (inflate_generic_class): Correctly set the new context's
2580         container.
2581
2582         * loader.c
2583         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
2584         instead of a `MonoGenericContext *'.
2585         (mono_method_signature_full): Take a `MonoGenericContainer *'
2586         instead of a `MonoGenericContext *'.
2587
2588         * metadata.c
2589         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
2590         instead of a `MonoGenericContext *'.
2591         (mono_metadata_parse_method_signature_full): Likewise.
2592
2593 2005-09-26  Martin Baulig  <martin@ximian.com>
2594
2595         * class.c
2596         (mono_class_from_generic_parameter): Set `klass->generic_container'
2597         (mono_class_from_generic_parameter): Likewise.
2598         (mono_bounded_array_class_get): We inherit the generic container
2599         from the element class.
2600
2601         * loader.c
2602         (find_method, find_method_in_class): Take a `MonoGenericContext *'
2603         argument rather than computing it here.
2604         (method_from_memberref): Correctly set the generic context before
2605         parsing the signature.  Fixes #75681.
2606
2607 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
2608
2609         * object.c (mono_class_has_special_static_fields): Fix warnings.
2610
2611 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2612
2613         * assembly.c: Add parse_public_key function, to
2614         par the public keys. Also added mono_assembly_name_parse_full,
2615         to define it the parsed key should be freed or not.
2616         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
2617         to parse a long format assembly name.
2618         * metadata-internals.h: Keep mono_assembly_name_parse_full as
2619         private, since calling it to preserve the key requires
2620         freeing it manually.
2621         
2622 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
2623
2624         * locales.c : removed HAVE_ICU part.
2625
2626 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
2627
2628         * object.c (mono_class_create_runtime_vtable): Avoid calling 
2629         field_is_special_static if the klass has no special static fields.
2630
2631         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
2632         (MonoCachedClassInfo): Likewise.
2633
2634         * object.c (mono_class_has_special_static_fields): New helper function.
2635
2636 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
2637
2638         * class.c (mono_class_create_from_typedef): Don't call 
2639         interfaces_from_typedef_full for enums.
2640         (mono_class_create_from_typedef): Compute the base types of enums directly
2641         without calling mono_class_setup_fields ().
2642         (mono_class_find_enum_basetype): New helper function.
2643
2644         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
2645         one place inside the string heap.
2646         
2647 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
2648
2649         * class.c: locking fixes, code cleanups, some docs added.
2650         Allocate some data structures in the image mempool.
2651
2652 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
2653
2654         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
2655         the example code.
2656         
2657 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
2658
2659         * class-internals.h, class.c, reflection.c: reduce memory taken by
2660         MonoClass.
2661
2662 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
2663
2664         * metadata.c, metadata.h, loader.h: documentation updates, code and
2665         API cleanups.
2666
2667 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
2668
2669         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
2670         the example code.
2671
2672         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
2673         page faults caused by the runtime while reading metadata.
2674
2675 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2676
2677         * socket-io.c: the field names were changed 3 months ago and no one
2678         realized until bug #76077 got filed!
2679
2680 2005-09-20  Martin Baulig  <martin@ximian.com>
2681
2682         * icall.c (assembly_icalls): Removed some unused debugger icalls.
2683
2684 2005-09-20  Martin Baulig  <martin@ximian.com>
2685
2686         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
2687         write the rank into the class entry.
2688
2689 2005-09-20  Martin Baulig  <martin@ximian.com>
2690
2691         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
2692
2693 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
2694
2695         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2696
2697         * icall.c (custom_attrs_defined_internal): New icall.
2698
2699         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
2700         function.
2701         (mono_custom_attrs_construct_by_type): New helper function.
2702
2703 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
2704
2705         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
2706         terminate the resulting string. Fixes #76123.
2707
2708 2005-09-16  Martin Baulig  <martin@ximian.com>
2709
2710         * mono-debug.c
2711         (mono_debug_add_method): Ignore inflated methods for the moment.
2712
2713 2005-09-14  Martin Baulig  <martin@ximian.com>
2714
2715         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
2716
2717 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
2718
2719         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
2720         return a success/failure indication.
2721         (mono_metadata_interfaces_from_typedef_full): Ditto.
2722         (get_constraints): Ditto.
2723
2724 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
2725
2726         * marshal.c (emit_marshal_array): Fix handling of null arrays.
2727         
2728         * marshal.c (emit_marshal_array): Add support for returning string
2729         arrays from delegates. Fixes #76063.
2730
2731         * marshal.c: Use the emit_ldloc/stloc macros where possible.
2732
2733 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
2734
2735         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
2736         icall.
2737
2738 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
2739
2740         * reflection.c icall.c: Fix after mono_get_exception_type_load
2741         signature change.
2742
2743         * assembly.c (mono_assembly_get_assemblyref): New helper function.
2744         (mono_assembly_load_reference): Use the new helper.
2745
2746         * class-internals.h (MonoLoaderError): New structure containing 
2747         information about type loading errors.
2748
2749         * class-internals.h loader.c: Add APIs to store per-thread loader
2750         error information.
2751
2752         * loader.c class.c: Set the loader error if needed.
2753
2754         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
2755
2756 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
2757
2758         * decimal.c: fixed to handle the broken ARM fp format.
2759
2760 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
2761
2762         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
2763         broken.
2764
2765 2005-09-06  Martin Baulig  <martin@ximian.com>
2766
2767         * domain.c (supported_runtimes): Added v2.0.50727.
2768
2769 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
2770
2771         * culture-info.h: reduce the size of some structures.
2772
2773 2005-09-05  Martin Baulig  <martin@ximian.com>
2774
2775         Reflect latest API changes in the August CTP.
2776
2777         * icall.c
2778         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
2779         ("MonoType.HasGenericArguments"): Removed.
2780         ("MonoMethod.BindGenericParameters"): Renamed to
2781         "MakeGenericMethod".
2782         ("MethodBuilder.BindGenericParameters"): Renamed to
2783         "MakeGenericMethod".    
2784
2785 2005-09-05  Martin Baulig  <martin@ximian.com>
2786
2787         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
2788
2789 2005-09-05  Martin Baulig  <martin@ximian.com>
2790
2791         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2792
2793         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
2794         generic_container is non-NULL.
2795
2796 2005-09-05  Martin Baulig  <martin@ximian.com>
2797
2798         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2799
2800         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
2801
2802 2005-08-29  Michal Moskal  <malekith@nemerle.org>
2803
2804         * reflection.c (encode_locals,
2805         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
2806         for large generic types.
2807
2808 2005-09-05  Martin Baulig  <martin@ximian.com>
2809
2810         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2811
2812         * class.c (mono_dup_array_type): New public method.
2813         (mono_metadata_signature_deep_dup): New public method.
2814         (dup_type): Correctly duplicate array and function types.
2815
2816 2005-09-05  Martin Baulig  <martin@ximian.com>
2817
2818         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2819
2820         * reflection.c (get_default_param_value_blobs): Handle generic types
2821         and generic methods.
2822
2823 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
2824
2825         * class.c: Fixed error reporting (method/class were inversed) for 
2826         inheritance demands.
2827         * security-manager.c|h: Added the AppDomain when calling the managed
2828         System.Security.SecurityManager.InheritanceDemand method.
2829
2830 2005-09-01  Raja R Harinath  <rharinath@novell.com>
2831
2832         * reflection.c (encode_marshal_blob): 'marshaltype' and
2833         'marshaltyperef' are alternate sources for the custom marshaler
2834         name.
2835
2836 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
2837
2838         * class.c: fix creation of array classes with rank == 1
2839         (patch by Ankit Jain <jankit@novell.com>).
2840
2841 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
2842
2843         * object.c: fix check for creating the bound data for arrays vs
2844         szarrays.
2845
2846 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2847
2848         * object.c: configuration file name is now based on the executable name,
2849         not the image name. Fixes bug #75931.
2850
2851 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
2852
2853         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
2854         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
2855
2856 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
2857
2858         * rand.c: Use wincrypt.h instead of WinCrypt.h.
2859
2860 2005-08-24  Ankit Jain  <jankit@novell.com>
2861             Raja R Harinath  <rharinath@novell.com>
2862
2863         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
2864           called by it recursively.
2865           (mono_class_init): Remove special case in pending_init handling, since it's
2866           superseded by the fix to mono_class_from_typeref.
2867
2868 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
2869
2870         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
2871         BROKEN_THREAD_START stuff.
2872
2873 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
2874
2875         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
2876         trampoline.
2877
2878         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
2879         
2880         * object.c (mono_delegate_ctor): Replace the original function address with
2881         a delegate trampoline.
2882
2883 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
2884
2885         * icall.c: add boolean argument to base64_to_byte_array and 
2886         InternalFromBase64String to control whether a whitespace-only string
2887         is allowed (or should casue a FormatException to be thrown). We need
2888         this as the behavior has changed between MS.NET 1.x and 2.0, and we
2889         to match the MS behaviour in both profiles.
2890         * appdomain.c: Bump corlib version.
2891
2892 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2893
2894         This patch implements a big portion of publisher policy
2895         support, used to bind assembly versions and redirect
2896         one assembly from version A to version B.
2897
2898         * assembly.c:
2899         New GSList loaded_assembly_bindings, for storing the cached
2900         assembly bindings.
2901         (assembly_binding_maps_name): New static function for checking if a 
2902         assembly binding information maps an assembly name.
2903         (mono_assembly_binding_info_free): New function for freeing
2904         assembly binding information resources.
2905         (get_publisher_policy_info): New static function for retrieving 
2906         assembly binding information from a MonoImage.
2907         (compare_versions): New static function for comparing an assembly
2908         binding information data and the version of an assembly name.
2909         (check_policy_versions): New static function for checking if an
2910         assembly binding info mapping an assembly name is valid for it.
2911         (mono_assembly_load_publisher_policy): New static function for
2912         loading the 'policy.major.minor.MyAssembly' image for an assembly
2913         with an assembly name 'aname'.
2914         (mono_assembly_bind_version): New static function for updating
2915         assembly redirection.
2916         (mono_assembly_apply_binding): New static function for applying
2917         assembly binding.
2918         (search_binding_loaded): New static function for searching 
2919         loaded assembly binding infos in the cache domain.
2920         (mono_assembly_load_full): Don't apply assembly binding for
2921         reflection only assemblies.
2922
2923         * metadata-internals.h: Add MonoAssemblyBindingInfo,
2924         which contains information about assembly binding. Also
2925         declare signature for mono_config_parse_publisher_policy ()
2926         function, used to retrieve pub policy info.
2927         
2928         * mono-config.c:
2929         (publisher_policy_start): New static function used to parse publisher 
2930         policy config files.
2931         (publisher_policy_parser): New static MonoParseHandler containing 
2932         the functions used when parsing config files.
2933         (mono_config_parse_publisher_policy): New function for parsing
2934         publisher policy files.
2935         
2936 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
2937
2938         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
2939
2940         * marshal.c (mono_delegate_free_ftnptr): Ditto.
2941
2942         * object.c (mono_get_addr_from_ftnptr): New helper function.
2943
2944         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
2945
2946         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2947
2948 2005-08-19  Dick Porter  <dick@ximian.com>
2949
2950         * threads.c, threads.h, appdomain.c, appdomain.h,
2951         profiler-private.h, monitor.c, object.c, object-internals.h,
2952         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
2953         store the thread ID, so it can hold a 64 bit value if needed.
2954
2955 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
2956
2957         * reflection.c (mono_reflection_create_dynamic_method): Store the
2958         handle class into the method references as well so ldtoken works in
2959         dynamic methods.
2960
2961         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
2962         types.
2963
2964 2005-08-19  Ankit Jain <jankit@novell.com>
2965
2966         Fix #75847.
2967         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
2968           here rather than using the method signature of a arbitrary function
2969           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
2970           two arguments.
2971           Hack done with Harinath.
2972
2973 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2974
2975         * threadpool.c: disable printing stack traces when we get a exception
2976         in a threadpool thread. I need to do more testing to figure out which
2977         cases actually print this. Fixes bug #75828.
2978
2979 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2980
2981         * icall.c: there might be ignored whitespace after the last '='. This
2982         fixes length computation and bug #75840.
2983
2984 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
2985
2986         * assembly.c (mono_assembly_load_full): Consider .exe extension as
2987         well. Fixes #75809.
2988
2989         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
2990         #75784.
2991         
2992         * reflection.c (create_custom_attr_data): Ditto.
2993
2994 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
2995
2996         * locales.c, culture-info.h : removed RegionLCIDMap.
2997         * culture-info-tables.h : regenerated.
2998
2999 2005-08-16  Martin Baulig  <martin@ximian.com>
3000
3001         * class.c (mono_type_get_name_recurse): Small fix.
3002
3003 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
3004
3005         * locales.c : indentation fixie.
3006
3007 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
3008
3009         * object-internals.h,
3010           locales.h,
3011           locales.c,
3012           culture-info.h,
3013           icall.c : added RegionInfo table support.
3014         * culture-info-table.h : regenerated for region support.
3015
3016 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
3017
3018         * reflection.c (resolve_object): handle all kinds of MonoMethod
3019         including generic ones
3020
3021 2005-08-12  Ankit Jain <jankit@novell.com>
3022
3023         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
3024           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
3025
3026 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
3027
3028         * process.c: Don't close a thread handle when it's NULL. This is a
3029         workaround for bug #75733.
3030
3031 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
3032
3033         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
3034
3035 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
3036
3037         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
3038
3039 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3040
3041         * threadpool.c: if a work item in the thread pool has a callback that
3042         catches a exception, don't propagate it after invoking the callback.
3043         Fixes bug #75336.
3044
3045 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
3046
3047         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
3048
3049         * class-internals.h (MonoCachedClassInfo): Add some new fields.
3050
3051         * class.c (mono_class_init): Load field info lazily in the AOT case.    
3052
3053         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
3054
3055 2005-08-03  Ankit Jain  <jankit@novell.com>
3056
3057         Fix #75683.
3058         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
3059           PInvoke calling convention is 0.
3060
3061 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
3062
3063         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
3064         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
3065
3066 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
3067
3068         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
3069         to handle threads not started by the GC (patch by Michael Meeks
3070         <michael.meeks@novell.com>).
3071
3072 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
3073
3074         * reflection.c: Make buffer used in emitting types larger for some
3075         big generic types (patch by Michal Moskal).
3076
3077 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
3078
3079         * mono-debug.c: Fix some (not all) alignment problems.
3080
3081 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3082
3083         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
3084         Invoke mono_image_load_from_data_full passing the refonly
3085         parameter.
3086
3087         * assembly.c
3088         (mono_assembly_open_from_bundle): Add the refonly argument, 
3089         in order to pass it to other methods it calls to.
3090         (do_mono_assembly_open): Add the refonly argument, in order 
3091         to pass it to other methods it calls to.
3092         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
3093         the refonly parameter to it.
3094
3095         * image.c: Add loaded_images_refonly_hash and
3096         loaded_images_refonly_guid_hash to cache the reflection
3097         only loaded images.
3098         (mono_images_init): Initialize the hash tables used for
3099         caching the reflection only images.
3100         (load_modules): Invoke mono_image_open_full passing the refonly
3101         parameter to load the modules the correct way.
3102         (build_guid_table): Add the refonly argument, to re-build the 
3103         correct hash table.
3104         (do_mono_image_open): Added the refonly argument, in order to
3105         define it for the loaded image.
3106         (mono_image_loaded_full): New function, which receives an
3107         additional parameter to look for the image in the refonly or
3108         non-refonly section.
3109         (mono_image_loaded): Updated, using mono_image_loaded_full.
3110         (mono_image_loaded_by_guid_full): The same case that happens
3111         with mono_image_loaded_full.
3112         (mono_image_loaded_by_guid): Likewise.
3113         (register_image): Use the ref_only variable inside MonoImage
3114         to decide in which hash table store the current image.
3115         (mono_image_open_from_data_full): Rename
3116         mono_image_open_from_data to mono_image_open_from_data_full,
3117         adding the refonly argument, to define the ref_only variable 
3118         inside MonoImage.
3119         (mono_image_open_from_data): Return 
3120         mono_image_open_from_data_full.
3121         (mono_image_open_full): Rename mono_image_open to
3122         mono_image_open_full, receiving the new refonly argument,
3123         to pass it to inner methods.
3124         (mono_pe_file_open): Update this function, to open
3125         a MonoImage as a non-refonly image.
3126         (mono_image_close): Use the refonly variable inside
3127         MonoImage to remove the image from the correct caches.
3128
3129         * image.h: Add the signatures of mono_image_open_full,
3130         mono_image_open_from_data_full, mono_image_loaded_full,
3131         mono_image_loaded_by_guid_full.
3132
3133         * metadata-internals.h: Add the ref_only field to 
3134         MonoImage.
3135         
3136 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3137
3138         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
3139         Fix the last behavior, which used to load the assemblies and
3140         extract MonoReflectionAssemblyName information, instead of
3141         extract it from the metadata tables. Needed for Reflection
3142         Only assemblies.
3143         
3144 2005-07-29  Martin Baulig  <martin@ximian.com>
3145
3146         * mono-debug-debugger.c
3147         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
3148         not initialized.
3149
3150         * mono-debug.c
3151         (mono_debug_address_from_il_offset): Check whether we have
3152         debugging support before attempting to take the lock.
3153         (mono_debug_source_location_from_address): Likewise.
3154         (mono_debug_source_location_from_il_offset): Likewise.
3155         (mono_debug_il_offset_from_address): Likewise.
3156         (mono_debug_address_from_il_offset): Likewise.
3157
3158 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
3159
3160         * class.c (mono_class_from_name_case): Add support for dynamic images.
3161         Fixes #75650.
3162
3163         * object.c (mono_class_compute_gc_descriptor): Add a workaround
3164         for #75479.
3165
3166 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
3167         
3168         * reflection.c (mono_method_get_object): Fix warning.
3169
3170 2005-07-28  Martin Baulig  <martin@ximian.com>
3171
3172         * mono-debug.c
3173         (mono_debug_add_wrapper): Also write the wrapper type.
3174
3175 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
3176
3177         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
3178         
3179         * class.c (mono_class_init): Avoid reading nested classes if the AOT
3180         data indicates the class has none.
3181
3182 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
3183
3184         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
3185         loader lock with the debugger lock. Prevents deadlocks for beagle.
3186
3187         Beagle can now run on an smp box for a weekend without any
3188         issues. Woohoo!
3189
3190 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
3191
3192         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
3193         in a module. Fixes #75629.
3194
3195 2005-07-26  Martin Baulig  <martin@ximian.com>
3196
3197         * mono-debug.c (mono_debug_add_wrapper): New static method.
3198         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
3199         interncall or a wrapper.
3200
3201         * mono-debug.h (MonoDebugWrapperData): New public typedef.
3202         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
3203         (MONO_DEBUGGER_VERSION): Bump to 51.
3204
3205         * mono-debug-debugger.c
3206         (mono_debugger_add_type): Removed this empty function.
3207         (mono_debugger_add_method): Likewise.
3208
3209 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
3210
3211         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
3212         before accessing method->slot.
3213
3214 2005-07-21  Jb Evain  <jbevain@gmail.com>
3215
3216         * reflection.c (method_encode_clauses/class): Handle filters clauses.
3217         Fixes #75010.
3218
3219 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
3220
3221         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
3222         #75587.
3223
3224 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
3225
3226         * image.h image.c: Add mono_image_get_guid () API function.
3227
3228 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
3229
3230         There were issues when multiple threads tried to load
3231         assemblies. A deadlock was created between assemblies_mutex and
3232         mono_domain_assemblies_lock. This fixes the issue by making the
3233         assembly ref counting be lock free. See bug 75586.
3234         
3235         * image.c (mono_image_close): The add ref function here was using
3236         Interlocked operations while the unref was using a mutex and a
3237         --. I don't think this was ever a bug that would be exposed in a
3238         non-pendantic way (ie, by an embedder doing a ref on one thread
3239         and an unref on another), but for the sake of correctness, this is
3240         now Interlocked.
3241
3242         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
3243         (mono_assembly_load_reference): Call mono_assembly_addref rather
3244         than touching the refcount ourselves.
3245         (mono_assembly_close): Use InterlockedDecrement to unref the
3246         assembly. Don't acquire the lock unless it is actually needed.
3247
3248 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
3249
3250         * class.c (mono_class_layout_fields): Fix calculation of has_references
3251         for generic types.
3252
3253 2005-07-12  Martin Baulig  <martin@ximian.com>
3254
3255         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3256
3257         * metadata.c
3258         (mono_type_hash): Provide better hashing for generic instances.
3259         (mono_generic_inst_hash): Improve hashing.
3260         (mono_generic_class_hash): Likewise.
3261
3262         * reflection.c (mymono_metadata_type_hash): Improve hashing for
3263         generic instances.
3264
3265 2005-07-12  Martin Baulig  <martin@ximian.com>
3266
3267         * reflection.c (mono_reflection_create_runtime_class): Remove the
3268         hack for generic type definitions and non-`Run' assemblies.
3269         (mono_reflection_bind_generic_parameters): Also use
3270         `klass->wastypebuilder' to check for TypeBuilders.
3271
3272 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
3273
3274         * class.c (mono_class_layout_fields): Fix calculation of has_references
3275         for generic types.
3276
3277         * class.c (inflate_generic_class): Fix a leak.
3278         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
3279         for generic types.
3280
3281 2005-07-11  Martin Baulig  <martin@ximian.com>
3282
3283         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
3284         on error.
3285
3286 2005-07-11  Martin Baulig  <martin@ximian.com>
3287
3288         * loader.c (find_method): Also lookup in
3289         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
3290
3291 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3292
3293         * appdomain.c (mono_domain_unload): Don't free the error message
3294         before passing it to mono_get_exception_...
3295
3296         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
3297         
3298 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
3299
3300         * threads.c: try to better guess an available RT signal (bug #75387).
3301
3302 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3303
3304         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
3305         and CACHE_OBJECT.
3306
3307 2005-07-07  Martin Baulig  <martin@ximian.com>
3308
3309         * class.c (mono_type_get_name_full): Return NULL for
3310         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
3311         fixes #75408.
3312
3313 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3314
3315         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
3316         exit the appdomain as well being aborted.
3317
3318         * threadpool.c: Create all threadpool threads inside the root appdomain, and
3319         change back to the root domain after calling managed code. This enables
3320         appdomains using threadpools to be unloaded.
3321
3322 2005-07-07  Martin Baulig  <martin@ximian.com>
3323
3324         * class-internals.h
3325         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
3326         into `MonoDynamicGenericClass' since we only need it for dynamic
3327         types.
3328
3329         * reflection.c (mono_class_bind_generic_parameters): We don't need
3330         to compute the `parent' here.
3331
3332 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
3333
3334         * culture-info-table.h : regenerated.
3335
3336 2005-07-06  Martin Baulig  <martin@ximian.com>
3337
3338         * icall.c
3339         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
3340
3341         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
3342
3343 2005-07-06  Martin Baulig  <martin@ximian.com>
3344
3345         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
3346         we're doing a signature-only comparision; fixes #74945.
3347
3348 2005-07-06  Martin Baulig  <martin@ximian.com>
3349
3350         * class-internals.h (MonoGenericClass): Moved some things out into
3351         a new `MonoInflatedGenericClass' type.  
3352         (MonoInflatedGenericClass): New type; the `klass' of a
3353         `MonoGenericClass' is now computed lazyly in
3354         mono_get_inflated_generic_class().      
3355
3356         * class.c (mono_get_inflated_generic_class): New public function.
3357         (mono_class_inflate_generic_method): Removed the unused
3358         `MonoClass *' argument.
3359         (setup_generic_vtable): Don't call mono_get_inflated_method() on
3360         all the methods.
3361         (mono_class_create_generic): Make this static and merge it with
3362         mono_class_create_generic_2(); we're now called automatically from
3363         mono_get_inflated_generic_class().
3364
3365         * loader.c (mono_method_signature): Call
3366         mono_get_inflated_method() here.
3367
3368 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
3369
3370         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
3371         type of fields with RVA.
3372
3373         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
3374         for this pseudo class.
3375         (my_mono_class_from_generic_parameter): Likewise.
3376         (mono_class_init): Allow interfaces to have cctors.
3377
3378 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
3379
3380         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
3381         lazily for AOT methods.
3382
3383 2005-07-05  Martin Baulig  <martin@ximian.com>
3384
3385         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
3386         returns FALSE for a successful match, not TRUE.
3387
3388 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
3389
3390         * loader.c (mono_method_get_index): Optimize this a bit.
3391
3392 2005-07-04  Martin Baulig  <martin@ximian.com>
3393
3394         * class.c
3395         (class_compute_field_layout): Move the check for generic type
3396         definitions into mono_class_layout_fields().  Fixes #74684.
3397         (mono_class_from_generic_parameter): Correctly compute
3398         `klass->parent'; fixes #75457.
3399
3400         * reflection.c (register_assembly, register_module): Make sure
3401         `domain->rejobject_hash' is already created.
3402
3403 2005-07-02  Martin Baulig  <martin@ximian.com>
3404
3405         * class-internals.h
3406         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
3407         `MonoDynamicGenericClass'.      
3408
3409 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
3410
3411         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
3412         returned by a field getter is null, since null is a valid value.
3413
3414 2005-07-01  Martin Baulig  <martin@ximian.com>
3415
3416         * reflection.c (mono_reflection_generic_class_initialize): Update
3417         the `dgclass->fields [i].parent' to the correct class.
3418         (mono_image_get_fieldref_token): Use the declaring type, not the
3419         reflected type.
3420
3421 2005-07-01  Martin Baulig  <martin@ximian.com>
3422
3423         * loader.c (find_method): Also look in the interfaces; fixes #75429.
3424
3425 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
3426
3427         * threads.c (thread_cleanup): assert that thread != NULL
3428         (wait_for_tids_or_state_change): We were using the wrong variable
3429         when accessing wait->threads. `i' was always out of the bounds of
3430         the array.
3431
3432 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3433
3434         * loader.c: map user32 and kernel32 to libMonoSupportW
3435
3436 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
3437
3438         * appdomain.c (unload_thread_main): Mark this as WINAPI.
3439
3440 2005-06-28  Martin Baulig  <martin@ximian.com>
3441
3442         * loader.c (method_from_methodspec): Fix #75334.
3443
3444 2005-06-28  Martin Baulig  <martin@ximian.com>
3445
3446         Fix #74953 - Arrays now implement the generic IList<T> interface
3447         on the 2.0 platform.
3448
3449         * class-internals.h (MonoDefaults): Added `generic_array_class'.
3450
3451         * reflection.c (mono_class_bind_generic_parameters): New public
3452         function; similar to mono_reflection_bind_generic_parameters(),
3453         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
3454
3455         * domain.c (mono_init_internal): Try to initialize.
3456         `mono_defaults.generic_array_class' here; this'll only succeed if
3457         we're using the 2.0 corlib.
3458
3459         * icall.c
3460         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
3461         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
3462         (mono_lookup_internal_call): Added support for nested classes.
3463
3464         * loader.c
3465         (mono_get_method_from_token): Set `result->signature->pinvoke' if
3466         we're an interncall and have generic arguments.
3467
3468         * class.c
3469         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
3470         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
3471         instance of System.Array.InternalArray<T> for arrays, so they
3472         implement the generic IList<T> interface.
3473
3474 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
3475
3476         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
3477         (chastamar@yahoo.com). Fixes #75374.    
3478
3479 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
3480
3481         * culture-info-table.h: regenerated.
3482
3483 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3484
3485         * icall.c: handle spaces correctly for base64 strings.
3486
3487 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
3488
3489         * *.c: Kill some warnings.
3490
3491 2005-06-23  Duncan Mak  <duncan@novell.com>
3492
3493         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
3494         that this builds on Solaris 10 (x86).
3495
3496 2005-06-23  Martin Baulig  <martin@ximian.com>
3497
3498         * class.c
3499         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
3500         generic type definitions.
3501
3502 2005-06-23  Martin Baulig  <martin@ximian.com>
3503
3504         Fix #75331.
3505
3506         * metadata.c (mono_class_get_overrides): Renamed to
3507         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
3508         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
3509         pass it to mono_get_method_full().
3510
3511 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
3512
3513         * reflection.c (mono_reflection_create_runtime_class): take the
3514         mono_domain_lock in this method. Prevents deadlocks
3515
3516 2005-06-22  Martin Baulig  <martin@ximian.com>
3517
3518         * loader.c (method_from_methodspec): Fix #75330.
3519
3520 2005-06-22  Martin Baulig  <martin@ximian.com>
3521
3522         * reflection.c (type_get_qualified_name): Use
3523         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
3524         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
3525         argument; use it if we don't have an assembly name.
3526
3527 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
3528
3529         * object.c: In mono_message_init, set "copy out" flag for in
3530         parameters with the [Out] flag.
3531
3532 2005-06-21  Martin Baulig  <martin@ximian.com>
3533
3534         * class.c
3535         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
3536         and MONO_TYPE_PTR.
3537
3538 2005-06-21  Martin Baulig  <martin@ximian.com>
3539
3540         * class.c (mono_class_init): Don't initialize `class->fields' for
3541         generic instances since they're initialized again in
3542         compute_field_layout(). 
3543         (compute_field_layout): Set the field's `generic_info' here; fix
3544         #75320. 
3545
3546 2005-06-21  Martin Baulig  <martin@ximian.com>
3547
3548         * class-internals.h
3549         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
3550
3551         * metadata.c (mono_metadata_generic_method_equal): Also
3552         distinguish the `generic_class'; fixes #75334.
3553
3554 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3555
3556         * domain.c:
3557         * appdomain.c:
3558         * domain-internals.h:
3559         * reflection.c: 'domain_assemblies' field is now protected by its own
3560         lock. Don't call into managed code to run the AssemblyLoad event if we
3561         now there are no registered delegates for it.
3562
3563 2005-06-20  Martin Baulig  <martin@ximian.com>
3564
3565         * class.c (mono_class_is_assignable_from): Use a custom version of
3566         mono_class_has_parent() to make things work for generic instances;
3567         fix #75300.
3568
3569 2005-06-20  Martin Baulig  <martin@ximian.com>
3570
3571         * loader.c (method_from_methodspec): Apply a patch from
3572         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
3573
3574 2005-06-20  Martin Baulig  <martin@ximian.com>
3575
3576         * class.c (mono_class_init): Reverted Zoltan's last change; it
3577         breaks generics.
3578
3579 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
3580
3581         * threads.c (wait_for_tids_or_state_change): Add missing locking.
3582
3583 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3584
3585         * socket-io.c: fix the index in the socket array for writable/error
3586         sockets. Fixes bug #75306.
3587
3588 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
3589
3590         * class.c (mono_class_init): Allow interfaces to have static ctors.
3591
3592 2005-06-17  Martin Baulig  <martin@ximian.com>
3593
3594         * loader.c (method_from_methodspec): Use `context->container' when
3595         parsing the `gmethod->inst'.
3596
3597 2005-06-17  Martin Baulig  <martin@ximian.com>
3598
3599         * class.c (mono_type_get_name_recurse): Don't add the assembly
3600         name for type arguments.
3601
3602 2005-06-15  Martin Baulig  <martin@ximian.com>
3603
3604         * reflection.c (mono_image_get_inflated_method_token): Encode
3605         correct klass; fixes #75260.
3606
3607 2005-06-13 Michal Moskal <malekith@nemerle.org>
3608
3609         * icall.c: Make GetCorrespondingMethod/Constructor take
3610         MonoReflectionMethod method not MonoMethod. Removed
3611         MonoType.GetCorrespondingField, and make
3612         MonoGenericType.GetCorrespondingField take name not
3613         MonoClassField.
3614
3615 2005-06-13  Michal Moskal <malekith@nemerle.org>
3616
3617         * reflection.c (field_encode_signature, encode_locals):
3618          Make sizes of buffers for types larger (for big generic types).
3619          (create_generic_typespec,
3620          mono_reflection_sighelper_get_signature_local,
3621          mono_reflection_sighelper_get_signature_field):
3622          Add asserts for too small buffers.
3623
3624 2005-06-15  Martin Baulig  <martin@ximian.com>
3625
3626         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
3627         if our parent is not a dynamic type.
3628
3629 2005-06-15  Martin Baulig  <martin@ximian.com>
3630
3631         * class-internals.h (MonoTypeNameFormat): New enum.
3632
3633         * class.c
3634         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
3635         (mono_type_get_full_name): Removed.
3636         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
3637         argument instead of the boolean's.
3638
3639         * icall.c (ves_icall_System_MonoType_getFullName):
3640         Added `gboolean assembly_qualified'.    
3641
3642         * reflection.h
3643         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
3644
3645         * reflection.c (mono_reflection_parse_type): Parse the new type
3646         name format.
3647
3648 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3649
3650         * icall.c: no need to convert from utf16 to utf8 and then back again
3651         after the call to GetLogicalDrives.
3652
3653 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3654
3655         * icall.c: frombase64. Fix problems exposed by new tests.
3656
3657 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3658
3659         * icall.c: added internal calls for converting char [] and strings in
3660         base64 into byte [].
3661
3662 2005-06-10  Martin Baulig  <martin@ximian.com>
3663
3664         * class.c (mono_class_create_generic_2): Read the nested classes
3665         from the metadata rather than from `gklass->nested_classes' since
3666         `gklass' might not be initialized yet.
3667
3668 2005-06-09  Duncan Mak  <duncan@novell.com>
3669
3670         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
3671         all public headers. Fixes #74919.
3672
3673 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
3674
3675         * domain.c: The key for proxy_vtable_hash is now a pointer
3676         array. Added new GHashFunc and GCompareFunc functions for this.
3677
3678         * class.h: The list of interfaces in MonoRemoteClass is known in
3679         advance and can't grow (we create a new MonoRemoteClass if needed),
3680         so now the interface array can be allocated together with
3681         MonoRemoteClass.
3682         
3683         * object.c: Added a new method create_remote_class_key.
3684         Fixed mono_remote_class so it does not depend on
3685         mono_upgrade_remote_class.
3686         Removed extend_interface_array.
3687         Added new method clone_remote_class(), which makes a copy of a remote
3688         class and adds a new interface or class to it.
3689         mono_upgrade_remote_class() now creates a new remote class (or gets
3690         it from the cache) if an vtable upgrade is needed. In this way
3691         we make sure that other objects sharing the same remote class
3692         don't get the new vtable with unwanted interfaces.
3693         
3694         * object-internals.h:
3695         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
3696         
3697         * marshal.c: Track changes in mono_upgrade_remote_class().
3698
3699 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
3700         * icall.c: Add runtime methods for obtaining members of inflated
3701         class, which were created from supplied non-inflated members. It
3702         is used in internal Get{Method,Constructor,Field} methods in
3703         System.Type
3704
3705 2005-06-09  Martin Baulig  <martin@ximian.com>
3706
3707         * reflection.c
3708         (mono_reflection_bind_generic_method_parameters): Fix #75169.
3709
3710 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3711         * reflection.c (mono_image_basic_init): Define
3712         Version in MonoDynamicAssembly. 
3713         
3714 2005-06-08  Martin Baulig  <martin@ximian.com>
3715
3716         Fix #75136.
3717
3718         * loader.c
3719         (mono_method_signature_full): New public method; takes a
3720         `MonoGenericContext *'.
3721         (find_method): Use mono_method_signature_full() and pass the
3722         klass'es context to it.
3723
3724         * class.c (mono_class_is_inflated_method): Use
3725         mono_method_signature_full() and pass the context to it.
3726
3727 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
3728
3729         * object.c: add proper locking in mono_remote_class_vtable(),
3730         fixes possible memory corruption.
3731
3732 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
3733
3734         * marshal.c (mono_remoting_marshal_init): set
3735         initialized after initialization.
3736
3737 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
3738
3739         * locales.c : hush.
3740
3741 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
3742
3743         * object.c (extend_interface_array): fix really silly
3744         memory corrupting / comparison bug.
3745
3746 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3747
3748         * reflection.c: Functions added to support the creation
3749         of CustomAttributeData, which includes Attribute data
3750         used by ReflectionOnly methods.
3751
3752         * reflection.h:  mono_reflection_get_custom_attrs_data and
3753          mono_custom_attrs_data_construct added (functions exposed).
3754
3755          * icall.c: Added mono_reflection_get_custom_attrs_data
3756          as icall.
3757         
3758 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
3759
3760         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
3761         lupus's request.
3762
3763 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
3764
3765         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
3766
3767         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
3768         dynamic DllImportAttribute.
3769
3770         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
3771         dynamic DllImportAttribute.
3772
3773         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
3774         Fixes #75162.
3775
3776 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3777
3778         * threads.c: avoid segfault when an unstarted thread is aborted.
3779
3780 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
3781
3782         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
3783         Returns the name and version of the runtime for reporting.
3784
3785 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3786
3787         * appdomain.c: bump corlib version.
3788         * object-internals.h: new field in MonoReflectionAssembly.
3789
3790 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3791
3792         * object-internals.h: Carlos forgot to add this field.
3793
3794 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3795
3796         * icall.c: Added create_version to create instances
3797         of Version of MonoReflectionAssemblyName. This change helps
3798         the AssemblyName tests to keep running fine.
3799         
3800 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
3801   
3802         * object.c (mono_method_return_message_restore): A somehow less
3803         intrusive fix for #75138.
3804
3805 2005-06-03  Raja R Harinath  <rharinath@novell.com>
3806
3807         * object.c (mono_method_return_message_restore): Fix computation
3808         of expected number of out args.
3809
3810 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
3811
3812         * reflection.c (mono_image_get_method_info): Fix the case when the
3813         charset is empty.
3814
3815 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
3816
3817         * object.c: Added missing null check in
3818           mono_method_return_message_restore.
3819
3820 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
3821
3822         * reflection.c (mono_image_get_method_info): Handle the case when
3823         dllentry is empty.
3824
3825 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
3826
3827         * object.c: When creating the vtable for a proxy, take into account
3828         all inherited interfaces, not only the ones registered in
3829         iclass->interfaces. This fixs bug #74996.
3830         Also, in mono_method_return_message_restore, verify that the array
3831         of out args has the expected lengh.
3832
3833 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3834
3835         * socket-io.c: update the timeout in Poll when the call is interrupte.
3836
3837 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3838
3839         * socket-io.c: support abort/suspend in Select_internal after last
3840         change.
3841
3842 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3843
3844         * threadpool.c: remove warning.
3845
3846 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3847
3848         * icall.c:
3849         * socket-io.[ch]: Select_internal uses poll() now when available, thus
3850         removing the 1024 limit from select(). Runtime part of the fix for
3851         bug #71203.
3852
3853 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3854
3855         * socket-io.c: when resolving the addresses for the same
3856         host returned by gethostname(), get the local IPs from the interface
3857         list. Loopback addresses are discarded if the are interfaces up with
3858         non-loopback ones. Fixes bug #63265.
3859
3860 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
3861
3862         * appdomain.c, verify.c, object-internals.h, reflection.c:
3863         bumped corlib number to 36, and added new extra_flags field
3864         to ReflectionMethodBuilder and friends.  Fixes #75060.
3865
3866 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
3867
3868         * gc.c: register a new weak link only if the object is non-null
3869         (fixes bug#75047).
3870
3871 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
3872
3873         * culture-info.h : short time pattern too.
3874
3875 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
3876
3877         * culture-info.h : expand long time pattern string length.
3878
3879 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
3880
3881         * culture-info-table.h : update (more French date format; #72788).
3882
3883 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
3884
3885         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
3886         the method is static. Fixes #75029.
3887
3888 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
3889
3890         * reflection.c: Update the table_idx field of method builders after
3891         saving the module, since it can change. This is a workaround for
3892         bug #74914. 
3893
3894 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
3895
3896         * culture-info-table.h : update (additional French date format).
3897
3898 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
3899
3900         * icall.c (ves_icall_type_Equals): Revert last change.
3901         
3902         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
3903
3904         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
3905
3906 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
3907
3908         * class-internals.h: Added executioncontext_class field to 
3909         MonoDefaults structure.
3910         * domain.c: Cache System.Threading.ExecutionContext class in 
3911         mono_defaults.
3912         * object.c: Capture the ExecutionContext for asynchroneous calls in
3913          mono_async_result_new.
3914         * object-internals.h: Added execution_context and original_context 
3915         fields to MonoAsyncResult. Added execution_context to MonoThread.
3916         * security-manager.c|.h: Added mono_get_context_capture_method to 
3917         return the capture method (if required by the security manager or by
3918         the framework version used).
3919         * threadpool.c: Apply capture (if present) ExecutionContext in 
3920         mono_async_invoke and revert to original context after it completes.
3921
3922 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
3923
3924         * culture-info-table.h : updated (real hacky solution for zh-CHT).
3925
3926 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
3927
3928         * culture-info-table.h : zh-CHT related workaround.
3929
3930 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
3931
3932         * marshal.c (emit_marshal_custom): Add some error checking and call the
3933         methods in the ICustomMarshaler interface. Fixes #74875.
3934         
3935         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
3936         native->managed wrappers.
3937
3938 2005-05-12  Martin Baulig  <martin@ximian.com>
3939
3940         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
3941         here and use the loader lock.
3942
3943         * mono-debug.c: Properly lock when the debugger is not attached.
3944         (mono_debug_init): Release the initial lock if we're not running
3945         in the debugger.
3946
3947 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
3948
3949         * marshal.c (emit_marshal_custom): Pass through NULL values without
3950         calling the custom marshalling routines.
3951
3952         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
3953         conversion in structures. Fixes #74882.
3954
3955 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
3956
3957         * culture-info-table.h : zh-* cultures were missing.
3958
3959 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
3960
3961         * threads.c: Added a new event background_change_event which is signaled
3962         when a thread changes its background mode.
3963         Moved here several checks previously done in managed code. The checks
3964         require the thread lock, and using the thread lock in managed code
3965         can result in deadlocks.
3966         Merged Start_internal and Thread_internal into a single method. Now 
3967         Thread_internal does all work of creating and starting a thread.
3968         Added icalls for setting and getting the state of the object. Moved from
3969         managed code to avoid locking there.
3970         Added wait_for_tids_or_state_change() which is called instad of
3971         wait_for_tids when waiting for non-backround threads to end. This method
3972         will return if one of the threads ends or the background_change_event
3973         is signaled.
3974         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
3975         the background mode. This method signals the background_change_event
3976         event.
3977         * icall.c:
3978         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
3979         removed Start_internal.
3980         
3981 2005-05-11  Martin Baulig  <martin@ximian.com>
3982
3983         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
3984         to order of some fields to get proper alignment on 64-bit machines.
3985
3986 2005-05-11  Martin Baulig  <martin@ximian.com>
3987
3988         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
3989         changes as they're broken and completely fuck up the debugger.
3990
3991         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
3992
3993 2005-05-10  Martin Baulig  <martin@ximian.com>
3994
3995         * reflection.c (mono_reflection_generic_class_initialize): Don't
3996         call mono_class_setup_parent() here.
3997
3998 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3999
4000         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
4001         send/receive timeout use an integer in milliseconds. We were using a
4002         struct timeval.
4003
4004 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4005
4006         * locales.c:
4007         (internal_get_cultures): reserve the first slot of the array for the
4008         InvariantCulture, which will be filled in managed code.
4009
4010 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
4011
4012         * reflection.c (mono_image_fill_module_table): Initialize the
4013         GENERATION field as well.
4014
4015 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4016
4017         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
4018         Monitor.Enter on the object.
4019
4020 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
4021
4022         * threads.c: Enable the wait for running threads when exiting.
4023         * icall.c: Suspend all threads before exiting.
4024
4025 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
4026
4027         * assembly.c (mono_assembly_load_reference): Fix warning.
4028
4029 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4030
4031         * threadpool.c: changed the default number of threads per cpu. From now
4032         on, the default will be 20 + (5 * number of cpus) instead of 50.
4033
4034 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
4035
4036         * loader.c (mono_method_get_signature_full): Add locking here.
4037
4038 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
4039
4040         * appdomain.c: Moved methods for parsing and freeing assembly
4041         names to assembly.c.
4042         * assembly.c, domain-internals.h: Created public methods for parsing
4043         assembly names. Fixed mono_assembly_load_with_partial_name:
4044         it now finds the best match, taking into account the version,
4045         token and culture specified in the partial name. Also return
4046         the latest version if no version information is specified.
4047
4048 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
4049
4050         * threadpool.c: replace check for SocketAsyncCall class.
4051
4052 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4053
4054         * threadpool-internals.h:
4055         * Makefile.am: added threadpool-internals.h
4056
4057         * threadpool.c: call mono_unhandled_exception on exceptions not handled
4058         that happen in threadpool threads (tested on MS).
4059         (mono_thread_pool_remove_socket): new function that dispatch any pending
4060         AIO call on a socket that is closing. By now only epoll really needs it,
4061         as select/poll wake up when the socket closes.
4062
4063
4064         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
4065
4066 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
4067
4068         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
4069
4070 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
4071
4072         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
4073
4074 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
4075
4076         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
4077         has an abort request, convert it into a suspend request.
4078
4079 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
4080
4081         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
4082         warning for the usage of `UnmanagedFunctionPointerAttribute' which
4083         is not supported yet.
4084
4085 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4086
4087         * image.c: register assemblies loaded from data (bundles) in the loaded
4088         assemblies hash. Fixes bug #74772.
4089
4090 2005-04-29  Martin Baulig  <martin@ximian.com>
4091
4092         * class.c (mono_type_get_name_recurse): Update to the new naming
4093         schema from the latest .NET 2.x beta2.
4094         (mono_class_setup_vtable_general): If we're a generic instance,
4095         copy the vtable from our generic type definition and inflate all
4096         the methods in it.
4097
4098         * loader.c (find_method): Update to the new naming schema from the
4099         latest .NET 2.x beta2.
4100
4101 2005-04-29  Raja R Harinath  <harinath@gmail.com>
4102
4103         * class.c (mono_class_init): Add a mono_loader_unlock to the
4104         #74734 fix.
4105
4106 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
4107
4108         * icall.c (ves_icall_System_Environment_Exit): Remove the 
4109         suspend_all_other_threads () call for the time being, since it can hang.
4110
4111         * threads.c (mono_thread_manage): Similarly, disable the waiting for
4112         the background threads to exit, since it can also hang.
4113
4114         * class.c (mono_class_init): Applied patch from Ankit Jain 
4115         (radical@gmail.com). Avoid pending init errors when a field refers
4116         to a nested class using a typeref. Fixes #74734.
4117
4118         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
4119         this for dynamic modules.
4120
4121 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4122
4123         * threads.c: don't wait for threads that are in the process of aborting
4124         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
4125         and waiting for background threads to finish. This makes xsp and
4126         mod-mono-server exit without random length delays and/or hangs.
4127
4128 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4129
4130         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
4131
4132 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
4133
4134         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
4135         dynamic types to prevent infinite loops. Fixes #74727.
4136
4137         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
4138         ..._is_assignable_to.
4139
4140 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
4141
4142         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
4143
4144 2005-04-25  Martin Baulig  <martin@ximian.com>
4145
4146         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
4147
4148         * domain.c
4149         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
4150
4151         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
4152
4153         * reflection.c (build_compressed_metadata): Set metadata header
4154         version to 2.0.
4155
4156 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
4157
4158         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
4159         number into an integral and a decimal part. Fixes #70473.
4160
4161         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
4162
4163 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
4164
4165         * culture-info-table.h : reflected the latest locale-builder output.
4166
4167 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4168
4169         * threadpool.c: check for SuspendRequested too when deciding if
4170         mono_thread_interruption_checkpoint should be called.
4171
4172 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4173
4174         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
4175         * threads.c: remove interruption_mutex and use Interlocked instead. When
4176         suspending all the threads, wait for all the suspended events at once.
4177         If we're shutting down and get an APC that is going to be queued,
4178         call mono_thread_execute_interruption immediately, as the thread might
4179         be sleeping on a pthread condition or mutex.
4180
4181         * icall.c: call mono_runtime_set_shutting_down before suspending the
4182         threads.
4183
4184         Fixes bug #74693. And now xsp is happier when exiting.
4185
4186 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
4187
4188         * loader.c (mono_stack_walk): Fix #74690.
4189
4190 2005-04-22  Martin Baulig  <martin@ximian.com>
4191
4192         * mono-debug.h (MonoDebugMethodJitInfo): Added
4193         `MonoDebugMethodJitInfo *jit'.
4194
4195         * mono-debug.c (mono_debug_read_method): Cache the
4196         MonoDebugMethodJitInfo in `address->jit'.
4197         (mono_debug_free_method_jit_info): New public method.
4198
4199 2005-04-22  Martin Baulig  <martin@ximian.com>
4200
4201         * class.c (mono_class_is_assignable_from): Disallow
4202         type parameter -> interface.
4203
4204 2005-04-21  Dick Porter  <dick@ximian.com>
4205
4206         * threads.c (mono_thread_create): Turn an assertion into an error.
4207
4208 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
4209
4210         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
4211         
4212         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
4213         Fix some gcc 4.0 warnings.
4214
4215 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
4216
4217         * file-io.c: fix alt dir separator char on unix systems
4218         and cleanup (fixes bug #71214).
4219
4220 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
4221
4222         * marshal.c: Use CALLVIRT instead of CALL when dispatching
4223         a call to a remote domain, since the method may be an
4224         interface method in the client domain. This fixes bug #74192.
4225
4226 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4227
4228         * threadpool.c: recv/send are now performed before going back to managed
4229         code to save one transition.
4230
4231 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4232
4233         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
4234
4235         * metadata/threadpool.c: removed hack to workaround the bug above.
4236
4237         Fixes bug #74618.
4238
4239 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
4240
4241         * reflection.c reflection.h: Fix handling of parameter defaults in
4242         dynamic methods. Also fixes handling of parameter attributes.
4243         Fixes #74609.
4244
4245         * mono-debug.c (mono_debug_close_image): Fix warning.
4246
4247 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4248
4249         * socket-io.h: replaced old unused field with new 'blocking'.
4250         * threadpool.c: restore socket blocking state on windows(tm).
4251
4252 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
4253
4254         * icall.c: don't return the codebase in the AssemblyName[] returned by
4255         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
4256         * object-internals.h: Removed FIXME (fields were presents) and fixed
4257         versioncompat declaration.
4258
4259 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4260
4261         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
4262         not closed, so don't cleanup when it happens.
4263
4264 2005-04-13  Chris Toshok  <toshok@ximian.com>
4265
4266         * mono-debug-debugger.h: change prototype for
4267         mono_debugger_lookup_type.
4268
4269         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
4270         this function, although it should probably be named
4271         mono_debugger_init_type.
4272
4273 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4274
4275         * threadpool.c: fix non-AIO case.
4276
4277 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
4278
4279         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
4280         the built-in profiler to measure just JIT compilation times.
4281
4282 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4283
4284         * threadpool.c: the epollfd might be closed by another thread at
4285         any time, so ignore EBADF at treat it as a "we're closing" sign.
4286
4287 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4288
4289         * threadpool.c: release the semaphores with a count equals to the number
4290         of working threads in both IO and regular pools. Fixed typo that messed
4291         up the count of IO pool threads. Don't initialize the pipe handles if
4292         we're using epoll.
4293
4294 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4295
4296         * threadpool.c: some systems don't like a NULL when deleting the socket
4297         from epoll.
4298
4299 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4300
4301         * threadpool.c: fix semaphore allocation.
4302
4303 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4304
4305         * threadpool.c: added epoll() based implementation for asynchronous IO
4306         that is used instead of the default poll() when available.
4307         It can be disabled by setting MONO_DISABLE_AIO.
4308
4309 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4310
4311         * threadpool.c: windows needs 'closesocket' and instead of returning
4312         0 when the stream is closed while in select, it returns -1. Fixes bug
4313         #74573.
4314
4315 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
4316
4317         * class.c (class_compute_field_layout): Fix the regression caused by
4318         the previous try.
4319
4320 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4321
4322         * threadpool.c: separate pool for socket async. IO.
4323         * threadpool.h: mono_max_worker_threads is not a global any more.
4324
4325 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
4326
4327         * class.c (class_compute_field_layout): Fix #74549.
4328
4329 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4330
4331         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
4332         use 2 connected sockets instead.
4333
4334 2005-04-08  Miguel de Icaza  <miguel@novell.com>
4335
4336         * mono-config.c: Add new entry point for mkbundle
4337         mono_config_parse_memory. 
4338
4339 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4340
4341         * threadpool.c: removed another unused function.
4342
4343 2005-04-08  Ankit Jain  <radical@corewars.org>
4344
4345         * reflection.c (get_default_param_value_blobs): Add 'types'
4346         parameter to get the types encoded in the constant table.
4347         (mono_param_get_objects): Use the type from the constant table,
4348         not the type of the parameter, when creating default values.
4349         Handle null default values correctly.
4350
4351 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4352
4353         * file-io.c:
4354         * file-io.h:
4355         * threadpool.c:
4356         * threadpool.h:
4357         * icall.c:
4358         * socket-io.c: removed dead code for async IO.
4359
4360 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4361
4362         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
4363
4364         * threadpool.c: intercept socket async. calls and pass them to a thread
4365         that is polling and dispatching the job items to the threadpool as
4366         socket become ready. Fixes bugs #71217, #71933.
4367
4368         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
4369         between char and short/ushort arrays.
4370
4371         * socket-io.c: remove dead code.
4372
4373 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
4374
4375         * locales.c,
4376           icall.c : removed InternalToUpper_Comp() and
4377           InternalToLower_Comp().
4378
4379 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
4380
4381         * char-conversions.h : The tables were incorrectly generated. Should
4382           be generated against invariant culture.
4383
4384 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
4385
4386         * object.c (mono_runtime_invoke_array): Fix return value when 
4387         passing pre-created valuetype objects to ctors.
4388
4389         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
4390         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
4391         Fixes #74338.
4392
4393 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
4394
4395         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
4396         only used with --security and hides the wrong corlib version error.
4397
4398 2005-03-30  Joshua Tauberer  <tauberer@for.net>
4399
4400         * class.c: Changed mono_class_name_from_token so that types
4401         outside of a namespace don't have an initial period.  Improved
4402         the g_warning message used in _mono_class_get when loading
4403         fails.
4404         * assembly.c: In mono_assembly_load_reference, when an assembly
4405         can't be found, "No such file or directory" is misleading and
4406         unhelpful because a few paths were checked for the presence of
4407         the assembly.  When that happens (ENOENT), display a nicer
4408         message indicating the directories that were searched.  In all
4409         cases, the warning is made easier to read for non-hackers.
4410
4411 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
4412
4413         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
4414         project/solution.
4415         * appdomain.h|domain.c: Removed inline from functions.
4416         * appdomain.c: Reduced warnings when compiling on windows.
4417         * icall.c: Fixed output_debug declaration to gunichar2*.
4418         * mono-config.c: Reduced warnings when compiling on windows.
4419         * rand.c: Added missing "windows.h". Added missing return value.
4420         * rawbuffer.c: Added missing winsock2.h for windows.
4421         * sysmath.h: Added mono-compiler.h header to allow/ease 
4422         compilation with non-GCC compilers.
4423         * threads.c: Fixed declarations to compile with VS.NET C compiler.
4424         Removed cast warnings.
4425
4426         Adapted from the work of J Lothian (for VC6).
4427
4428 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
4429
4430         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
4431         from default_path.
4432
4433 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
4434
4435         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
4436         the 2.0 profile.
4437
4438 2005-03-27  Raja R Harinath  <harinath@gmail.com>
4439
4440         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
4441         has to be in $(exec_prefix).  $(prefix) is for arch-independent
4442         stuff, and it would probably use $(prefix)/share rather than
4443         $(prefix)/lib.
4444
4445 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4446
4447         * console-io.c: added 2 includes that might be missing.
4448
4449 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
4450
4451         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
4452         profile.
4453
4454         * reflection.c (create_custom_attr): Allocate the params array using
4455         alloca so it gets GC tracking.
4456
4457 2005-03-23  Chris Toshok  <toshok@ximian.com>
4458
4459         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
4460         out some spew.
4461
4462 2005-03-24  Raja R Harinath  <rharinath@novell.com>
4463
4464         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
4465         changes to pick up any changes in prefix, etc.
4466
4467 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
4468
4469         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
4470         
4471         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
4472         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
4473
4474 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
4475
4476         * class-internals.h object-internals.h class.c reflection.c: Extend the
4477         mono_lookup_dynamic_token () function to return the class of the
4478         token as well. 
4479
4480         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
4481         well. Fixes #73848.
4482
4483 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
4484
4485         * security-manager.c: Skip inheritance checks for intra-corlib
4486         class inheritance and method overrides. This skips a lot of checks
4487         and (anyway) permissions cannot work until corlib is loaded.
4488
4489 2005-03-23  Martin Baulig  <martin@ximian.com>
4490
4491         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
4492         MONO_TYPE_GENERICINST.  
4493
4494 2005-03-23  Martin Baulig  <martin@ximian.com>
4495
4496         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
4497
4498 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4499
4500         * class.c: added locking comments to some functions.
4501         Cache the interface offsets arrays (saves about 20 KB
4502         of runtime memory in a typical app).
4503         Reduce the time overhead in mono_class_setup_supertypes ().
4504
4505 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
4506
4507         * icall.c: speedup and fix leaks in GetMethodsByName and
4508         GetPropertiesByName.
4509
4510 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4511
4512         * reflection.c: some locking fixes.
4513
4514 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
4515
4516         * metadata.c: added missing break in case statement.
4517
4518 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
4519
4520         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
4521         typedbyref return values. Fixes #73941.
4522
4523 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
4524
4525         * security-manager.c|h: Added demandunmanaged method and 
4526         suppressunmanagedcodesecurity class to MonoSecurityManager.
4527         Renamed aptc class to allowpartiallytrustedcallers.
4528
4529 2005-03-17  Martin Baulig  <martin@ximian.com>
4530
4531         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
4532
4533 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4534
4535         * file-io.c: disabled file async. IO using aio_*. It uses the
4536         threadpool now. Workaround for bug #73718.
4537
4538 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4539
4540         * assembly.h, mono-config.c: added code to deal with bundled configs
4541         for bundled assemblies.
4542
4543 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
4544
4545         * *.c, private.h: cleanup, removing old private.h header file.
4546
4547 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
4548
4549         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
4550         and throw_on_unmappable_char attributes.
4551
4552 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
4553
4554         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
4555         _ProcessName_internal.
4556
4557 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
4558
4559         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
4560         #73631.
4561
4562         * icall.c threads.c threads-types.h: Remove slothash icalls as they
4563         are no longer used.
4564
4565 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
4566
4567         * object.c (compute_class_bitmap): Add support for generics. Fixes
4568         #73527.
4569
4570 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
4571
4572         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
4573
4574 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4575
4576         * filewatcher.c: commented out the code for windows watcher, as we don't
4577         use it (we use the managed implementation instead).
4578
4579 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
4580
4581         * object-internals.h (MonoThread): Remove 'unused1' field.
4582
4583         * appdomain.c: Bump corlib version.
4584
4585         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
4586
4587         * reflection.c (mono_reflection_create_runtime_class): Remove the
4588         AssemblyBuilder.Save optimization since it causes too many problems.
4589
4590 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
4591
4592         * exception.c|h: Added mono_get_exception_reflection_type_load to
4593         create a ReflectionTypeLoadException object.
4594         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
4595         to return NULL is a InheritanceDemand fails during reflection. Updated
4596         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
4597         ReflectionTypeLoadException if an InheritanceDemand fails during 
4598         reflection. Added icall mapping for GetLinkDemandSecurity.
4599         * security-manager.c|h: Added ves_icall_System_Security_
4600         SecurityManager_GetLinkDemandSecurity internal call to return the
4601         class and methods permissions set for a LinkDemand. Removed unused
4602         fields in MonoSecurityManager.
4603
4604 2005-03-10  Martin Baulig  <martin@ximian.com>
4605
4606         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
4607         it's a generic instance.
4608
4609 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
4610
4611         * reflection.c (mono_get_object_from_blob): Applied patch from
4612         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
4613
4614         * class.c (mono_class_is_assignable_from): Another try at fixing 
4615         #73469 without breaking anything.
4616
4617 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
4618
4619         * class.c: (mono_class_is_assignable_from): Revert the last changes
4620         since they don't work with generics.
4621         
4622         * class.c (mono_class_is_assignable_from): Fix build bustage.
4623
4624         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
4625         the managed IsAssignableFrom method. Fixes #73469.
4626
4627         * reflection.c (mono_reflection_call_is_assignable_from): New helper
4628         function.
4629
4630 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
4631
4632         * object.c (mono_load_remote_field_new): Fix returning uninitialized
4633         memory when the remoting callback does not sets the out arguments.
4634         Fixes #73007.
4635
4636         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
4637         by mistake.
4638
4639         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
4640
4641         * object-internals.h (MonoStackFrame): Sync with managed object layout.
4642
4643         * appdomain.c: Bump corlib version.
4644
4645 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
4646
4647         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
4648         function.
4649
4650         * threads.c (mono_thread_attach): Detect threads which are not started
4651         by the GC pthread wrappers.
4652
4653 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
4654
4655         * icall.c: Added new icall for RNG.
4656         * rand.c|h: Added new icall to open the RNG. This allows to share a 
4657         single handle on Linux to access /dev/urandom and fix #73183.
4658
4659 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
4660
4661         * object.c: setting the new vtable in a transparent proxy object must
4662         not change the GC descriptor.
4663
4664 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4665
4666         * object.c: fixed compilation without GCJ support.
4667         * reflection.c: for runtime-created types ensure klass->has_references
4668         is correct (bug #73215).
4669
4670 2005-03-02  Martin Baulig  <martin@ximian.com>
4671
4672         * class.c (mono_class_is_assignable_from): Make this work if
4673         `oklass' is a generic instance; fixes #72831.
4674
4675 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
4676
4677         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
4678         with hasthis set.
4679         
4680         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
4681
4682         * marshal.c: Reorganize native->managed marshalling code to also use
4683         the emit_marshal_... functions.
4684
4685 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
4686
4687         * object.c: typed allocs have issues with bitmap sizes > 30,
4688         so check for max_set >= 30.
4689
4690 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
4691
4692         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
4693         managed code. Fixes #73012.
4694
4695         * metadata.h (MonoMarshalSpec): Add elem_mult field.
4696
4697         * metadata.c reflection.c: Load/Emit elem_mult as well.
4698         
4699         * metadata.h (MonoMarshalSpec): Add comment.
4700
4701         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
4702
4703         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
4704         num_elem to -1 if not given.
4705
4706         * object-internals.h (MonoReflectionMarshal): Add has_size field.
4707
4708         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
4709         given values.
4710
4711 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
4712
4713         * null-gc.c (mono_gc_free_fixed): Was not compilable.
4714
4715 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
4716
4717         * reflection.c (encode_marshal_blob): Encode param_num field as well.
4718
4719         * object-internals.h (MonoReflectionMarshal): Add param_num field.
4720
4721 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
4722
4723         * object.c: generalized the reference bitmap creation
4724         and added hooks for the new GC.
4725         * class-internals.c: removed the gc_bitmap field from MonoClass.
4726
4727 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4728
4729         * domain.c: help the compiler to produce better code
4730         in mono_jit_info_table_find ().
4731
4732 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
4733
4734         * object.c: make all allocations look typed.
4735
4736 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4737
4738         * socket-io.c: load Mono.Posix if it's not loaded already
4739         (fixes bug#73033).
4740
4741 2005-02-24  Martin Baulig  <martin@ximian.com>
4742
4743         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
4744         * reflection.c (dup_type): Likewise.
4745
4746 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
4747
4748         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
4749         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
4750
4751 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4752
4753         * domain.c, threads.c, object-internals.h: make the critical thread
4754         local vars use the fast access mode (even when we're compiled in
4755         a lib). Provide accessors to be used by the jit during codegen.
4756
4757 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4758
4759         * appdomain.c: Changed hook functios behavior to include
4760         support for the reflection only assemblies. Some icalls were changed
4761         to support the mentioned assemblies too. Signatures of static methods
4762         try_assembly_resolve and real_load now have an additional parameter:
4763         refonly.
4764
4765         * assembly.c: General changes to mono_assembly_ methods to support
4766         reflection only api. Functions mono_assembly_open, mono_assembly_load,
4767         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
4768         suffix, to support an additional gbool parameter to specify whether
4769         the assembli is reflection only or not. Created some new hook functions 
4770         to add support for reflection only assemblies. Signatures of static 
4771         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
4772         have now an additional parameter: refonly.
4773
4774         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
4775         indicating whether the assembly is reflection only or not.
4776
4777         * exception.c: Add mono_get_exception_invalid_operation.
4778
4779         * icall.c: Throw an InvalidOperationException when trying to invoke
4780         a property/method/event, or trying to set/get the value of a field.
4781         Also add an icall to retrieve the ref_only flag to the
4782         MonoReflectionAssembly.
4783
4784 2005-02-23  Chris Toshok  <toshok@ximian.com>
4785
4786         Part of fix for #72827.
4787         * mono-debug.c (mono_debug_add_method): add lexical block data to
4788         the info we write.  Kind of a hack at the moment - we copy the
4789         lexical block info from the MonoDebugMethodInfo to the
4790         MonoDebugMethodJitInfo here, before writing it.
4791         (mono_debug_read_method): read the lexical block info.
4792
4793         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
4794
4795         * debug-mono-symfile.h: add lexical block support.
4796
4797         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
4798         support.
4799
4800 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
4801
4802         * loader.c (mono_lookup_pinvoke_call): Fix warning.
4803
4804         * object.c (mono_runtime_free_method): Call mono_free_method () and
4805         put the TODOs there.
4806
4807         * loader.c (mono_free_method): Free up most memory allocated for 
4808         dynamic methods.
4809
4810 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
4811
4812         * reflection.c: properly flag a Type argument to a
4813         named custom attr value (bug #72248).
4814
4815 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4816
4817         * reflection.c: reduce code duplication in named custom
4818         attribute encoding.
4819
4820 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
4821
4822         * reflection.c: properly encode custom attrs of type object
4823         (bug #72649).
4824
4825 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
4826
4827         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
4828
4829 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
4830
4831         * socket-io.c: load System.dll if it's not loaded already
4832         (bug #72850 and #70477).
4833
4834 2005-02-21  Martin Baulig  <martin@ximian.com>
4835
4836         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
4837         generic instances.
4838
4839 2005-02-21  Martin Baulig  <martin@ximian.com>
4840
4841         * reflection.c (mono_image_build_metadata): We also need to
4842         "fixup" the MethodImpl table after we computed the final method
4843         indices.  Call fixup_methodimpl() to do that.
4844         (fixup_methodimpl): New private method.
4845
4846 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
4847
4848         * assembly.c: special case mscorlib.dll (bug#72536),
4849         patch from Carlos Alberto Cortez.
4850
4851 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
4852
4853         * threads-types.h threads.c: Fix build bustage.
4854
4855         * threads.c: Use a union for long<->double conversions.
4856
4857         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
4858         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
4859
4860         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
4861         containing the checkpoint call with NOT_TAKEN.
4862         
4863         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
4864         checkpoint before pushing the arguments, so they won't have to be
4865         spilled to stack.
4866
4867 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4868
4869         * domain.c, assembly.c, domain-internals.h: make some data
4870         const and relocation-free.
4871
4872 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
4873
4874         * object.c, appdomain.c, class-internals.h: introduce the
4875         MonoClassRuntimeInfo structure to hold the info needed to
4876         use a class at runtime. Made mono_class_vtable() lock-free
4877         for all the appdomains.
4878
4879 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
4880
4881         * metadata-internals.h, image.c: introduce a per-image mempool to
4882         be used for memory that has the same lifetime as the image.
4883
4884 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
4885
4886         * domain.c: In mono_init_internal(), instead of selecting the first
4887         runtime version supported by an executable, get a list of all
4888         supported versions and select the one for which an mscorlib exists
4889         (since even if the runtime supports a given version, it doesn't mean
4890         that the framework for that version is installed).
4891         Modified get_runtimes_from_exe to support this behavior.
4892         In supported_runtimes, added information about additional system
4893         assembly versions.
4894         
4895         * assembly.c: Added support for more than one system assembly version
4896         per runtime version. Updated the assembly list.
4897         In mono_assembly_remap_version, removed the initial version check,
4898         since we don't know to which version we need to compare until we
4899         get the version set on which the assembly is based.
4900         Moved the code for loading corlib into the new method
4901         mono_assembly_load_corlib(), so it can be used by the initialization
4902         code.
4903         
4904         * domain-internals.h: Updated data structures and added declaration
4905         for mono_assembly_load_corlib.
4906
4907 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
4908
4909         * reflection.c (resolve_object): Fix the creation of the signature in 
4910         the SignatureHelper case.
4911
4912         * assembly.c (mono_assembly_remap_version): Fix binary search.
4913         
4914 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
4915  
4916         * class.c: Added inheritance check when a method is overloaded (from a
4917         virtual method or when implementing an interface) and when a class is
4918         inherited. Added functions to set a failure for a class and to 
4919         retreive the exception from a failure.
4920         * class-internals.h: Added fields to MonoClass to keep the exception
4921         information status for inheritance (or other exceptions) to be thrown
4922         later (i.e. not at load time).
4923         * object.c: Throw the inheritance SecurityException when a type is to 
4924         be created with either class or method inheritance violations.
4925         * reflection.c|h: Fix when getting declsec from a class. Removed 
4926         unrequired code for class. Improved sanity in parameter naming.
4927         * security-manager.c|h: Added functions to check for class and method
4928         inheritance.
4929
4930 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
4931
4932         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
4933         and has_finalize in dynamic types as well.
4934
4935 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
4936
4937         * culture-info-table.h : fixed currency format for en-GB (and so on).
4938
4939 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
4940
4941         * gc.c: ensure the GC handles never have 0 as a value.
4942
4943 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
4944
4945         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
4946         a pointer to a struct to unmanaged code. Fixes #72625.
4947
4948 2005-02-16  Martin Baulig  <martin@ximian.com>
4949
4950         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
4951
4952 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
4953
4954         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
4955
4956 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
4957
4958         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
4959
4960         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
4961         UnmanagedFunctionPointerAttribute, use it for determining calling convention
4962         etc. Fixes #71471.
4963
4964         * reflection.c (mono_custom_attrs_get_attr): New helper function.
4965
4966         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
4967
4968 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
4969
4970         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
4971         changes to make the current context a field in MonoThread.
4972
4973 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
4974
4975         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
4976         the last change.
4977         
4978         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
4979         extracted from mono_marshal_get_native_wrapper.
4980
4981         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
4982         to create wrappers around native functions.
4983
4984         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
4985         delegates for arbitrary function pointers. Fixes #71472.
4986
4987 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
4988
4989         * threads.c: cleaned up the code a little.
4990
4991 2005-02-15  Martin Baulig  <martin@ximian.com>
4992
4993         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
4994         the data table.
4995
4996         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
4997         allocate larger chunks if needed.
4998
4999 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
5000
5001         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
5002         in by mistake.
5003
5004 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
5005
5006         * domain.c: keep the domains in an array and ensure the domain ids
5007         are kept small, so they can be used as indexes to domain-specific data
5008         with a small memory overhead.
5009
5010 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
5011
5012         * icall.c: Handle byref types in Type icalls. Fixes #72544.
5013
5014 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
5015
5016         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
5017
5018 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
5019
5020         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
5021
5022         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
5023         values.
5024
5025         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
5026         
5027 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
5028
5029         * domain-internals.h: add the hashtable here.
5030
5031         * class-internals.h: Remove `info' from MonoMethod
5032
5033         * domain.c: Add a new hashtable, jit_trampoline_hash
5034
5035 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
5036
5037         * object.c: don't set the value of static fields
5038         (fixes bug#72494).
5039
5040 2005-02-11  Martin Baulig  <martin@ximian.com>
5041
5042         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
5043         (mono_debug_add_method): Silently ignore the method if it's too big.
5044         (mono_debug_add_type): Likewise.
5045
5046 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
5047
5048         * threads.c, appdomain.c: remove #ifdefs from the code.
5049
5050 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
5051
5052         * metadata-internals.h: Added flags to MonoAssembly to cache the most
5053         common security informations. This allows us to stay in unmanaged code
5054         when doing LinkDemand and it's special cases (except for the first 
5055         time for initialization). The flags a very much used with --security.
5056         * reflection.c|h: Added code to get declarative security attributes 
5057         for LinkDemand and InheritanceDemand. This required to refactor the
5058         existing code for Demand.
5059         * security-manager.c|h: Added new method fields for the special cases
5060         of LinkDemand.
5061
5062 2005-02-10  Martin Baulig  <martin@ximian.com>
5063
5064         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
5065         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
5066
5067 2005-02-10  Martin Baulig  <martin@ximian.com>
5068
5069         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
5070         debugging code; this is almost a complete rewrite.
5071
5072         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
5073
5074 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5075
5076         * domain.c, object.h: expose mono_string_equal () and 
5077         mono_string_hash ().
5078         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
5079         it's implemented in managed code.
5080
5081 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5082
5083         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
5084         lo leak objects between appdomains.
5085
5086 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5087
5088         * assembly.c: old compilers compilation fix from 
5089         robertj@gmx.net (Robert Jordan).
5090
5091 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
5092
5093         * class-internals.h: Little reminder for the future.
5094
5095         * debug-helpers.c: Fix up wrapper_type_names
5096
5097 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5098
5099         * image.c, metadata-internals.h: when loading an image from a file,
5100         mmap all of it and use the same codepaths as when using a
5101         in-memory image: the code is simpler and we use less memory
5102         (both writable and readonly).
5103
5104 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5105
5106         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
5107         API to alloc runtime data structures that need to be tracked by the
5108         GC and contain pointers.
5109         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
5110         make the code more readable and eventually use a different GC.
5111
5112 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
5113
5114         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
5115         for out arguments.
5116         
5117 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
5118
5119         * object.c: In release_type_locks(), don't release the cctor lock
5120         if it has already been released. This fixes a crash in the
5121         thread5 test.
5122
5123 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5124
5125         * gc.c, marshal.c, icall.c: register a delegate for finalization
5126         only when the native function pointer has been allocated for it.
5127
5128 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5129
5130         * object.c: cleaned up some code, allocate objects that are
5131         pointer free with the atomic malloc variant. Allocate memory
5132         for static data from the mempool if it's pointer-free.
5133         Allocate the bounds array at the end of the array data, when needed.
5134         * object-internals.h, object.h: move a private function in a private
5135         header.
5136         * class.c: handle missing case in tracking references in fields.
5137
5138 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5139
5140         * class.c, class-internals.h: keep track if a type has
5141         reference fields in either the instance or static fields.
5142
5143 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
5144
5145         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
5146         and renamed to MonoRuntimeInfo. Added fields to store the expected
5147         framework assembly version. Changed mono_get_framework_version and
5148         mono_get_runtime_version for a single mono_get_runtime_info method.
5149         
5150         * assembly.c: Added method to remap system assembly versions to the
5151         current executing runtime version. Removed old mapping code.
5152         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
5153         
5154         * icall.c, reflection.c: Track api changes.
5155
5156 2005-02-06  Miguel de Icaza  <miguel@novell.com>
5157
5158         * loader.c (method_from_memberref): Improve error reporting,
5159         produce the class name instead of the typeref/typedef index. 
5160
5161 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
5162
5163         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
5164
5165 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5166
5167         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
5168         stdcall and charset name mangling.  Reorganize the code and add
5169         some tracing stuff.
5170
5171 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
5172
5173         * monodiet.c: More iters!
5174
5175         * marshal.c: Iter usage.
5176
5177         * icall.c: Iter usage.
5178
5179         * object.c: Use iters.
5180
5181         * debug-helpers.c: More iters
5182
5183 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5184
5185         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
5186         under win32.
5187
5188 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
5189
5190         * mono-debug-debugger.c: use iters
5191
5192         * class.c, class-internals.h: mono_class_setup_events is static
5193         now
5194
5195         * All callers: use iters
5196
5197 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5198
5199         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
5200         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
5201
5202 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
5203
5204         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
5205
5206         * marshal.h: Add prototypes for ldfld/stfld_remote.
5207
5208         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
5209         this is called during startup.
5210         
5211 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
5212
5213         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
5214         MonoThreadsSync struct private in monitor.c. Changed the way
5215         MonoThreadsSync is allocated so it's faster and there is no
5216         need to keep track of it with a finalizer and it uses less memory.
5217         This also finally allows us to allocate mono objects as ptrfree when
5218         there are no reference fields.
5219
5220 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
5221
5222         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
5223         disappearing link to the GC interface and use them to simplify
5224         the gchandles code.
5225
5226 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
5227
5228         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
5229         stfld_remote which call mono_load/store_field_new. This allows methods
5230         calling ldfld/stfld wrappers to be AOTed.
5231
5232         * console-io.c: Include sys/filio.h under solaris.
5233         
5234         * console-io.c: Include curses.h if needed correctly.
5235
5236 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
5237         
5238         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
5239         method->klass as well.
5240
5241         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
5242
5243         * class.c (mono_class_init): Switch on lazy initialization of 
5244         methods.
5245
5246         * class.c (mono_class_get_finalizer): Handle the case when the 
5247         finalizer is inherited.
5248
5249 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5250
5251         * console-io.c: <curses.h> is needed by term.h on solaris.
5252
5253 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
5254
5255         * icall.c, class-internals.h, monodiet.c, class.c: Remove
5256         mono_class_setup_properties where possible. Remove this ftn from
5257         the header file, and make it static.
5258
5259 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
5260
5261         * loader.c: Add missing setup_... call.
5262
5263         * class.c: Add missing setup_... calls.
5264
5265         * class.c (mono_class_init): Switch on lazy initialization of 
5266         the generic vtable.
5267         
5268         * class.c (mono_class_init): Fix generics broken by the recent changes.
5269
5270         * monodiet.c (handle_type): Add missing setup_... calls.
5271
5272         * class.c: Back out garbage in previous patch.
5273         
5274         * class.c: Add missing setup_... calls.
5275
5276         * class.c (mono_class_get_method_from_name_flags): Avoid calling
5277         mono_class_setup_methods () if possible.
5278
5279         * class-internals.h (MonoClass): Add 'has_cctor' flag.
5280
5281         * class-internals.h (MonoCachedClassInfo): New structure.
5282
5283         * class.c: Initialize properties and events fields of MonoClass lazily.
5284
5285         * class.c: Add infrastructure for lazily initializing the methods and
5286         vtable fields of MonoClass. Not yet used.
5287
5288         * class.c (mono_class_get_finalizer): New helper function.
5289
5290         * class.c: Add infrastructure for loading some class related data from
5291         an AOT file.
5292
5293         * object.c: Add infrastructure for initializing the vtable from data
5294         in the AOT file.
5295
5296         * gc.c (run_finalize): Use mono_class_get_finalizer ().
5297
5298         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
5299         appropriate initialization function before accessing parts of the
5300         MonoClass structure.
5301
5302         * marshal.c: Fix warnings.
5303         
5304         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
5305
5306         * mono-debug-debugger.c (get_exception_message): Use 
5307         mono_class_get_method_from_name_flags ().
5308
5309 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
5310
5311         * reflection.c, appdomain.c: Replace a few manual searches that
5312         Zoltan missed. (Paolo approved this part of my initial patch).
5313
5314 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
5315
5316         * profiler.c: disable recording statistical events at report time.
5317
5318 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5319
5320         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
5321         to byteswap arrays of enum values, too (bug #72080).
5322
5323 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
5324
5325         * appdomain.c (set_domain_search_path): Allow this to be called if
5326         domain->setup is not yet set.
5327
5328         * loader.c (mono_method_get_index): New helper function.
5329
5330         * loader.c reflection.c: Use mono_method_get_index ().
5331
5332         * class.c (mono_class_get_method_from_name_flags): New helper method.
5333
5334         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
5335         this.
5336
5337         * class.c (mono_class_get_cctor): New helper method.
5338
5339         * string-icalls.c object.c class.c marshal.c reflection.c: Use
5340         mono_class_get_method () to look up methods.
5341
5342 2005-02-01  Miguel de Icaza  <miguel@novell.com>
5343
5344         * console-io.c: Fix the build, this should work on Windows.
5345
5346 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
5347
5348         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
5349         be set to null to keep things valid
5350
5351 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5352
5353         * icall.c: added Console 2.0 icalls.
5354         * Makefile.am: added console-io.[ch]
5355         * console-io.[ch]: internal calls for Console 2.0 API.
5356
5357 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5358
5359         * class.c: make sure we consider all the interfaces
5360         when calculating max_interface_id (bug found by
5361         Jeroen Frijters running ikvm).
5362
5363 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
5364
5365         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
5366         valuetype fields to null.
5367
5368         * object.c (set_value): Ditto. Fixes #71669.    
5369
5370 2005-01-31  Martin Baulig  <martin@ximian.com>
5371
5372         * metadata.c (mono_metadata_has_generic_params): New public
5373         function; checks whether something is a generic method.
5374
5375 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
5376
5377         * appdomain.c: fix infinite recursion when adding assemblies.
5378
5379 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
5380
5381         * object.c: Fix small typo to return all items for Environment.
5382         GetCommandLineArgs.
5383
5384 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5385
5386         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
5387         reflection.c: more domain and assembly-unload related fixes
5388         and memory leaks plugs.
5389
5390 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
5391
5392         * 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.
5393
5394 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
5395
5396         * loader.c (mono_method_signature): Make this method lazy
5397         (mono_get_method_from_token): Don't computate the signature here.
5398
5399         Doing this saves quite a bit of memory. I got 90 kb on starting up
5400         monodoc. It should also save some disk reads on startup.
5401
5402         * *: MonoMethod->signature might be NULL now. You *MUST* use
5403         mono_method_signature.
5404
5405 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
5406
5407         * object.c (mono_runtime_get_main_args): Return an array from the
5408         current domain here. Fixes #71938.
5409
5410 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
5411
5412         * monitor.c: formatting changes to comply with the
5413         mono coding style and remove #ifdefs from the code.
5414
5415 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5416
5417         * metadata.c, private.h: remove some unneeded data
5418         and use a more compact representation for table schemas.
5419
5420 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
5421
5422         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
5423         to get a better distribution in hash tables.
5424         * *.c: use mono_aligned_addr_hash() where appropriate.
5425         * assembly.c: make var static.
5426
5427 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
5428
5429         * domain-internals.h: Put MonoJitInfo on a diet.
5430
5431         * domain.c: Fix a warning.
5432
5433 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5434
5435         * gc.c: rework the gc handles code to reuse handles
5436         when freed.
5437
5438 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5439
5440         * domain.c: fixed long standing bug in mono_string_equal() which
5441         was brought to light with the ldstr changes.
5442
5443 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
5444
5445         * reflection.c: Remove warning by adding missing include for marshal.h
5446
5447 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5448
5449         * domain.c, object.c: change the ldstr_table to hold
5450         MonoString* as keys: makes the runtime isinterned lookup
5451         faster and simplifies memory management.
5452
5453 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
5454  
5455         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
5456         possible to add imperative security checks before calling the icall.
5457         * reflection.c: Return security attributes on the original MonoMethod
5458         (and not the wrapped one). This fix permissions on icalls.
5459
5460 2005-01-25  Dick Porter  <dick@ximian.com>
5461
5462         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
5463         the check for mktime() support actually test the mktime() return
5464         value.  "Fixes" bug 71682, though the output is still different to
5465         MS.
5466
5467 2005-01-25  Martin Baulig  <martin@ximian.com>
5468
5469         * class.c (mono_class_is_assignable_from): Make this work for
5470         generic instances.
5471
5472 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
5473
5474         * marshal.c (mono_string_utf8_to_builder)
5475         (mono_string_builder_to_utf16): We might not have ownership of the
5476         string. In thise case, we need to create a new buffer.
5477
5478         * object-internals.h (mono_stringbuilder_capacity): sb->str might
5479         be null, in which case, use the default capacity.
5480
5481 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5482
5483         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
5484         GC events to the profiler.
5485
5486 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5487
5488         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
5489         if you don't want the GC to run.
5490
5491 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
5492
5493         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
5494         start providing a GC API and keeping different implementations in
5495         their own file.
5496         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
5497
5498 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
5499
5500         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
5501         mmap rather than allocating a huge buffer.
5502         (mono_debug_close_mono_symbol_file): Free the buffer allocated
5503         above.
5504
5505 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
5506
5507         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
5508         and CheckExecutionRights.
5509         * reflection.c|h: Keep the index of the declarative security to be 
5510         used, instead of the pointer, when AOT compiler is used. Also add 
5511         class initialization when requesting demands.
5512         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
5513         CheckExecutionRights. Both properties are now FALSE by default, and
5514         unmodifiable, unless the --security option is used.
5515
5516 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5517
5518         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
5519         reflection.c: properly refcount images and assemblies, many leaks fixed.
5520
5521 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5522
5523         * threadpool.c: increase the timeout for threads in the thread pool to
5524         10s.  Fixes bug #67159.
5525
5526 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
5527
5528         * class-internals.h: Sun's compiler insists on explicit
5529         signed on bit fields to handle then correctly.
5530
5531 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
5532
5533         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
5534         Make the size of the array fit only the number of invalid path
5535         chars that we have.
5536
5537         * class.c (_mono_class_get): Improve the error reporting when a
5538         class referenced is not found, to assist debugging. 
5539
5540 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
5541
5542         * threads.c: fix off-by-one error.
5543         * domain.c: free data allocated in the domain.
5544
5545 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
5546
5547         * reflection.c (mono_method_body_get_object): Fill out exception info
5548         as well.
5549
5550         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
5551         structure.
5552         
5553 2005-01-19  Martin Baulig  <martin@ximian.com>
5554
5555         * loader.c (mono_get_method_constrained): Make this work again.
5556
5557 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
5558
5559         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
5560         guint16 to match the managed side.
5561
5562         * reflection.c (mono_reflection_body_get_object): Fill out local
5563         variables array.
5564
5565         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
5566         as well.
5567
5568         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
5569         'local_var_sig_token'.
5570
5571 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
5572
5573         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
5574         System.Drawing.
5575
5576         * reflection.c (mono_method_body_get_object): Handle abstract and
5577         runtime methods.
5578
5579 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
5580
5581         * marshal.c, loader.c, class-internals.h, reflection.c:
5582         store the emthod data for a wrapper in an array instead of a list.
5583
5584 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
5585
5586         * marshal.c: change the code to allocate memory more
5587         conservatively for method wrappers.
5588
5589 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
5590
5591         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
5592         fields from MonoClass to the marshal info structure where they belong.
5593
5594 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5595
5596         * class.c, object.c, class-internals.h, marshal.c: rearrange
5597         some fields and tweak some types to lower memory usage.
5598
5599 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
5600
5601         * threads.c (signal_thread_state_change): Handle the case when the
5602         target thread is the current thread.
5603
5604         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
5605
5606         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
5607         emit_ptr_to_object_conv. 
5608
5609         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
5610         marshalling. Fixes #71352.
5611
5612 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
5613
5614         * metadata.h, blob.h: move table enum to blob.h so it can be included
5615         in any header.
5616         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
5617         cut the size of MonoImage/MonoDynamicImage.
5618
5619 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
5620
5621         * profiler.c (mono_profiler_install_simple): Fix default arguments.
5622
5623 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
5624
5625         * reflection.c, reflection.h, icall.c: add a function to check
5626         if an attribute type is defined for a metadata object.
5627
5628 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
5629
5630         * object-internals.h: Added some needed fields from StringBuilder class.
5631         * marshal.c: Set the maxCapacity when creating a StringBuilder.
5632
5633 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
5634
5635         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
5636         threads before shutting down the runtime.
5637
5638         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
5639
5640 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5641
5642         * object-internal.h, threads.c: implement stacksize and 
5643         parameterized thread start functionality (requires
5644         matching corlib). Marked broken code for later removal.
5645
5646 2005-01-12  Martin Baulig  <martin@ximian.com>
5647
5648         * class-internals.h (MonoGenericClass): Moved the `initialized'
5649         flag to MonoDynamicGenericClass, removed `init_pending'.
5650         (MonoGenericInst): Added `is_reference' flag.
5651
5652 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
5653
5654         * reflection.c (mono_image_create_pefile): Only set the pe_offset
5655         inside the MSDOS header. Fixes #71201.
5656
5657         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
5658         gc thread.
5659         (mono_domain_finalize): Ditto.
5660
5661 2005-01-12  Martin Baulig  <martin@ximian.com>
5662
5663         * class.c (mono_get_shared_generic_class): Use the cache for
5664         non-dynamic generic classes.
5665
5666         * class-internals.h (mono_class_create_generic_2): Removed
5667         function prototype, this function is now static inside class.c.
5668
5669         * class.c (mono_class_create_generic_2): Made this static, only
5670         call it from mono_class_init() and mono_class_setup_parent().
5671         (collect_implemented_interfaces_aux): Call mono_class_init() on
5672         the interfaces we collect.
5673         (mono_class_setup_vtable): Call mono_class_init (class->parent).
5674
5675 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
5676
5677         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
5678         it a real thread handle.
5679
5680         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
5681         MonoJitExceptionInfo, since each catch clause needs its own variable.
5682         
5683 2005-01-11  Dick Porter  <dick@ximian.com>
5684
5685         * image.c (mono_pe_file_open): New variant on mono_image_open()
5686         that does not set up the CLI metadata; used for FileVersionInfo so
5687         it can get the data for windows binaries too.
5688         
5689         * process.c (process_read_string_block): Don't read off the end of
5690         the StringTable block.
5691
5692         These both fix bug 70766.
5693
5694 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
5695
5696         * gc.c: set some fields to NULL at GC cleanup time.
5697         * threads.c: if we quit the main thread, call exit ().
5698
5699 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
5700
5701         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
5702
5703 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
5704
5705         * threads.h, threads.c, object.c: added accessor and settor for
5706         main_thread. Handle it specially when exiting from it: wait
5707         for other foreground threads to exit.
5708
5709 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
5710
5711         * process.c, verify.c: remove some bloat.
5712
5713 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
5714
5715         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
5716         the calling convention to cdecl under win32.
5717
5718 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
5719
5720         * object.c (mono_object_get_size): New function to get the size of
5721         an object instance.
5722
5723         * profiler.c (simple_allocation): Use above.
5724
5725 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
5726
5727         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
5728         ves_icall_System_AppDomain_getRootDomain (as it's not required to
5729         get an appdomain by it's id and we can't assume the root's id is 0).
5730         * domain-internals.h: Change the function prototype to match.
5731         * icall.c: Change the icall table for AppDomain.
5732
5733 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
5734
5735         * locales.c (string_invariant_compare_char): Only compute
5736         GUnicodeTypes in the case where we need them.  Test for ordinality
5737         first and return if so.
5738
5739         From the commit:
5740
5741                 /*
5742                  * FIXME: here we must use the information from c1type and c2type
5743                  * to find out the proper collation, even on the InvariantCulture, the
5744                  * sorting is not done by computing the unicode values, but their
5745                  * actual sort order.
5746                  */
5747
5748 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5749
5750         * loader.c: for P/Invoke methods, allow the "Internal" shared
5751         library name to refer to the calling process symbol namespace.
5752
5753 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
5754
5755         * Makefile.am: Add the security manager to the build.
5756         * security-manager.c|h: New. Initialization of the security manager.
5757
5758 2005-01-07  Dick Porter  <dick@ximian.com>
5759
5760         * threads.c: 
5761         * monitor.c: Update thread state during Monitor and WaitHandle
5762         waits.  Fixes bug 71031.
5763
5764 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
5765
5766         * reflection.c (property_encode_signature): Correctly handle when the
5767         property has no methods.
5768
5769 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
5770
5771         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
5772         
5773         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
5774         fields from mb, not rmb. Fixes #71017.
5775
5776         * marshal.c (emit_ptr_to_str_conv): Add support for 
5777         ByValTStr -> string conversion. Fixes #71015.
5778
5779         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
5780
5781         * mempool.c (mono_mempool_contains_addr): New helper function.
5782
5783 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
5784
5785         * metadata.c (mono_metadata_compute_size): Fix size calculation of
5786         HasSematics encoded fields.
5787         
5788         * metadata.c (mono_type_to_unmanaged): Improve error message for 
5789         invalid string marshalling.
5790
5791         * metadata.c: Fix warnings.
5792         
5793 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5794
5795         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
5796         profiler support.
5797
5798 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
5799
5800         * domain.c object.c domain-internals.h: Revert part of r38077 since the
5801         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
5802         tests.
5803
5804 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
5805
5806         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
5807         so methods containing these can be AOTed.
5808
5809 2005-01-03  Martin Baulig  <martin@ximian.com>
5810
5811         * loader.c (find_method): Removed the hack for generic instances.
5812         (method_from_memberref): If our parent is a generic instance, pass
5813         its generic type definition to find_method() and then inflate the
5814         method.
5815         (mono_get_method_constrained): Pass the generic type definition to
5816         find_method() and inflate the method later.
5817
5818         * class-internals.h (MonoStats): Added `generic_class_count'.
5819
5820         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
5821         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
5822
5823         * reflection.c (mono_custom_attrs_from_params): Don't ignore
5824         generic type definitions.
5825
5826 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
5827
5828         * loader.c icall.c: Fix warnings.
5829
5830 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
5831
5832         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
5833         blittable types. Fixes #70864.
5834
5835 2004-12-29  Martin Baulig  <martin@ximian.com>
5836
5837         * icall.c
5838         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
5839
5840         * reflection.c (mono_method_get_object): Create a
5841         "System.Reflection.MonoGenericMethod" for inflated methods; don't
5842         call mono_get_inflated_method().
5843
5844         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
5845
5846 2004-12-27  Martin Baulig  <martin@ximian.com>
5847
5848         * class-internals.h (MonoMethod): Added `is_inflated' flag.
5849         (MonoMethodInflated): Added `inflated' field.
5850
5851         * class.c (mono_class_inflate_generic_method): Don't really
5852         inflate the method here; just set the `is_inflated' flag in the
5853         MonoMethod.
5854         (mono_class_get_inflated_method): Actually inflate the method here
5855         if it's not already inflated; we use the MonoMethodInflated's new
5856         `inflated' field as a cache.
5857
5858 2004-12-26  Martin Baulig  <martin@ximian.com>
5859
5860         * class.c
5861         (inflate_generic_class): Moved some code out of inflate_generic_type().
5862         (mono_class_inflate_generic_method): If we're already inflated,
5863         inflate the context and use the declaring method; ie. make sure
5864         the declaring method of an inflated method is always the generic
5865         method definition.
5866         (mono_class_create_from_typedef): Create
5867         `class->generic_container->context->gclass'.
5868
5869 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
5870
5871         * metadata-internals.h, marshal.c, reflection.c: More
5872         MonoGHashTable->GHashTable.
5873
5874         * domain-internals.h, class.c: Change MonoGHashTable's into
5875         GHashTables for some cases where no gc stuff is used
5876
5877         All users: update apis
5878
5879 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
5880
5881         * metadata.c (builtin_types): Make this `const'. Makes this get
5882         put into the shareable section.
5883         (mono_metadata_init): Casts to make gcc happy.
5884
5885 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
5886
5887         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
5888
5889 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
5890
5891         * icall.c: Added an internal call to retrieve the position and length
5892         of assembly-level declarative security attributes (RequestMinimum, 
5893         RequestOptional and RequestRefuse). This is used by the Assembly class
5894         to re-create the corresponding permission sets.
5895
5896 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
5897
5898         * marshal.c: fix the stelemref wrapper to be type correct
5899         (and faster).
5900
5901 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
5902
5903         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
5904         to do key & 0x7fffffff. Hashtable already does this. It just
5905         results in longer code.
5906
5907 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
5908
5909         * appdomain.c: Bump corlib version.
5910         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
5911         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
5912         * reflection.c|h: Add functions to get declarative security infos
5913         (blob position and length) for assemblies, classes and methods.
5914
5915 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
5916
5917         * reflection.c: sort the constant table (bug #70693).
5918
5919 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
5920
5921         * object-internals.h, threads.c, domain.c: add accessors for
5922         the MonoThread and MonoDomain tls keys.
5923
5924 2004-12-18  Martin Baulig  <martin@ximian.com>
5925
5926         * class.c (inflate_generic_type): If we're inflating a generic
5927         instance, set `ngclass->context->container = context->container';
5928         ie. the container we inflated into.
5929
5930         * metadata.c (mono_metadata_parse_generic_param): Reflect above
5931         inflate_generic_type() changes.
5932
5933 2004-12-17  Martin Baulig  <martin@ximian.com>
5934
5935         * class-internals.h
5936         (MonoGenericClass): Replaced `MonoType *generic_type' with
5937         `MonoClass *generic_class'.  Removed `dynamic_info'; if
5938         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
5939         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
5940
5941 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
5942
5943         * exception.c (mono_exception_from_token): New helper function.
5944
5945 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
5946
5947         * assembly.c (mono_assembly_load_with_partial_name): Call 
5948         mono_assembly_loaded before invoking the preload hooks. Fixes
5949         #70564.
5950
5951         * object-internals.h (MonoThread): Change culture_info and 
5952         ui_culture_info into an array.
5953
5954         * threads.c: Cache culture info objects from more than one appdomain.
5955
5956         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
5957         current UI culture.
5958
5959 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
5960
5961         * threads.h threads.c appdomain.c: Clear the culture_info field of
5962         all threads during unloading if they point to an object in the dying
5963         appdomain.
5964
5965 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
5966
5967         * culture-info.h (TextInfoEntry): New struct
5968         * object-internals.h: sync with managed
5969         * locales.c: fill the `text_info_data' field
5970         * culture-info-tables.h: update
5971
5972 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
5973
5974         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
5975         collector.
5976
5977 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
5978
5979         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
5980         (ves_icall_ModuleBuilder_getMethodToken): Ditto
5981
5982 2004-12-12  Martin Baulig  <martin@ximian.com>
5983
5984         * mono-debug-debugger.c (write_type): If we're an enum and the
5985         builtin types have already been initialized, call mono_class_init().
5986
5987 2004-12-11  Martin Baulig  <martin@ximian.com>
5988
5989         * metadata.c (mono_metadata_load_generic_params): Added
5990         `MonoGenericContainer *parent_container' argument; automatically
5991         compute `container->is_method'; pass the correct owner to
5992         get_constraints().      
5993
5994         * reflection.c (compare_genericparam): Sort the GenericParam table
5995         according to increasing owners. 
5996
5997 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
5998
5999         * profiler.c: allow disabling the default profiler.
6000
6001 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
6002
6003         * decimal.c, icall.c: allow disabling System.Decimal support.
6004
6005 2004-12-09  Marek Safar <marek.safar@seznam.cz>
6006
6007         * reflection.c: Add support for null attribute arguments.
6008
6009 2004-12-09  Martin Baulig  <martin@ximian.com>
6010
6011         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
6012         names to get rid of compiler warnings.
6013
6014 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
6015
6016         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
6017         mono_marshal_load_type_info (). Fixes #69625.
6018         (mono_marshal_get_ptr_to_struct): Likewise.
6019
6020 2004-12-08  Martin Baulig  <martin@ximian.com>
6021
6022         * mono-debug.h: Bumped version number to 47.
6023
6024         * mono-debug-debugger.c
6025         (mono_debugger_event_handler, mono_debugger_event): Take two
6026         guint64 arguments insteed of a gpointer and a guint32.  
6027
6028 2004-12-08  Martin Baulig  <martin@ximian.com>
6029
6030         * debug-mono-symfile.h
6031         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
6032         `address' to `native_offset'.
6033
6034 2004-12-08  Martin Baulig  <martin@ximian.com>
6035
6036         * class.c (mono_class_create_from_typespec): Only inflate if we
6037         either have `context->gclass' or `context->gmethod'.
6038
6039 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
6040
6041         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
6042
6043         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
6044
6045         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
6046
6047         * reflection.c (mono_assembly_get_object): Remove the workaround put
6048         in for the release.
6049         
6050         * appdomain.c: Use the corlib_internal field from MonoAssembly.
6051
6052         * appdomain.c: Bump corlib version.
6053
6054         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
6055         be visible in other appdomains.
6056
6057 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
6058
6059         * threads.c: Interlocked inc and dec for longs were messed up,
6060         use a KISS based impl for this. Fixes 70234
6061
6062 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
6063
6064         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
6065
6066 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
6067
6068         * icall.c: fix to follow policy not to allow struct
6069         arguments in icalls.
6070
6071 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6072
6073         * process.c: make the patch that handles spaces in file paths work
6074         on mono/windows too.
6075
6076 2004-12-06  Martin Baulig  <martin@ximian.com>
6077
6078         * class.c (mono_class_create_generic): Call
6079         mono_class_setup_supertypes() if we're dynamic.
6080         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
6081
6082 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
6083
6084         * object-internals.h: Add new fields to MonoThread.
6085
6086         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6087
6088         * icall.c threads-types.h threads.c: Add new icalls.
6089
6090         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
6091
6092         * object-internals.h (MonoReflectionAssembly): Sync object layout with
6093         managed side.
6094
6095         * appdomain.c: Bump corlib version.
6096
6097         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
6098         internal assemblies. Fixes #69181.
6099
6100 2004-12-05  Martin Baulig  <martin@ximian.com>
6101
6102         * class.c (mono_class_inflate_generic_signature): Make this a
6103         no-op if `context' is NULL or we don't have any type parameters;
6104         also copy `sentinelpos'.        
6105
6106 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
6107
6108         * image.c: Add unbox_wrapper_cache.
6109
6110         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
6111
6112         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
6113         function generator.
6114         
6115         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
6116         Fixes #70173.
6117
6118         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
6119         
6120 2004-12-04  Martin Baulig  <martin@ximian.com>
6121
6122         * loader.c (mono_method_get_signature_full): New public function;
6123         like mono_method_get_signature(), but with an additional
6124         `MonoGenericContext *' argument.
6125
6126         * class.c (mono_class_inflate_generic_signature): Formerly known
6127         as inflate_generic_signature(); make this public.
6128
6129 2004-12-04  Martin Baulig  <martin@ximian.com>
6130
6131         * metadata.c
6132         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
6133         instead of a `MonoGenericContainer *'.  
6134         (mono_metadata_parse_array_full): Likewise.
6135         (mono_metadata_parse_signature_full): Likewise.
6136         (mono_metadata_parse_method_signature_full): Likewise.
6137         (mono_metadata_parse_generic_inst): Likewise.
6138         (mono_metadata_parse_generic_param): Likewise.
6139         (mono_metadata_parse_mh_full): Likewise.
6140         (mono_type_create_from_typespec_full): Likewise.
6141
6142 2004-12-03  Martin Baulig  <martin@ximian.com>
6143
6144         * class-internals.h (MonoGenericContainer): Replaced the
6145         `MonoGenericContext * pointer with a `MonoGenericContext'
6146         structure and made it the first element.
6147
6148 2004-12-03  Martin Baulig  <martin@ximian.com>
6149
6150         * class.c
6151         (inflate_generic_type): Set the `context->container' when creating
6152         a new MonoGenericContext.
6153         (mono_class_inflate_generic_method): Likewise.
6154         (mono_class_create_from_typespec): Just use `context->container'
6155         to get the container.
6156
6157         * loader.c (method_from_methodspec): Set `context->parent' from
6158         `context->container' - and if that's a method container, use its
6159         parent.  Also set the `context->container' when creating a new
6160         MonoGenericContext.
6161         (mono_get_method_from_token): Use just `context->container' to get
6162         the container.
6163
6164         * metadata.c (do_mono_metadata_parse_generic_class): Also set
6165         `gclass->context->container'.
6166
6167         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
6168         the `context->container' when creating a new MonoGenericContext.
6169
6170 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
6171
6172         * reflection.c (compare_genericparam): Sort params with identical
6173         owner by their number. Fixes gen-111 on sparc.
6174
6175 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
6176
6177         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
6178         around the domain changes.
6179
6180         * appdomain.c (mono_domain_unload): Handle the case when the thread
6181         calling Unload is itself being aborted during unloading. Fixes #70022.
6182
6183         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
6184
6185         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
6186         checkpoint_func as an icall so it gets a wrapper.
6187         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
6188         in the cross-appdomain wrappers too.
6189
6190         * threads.c (mono_thread_has_appdomain_ref): Make this public.
6191
6192         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
6193
6194         * reflection.c: Fix some memory leaks.
6195         
6196 2004-12-02  Martin Baulig  <martin@ximian.com>
6197
6198         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
6199
6200         * metadata.c (generic_class_cache): New static hashtable.
6201         (mono_metadata_lookup_generic_class): New public method.
6202
6203 2004-12-02  Martin Baulig  <martin@ximian.com>
6204
6205         * class.c (mono_class_create_from_typedef): Call
6206         mono_class_setup_parent() and mono_class_create_mono_type() before
6207         parsing the interfaces.
6208
6209 2004-12-02  Martin Baulig  <martin@ximian.com>
6210
6211         * metadata.c (generic_inst_cache): New static hashtable.
6212         (mono_metadata_lookup_generic_inst): New public function.
6213         (mono_metadata_inflate_generic_inst): New public function.
6214         (mono_metadata_parse_generic_inst): New public function.
6215         (do_mono_metadata_parse_generic_class): Use the new
6216         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
6217         since this'll also use the cache.
6218
6219         * reflection.c (mono_reflection_bind_generic_method_parameters):
6220         Use mono_metadata_lookup_generic_inst() to use the new cache.
6221
6222         * class.c (inflate_mono_type): Use
6223         mono_metadata_inflate_generic_inst() to inflate a generic
6224         instance; this'll also use the new cache.
6225
6226         * loader.c (method_from_methodspec): Use
6227         mono_metadata_parse_generic_inst() and
6228         mono_metadata_inflate_generic_inst() rather than parsing it
6229         manually, so we can use the new cache.
6230
6231 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
6232
6233         * threads.c (wait_for_tids): Do not incorrectly free threads when 
6234         the wait times out.
6235
6236 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6237
6238         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
6239         iter->args based on whether parameters are passed in registers (i.e.
6240         MONO_ARCH_REGPARMS is defined)
6241
6242 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
6243
6244         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
6245         the exception message. Fixes #70070.
6246         (method_from_methodspec): Fix warnings.
6247
6248 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6249
6250         * process.c: (complete_path) return the path quoted
6251
6252 2004-12-01  Martin Baulig  <martin@ximian.com>
6253
6254         * class-internals.h (MonoGenericInst): New structure.
6255         (MonoGenericClass): Replaced `type_argc', `type_argv' and
6256         `is_open' with `MonoGenericInst *inst'.
6257         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
6258         `is_open' with `MonoGenericInst *inst'.
6259
6260 2004-11-30  Martin Baulig  <martin@ximian.com>
6261
6262         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
6263
6264         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
6265         to `generic_class_cache'.
6266
6267         * metadata.c
6268         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
6269         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
6270         (mono_generic_inst_is_valuetype): Renamed to
6271         mono_generic_class_is_valuetype().
6272
6273         * class-internals.h
6274         (MonoGenericInst): Renamed to MonoGenericClass.
6275         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
6276         (MonoClass): Renamed `generic_inst' to `generic_class'.
6277         (MonoGenericContext): Renamed `ginst' to `gclass'.
6278
6279         * object-internals.h
6280         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
6281
6282         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
6283         mono_reflection_generic_class_initialize().
6284
6285         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
6286         now known as "System.Reflection.MonoGenericClass".
6287         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
6288
6289 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
6290
6291         * class-internals.h: Added a flag field to MonoClass to cache the
6292         declarative security attributes actions associated with the class.
6293         * domain-internals.h: Added booleans to MonoJitInfo to cache the
6294         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
6295         applicable to the JITted method.
6296         * reflection.c|h: Added functions to extract (as flags) which security
6297         actions are available (declaratively) for a method, class or assembly.
6298         * metadata.c|h: Added functions to search the declarative security
6299         table in the metadata.
6300         
6301 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
6302
6303         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
6304         EXPORTEDTYPES are already in the class name cache, so there is no
6305         need to add extra code here to look at them. Just removes a bit of
6306         cruft.
6307
6308         (ves_icall_System_Environment_get_TickCount): No need for #if
6309         WINDOWS. We already have the code in io-layer.
6310
6311 2004-11-28  Martin Baulig  <martin@ximian.com>
6312
6313         * loader.c
6314         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
6315         Fixes gen-112.cs.
6316
6317 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
6318
6319         * assembly.c (do_mono_assembly_open): Instead of having a
6320         conditional WITH_BUNDLE, incorporate support for bundles here, by
6321         having a global `bundles' variable holding a pointer to the actual
6322         bundles. 
6323
6324         (mono_register_bundled_assemblies): New API call used by the
6325         bundle code. 
6326
6327         See mkbundle.1 for details.
6328         
6329 2004-11-27  Martin Baulig  <martin@ximian.com>
6330
6331         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
6332         the vtable for generic methods.
6333
6334 2004-11-26  Martin Baulig  <martin@ximian.com>
6335
6336         * metadata.c
6337         (mono_metadata_generic_method_hash): New public function.
6338         (mono_metadata_generic_method_equal): Likewise.
6339
6340         * class-internals.h
6341         (MonoGenericContainer): Added `GHashTable *method_hash'.
6342
6343         * reflection.c (ReflectionMethodBuilder): Added
6344         `MonoGenericContainer *generic_container'.
6345         (reflection_methodbuilder_to_mono_method): Don't create a new
6346         MonoGenericContainer each time we're called.
6347         (mono_reflection_bind_generic_method_parameters): Use
6348         `container->method_hash' to cache the results so we don't create a
6349         different method if we're called several times with the same
6350         arguments.
6351
6352         * loader.c (method_from_methodspec): Use the new
6353         `container->method_hash' here, too.
6354
6355 2004-11-26  Martin Baulig  <martin@ximian.com>
6356
6357         * class.c (inflate_generic_signature): Correctly compute
6358         `res->has_type_parameters'.
6359         (mono_class_vtable): Use the `has_type_parameters' flag to
6360         determine whether we're a generic method.
6361
6362         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
6363
6364 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
6365
6366         * object.c (mono_runtime_run_main): Fix a small memory leak.
6367
6368 2004-11-25  Martin Baulig  <martin@ximian.com>
6369
6370         * class.c (set_generic_param_owner): Fixed the loop.
6371
6372 2004-11-25  Martin Baulig  <martin@ximian.com>
6373
6374         * object.c (mono_class_vtable): Don't create any JIT wrappers for
6375         generic methods.
6376
6377 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
6378
6379         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
6380         names. Fixes #69787.
6381
6382 2004-11-24  Martin Baulig  <martin@ximian.com>
6383
6384         * class.c (mono_class_create_generic_2): If we don't have a
6385         `ginst->parent', inflate `gklass->parent' to get our parent.
6386
6387 2004-11-24  Martin Baulig  <martin@ximian.com>
6388
6389         * reflection.c (compare_genericparam): Correctly sort the
6390         GenericParam table; fixes #69779.
6391
6392 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
6393
6394         * reflection.c: When writing a PE file, don't create a huge
6395         buffer in memory. Just write the arrays we have to the file.
6396         This reduces memory usage.
6397
6398         * metadata-internals.h: MonoDynamicStream pefile is no longer used
6399         globally.
6400
6401 2004-11-17  Martin Baulig  <martin@ximian.com>
6402
6403         * class.c (mono_class_init): Don't setup `class->parent' for
6404         dynamic instances; moved this to mono_class_generic_2().
6405         (mono_class_create_generic): Also set `klass->inited' for dynamic
6406         generic instances.
6407         (mono_class_create_generic_2): Don't do anything for dynamic
6408         generic instances.  Set `klass->parent' here and also call
6409         mono_class_setup_parent() here. 
6410
6411         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
6412         `MonoType *parent' argument; set `ginst->parent' before calling
6413         mono_class_create_generic_2(), so we set the correct parent.
6414
6415 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
6416
6417         * reflection.c: allow getting attributes from ModuleBuilder
6418         (used by ikvm).
6419
6420 2004-11-17  Martin Baulig  <martin@ximian.com>
6421
6422         * class.c (mono_class_create_from_typedef): If a type parameter is
6423         inherited from an outer class, set its owner to that class.
6424
6425 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
6426
6427         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
6428           for (int*) written size. This fixes bug #69592.
6429
6430 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
6431
6432         * icall.c: Added IsAuthenticodePresnet internal call.
6433         * image.c|h: New function that check a MonoImage for an Authenticode
6434         signature in the certificate PE data directory.
6435         * security.c|h: New internal call to ask the runtime if an 
6436         Authenticode signature seems referenced in the PE header.
6437
6438 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
6439
6440         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
6441
6442         * reflection.c (mono_image_create_pefile): Free the assembly streams
6443         after writing out the assembly file.
6444
6445         * object.c (mono_runtime_run_main): Fix small memory leak.
6446
6447         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
6448         property access modifiers. Fixes #69389.
6449
6450 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
6451
6452         * domain.c, object.c, object-internals.h, domain-internals.h,
6453         object.h, marshal.c: keep dynamic code info per domain.
6454
6455 2004-11-15  Martin Baulig  <martin@ximian.com>
6456
6457         * class.c (mono_type_get_name_recurse): Put type arguments in
6458         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
6459         see bug #68387.
6460
6461 2004-11-15  Martin Baulig  <martin@ximian.com>
6462
6463         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
6464         (mono_class_setup_vtable): When computing `the_cname' for a
6465         generic instance, don't include the namespace since we'd otherwise
6466         add it twice.
6467
6468 2004-11-15  Martin Baulig  <martin@ximian.com>
6469
6470         * class.c (mono_class_create_generic): Changed return type to void.
6471         (mono_class_create_generic_2): New public function; setup
6472         `class->method', `class->field' and `class->interfaces' here
6473         instead of in mono_class_init().
6474
6475         * class.h (mono_class_create_generic): Moved to class-internals.h.
6476
6477 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
6478
6479         * reflection.c (mono_image_create_pefile): take a file HANDLE.
6480         rather than writing to memory, write to this file. Right now,
6481         we are just writting into a buffer, and copying that. However
6482         we can avoid the buffer later.
6483
6484         (mono_dynamic_stream_reset): new function
6485
6486         * icall.c, object-internals.h: update for the above.
6487
6488 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
6489
6490         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
6491         have been using gc'd memory. First it is slower, unlikely
6492         the comment in the source code said, secondly, it increases
6493         our footprint to do it in the gc.
6494
6495         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
6496         the method so that it does not have to copy to managed code.
6497
6498 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
6499
6500         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
6501
6502 2004-11-12  Martin Baulig  <martin@localhost>
6503
6504         * reflection.c (mono_image_create_token): Allow generic method
6505         definitions here, since they may appear in an `.override'; see
6506         gen-98/gen-99 for an example.
6507
6508 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
6509
6510         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
6511         #69365.
6512
6513         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
6514         descriptive.
6515
6516 2004-11-11  Martin Baulig  <martin@ximian.com>
6517
6518         * class.c (mono_class_setup_vtable): In an explicit interface
6519         implementation, the method name now includes the arity.
6520
6521 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
6522
6523         * object.c (mono_array_full_copy): Fix warning.
6524
6525 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
6526
6527         * appdomain.c: Removed look_for_method_by_name(). Use the new method
6528         mono_class_get_method_from_name() instead.
6529         
6530         * class-internals.h: Added two new types of wrappers. 
6531         Added MonoRemotingTarget enum. Added new trampoline function type, which
6532         takes an additional MonoRemotingTarget value as parameter, so it is
6533         possible to request a trampoline for a specific target.
6534         
6535         * class.c: Added new mono_class_get_method_from_name() method.
6536         
6537         * class.h: In MonoRemoteClass, we can have now to vtables, one for
6538         general remoting sinks and one specific for cross domain calls.
6539         
6540         * debug-helpers.c: Added new wrapper names.
6541         
6542         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
6543         of a remote class.
6544         
6545         * image.c: Porperly delete value objects form the remoting invoke hashtable.
6546         
6547         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
6548         with several other methods (mono_marshal_get_xappdomain_dispatch,
6549         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
6550         and others) can generate a fast remoting wrapper for cross domain calls.
6551         More information can be found in docs/remoting.
6552         Other changes: Removed mono_find_method_by_name, and used
6553         mono_class_get_method_from_name instead.
6554         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
6555         is stored in the remoting invoke hashtable.
6556         
6557         * marshal.h: published the new method for getting the xdomain wrapper,
6558         and also added a method for getting the adequate wrapper for a given
6559         method and target.
6560         
6561         * object-internals.h, object.c: Added a couple of methods for capying and
6562         cloning arrays.
6563         Modified mono_install_remoting_trampoline, which takes the new remoting
6564         trampoline that has a remoting target as parameter.
6565         mono_class_proxy_vtable now also takes a remoting target as parameter, and
6566         will return the most suitable vtable for the target.
6567         Added mono_remote_class_vtable, which returns the vtable of a remote class
6568         (which can be the normal remoting vtable or the xdomain vtable).
6569         
6570         * threads.c: the xdomain invoke and dispatch wrappers must also be
6571         protected against interruptions.
6572
6573 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6574
6575         * icall.c: use memmove in BlockCopyInternal when the source and
6576         destination arrays are the same.
6577
6578 2004-11-09  Martin Baulig  <martin@ximian.com>
6579
6580         * class-internals.h (MonoGenericContainer): Removed `method' and
6581         `signature', replaced them with `is_method' and `is_signature'
6582         flags.  Added `context'.
6583
6584         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
6585         instead of a `MonoGenericContainer *'.
6586
6587         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
6588         for dynamic type parameters.
6589         (mono_metadata_load_generic_params): Setup `container->context'.
6590
6591         * reflection.c (mono_reflection_setup_generic_class): Setup
6592         `tb->generic_container->context'.
6593         (do_mono_reflection_bind_generic_parameters): Use
6594         mono_class_inflate_generic_type() to correctly inflate types,
6595         rather than using our own hack just for MONO_TYPE_VAR.
6596
6597 2004-11-09  Martin Baulig  <martin@ximian.com>
6598
6599         * class.c (mono_class_inflate_generic_method): Small fix; don't
6600         crash here.
6601
6602         * icall.c
6603         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
6604         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
6605         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
6606         (ves_icall_Type_BindGenericParameters): Likewise.
6607         (ves_icall_Type_get_IsGenericInstance): Likewise.
6608         (ves_icall_Type_GetGenericParameterPosition): Likewise.
6609         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
6610         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
6611         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
6612
6613 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
6614
6615         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
6616         assembly versions and public key tokens. Fixes #69113.
6617
6618 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
6619
6620         * metadata.c: fix bug introduced with the type cache changes
6621         on 2004-11-06.
6622
6623 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
6624
6625         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
6626         the MonoClass pointer instead of the token in exception clauses.
6627         * reflection.c: updates for the above and make the code not depend
6628         on the structure of MonoExceptionClause.
6629
6630 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
6631
6632         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
6633         Add support for dynamic assemblies. Fixes #69114.
6634
6635         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
6636
6637 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
6638
6639         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
6640         since most only those methods use it. the code member of
6641         MonoMethodPInvoke was dead, so that can be removed too. Also,
6642         remove inline_count (again, not used), and move slot so that it
6643         can share bits with some other flags. This saves 8 bytes in the
6644         structure and gives us about 50 kb back for mcs helloworld.cs
6645
6646         * *.[ch]: Do naming changes for the above.
6647
6648         * loader.c (mono_method_get_header): Lazily init the header
6649         on first access.
6650         (mono_get_method_from_token): don't init the header here
6651         (mono_free_method): the header may never be allocated
6652
6653         Overall, this saves 150 kb of unmanaged allocations
6654         for mcs helloworld.cs. That accounts for 10% of the unmanaged
6655         memory at runtime.
6656         
6657         * loader.c, loader.h (mono_method_get_header): new accessor.
6658
6659         * *.[ch]: use the above method. Prepares us to lazily load
6660         the header.
6661
6662         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
6663         three warnings, which are actual bugs (see 69206).
6664
6665         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
6666         unused. Saves a cool 4 bytes / method.
6667
6668 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
6669
6670         * metadata.c (builtin_types): Add types for System.Object here.
6671         (mono_metadata_parse_type_full): Cache MonoType*'s that are
6672         for a class or valuetype from klass->this_arg or klass->byval_arg.
6673
6674         On mcs for a hello world, this gets us down from 21836 MonoType's
6675         to 14560.
6676
6677         (mono_metadata_free_type): Account for the above change.
6678
6679 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
6680
6681         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
6682         exception instead of asserting if name is null.
6683         (ves_icall_System_AppDomain_GetData): Ditto.
6684
6685 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
6686
6687         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
6688         EnumBuilder.
6689
6690         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
6691         Return NULL when the domain does not have entry_assembly set.
6692
6693         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
6694         Add a 'resource_modules' argument.
6695         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
6696
6697         * reflection.c (mono_reflection_create_runtime_class): Move setting
6698         of wastypebuilder here, so mono_get_type_object () returns a MonoType
6699         for enums too.
6700
6701         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
6702         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
6703         Throw an ArgumentNullException if 'ptr' is null.
6704
6705         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
6706         assemblies here. Fixes #69020.
6707
6708 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
6709
6710         * reflection.c (build_compressed_metadata): Fix the previous patch for
6711         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
6712         the stack.
6713
6714 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
6715
6716         * assembly.c (mono_assembly_names_equal): Allow a match if one of
6717         the cultures is false. Fixes #69090.
6718
6719         * reflection.c (build_compressed_metadata): Fix invalid memory read 
6720         detected by valgrind.
6721         
6722         * reflection.c (mono_reflection_get_type): Avoid triggering a 
6723         TypeResolve multiple times for the same type. Fixes #65577.
6724
6725 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
6726
6727         * marshal.c: Avoid using ldftn to call managed functions. It is
6728         much slower than just a call.
6729
6730         * reflection.c (mono_module_get_object): free the basename we
6731         allocate here from glib.
6732         
6733         * reflection.c (ensure_runtime_vtable): make sure to free
6734         overrides.  Also, we were allocating an array of MonoMethod not an
6735         array of MonoMethod*.
6736
6737         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
6738
6739         * image.c (mono_image_close): free image->guid here.
6740
6741 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
6742
6743         * reflection.c: Fix some spec conformance issues with the PE file
6744         structures so mcs compiled apps run on the Net 2.0 beta.
6745
6746 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
6747
6748         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
6749         Implement this. Fixes #67264.
6750
6751         * debug-helpers.h debug-helpers.c marshal.c: Move 
6752         mono_find_method_by_name to debug-helpers.c.
6753
6754 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
6755
6756         * object.c (mono_release_type_locks): type_initialization_hash is
6757         a GHashTable.
6758
6759         * reflection.c object.c object-internals.h: Fix warnings.
6760
6761         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
6762         without accessors. Fixes #61561.
6763
6764         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
6765         application base from the root domain if not set. Fixes #65641.
6766         (mono_runtime_init): Fix warning.
6767
6768 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6769
6770         * appdomain.c: call mono_thread_pool_init.
6771         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
6772         of worker threads based on the number of CPUs and the environment
6773         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
6774         for non-windows (windows) systems.
6775
6776 2004-10-27  Chris Toshok  <toshok@ximian.com>
6777
6778         * mono-debug-debugger.c (write_class): don't call mono_class_init
6779         here, as even with the check for (!klass->init_pending), we get
6780         into a situation where we're hitting cycles in class
6781         initialization.  Fixes #68816.
6782
6783 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
6784
6785         * image.c: Avoid overwriting values in the loaded_images_hash when an
6786         assembly is loaded multiple times. Fixes #61152.
6787
6788         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
6789         so multiple satellite assemblies for the same name can be loaded.
6790         Fixes #68259.
6791
6792         * mono_domain_assembly_preload: Actually return the loaded assembly, 
6793         not NULL.
6794
6795         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
6796         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
6797
6798         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
6799         pending finalizers are not invoked after the appdomain has been 
6800         unloaded. Fixes #67862.
6801
6802 2004-10-22  Martin Baulig  <martin@ximian.com>
6803
6804         * mono-debug-debugger.c
6805         (mono_debugger_runtime_invoke): Don't box valuetypes.
6806
6807 2004-10-22  Chris Toshok  <toshok@ximian.com>
6808
6809         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
6810         don't hide private methods.
6811
6812 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
6813
6814         * icall.c: Allows the runtime to "share" (when known) the public key
6815         token of an assembly. This avoid the need to recalculate the token 
6816         (from the public key) in managed code.
6817
6818 2004-10-21  Chris Toshok  <toshok@ximian.com>
6819
6820         * debug-helpers.c (append_class_name): argh, revert last patch.
6821         
6822 2004-10-21  Chris Toshok  <toshok@ximian.com>
6823
6824         * debug-helpers.c (append_class_name): use '+' as the delimiter,
6825         not '/', so that it matches what the debugger uses to look up
6826         methods.
6827
6828 2004-10-21  Martin Baulig  <martin@ximian.com>
6829
6830         * mono-debug-debugger.c (mono_debugger_throw_exception): New
6831         public method; this is called each time an exception is thrown and
6832         allows the debugger to use exception catch points.
6833
6834 2004-10-21  Martin Baulig  <martin@ximian.com>
6835
6836         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
6837         the stack pointer and the exception object in some struct and pass
6838         that to the debugger.
6839
6840 2004-10-21  Chris Toshok  <toshok@ximian.com>
6841
6842         * mono-debug-debugger.c (do_write_class): add instance/static
6843         event support.  We don't expose "raise" or "other" yet.
6844         (event_is_static): new method.
6845
6846 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
6847
6848         * mono-debug-debugger.c
6849         (mono_debugger_handle_exception): Remove
6850         bogus return value for fussy compilers.
6851
6852 2004-10-20  Martin Baulig  <martin@ximian.com>
6853
6854         * mono-debug-debugger.c
6855         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
6856         (mono_debugger_handled_exception): Likewise.
6857
6858 2004-10-20  Martin Baulig  <martin@ximian.com>
6859
6860         * mono-debug-debugger.h (MonoDebuggerEvent): Added
6861         MONO_DEBUGGER_EVENT_EXCEPTION.
6862
6863         * mono-debug-debugger.c (mono_debugger_handle_exception): New
6864         public function to send the debugger a notification for an
6865         exception and inform it about a catch/finally clause.
6866
6867 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
6868
6869         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
6870         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
6871         fix 2.95 build. 
6872
6873         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
6874
6875 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
6876
6877         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
6878         marshalled as [In,Out]. Fixes #58325.
6879
6880 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
6881
6882         * reflection.c (mono_method_body_get_object): Implement some fields.
6883
6884 2004-10-12  Martin Baulig  <martin@ximian.com>
6885
6886         * reflection.c (mono_reflection_bind_generic_parameters): Small
6887         fix, correctly retrieve our parent from a generic instance.
6888
6889 2004-10-12  Martin Baulig  <martin@ximian.com>
6890
6891         * metadata.c (mono_metadata_generic_param_equal): We always have
6892         an owner.
6893
6894         * class.c
6895         (mono_class_from_generic_parameter): We need to have an owner.
6896         (my_mono_class_from_generic_parameter): Likewise.
6897
6898         * reflection.c (mono_reflection_setup_generic_class): Renamed to
6899         mono_reflection_create_generic_class() and added a new
6900         mono_reflection_setup_generic_class().  
6901         (mono_reflection_initialize_generic_param): If we're a nested
6902         generic type and inherited from the containing class, set our
6903         owner to the outer class.
6904
6905 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
6906
6907         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
6908
6909         * reflection.c (mono_method_body_get_object): New function to create
6910         a MethodBody object.
6911
6912         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
6913
6914 2004-10-11  Martin Baulig  <martin@ximian.com>
6915
6916         * metadata.c (_mono_metadata_type_equal): Renamed to
6917         do_mono_metadata_type_equal() and made static.
6918
6919 2004-10-11  Martin Baulig  <martin@ximian.com>
6920
6921         * appdomain.c: Bump corlib version number to 28.
6922
6923 2004-10-10  Martin Baulig  <martin@ximian.com>
6924
6925         * class-internals.h
6926         (MonoGenericInst): Added `MonoGenericContainer *container'.
6927         (MonoGenericMethod): Likewise.
6928         (MonoGenericContext): Likewise.
6929         (MonoGenericParam): Added `MonoGenericContainer *owner'.
6930
6931         * metadata.c
6932         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
6933         (do_mono_metadata_parse_generic_inst): Likewise.
6934         (mono_metadata_parse_type_full): New public method.  This is the actual
6935         mono_metadata_parse_type() implementation - with an additional
6936         `MonoGenericContainer *' argument.
6937         (mono_metadata_parse_array_full): Likewise.
6938         (mono_metadata_parse_signature_full): Likewise.
6939         (mono_metadata_parse_method_signature_full): Likewise.
6940         (mono_metadata_parse_mh_full): Likewise.
6941         (mono_type_create_from_typespec): Likewise.
6942         (mono_metadata_interfaces_from_typedef_full): New public method;
6943         this is similar to the other _full() methods, but we take a
6944         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
6945         (mono_metadata_parse_generic_param): Take an additional
6946         `MonoGenericContainer *' argument and lookup the MonoGenericParam
6947         from that container.
6948         (mono_metadata_generic_param_equal): New static method to compare
6949         two type parameters.
6950         (_mono_metadata_type_equal): New static method; takes an
6951         additional `gboolean signature_only' argument - if true, we don't
6952         compare the owners of generic parameters.
6953         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
6954         with a TRUE argument - do a signature-only comparision.
6955
6956         * loader.c: Use the new _full() methods and pass the
6957         MonoGenericContainer to them.
6958
6959         * object-internals.h (MonoReflectionTypeBuilder): Added
6960         `MonoGenericContainer *generic_container' field.
6961         (MonoReflectionMethodBuilder): Likewise.
6962
6963 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
6964
6965         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
6966         case initial images of dynamic assemblies.
6967
6968         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
6969
6970         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
6971
6972         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
6973         length of event->other array.
6974         (typebuilder_setup_events): Ditto.
6975
6976         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
6977         'assembly_by_name' and add an 'assemblies' list.
6978
6979         * assembly.h assembly.c: Add a new search hook for determining whenever
6980         an assembly is already loaded. Use this instead of searching in the
6981         loaded_assemblies list.
6982
6983         * domain.c appdomain.c: Implement the new search hook so loaded 
6984         assemblies are now scoped by appdomain. Fixes #67727.
6985
6986 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
6987
6988         * threads.c (mono_thread_attach): Initialize synch_lock field so
6989         mono_thread_detach works again.
6990
6991         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
6992         'lib' too. Fixes #63130.
6993
6994 2004-10-06  Jackson Harper  <jackson@ximian.com>
6995
6996         * culture-info-tables.h: regenerated.
6997
6998 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
6999
7000         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
7001         implemented by other interfaces in the result. Fixes #65764.
7002         
7003         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7004         Handle unloadable modules without crashing.
7005
7006         * image.c (load_modules): Revert the previous patch since modules must
7007         have a fixed index inside the array.
7008         
7009         * image.c (load_modules): Don't include native modules in the modules
7010         array.
7011
7012 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
7013
7014         * reflection.h: Add param_defaults field.
7015
7016         * reflection.c: Add support for parameter defaults in dynamic methods.
7017         Fixes #64595.
7018
7019         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
7020         an empty string when a type has no namespace. Fixes #64230.
7021
7022 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
7023
7024         * tabledefs.h: Added "internal" security actions to support non-CAS
7025         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
7026         Note: they do not seems to be used anymore in 2.0 (new metadata format)
7027
7028 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
7029
7030         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
7031         constructor of abstract class. Fixes #61689.
7032
7033 2004-10-04  Martin Baulig  <martin@ximian.com>
7034
7035         * class-internals.h (MonoGenericContainer): New type.
7036         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
7037         `MonoGenericContainer *generic_container'.
7038         (MonoClass): Replaced `gen_params' and `num_gen_params' with
7039         `MonoGenericContainer *generic_container'.
7040
7041         * metadata.c (mono_metadata_load_generic_params): Return a
7042         `MonoGenericContainer *' instead of a `MonoGenericParam *';
7043         removed the `num' argument.
7044
7045 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
7046
7047         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
7048         for dynamic images.
7049
7050         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
7051         machine fields.
7052
7053         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
7054
7055         * reflection.c: Save pe_kind and machine values into the generated
7056         image file.
7057
7058         * appdomain.c: Bump corlib version number.
7059
7060         * object-internals.h: Reorganize layout of LocalBuilder.
7061
7062         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
7063         New helper function.
7064
7065         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
7066         created MonoType for dynamic types. Fixes #66180.
7067
7068 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
7069
7070         * threadpool.c: the ares hashtable needs a critical section around it.
7071         this prevents some nasty segfaults
7072
7073 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
7074
7075         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
7076         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
7077         bug 67324).
7078         
7079 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
7080
7081         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
7082         
7083 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
7084
7085         * image.c: Always canonicalize image file names, to avoid loading
7086         the same assembly twice when referenced using a relative path.
7087
7088 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
7089
7090         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
7091
7092         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
7093
7094         * marshal.c: Fix warnings.
7095
7096 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
7097
7098         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
7099         attempting to marshal the delegate_trampoline as the method_addr.
7100         This patch has a static hashtable of marshalled delegates so that 
7101         we can map delegate_trampoline addresses back to delegates.  This
7102         allows a delegate passed to managed code to be passed back into native
7103         code.  Fixes #67039
7104
7105 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
7106
7107         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
7108
7109         * reflection.c (method_encode_code): Align method headers properly.
7110         Fixes #66025.
7111
7112 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
7113
7114         * marshal.c: In the runtime invoke wrapper, reset the abort
7115         exception if it is cached. This avoids the automatic rethrowal of 
7116         the exception after the catch of the wrapper. Also check for pending
7117         interruptions before calling the managed method. This is done using
7118         the new method emit_thread_force_interrupt_checkpoint, since the
7119         normal checkpoint method is ignored when running the invoke wrapper.
7120         * object.c: If the abort exception is rethrown, set the abort_exc
7121         field of the thread, so it will be rethrown aftere every catch.
7122         * threadpool.c: Only run an interruption checkpoint if what has been
7123         requested is a stop of the thread (aborts will be ignored).
7124         * threads.c: By default, a thread will now never be interrumped while
7125         running the runtime invoke wrapper (this ensures that runtime_invoke
7126         will always return to the caller if an exception pointer is provided).
7127         There is a new special method mono_thread_force_interruption_checkpoint()
7128         to force an interruption checkpoint even if running a protected
7129         wrapper, which is used by the same runtime invoke wrapper to do a check
7130         at a safe point.
7131
7132 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
7133
7134         * object.c, object-internals.h: Implemented mono_release_type_locks,
7135         which releases the cctor locks held by a thread.
7136         * threads.c, threads.h: In thread_cleanup, release cctor locks held
7137         by a thread. Added mono_thread_exit() method to be used to safely stop
7138         a thread.
7139
7140 2004-09-28  Raja R Harinath  <rharinath@novell.com>
7141
7142         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7143         Move null check before dereference.  Avoid indexing beyond the end
7144         of the 'modules' array.
7145
7146 2004-09-28  Raja R Harinath  <rharinath@novell.com>
7147
7148         * metadata-internals.h (MonoImage): Add module_count field.
7149         * image.c (load_modules): Set image->module_count.
7150         (mono_image_load_file_for_image): Use image->module_count.
7151         * reflection.c (mono_image_load_module): Append to image->modules array 
7152         of dynamic assembly.
7153         (mono_module_get_object): Fix loop to actually increment index.
7154         Use image->module_count.
7155         * assembly.c (mono_assembly_load_references): Use image->module_count.
7156         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7157         Likewise.
7158
7159 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
7160
7161         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
7162         Avoid assert on generic types.
7163
7164 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
7165
7166         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
7167
7168         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
7169
7170         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
7171         function to convert a MarshalSpec structure to its managed counterpart.
7172
7173         * reflection.c: Fix warnings.
7174         
7175         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
7176         field.
7177
7178         * icall.c (mono_create_icall_signature): Fix build.
7179
7180 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
7181
7182         * icall.c: Add MakePointType icall.
7183
7184         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
7185         warnings.
7186
7187 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7188
7189         * threadpool.c: reuse allocated slots in the queue.
7190
7191 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
7192
7193         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
7194
7195         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
7196
7197         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
7198         previous change.
7199
7200         * tabledefs.h: Add constants for pinvoke attributes BestFit and
7201         ThrowOnUnmappableChar.
7202
7203         * icall.c (ves_icall_Type_GetPacking): New icall.
7204
7205 2004-09-24  Martin Baulig  <martin@ximian.com>
7206
7207         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
7208
7209 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7210
7211         * appdomain.c:
7212         (mono_domain_set): allow setting a domain that is being unloaded.
7213         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
7214         being unloaded.
7215
7216 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
7217
7218         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
7219         the GetCustomAttributes icall.
7220
7221 2004-09-23  Martin Baulig  <martin@ximian.com>
7222
7223         * object-internals.h (MonoReflectionGenericParam): Replaced
7224         'has_ctor_constraint', `has_reference_type' and `has_value_type'
7225         with `guint32 attrs'.
7226
7227 2004-09-23  Martin Baulig  <martin@ximian.com>
7228
7229         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
7230
7231 2004-09-23  Martin Baulig  <martin@ximian.com>
7232
7233         * object-internals.h (GenericParameterAttributes): New enum.
7234
7235 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
7236
7237         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
7238         
7239         * class.c (init_events): Fill out event->other field.
7240
7241         * class.c: Fix warnings.
7242
7243         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
7244
7245 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
7246
7247         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
7248         walk which doesn't supply the IL offset.
7249
7250 2004-09-22  Martin Baulig  <martin@ximian.com>
7251
7252         * reflection.c (mono_reflection_setup_internal_class): If we're
7253         System.ValueType, System.Object or System.Enum, set
7254         `klass->instance_size' and create the vtable.
7255         (mono_reflection_create_internal_class): If we're an enum type,
7256         get the base class from our current corlib.
7257
7258 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
7259
7260         * reflection.h (MonoResolveTokenError): New type.
7261
7262         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
7263         icall.
7264
7265         * icall.c: Add an 'error' argument to the ResolveToken icalls.
7266
7267 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
7268
7269         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
7270         Support also calling constructors, but only for already allocated objects.
7271
7272 2004-09-17  Geoff Norton <gnorton@customerdna.com>
7273
7274         * reflection.c (type_get_qualified_name): If the klass is null
7275         return the typename to avoid a NullRefEx.
7276         (encode_cattr_value): Get the qualified name of the boxed type,
7277         not the underlying enumtype.  Fixes #62984.
7278
7279 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
7280
7281         * marshal.c: Fix problems with previous checkin.
7282
7283 2004-09-21    <vargaz@freemail.hu>
7284
7285         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
7286         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
7287
7288         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
7289
7290 2004-09-21  Geoff Norton <gnorton@customerdna.com>
7291
7292         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
7293         should only return a type for pointers, arrays, and passbyref types.
7294         Fixes bug #63841.
7295
7296 2004-09-21  Martin Baulig  <martin@ximian.com>
7297
7298         * domain.c (mono_debugger_check_runtime_version): New public
7299         function.
7300
7301         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
7302
7303 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
7304
7305         * reflection.c: Added missing sort to the declarative security 
7306         attributes table. MS implementation stops seeing the attributes if the
7307         token number regress in the table (as shown by ildasm and permview).
7308
7309 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
7310
7311         * object-internals.h (MonoReflectionModule): Add 'token' field.
7312         
7313         * reflection.c (mono_reflection_get_token): Add support for Module
7314         and Assembly.
7315         (mono_module_get_object): Set 'token' field.
7316         (mono_module_file_get_object): Set 'token' field.
7317
7318         * icall.c: Add new Assembly and Module icalls.
7319
7320         * appdomain.c: Bump corlib version.
7321
7322 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
7323
7324         * loader.h loader.c class.h class.c: Add helper functions for obtaining
7325         tokens of metadata objects.
7326
7327         * reflection.h reflection.c (mono_reflection_get_token): New function
7328         to obtain the token of a metadata object.
7329
7330         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
7331
7332 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
7333
7334         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
7335         
7336         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
7337
7338 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
7339
7340         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
7341         * object-internals.h: Added 3 MonoArray* members to MonoReflection
7342         AssemblyBuilder to access the permissions set in the class lib.
7343         * reflection.c: Added security attributes encoding step in 
7344         mono_image_build_metadata.
7345         * tabledefs.h: Added new security actions defined in 2.0:
7346         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
7347
7348 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
7349
7350         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
7351         macro parameter.
7352
7353 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
7354  
7355         * locales.c: nullify the ICU_collator member of CompareInfo when it is
7356           finalized. There where random SIGSEVs at program termination, when
7357           an object being finalized was trying to do a string comparison and
7358           the current culture was already finalized.
7359  
7360 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7361
7362         * threads.c: call thread_cleanup before finishing the thread if we get
7363         there.
7364
7365 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
7366
7367         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
7368         assemblies from the parent. Fixes #65665.
7369
7370 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
7371
7372         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
7373         modifiers.
7374
7375 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
7376
7377         * reflection.h: add prototype for mono_get_dbnull_object
7378         * reflection.c: add prototypes for get_default_param_value_blobs 
7379         and mono_get_object_from_blob for fussier compilers
7380
7381 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
7382  
7383         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
7384         false deadlock checks in class initialization.
7385  
7386 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
7387
7388         * image.c (mono_image_addref): Fix comment.
7389
7390         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
7391         possible.
7392
7393 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
7394
7395         * reflection.c (mono_param_get_objects): Modified to return
7396         ParameterInfo.DefaultValue object.
7397
7398         (get_default_param_value_blobs):
7399         (mono_get_object_from_blob):
7400         (mono_get_dbnull_object): New helper routines. 
7401
7402         * object.c (mono_get_constant_value_from_blob): New helper routine
7403         carved out from get_default_field_value ()
7404
7405         * object-internals.h (mono_get_constant_value_from_blob): Added
7406         function declaration.
7407
7408 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
7409
7410         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
7411         referenced assemblies. Fixes #62135.
7412
7413         * exception.h exception.c (mono_get_exception_file_not_found2): New
7414         helper function.
7415
7416 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
7417
7418         * class.h class.c: Add mono_type_get_underlying_type ().
7419
7420 2004-09-09  Geoff Norton <gnorton@customerndna.com>
7421
7422         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
7423         Fix GetTypes() to support dynamically created assemblies.
7424
7425 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
7426
7427         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
7428         
7429         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
7430         previous patch.
7431
7432         * reflection.h reflection.c loader.c: Allow dynamic construction of
7433         pinvoke methods. Fixes #65571.
7434         
7435         * reflection.c (mono_reflection_get_type): Revert previous change since
7436         it causes regressions.
7437
7438 2004-09-08  Martin Baulig  <martin@ximian.com>
7439
7440         * class.c (class_compute_field_layout): Don't call
7441         mono_class_layout_fields() for open generic instances.
7442
7443 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
7444         * threads.c appdomain.c: fix typo in GC macro
7445
7446 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7447
7448         * threads.c: don't call mono_thread_detach() in start_wrapper(),
7449         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
7450
7451 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
7452
7453         * image.c (mono_image_close): Applied patch from 
7454         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
7455         assembly is loaded multiple times from data.
7456         
7457         * image.c (mono_image_open): Fix warning.
7458
7459 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7460
7461         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
7462         once. Fixes #58334.
7463         
7464         * reflection.c (mono_reflection_create_runtime_class): Initialize
7465         klass->nested_classes. Fixes #61224.
7466
7467 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
7468
7469         * threads.c: sched_yield() on exit, to allow threads to quit.
7470
7471 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7472
7473         * object.c (mono_unhandled_exception): Remove leftover debug code.
7474
7475 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
7476
7477         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
7478
7479 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7480
7481         * marshal.c (emit_marshal_array): Really null terminate string arrays.
7482         
7483         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
7484
7485 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
7486
7487         * marshal.c (emit_marshal_array): Null terminate string arrays.
7488         
7489         * marshal.c (raise_auto_layout_exception): Fix warning.
7490
7491         * reflection.c (mono_param_get_objects): Initialize the default value
7492         with DBNull.Value, not null. Fixes #62123.
7493
7494 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
7495
7496         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
7497         throw an exception with a cute explanation.
7498
7499 2004-09-06  Dick Porter  <dick@ximian.com>
7500
7501         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
7502         Close the new process's thread handle, as we don't use it.  The
7503         handle stays around forever otherwise.
7504
7505 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
7506
7507         * object.c (arith_overflow): Fix warning.
7508
7509         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
7510         calling conventions in method refs. Fixes #65352.
7511
7512         * reflection.c: Fix warnings.
7513
7514 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
7515
7516         * icall.c: Add a new icall for Array.Clear
7517
7518 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
7519
7520         * object.c: When allocating an array, we have to throw
7521         an overflow exception if any of the lengths are < 0.
7522
7523 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
7524
7525         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
7526         properly. Also move implementation of string array marshalling to 
7527         managed code. Fixes #42316.
7528
7529 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7530
7531         * assembly.c: provide more information when loading an assembly fails.
7532
7533 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7534
7535         * filewatcher.c: don't expect the development fam package to be
7536         installed.
7537
7538 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
7539
7540         * marshal.c: Make a copy of the signature cookie since it will be
7541         freed by the caller.
7542         
7543         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
7544
7545         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
7546
7547         * metadata.c (mono_metadata_free_marshal_spec): New function to free
7548         marshal specs.
7549
7550         * marshal.c: More refactoring.
7551         
7552         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
7553         smaller functions.
7554
7555 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
7556
7557         * object.c: In mono_message_invoke, fill the output parameter array after
7558           calling the managed method (it was done before the call). This fixes
7559           bug #59299.
7560
7561 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
7562
7563         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
7564         as well.
7565
7566 2004-09-02  Martin Baulig  <martin@ximian.com>
7567
7568         * class.c (mono_class_instance_size): Don't allow generic type
7569         definitions or open generic instances.
7570         (mono_class_array_element_size): If we're a value type, call
7571         mono_class_instance_size() on the original class.
7572
7573         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
7574         handle generic instances.
7575
7576         * mono-debug-debugger.c (write_type): Handle generic instances
7577         like classes.
7578
7579 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
7580
7581         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
7582         the allocation request fails. Fixes #65089.
7583
7584         * object.c (mono_runtime_free_method): Do not call mono_free_method.
7585         
7586         * object.c (mono_runtime_free_method): New function to free a dynamic
7587         method.
7588
7589         * marshal.c (mono_delegate_free_ftnptr): New function to free the
7590         delegate trampoline.
7591
7592         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
7593         with hasthis as dynamic,
7594
7595         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
7596
7597         * domain.c (mono_jit_info_table_remove): New function to remove an
7598         entry from the jit info table.
7599
7600         * class-internals.h (MonoMethod): Add 'dynamic' field.
7601
7602         * loader.c: Fix warnings.
7603
7604 2004-09-01  Martin Baulig  <martin@ximian.com>
7605
7606         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
7607         instead of mono_debugger_lock() because the latter one is a no-op
7608         unless running in the debugger.
7609
7610 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
7611
7612         * class.c (class_compute_field_layout): Classes with auto-layout or
7613         reference fields are not blittable.
7614         
7615 2004-09-01  Dick Porter  <dick@ximian.com>
7616
7617         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
7618         mono_image_get_filename() to get the assembly location.
7619
7620         * icall.c:
7621         * metadata.h: Fix compile warnings
7622
7623 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
7624
7625         * class.c (class_compute_field_layout): System.Object is blittable.
7626
7627         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
7628         as in/out. Fixes #59909.
7629
7630 2004-09-01  Martin Baulig  <martin@ximian.com>
7631
7632         * metadata.h (MONO_TYPE_ISREFERENCE): Call
7633         mono_metadata_generic_inst_is_valuetype() if we're a generic
7634         instance to check whether our underlying type is a reference type.
7635
7636 2004-09-01  Martin Baulig  <martin@ximian.com>
7637
7638         * metadata.c (mono_type_size): If we're a generic instance, call
7639         mono_class_value_size() for value types.
7640
7641 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
7642
7643         * marshal.c: Implement more custom marshalling functionality. Fixes
7644         #64915.
7645
7646 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
7647
7648         * mono-debug.c, debug-mono-symfile.c: add some locking love.
7649
7650 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
7651
7652         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
7653
7654         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
7655
7656         * icall.c: Fix some warnings.
7657
7658         * threads.c (abort_appdomain_thread): Fix unref errors.
7659         (mono_thread_current): Fix THREAD_DEBUG define.
7660
7661 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
7662
7663         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
7664
7665         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
7666
7667 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
7668
7669         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
7670         string arrays.
7671
7672 2004-08-28  Martin Baulig  <martin@ximian.com>
7673
7674         * metadata.c
7675         (mono_metadata_generic_inst_is_valuetype): New public function.
7676
7677         * metadata.h (MONO_TYPE_ISSTRUCT): Call
7678         mono_metadata_generic_inst_is_valuetype() if we're a generic
7679         instance to check whether our underlying type is a valuetype.
7680
7681 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
7682
7683         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
7684         #63768.
7685
7686 2004-08-25  Martin Baulig  <martin@ximian.com>
7687
7688         * loader.c (mono_get_method_from_token): Abstract methods can also
7689         be generic and thus have type parameters.
7690
7691         * metadata-internals.h
7692         (MonoDynamicImage): Added `GPtrArray *gen_params'.
7693
7694         * reflection.c (mono_image_get_generic_param_info): Don't create a
7695         metadata row, just add an entry to the `gen_params' array.
7696         (build_compressed_metadata): Sort the `gen_params' array and then
7697         actually create the metadata.
7698
7699 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7700
7701         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
7702
7703 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
7704
7705         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
7706
7707 2004-08-24  Martin Baulig  <martin@ximian.com>
7708
7709         * class.cs (mono_class_is_subclass_of): Like an interface, a
7710         generic instance also derives from System.Object.
7711
7712 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
7713
7714         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
7715         custom modifiers to be in any order. Fixes #61990.
7716
7717 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
7718
7719         * object.c: Register mono_object_new_fast icall.
7720         
7721         * object.c (mono_class_get_allocation_ftn): Return to calling
7722         mono_object_new_fast, since it seems faster to compute the object 
7723         size in unmanaged code than passing it as a parameter.
7724
7725         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
7726
7727         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
7728         this function with Boehm as the oom handler, so we don't have to check
7729         the result of GC_malloc.
7730
7731         * object.c: Remove checks for oom.
7732
7733         * object.h object.c (mono_class_get_allocation_ftn): New function to
7734         return the icall which can be used to allocate an instance of a given
7735         class. 
7736
7737         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
7738
7739         * class-internals.h: Add 'enabled' field.
7740
7741 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
7742
7743         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
7744
7745 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
7746         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
7747         value 0x0010.
7748
7749 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
7750
7751         * appdomain.c: use the Tls function for appdomain too,
7752         at Zoltan's request. Actually return in mono_context_get
7753
7754         * appdomain.c, profiler.c, threads.c: use __thread
7755
7756 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
7757
7758         * appdomain.c threads.c: Call GC_CreateThread on windows.
7759
7760         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
7761         multiple libraries since this don't work on windows.
7762
7763 2004-08-18  Martin Baulig  <martin@ximian.com>
7764
7765         * class-internals.h
7766         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
7767         MonoMethodHeader.
7768
7769         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
7770         MonoMethodNormal since we also need it for abstract and interface
7771         methods.
7772
7773         * reflection.c
7774         (build_compressed_metadata): Sort the GenericParam table.
7775         (mono_image_create_token): Added `gboolean create_methodspec'
7776         argument; this is false when generating a MethodImpl token.
7777         (reflection_methodbuilder_to_mono_method): Abstract and interface
7778         methods may also have generic parameters.
7779
7780 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
7781
7782         * appdomain.c: thread local alloc
7783
7784 2004-08-17  Martin Baulig  <martin@ximian.com>
7785
7786         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
7787
7788         * icall.c
7789         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
7790         argument.
7791
7792         * class.c (mono_type_get_full_name): New public function.
7793         (mono_type_get_name): Don't include the type arguments.
7794
7795 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
7796
7797         * Makefile.am: Build static versions of libmetadata and libmonoruntime
7798         for inclusion into the mono executable.
7799
7800 2004-08-16  Martin Baulig  <martin@ximian.com>
7801
7802         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
7803         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
7804
7805 2004-08-14  Martin Baulig  <martin@ximian.com>
7806
7807         * class.c (dup_type): Also copy the `byref' field.
7808
7809 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
7810
7811         * reflection.c (create_dynamic_mono_image): Revert the last change 
7812         since it breaks bootstrap.
7813
7814 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
7815
7816         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
7817
7818         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
7819         not free them with g_free.
7820
7821 2004-08-11  Martin Baulig  <martin@ximian.com>
7822
7823         * reflection.c (mono_reflection_setup_internal_class): Also call
7824         mono_class_setup_mono_type() if we already have a `tb->type.type'.
7825
7826 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
7827
7828         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
7829         called during default (first) AppDomain creation. Keep track of
7830         Evidence when loading assemblies.
7831
7832 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
7833
7834         * opcodes.c, opcodes.h: reduce runtime relocations.
7835
7836 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
7837
7838         * culture-info.h, locales.c: fixes and chages to sue the new
7839         optimized format of the locale data.
7840         * culture-info-tables.h: regenerated.
7841
7842 2004-08-06  Geoff Norton <gnorton@customerdna.com>
7843         
7844         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
7845
7846 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
7847
7848         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
7849         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
7850         * domain-internals.h: icall declaration.
7851         * icall.c: icall registration.
7852         * object-internals.h: New fields in MonoAssembly for CAS.
7853
7854 2004-08-05  Duncan Mak  <duncan@ximian.com>
7855
7856         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
7857         CEE_LDELEM_ANY.
7858
7859 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
7860
7861         * reflection.c: fix to deal with object[] arrays in custom ctors
7862         (bug #62550).
7863
7864 2004-08-05  Martin Baulig  <martin@ximian.com>
7865
7866         * class.c (mono_class_array_element_size): Added support for
7867         generic instances and correctly handle "recursive" types.
7868
7869 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
7870
7871         * assembly.c: Fix warnings.
7872
7873 2004-08-04  Martin Baulig  <martin@ximian.com>
7874
7875         * class.c
7876         (mono_type_get_name_recurse): Added `gboolean include_arity'
7877         argument specifying whether or not we should include the generic
7878         arity in the type name.
7879         (_mono_type_get_name): New static function.
7880         (mono_class_setup_vtable): If we're a generic instance, don't
7881         include the generic arity in the names of explicit method
7882         implementations.        
7883
7884 2004-08-03  Martin Baulig  <martin@ximian.com>
7885
7886         * class.c (mono_type_get_name_recurse): Enclose the generic type
7887         arguments in `<', '>'.
7888
7889 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7890
7891         * gc.c: make GC warning messages use the trace API, they are just
7892         noise to most of the users.
7893
7894 2004-08-03  Martin Baulig  <martin@ximian.com>
7895
7896         * debug-mono-symfile.c (read_string): Correctly read the string.
7897
7898 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
7899
7900         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
7901         
7902         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
7903         icalls.
7904         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
7905
7906 2004-07-30  Martin Baulig  <martin@ximian.com>
7907
7908         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
7909         Reflect latest symbol writer changes.   
7910
7911 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
7912
7913         * object.c: always create an object if null is passed
7914         to Invoke() where a valuetype is expected.
7915
7916 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
7917
7918         * marshal.c (mono_marshal_init): make managed
7919         signatures match native ones better for 64bits.
7920
7921 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7922
7923         * appdomain.c: hack to build correctly the private bin path on windows.
7924         Fixes bug #61991.
7925
7926 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
7927
7928         * assembly.c: Load mscorlib from the correct framework directory
7929           (mono/<version>/mscorlib.dll).
7930         * appdomain.h: Added prototypes for new functions.
7931         * internals.h: Added some prototypes.
7932         * domain.c: When initializing the runtime, get from the executable and
7933           the configuration files the runtime version that the app supports.
7934           Added support methods for reading app.exe.config. Added list of versions
7935           supported by the JIT. Added two new methods: mono_init_from_assembly,
7936           which initializes the runtime and determines the required version from
7937           the provided exe file, and mono_init_version, which initializes
7938           the runtime using the provided version.
7939         * icall.c: Get machine.config from version-specific directory.
7940         * reflection.c: When generating an image, embed the version number
7941           of the current runtime.
7942
7943 2004-07-28  Dick Porter  <dick@ximian.com>
7944
7945         * socket-io.c
7946         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
7947         returned sockaddr size before creating the remote address object.
7948         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
7949         61608.
7950
7951 2004-07-28  Dick Porter  <dick@ximian.com>
7952
7953         * locales.c (string_invariant_compare_char): Fix invariant char
7954         compares between upper and lower cases.  Fixes bug 61458.
7955
7956 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
7957         
7958         * marshal.c: actually cache stelem.ref wrappers.
7959         
7960 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
7961
7962         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
7963         sections and remove the mono_cli_rva_map () function.
7964
7965 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
7966
7967         * debug-mono-symfile.c: fix one more endianess issue, from a patch
7968         by Geoff Norton (<gnorton@customerdna.com>).
7969
7970 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7971
7972         * class.c: fix class loads for pointer types (typeof(int) !=
7973         typeof(int*)).
7974
7975 2004-07-27  Martin Baulig  <martin@ximian.com>
7976
7977         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
7978         reading the debugging information from an external ".mdb" file.
7979
7980 2004-07-24  Martin Baulig  <martin@ximian.com>
7981
7982         * reflection.c (mono_image_get_type_info): Only write a class
7983         layout entry if we actually have a size or a packing size.
7984
7985 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
7986
7987         * reflection.c (type_get_fully_qualified_name): 
7988         insert cast to get type checking of ?: with non-gcc compilers
7989
7990 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
7991
7992         * rand.c: use g_getenv for both lookups of
7993         MONO_EGD_SOCKET
7994
7995 2004-07-17  Martin Baulig  <martin@ximian.com>
7996
7997         * reflection.c (mono_reflection_bind_generic_method_parameters):
7998         Set `gmethod->reflection_info'.
7999
8000 2004-07-17  Martin Baulig  <martin@ximian.com>
8001
8002         * class.c (mono_class_create_from_typedef): Insert the newly
8003         created class into the hash table before computing the interfaces
8004         since we could be called recursively.
8005
8006 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
8007
8008         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
8009         function to implement stelem.ref in managed code
8010         * class-internals.h, debug-helpers.c: a new wrapper type
8011         for the above.
8012
8013 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8014
8015         * gc.c: allow GC handles to work even when no GC is compiled in.
8016         Fix part of bug #61134 (GetAddrOfPinnedObject).
8017
8018 2004-07-13  Peter Williams  <peter@newton.cx>
8019  
8020         * process.c (complete_path): Make sure we don't attempt to execute
8021         directories.
8022  
8023 2004-07-12  Geoff Norton <gnorton@customerdna.com>
8024
8025         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
8026           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
8027           and will add/subtract the hour if needed
8028
8029 2004-07-12  Martin Baulig  <martin@ximian.com>
8030
8031         * reflection.c (mono_field_get_object): If we have
8032         `field->generic_info', take the attributes from
8033         `field->generic_info->generic_type'.    
8034
8035 2004-07-12  Martin Baulig  <martin@ximian.com>
8036
8037         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
8038         This function must be called before initializing the runtime.
8039         (mono_debug_init_1): New function; call this after initializing
8040         the runtime, but before loading the assembly.  It tells the
8041         debugger to load corlib and the builtin types.
8042
8043         * mono-debug-debugger.c: Did some larger changes in the debugging
8044         code; support recursive class declarations, make sure we actually
8045         add all classes.
8046
8047 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8048
8049         * debug-helpers.c: undo my previous patch and fixed the real issue in
8050         ../mini/exceptions-x86.c
8051
8052 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8053
8054         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
8055         when no HOME env. variable was set and a NullRef was thrown in a .cctor
8056         called from other .cctors.
8057
8058 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
8059
8060         * loader.c: Removed the mono_loader_wine_init hack now that we are
8061         doing a managed version of Windows.Forms.
8062
8063 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
8064
8065         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
8066         threadpool.c, threads.c: remove static data from rootset.
8067
8068 2004-07-09  Dick Porter  <dick@ximian.com>
8069
8070         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
8071         Don't do any more processing if the matched length was 0.  It was
8072         increasing the size of the string before.  Fixes bug 61167.
8073
8074 2004-07-09  Dick Porter  <dick@ximian.com>
8075
8076         * socket-io.h:
8077         * socket-io.c
8078         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
8079         Add support for SO_PEERCRED if its available.
8080
8081 2004-07-09  Peter Bartok <pbartok@novell.com>
8082         * loader.c: winelib.exe.so error message is now only displayed if
8083         MONO_DEBUG is set. To help us avoid questions when people are trying
8084         out the new Managed.Windows.Forms.
8085
8086 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
8087
8088         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
8089         for isinst and castclass wrappers.
8090
8091         * class-internals.h icall.c: Move registration and lookup of JIT icalls
8092         to libmetadata from the JIT, so they could be used by the marshalling
8093         code and the interpreter.
8094
8095         * marshal.c: Register marshalling related JIT icalls here instead of
8096         in mini.c. Use CEE_MONO_ICALL instead of the family of 
8097         CEE_MONO_PROC<x> opcodes to call marshalling functions.
8098
8099         * metadata.h: Remove unneeded marshalling conversions.
8100
8101         * opcodes.c: Update for new opcodes.
8102         
8103 2004-07-08  Martin Baulig  <martin@ximian.com>
8104
8105         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
8106         (mono_debug_get_domain_data): Make this function static.
8107
8108 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8109
8110         * gc.c, object.h: add nice GC handle API for embedders.
8111
8112 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
8113
8114         * reflection.c: more changes for the new api
8115
8116         * object.c: When we reflect on a field w/ a constant value, it
8117         will not have a memory location, so we must access metadata. Also,
8118         allow easier reading of strings so that we can read them from
8119         the constant data.
8120
8121         * class.c (mono_class_layout_fields): no need for literal fields here.
8122
8123         * class-internals.h: api changes for const fields
8124
8125         * icall.c (ves_icall_get_enum_info): use new apis for const fields
8126
8127 2004-07-06  Martin Baulig  <martin@ximian.com>
8128
8129         * mono-debug.h: Increment version number to 44.
8130
8131         * mono-debug.c (mono_debug_add_wrapper): The second argument is
8132         now a gpointer, rewrote this whole method.
8133
8134         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
8135         function.  Add information about the wrapper in a new "misc table".
8136
8137         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
8138         for the new misc table.
8139
8140 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
8141
8142         * metadata-internals.h image.c: Add a cache for helper signatures.
8143
8144         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
8145
8146 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
8147
8148         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
8149         delegates from a delegate. Fixes #61033.
8150         
8151         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
8152         marshalling of stringbuilder arrays. Fixes #59900.
8153
8154 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
8155
8156         * icall.c: Add EnumBuilder:setup_enum_type icall.
8157
8158 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
8159
8160         * icall.c: Added a new icall for the property version of
8161         OffsetOfStringData.
8162
8163 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
8164
8165         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
8166         it has a constant size across platforms.
8167
8168         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
8169         stack trace.
8170
8171 2004-06-29  Martin Baulig  <martin@ximian.com>
8172
8173         * mono-debug.c (mono_debug_add_method): Protect the whole function
8174         in mono_debugger_lock(), not just parts of it.
8175
8176 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8177
8178         * reflection.c: make sure padding bytes in heaps are zeroed.
8179
8180 2004-06-24  David Waite  <mass@akuma.org>
8181
8182         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
8183         image.c, loader.c, locales.c, marshal.c, metadata.c,
8184         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
8185         string-icalls.c, threads.c: change to C90-style comments from C99 /
8186         C++ -style
8187
8188 2004-06-24  Dick Porter  <dick@ximian.com>
8189
8190         * threads.c
8191         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
8192         return createdNew.  Fixes bug 60412.
8193
8194         * threads-types.h: 
8195         * icall.c: Add createdNew parameter to CreateMutex icall
8196
8197 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8198
8199         * reflection.c, object-internals.h: save default value in params.
8200
8201 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8202
8203         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
8204         no need to build a new path combining that with the application base.
8205         Fixes bug #60442.
8206
8207 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
8208
8209         * reflection.c: fixed minor standard compliance issues.
8210
8211 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8212
8213         * reflection.c: fixed issue with encoding some custom attributes
8214         (arrays in properties and fields, bug #60411).
8215
8216 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8217
8218         * reflection.c: fix start address when copying the public key token.
8219
8220 2004-06-23  Martin Baulig  <martin@ximian.com>
8221
8222         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
8223         the `exc' object in a static object to put it into the GC's root set.
8224
8225 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
8226
8227         * reflection.c: make mono_reflection_setup_internal_class ()
8228         callable a second time to setup a new parent class.
8229
8230 2004-06-23  Dick Porter  <dick@ximian.com>
8231
8232         * threads.c: Check for WAIT_IO_COMPLETION return values.
8233
8234 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
8235
8236         * appdomain.c: Removed the g_free on the public key token. Now copy 
8237         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
8238         * assembly.c: Added public key token string value when loading 
8239         assemblies. Fix bug #60439.
8240         * icall.c: Added missing informations (like public key) in 
8241         GetReferencedAssemblies. Fix #60519.
8242         * image.h: Changed definition for public key token from const char*
8243         public_tok_value to guchar public_key_token [17];
8244         * reflection.c: Updated for changes to public key token.
8245
8246 2004-06-22  Lluis Sanchez Gual
8247
8248         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
8249         for the field in base classes.
8250
8251 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8252
8253         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
8254         mark headers as not supported, they are installed only for use by the
8255         debugger.
8256
8257 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
8258
8259         * *.c, *.h: avoid namespace pollution in public headers.
8260
8261 2004-06-21  Martin Baulig  <martin@ximian.com>
8262
8263         * exception.c (mono_get_exception_security): It's in
8264         "System.Security", not in "System".
8265
8266         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
8267         the exception classes.
8268
8269 2004-06-21  Martin Baulig  <martin@ximian.com>
8270
8271         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
8272         Protect the exception object from being finalized.
8273
8274 2004-06-21  Martin Baulig  <martin@ximian.com>
8275
8276         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
8277         public function.
8278
8279 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
8280
8281         * reflection.c: Load the assembly in mono_reflection_type_from_name,
8282         if it was not loaded before. Fix parts of #60439.
8283
8284 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
8285
8286         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
8287         code that was broken since Ben's change: wrappers are now
8288         dependent on the method signature only again.
8289
8290 2004-06-21  Martin Baulig  <martin@ximian.com>
8291
8292         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
8293         added interface support.
8294
8295 2004-06-21  Martin Baulig  <martin@ximian.com>
8296
8297         * class.c (mono_vtable_get_static_field_data): New public method.
8298
8299 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
8300
8301         * filewatcher.c : Windows build fix to be compliant with API changes.
8302
8303 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8304
8305         * class.h, class.c: more accessors.
8306         * metadata.h, metadata.c: prepare for hiding MonoType and
8307         MonoMethodSignature: people should use the accessors from now on
8308         outside of the tree.
8309
8310 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8311
8312         * *.c, *.h: more API cleanups.
8313
8314 2004-06-18  Jackson Harper  <jackson@ximian.com>
8315
8316         * assembly.c: Trace loading assemblies.
8317         * loader.c: Trace loading native libraries.
8318         * mono-config.c: Trace loading config files.
8319         
8320 2004-06-18  Dick Porter  <dick@ximian.com>
8321
8322         * locales.c: Tell ICU the lengths of strings, it can cope with
8323         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
8324
8325 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
8326
8327         * image.c: swapped name/filename;
8328
8329 2004-06-18  Martin Baulig  <martin@ximian.com>
8330
8331         * mono-debug-debugger.c (write_class): Write the parent class at
8332         the end of the header.
8333
8334 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8335
8336         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
8337
8338 2004-06-17  Raja R Harinath  <rharinath@novell.com>
8339
8340         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
8341         (bundle_obj): New conditional define.
8342         (BUILT_SOURCES): Remove.
8343         ($(bundle_srcs)): Make parallel-make safe.
8344         (libmonoruntime_la_LIBADD): Make unconditional.
8345         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
8346         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
8347
8348 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
8349
8350         * culture-info-tables.h: It was inconsistent with the latest
8351           supp info files.
8352
8353 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
8354
8355         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
8356         be loaded.
8357
8358         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
8359         with gcc 2.95.
8360
8361 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8362
8363         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
8364         cleaned up public header threads.h.
8365
8366 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8367
8368         * Makefile.am, *.c, *.h: more API cleanups.
8369
8370 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
8371
8372         * Makefile.am: removed monosn from compilation.
8373         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
8374         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
8375         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
8376         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
8377         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
8378         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
8379
8380 2004-06-15  Jackson Harper  <jackson@ximian.com>
8381
8382         * assembly.c: Make locales lower case when searching the GAC for
8383         assemblies. gacutil will always make locales lowercase when
8384         installing so this effectively makes them case insensitive.
8385         
8386 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
8387
8388         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
8389         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
8390           parameter which allows to choose whether the wait can be interrupted or 
8391           not. Also added the method mono_monitor_enter(), which locks the monitor
8392           using an infinite wait and without allowing interruption.
8393           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
8394           interrupted.
8395         * object.h: Added new fields in MonoThread. suspend_event holds the event
8396           used to susped/resume the thread. synch_lock is the lock object to use for
8397           modifying the thread state.
8398         * threads.c: Use the new synch_lock object for locking, instead of "this",
8399           which can generate deadlocks.
8400           Moved thread state change in Thread.Sleep and Thread.Join from managed
8401           to unmanaged code. This avoids a deadlock when the thread was suspended
8402           just after acquiring the thread lock.
8403           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
8404           Implemented Thread.Suspend using an event instead of ThreadSuspend,
8405           which is not fully implemented in the io-layer.
8406         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
8407
8408 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
8409
8410         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
8411         threads-types.h: more API cleanups.
8412
8413 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8414
8415         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
8416         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
8417         threadpool.c, threads.c: first pass at the exported API cleanup.
8418
8419 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
8420
8421         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
8422
8423 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8424
8425         * icall.c: added internalGetHome.
8426
8427 2004-06-14  Dick Porter  <dick@ximian.com>
8428
8429         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
8430         possible to return successfully when '.' or '..' were the only
8431         entries in a directory, but were skipped.  The MonoIOStat was not
8432         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
8433         Fixes bug 59574.
8434
8435 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8436
8437         * reflection.c: make binaries run on .Net 1.1 by default.
8438
8439 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
8440
8441         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
8442
8443 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
8444
8445         * marshal.c: keep track of struct size with explicit layout
8446         (bug #59979).
8447
8448 2004-06-12  Martin Baulig  <martin@ximian.com>
8449
8450         * mono-debug-debugger.c: Comment out a debugging g_message().
8451
8452 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8453
8454         * reflection.c, reflection.h: do not free custom attrs that are cached.
8455         * icall.c: use braces to make code clearer.
8456
8457 2004-06-11  Martin Baulig  <martin@ximian.com>
8458
8459         * class.h (MonoInflatedField): New type.
8460         (MonoClassField): Replaced `MonoType *generic_type' with
8461         `MonoInflatedField *generic_info'.
8462
8463         * icall.c
8464         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
8465
8466 2004-06-11  Martin Baulig  <martin@ximian.com>
8467
8468         * reflection.c (mono_image_create_method_token): Correctly encode
8469         varargs methods.
8470
8471 2004-06-11  Martin Baulig  <martin@ximian.com>
8472
8473         * metadata.c (mono_metadata_parse_method_signature): When parsing
8474         a MethodDef which has VarArgs, also set sentinelpos if we don't
8475         have any parameters.
8476
8477 2004-06-11  Martin Baulig  <martin@ximian.com>
8478
8479         * verify.c (mono_method_verify): In CEE_CALL, use
8480         mono_method_get_signature() to get the method's signature, unless
8481         we're a PInvoke method.
8482
8483 2004-06-10  Jackson Harper  <jackson@ximian.com>
8484
8485         * assembly.c: Use <path>/lib/mono/gac for the extra paths
8486         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
8487         logical name as the supplied path is just a prefix to the gac not
8488         the direct path to it.
8489         
8490 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
8491
8492         * reflection.c: make the token for a created method match
8493         the token of the MethodBuilder it was created from
8494         (IKVM requires this behaviour now).
8495
8496 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
8497
8498         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
8499         reflection.c, socket-io.c: leak fixes.
8500
8501 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
8502
8503         * icall.c: handle sentinel pos in vararg methods in position different
8504         from 0.
8505
8506 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8507
8508         * culture-info-tables.h: freshly generated.
8509
8510 2004-06-09  Martin Baulig  <martin@ximian.com>
8511
8512         * loader.c (mono_get_method_constrained): Call `mono_class_init
8513         (constrained_class)'.   
8514
8515 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
8516
8517         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
8518         any methods. Fixes #59629.
8519
8520 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
8521
8522         * culture-info-tables.h: reflecting locale-builder updates.
8523
8524 2004-06-08  Dick Porter  <dick@ximian.com>
8525
8526         * object.h:
8527         * locales.c: Fixed compile warnings, including a real bug in
8528         CompareInfo_internal_compare.
8529         
8530 2004-06-08  Dick Porter  <dick@ximian.com>
8531
8532         * locales.c
8533         (ves_icall_System_Globalization_CompareInfo_internal_index):
8534         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
8535         Double-check the resuls of usearches, because ICU currently
8536         ignores most of the collator settings here.  Fixes bug 59720.
8537         
8538 2004-06-08  Dick Porter  <dick@ximian.com>
8539
8540         * locales.c
8541         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
8542         Fix memory leak and segfault-causing typo.  No idea how this one
8543         lasted so long without being noticed.
8544
8545 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
8546
8547         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
8548         any methods. Fixes #59629.
8549
8550 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8551
8552         * assembly.c:
8553         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
8554         own the critical section before). Removed dead code (that's done
8555         in the preload hook).
8556
8557         (mono_assembly_load_with_partial_name): call the preload hook.
8558
8559 2004-06-08  Martin Baulig  <martin@ximian.com>
8560
8561         * metadata.c (mono_metadata_signature_alloc): Default
8562         `sentinelpos' to -1.
8563
8564         * reflection.c (mono_image_get_array_token): Likewise.
8565
8566 2004-06-08  Martin Baulig  <martin@ximian.com>
8567
8568         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
8569
8570         * metadata.c (mono_metadata_parse_method_signature): When parsing
8571         a MethodDef which has VarArgs, set sentinelpos.
8572
8573         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
8574         `gint16' since we're using -1 for non-varargs methods.
8575
8576         * reflection.c
8577         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
8578         (method_encode_signature): Added varargs support.
8579         (method_builder_encode_signature): Likewise.
8580         (mono_image_get_varargs_method_token): New static method.
8581         (mono_image_create_method_token): New public method; this is
8582         called via an icall instead of mono_image_create_token() when
8583         calling a varargs method.       
8584
8585 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
8586
8587         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
8588
8589 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
8590
8591         * culture-info-tables.h : Reflecting the latest locale-builder that
8592           fixed empty array representation ({} to {0}).
8593
8594 2004-06-07  Jackson Harper  <jackson@ximian.com>
8595
8596         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
8597         looking up extra gac paths. This allows MONO_GAC_PATH to act
8598         exactly like a prefix.
8599         
8600 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
8601
8602         * reflection.c (mono_reflection_type_from_name): Make a copy of the
8603         type name before modifying it. Fixes #59405.
8604
8605 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
8606
8607         * culture-info.h: added fields for "all datetime patterns".
8608         * locales.c: (  ves_icall_System_Globalization_CultureInfo
8609           _construct_datetime_format ()): fill xxx_patterns fields.
8610         * object.h: added fields for "all datetime patterns" to
8611           MonoDateTimeFormatInfo.
8612         * culture-info-tables.h: reflecting locale-builder updates.
8613
8614 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
8615
8616         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
8617         the event has no add and remove methods. Fixes #59629.
8618
8619 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
8620
8621         * object.c: Fixed possible integer overflow when allocating large
8622         strings.
8623
8624 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
8625
8626         * culture-info-tables.h: reflecting locale-builder updates.
8627
8628 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
8629
8630         * culture-info-tables.h: reflecting locale-builder updates.
8631
8632 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
8633
8634         * culture-info-tables.h: reflecting locale-builder updates.
8635
8636 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
8637
8638         * threads.c: Made Thread.Sleep abortable.
8639
8640 2004-06-02  Martin Baulig  <martin@ximian.com>
8641
8642         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
8643
8644         * debug-mono-symfile.h: Bumped symbol file version number to 37.
8645
8646 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
8647
8648         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
8649
8650 2004-05-30  Jackson Harper  <jackson@ximian.com>
8651
8652         * reflection.c: Do not hardcode assembly versions or public key
8653         tokens anymore. All of this except the corlib section was dead
8654         code anyways.
8655         
8656 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
8657
8658         * object.c (mono_runtime_invoke_array): Automatically create boxed
8659         objects for byref valuetypes if needed. Fixes #59300.
8660         
8661         * object.c (mono_method_return_message_restore): Handle 
8662         MONO_TYPE_OBJECT as well.
8663
8664 2004-05-28  Jackson Harper  <jackson@ximian.com>
8665
8666         * reflection.c: The modified type encoding was causing build
8667         problems. Reverted for now.
8668         
8669 2004-05-28  Jackson Harper  <jackson@ximian.com>
8670
8671         * reflection.c/h: Take an assembly ref so that we dont create
8672         fully qualified names when encoding types in the same assembly as
8673         the custom attribute being emitted.
8674         * appdomain.c: Increment version number.
8675         
8676 2004-05-26  Duncan Mak  <duncan@ximian.com>
8677
8678         * icall.c
8679         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
8680         Set the full version number (major, minor, build, revision).
8681
8682 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
8683
8684         * marshal.c (emit_struct_conv): increment src/dst after blit
8685         (mono_marshal_get_managed_wrapper,
8686         mono_marshal_get_native_wrapper): make sure we have marshalling
8687         info before marshalling params (info computation affects
8688         blittable)
8689
8690         * class.c (class_compute_field_layout): correctly deal with
8691         blittable
8692         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
8693         value types (as per what windows dows by default)
8694         (mono_class_setup_mono_type): System.ValueType is blittable
8695         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
8696         blittable
8697
8698         * marshal.c (mono_marshal_load_type_info): flag types  as
8699         non-blittable if the native layout doesn't match the managed
8700         layout
8701
8702 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8703
8704         * appdomain.c: don't add stuff in the private search path that is
8705         above the application base. If application base is not set, there's
8706         no private search path.
8707
8708 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
8709
8710         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
8711         byref struct arguments in native->managed marshalling.
8712
8713 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
8714
8715         * marshal.c (mono_marshal_get_runtime_invoke): correctly
8716         cache methods using signature (special case for methods
8717         that are value type or string class)
8718         
8719         * image.c (mono_image_close): clean up allocated GSList's
8720         in runtime_invoke_cache.
8721
8722 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8723
8724         * mono-config.c: set the correct path for mono_cfg_dir on windows when
8725         there's no MONO_CFG_DIR environment variable defined.
8726
8727 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8728
8729         * threads.c: windows version must be >= 0x0500 to include OpenThread.
8730
8731 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
8732
8733         * threadpool.c: Really wait for 500ms after the async call, even if the wait
8734           is interrumped.
8735         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
8736           before waiting for it, and call CloseHandle after the wait to unref it.
8737           This will make sure that handles are not disposed too early.
8738
8739 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8740
8741         * appdomain.c:
8742         * appdomain.h:
8743         * icall.c: removed
8744         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
8745         needed now.
8746
8747         * object.c: se the application_base only for the domain that runs
8748         Main. Fixes bug #59216,
8749
8750 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8751
8752         * appdomain.c:
8753         * object.c: only the domain in which Main is run have
8754         SetupInformation.ConfigurationFile set, so moved a few lines from
8755         appdomain.c to object.c.
8756
8757 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8758
8759         * appdomain.c: we tried to load [name].(dll|exe), but according
8760         to bug #57710, we must also try [culture]/[name].(dll|exe) and
8761         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
8762         There's a test case attached to bug #58922.
8763
8764 2004-05-27  Dick Porter  <dick@ximian.com>
8765
8766         * icall.c:
8767         * file-io.c: Implemented icalls for locking and unlocking regions
8768         in a file.
8769         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
8770         FALSE on error (fixes both compiler warning and real bug.)
8771
8772 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
8773
8774         * culture-info-tables.h: reflecting locale-builder updates.
8775
8776           (Added missing ChangeLog entry for 05/26)
8777
8778 2004-05-27  Jackson Harper  <jackson@ximian.com>
8779
8780         * locales.c: Fix some cut and paste errors.
8781         
8782 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8783
8784         * mono-config.c: set the correct path for config. directory on windows.
8785
8786 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
8787
8788         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
8789           on win32.
8790
8791 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
8792
8793         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
8794         from pinvoke functions.
8795         
8796         * marshal.c (mono_ftnptr_to_delegate): Implement this.
8797
8798 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
8799
8800         * culture-info-tables.h: reflecting locale-builder updates.
8801
8802 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
8803
8804         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
8805         #59086.
8806
8807 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
8808
8809         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
8810         * icall.c: Modified icalls for RNG.
8811         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
8812         Windows (CryptoAPI).
8813
8814 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
8815
8816         * locales.c: Fix build.
8817
8818 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
8819
8820         * culture-info-tables.h: reflecting locale-builder updates.
8821
8822 2004-05-25  Jackson Harper  <jackson@ximian.com>
8823
8824         * locales.c: When creating the current culture use the $LANGs
8825         specific culture. So DateTimeFormat and NumberFormat entries are created.
8826         
8827 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
8828
8829         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
8830         a char array as parameter.
8831
8832 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
8833
8834         * image.c: In mono_image_open(), always use an absolute path name to
8835           look for already loaded images.
8836
8837 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
8838
8839         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
8840         missing in the windows build (like older cygwin include files).
8841
8842 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
8843
8844         * icall.c: Fixed check for possible integer overflow in Buffer_
8845         BlockCopy icall. Replaced comments style // by /* */.
8846
8847 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
8848
8849         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
8850         
8851         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
8852         check after MONO_VTADDR. Fixes pinvoke2.exe.
8853
8854         * marshal.h marshal.c metadata.h: Add beginnings of support for
8855         ftnptr -> delegate marshalling.
8856
8857 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
8858
8859         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
8860         * threads.c: Fix warnings.
8861
8862 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
8863
8864         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
8865         * icall.c: Registered icalls for Suspend and Resume.
8866         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
8867           Thread.Abort.
8868         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
8869         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
8870         * process.c: Use WaitForSingleObjectEx.
8871         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
8872           checkpoints.
8873         * threads.c, threads.h: Make use of new Ex wait methods. Improved
8874           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
8875           for Suspend and Resume. Added new mono_thread_stop, used for stoping
8876           background threads. Added basic support for Abort in Windows.
8877           Start new threads using a managed delegate invoke wrapper. This wrapper
8878           has an interruption checkpoint that is needed since an interruption
8879           can be requested before the thread leaves the unmanaged code that starts 
8880           the thread.
8881         * marshal.c: Added interruption checkpoint after every native call, and
8882           also before managed calls for wrappers called from unmanaged code to
8883           go into managed code.
8884         * object.h: Added new field in MonoThread to keep track of interruption
8885           requests.
8886
8887 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
8888
8889         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
8890         calls.
8891
8892 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8893
8894         * appdomain.c:
8895         * assembly.c:
8896         * gc.c:
8897         * locales.c:
8898         * mono-config.c:
8899         * rand.c: getenv -> g_getenv (windows!)
8900
8901         * process.c: complete_path is also used on non-windows platforms.
8902
8903 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8904
8905         * icall.c: new signature for Process_Start.
8906
8907         * process.[ch]: new signature for Process_Start. If we're on windows
8908         and UseShellExecute is false, we have to search for the program by
8909         ourselves if we don't get a full path.
8910
8911 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
8912
8913         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
8914         marshalling and call CleanUpNativeData if needed. Fixes #58646.
8915
8916 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8917
8918         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
8919         Fixes bug #58373.
8920
8921 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8922
8923         * process.c: use double quotes to quote program name and arguments on
8924         windows. Fixes bug #58575.
8925
8926 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8927
8928         * file-io.c: don't return "." and ".." when using windows Find*File.
8929
8930 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
8931
8932         * marshal.c: Don't pass wrappers to message init because method 
8933         addressed used to lookup metadata. part of remoting[2|3] fix.
8934
8935 2004-05-15  Jackson Harper  <jackson@ximian.com>
8936
8937         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
8938         path is essentially the same as MONO_PATH except that it points to
8939         GACs instead of lib directories.
8940         * loader.h: The user gac is gone so we dont need function to
8941         enable/disable it.
8942         * mono-config.c: user gac option is now gone.
8943         
8944 2004-05-15  Jackson Harper  <jackson@ximian.com>
8945
8946         * culture-info.h: Make defines more consistent, add calendar data
8947         to the culture info table.
8948         * culture-info-tables.h: Add basic calendar data. Basically
8949         everyone gets default gregorian until all the data is
8950         updated.
8951         * locales.c: Use the new consistent defines. Set calendar data for
8952         culture info objects.
8953         * object.h: add a field for calendar data to CultureInfo
8954         
8955 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
8956
8957         * image.c: image->runtime_invoke_cache is keyed on signatures now.
8958         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
8959         a signature.
8960         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
8961         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
8962         an extra param that is the pointer of the method to invoke. The IL for
8963         the invoke method is no longer specific to the method, but to the
8964         signature of the method. Thus, we can share the same code for multiple
8965         methods. This reduces the number of methods that have to be compiled.
8966
8967 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
8968
8969         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
8970
8971         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8972
8973         * icall.c: Optimize Buffer.BlockCopy.
8974
8975 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8976
8977         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
8978         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
8979         quote). Changed them to "MMMM yyyy".
8980
8981 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
8982
8983         * rand.c
8984         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
8985
8986 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
8987
8988         * reflection.h: Updated after changes to managed structures.
8989
8990         * appdomain.c: Bump corlib version.
8991
8992 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8993
8994         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
8995         windows.
8996
8997 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8998
8999         * Makefile.am: link to ../os/libmonoos.la on windows.
9000
9001         * assembly.c:
9002                 -If MONO_DEBUG, warn about non-existing directories in
9003                 MONO_PATH.
9004                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
9005                 compile time variable.
9006                 -Removed init_default_path and call mono_set_rootdir from
9007                 libmonoos.a instead (windows only).
9008
9009         * assembly.h: declare mono_assembly_getrootdir().
9010
9011         * domain.c:
9012         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
9013
9014         * loader.c: s/getenv/g_getenv/
9015
9016 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
9017
9018         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
9019
9020         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
9021
9022         * metadata.h: Add new marshalling conversions.
9023
9024         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
9025         function.
9026
9027         * reflection.c (mono_reflection_get_type): Lookup the type in all
9028         modules of a multi-module assembly. Fixes #58291.
9029
9030 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
9031
9032         * threads.c: Before aborting a background, set the StopRequested
9033         state.  This avoids throwing the Abort exception.
9034         In mono_thread_manage, don't continue with the shutdown until all
9035         aborted threads have actually stopped.
9036
9037 2004-05-10  Jackson Harper  <jackson@ximian.com>
9038
9039         * locales.c: Remove the modifier from culture names.
9040         
9041 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9042
9043         * Makefile.am: monosn is not installed any more. It has been deprecated
9044         in favor of sn.
9045
9046 2004-05-07  Jackson Harper  <jackson@ximian.com>
9047
9048         * locales.c
9049         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
9050         Fix array construction, add bailout if the length is 0.
9051
9052 2004-05-07  Dick Porter  <dick@ximian.com>
9053
9054         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
9055         machine doesn't have a DNS entry.  Patch by Urs Muff
9056         (umuff@quark.com), fixes bug 57928.
9057
9058 2004-05-06  Jackson Harper  <jackson@ximian.com>
9059
9060         * reflection.c: Handle null PublicTokens properly. alloc mem for
9061         assembly names culture so we dont crash when freeing it.
9062         
9063 2004-05-06  Jackson Harper  <jackson@ximian.com>
9064
9065         * assembly.c: Check the usergac when loading with partial names.
9066         
9067 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
9068
9069         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
9070         does nothing for now (not required for Linux/Windows) but the class
9071         library can call it (and a newer or modified runtime could need it).
9072         * icall.c: Registred icall.
9073
9074 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9075
9076         * loader.c: prints a message on module loading error we set MONO_DEBUG
9077         environment variable.
9078
9079 2004-05-05  Jackson Harper  <jackson@ximian.com>
9080
9081         * appdomain.c: Handle PublicKeyToken=null properly.
9082         
9083 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
9084
9085         * environment.c|h: Added icall ves_icall_System_Environment_
9086         GetOSVersionString to get the current OS version as a string.
9087         * icall.c: Registred icall.
9088
9089 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
9090
9091         * object.c: in mono_object_get_virtual_method(), take into account that
9092         non-virtual methods don't have a slot in the vtable. Check needed when
9093         the object is a proxy.
9094
9095 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
9096
9097         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
9098         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
9099
9100         * object.c (mono_class_compute_gc_descriptor): Fix warning.
9101
9102         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
9103         passed when a valuetype is expected.
9104
9105         * object.c (mono_unhandled_exception): Only set the exit code if the
9106         exception happens in the main thread. Fixes thread5.exe.
9107
9108         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
9109         invalid names. Fixes #58047.
9110
9111 2004-05-03  Jackson Harper  <jackson@ximian.com>
9112
9113         * assembly.c: This line was committed accidently and is unneeded.
9114         
9115 2004-05-03  Jackson Harper  <jackson@ximian.com>
9116
9117         * icall.c: Add new icall for Assembly::LoadWithPartialName
9118         * assembly.c/.h: new function that probes the GAC to load partial
9119         assembly names by Paolo Molaro.
9120         
9121 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9122
9123         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
9124         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
9125         (type_get_fully_qualified_name): Added PublicKeyToken when building a
9126         full type name.
9127
9128 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9129
9130         * appdomain.c: fixed check for 'neutral' culture and removed warning.
9131         * reflection.c: fix bug when parsing a full type name and Version is not
9132         the last thing in the string.
9133
9134 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
9135
9136         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
9137         crashes when it is freed.
9138
9139 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9140
9141         * assembly.c: print the compat warning to stderr.
9142
9143 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
9144
9145         * assembly.c (mono_assembly_load_references): Add a compatibility
9146         hack to run old applications that might be still referencing the
9147         3300-based assemblies, only do this for System.xxx.
9148
9149 2004-05-01  Jackson Harper  <jackson@ximian.com>
9150
9151         * appdomain.c: If the culture is neutral we set it to "".
9152         
9153 2004-04-29  Jackson Harper  <jackson@ximian.com>
9154
9155         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
9156
9157 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
9158  
9159         * string-icalls.c: added low overhead function for copying chars
9160         * icall.c: added needed icall for the above function
9161  
9162 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9163
9164         * icall.c: fix return value of get_global_assembly_cache.  Implemented
9165         Environment.GetLogicalDrives.
9166
9167 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
9168
9169         * rand.c: try and talk to egd or prngd
9170         for random bytes if opening devices fail.
9171
9172 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
9173
9174         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
9175         alignment for the type using the native alignment of its members 
9176         instead of using klass->min_align.
9177
9178         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
9179
9180 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9181
9182         * file-io.c:
9183         * socket-io.c: added check for sys/aio.h.
9184
9185 2004-04-28  Dick Porter  <dick@ximian.com>
9186
9187         * threads.c: Don't abort a thread thats already aborting, when
9188         terminating everything.
9189
9190 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9191
9192         * icall.c: added 2 new async calls for Socket.
9193
9194         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
9195         IO on *nix systems.
9196
9197         * threadpool.c: removed unused variable.
9198
9199 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
9200
9201         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
9202
9203 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9204
9205         * locales.c: put back string_invariant_tolower () and
9206         string_invariant_toupper ().
9207
9208 2004-04-26 David Waite <mass@akuma.org>
9209
9210         * file-io.h:
9211         * socket-io.h:
9212         * threads.h:
9213         * unicode.h: remove comma from end of enumeration declarations
9214
9215 2004-04-26 David Waite <mass@akuma.org>
9216
9217         * debug-mono-symfile.h:
9218         * decimal.c:
9219         * mono_debug.h:
9220         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
9221
9222
9223 2004-04-26  Jackson Harper  <jackson@ximian.com>
9224
9225         * appdomain.c: Increment version number.
9226         
9227 2004-04-26  Jackson Harper  <jackson@ximian.com>
9228
9229         * appdomain.c: Set assembly references public token value when
9230         PublicKeyToken is specified, not the hash_value. Free public token
9231         values when free assembly name data. Previously the public key
9232         token was hex decoded, however we are using hex encoded public key
9233         tokens, so this is not neccasary.
9234         * assembly.c: Lookup assemblies in the gac if their public token
9235         value is set. Add function to allow enabling user gac
9236         lookups. Specify whether or not the assembly was loaded from the
9237         GAC. Compare full assembly names when checking the cache for
9238         assemblies (Temporarily disabled see comment in code). Remove
9239         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
9240         specifies trace-loader they get extra info to stdout on the
9241         loading of assemblies.
9242         * image.h: Add a field for an assembly references public token
9243         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
9244         whether an assembly has been loaded from the GAC.
9245         * image.c: Remove a corlib -> mscorlib name mapping.
9246         * loader.h: Add function to enable/disable the user gac.
9247         * mono-config.c: Check if the usergac is enabled in the config
9248         file.
9249         * icall.c: New icall to determine whether or not an assembly has
9250         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
9251         * tabldefs.h: Add constant for assemblyref flag that specifies a
9252         full public key is used instead of a public token.
9253         * reflection.c: Remove mscorlib -> corlib mappings. Set
9254         PublicTokenValue instead of hash value. This value is a hex
9255         string so it does not need to be expanded.
9256
9257 2004-04-26  Martin Baulig  <martin@ximian.com>
9258
9259         * mono-debug-debugger.c (mono_debugger_initialize): Set
9260         `mono_debugger_initialized' before calling mono_debug_lock().
9261
9262 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
9263
9264         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
9265           InternalToUpper/InternalToLower.
9266         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
9267           removed invariant culture shortcut.  This is now done in managed code.
9268         * locales.c: (string_invariant_toupper/tolower) removed.
9269
9270 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9271
9272         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
9273         Added Poll internal call.
9274
9275         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
9276         call for Poll. Select was too heavy for polling a single socket.
9277
9278         * threadpool.[ch]: added mono_threadpool_cleanup.
9279         * threads.c: use it. Don't use Thread_Abort on windows.
9280
9281 2004-04-23  Martin Baulig  <martin@ximian.com>
9282
9283         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
9284
9285 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
9286
9287         * icall.c: Registred new icalls for key pair protection and added an
9288         icall for Environment.GetFolderPath on Windows.
9289         * security.c|h: Added new icalls for key pair protection.
9290
9291 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9292
9293         * socket-io.c: don't display the non-supported family warning for known
9294         families. Now this is not displayed on windows when checking support
9295         for IPv4/IPv6.
9296
9297 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9298
9299         * class.c: don't display the layout warning for static fields.
9300
9301 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
9302
9303         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
9304         * locales.c, locales.h: Added new icalls for culture-specific
9305         Char.ToLower and Char.ToUpper.
9306
9307 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9308
9309         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
9310         by David Waite.
9311
9312 2004-04-20  Martin Baulig  <martin@ximian.com>
9313
9314         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
9315         of the type name before passing it to mono_reflection_type_from_name().
9316
9317 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
9318
9319         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
9320         encodings here. Fixes #56965.
9321
9322 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
9323
9324         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9325         fix test on strstr result not that I can see anything that
9326         relies on the result.
9327
9328 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
9329
9330         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
9331         Fixes #57081.
9332
9333         * marshal.c (mono_marshal_get_string_encoding): New helper function.
9334
9335         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
9336         function to determine which marshalling to use for strings. Fixes
9337         #56965.
9338
9339         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
9340
9341         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
9342
9343 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
9344
9345         * icall.c: #include mono-config.h
9346
9347 2004-04-15  Jackson Harper  <jackson@ximian.com>
9348
9349         * culture-info-tables.h: Fix date formats for en-US culture.
9350         
9351 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
9352
9353         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
9354         ThreadPool.SetMinThreads.
9355         * threadpool.c: Implemented ThreadPool.GetMinThreads and
9356         ThreadPool.SetMinThreads.
9357
9358 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9359
9360         * mono-config.c: also load the .config file in the directory
9361         where the assembly was found.
9362
9363 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
9364
9365         * assembly.c: load per-assembly config files.
9366         * icall.c: decrapified code to get the config dir and moved to
9367         mono-config.c.
9368         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
9369         per-assembly config files. When doing a dll map lookup give precedence
9370         to the per-assembly data.
9371
9372 2004-04-14  Martin Baulig  <martin@ximian.com>
9373
9374         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
9375         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
9376         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
9377
9378         * mono-debugger-debugger.c: While the debugger is locked, remember
9379         whether the symbol tables have changes and send one single
9380         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
9381
9382 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
9383
9384         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
9385
9386         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
9387         function.
9388
9389         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
9390         account when marshalling string arrays. Fixes #56965.
9391
9392 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
9393
9394         * icall.c: Add new icalls mapping for security.
9395         * security.c|h: Add internal calls for WindowsIdentity,
9396         WindowsImpersonationContext and WindowsPrincipal.
9397
9398 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
9399
9400         * class.c: Added comment to ensure the System.MonoDummy class
9401         is removed when no longer necessary
9402
9403 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
9404
9405         * appdomain.c: Pass arguments to the bootstraping exceptions to
9406         minimize JITed methods at boot
9407
9408         * metadata.c (mono_exception_from_name_two_strings): Allow for the
9409         second string to be null.
9410
9411         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9412         Change the protocol to minimize the JIT methods at startup.  Now
9413         it Returns the internal codepage, if the value of "int_code_page"
9414         is 1 at entry, and we can not compute a suitable code page
9415         number, returns the code page as a string.
9416
9417 2004-04-13  Jackson Harper  <jackson@ximian.com>
9418
9419         * culture-info-tables.h: Fix number of decimal digits for all
9420         english locales.
9421
9422 2004-04-13  Jackson Harper  <jackson@ximian.com>
9423
9424         * icall.c: Clairfy out of sync error message. It is not always
9425         your corlib that is out of sync.
9426
9427 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
9428
9429         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
9430         properties when only the set accessor is overriden. Fixes #55874.
9431
9432 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
9433
9434         * assembly.c (mono_assembly_load_references): Make this thread safe.
9435         Fixes #56327.
9436
9437 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
9438
9439         * monosn.c: Add missing initialization calls.
9440
9441 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
9442
9443         * locales.c:
9444         ves_icall_System_Globalization_CultureInfo_construct_number_format
9445         Fix g_assert so it compiles on fussier compilers re int/ptr
9446         mismatch
9447
9448 2004-04-08  Dick Porter  <dick@ximian.com>
9449
9450         * socket-io.h:
9451         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
9452         53992.  Also rearrange the code so that the internal calls return
9453         an error value and exceptions are thrown from managed code.
9454
9455         * icall.c: Add type info to the socket icalls.
9456
9457 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9458
9459         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
9460         owes me a beer.
9461
9462 2004-04-07  Martin Baulig  <martin@ximian.com>
9463
9464         * class.c (mono_class_from_generic_parameter): Don't default
9465         `klass->parent' to `mono_defaults.object_type'.
9466
9467 2004-04-07  Martin Baulig  <martin@ximian.com>
9468
9469         * reflection.c (mono_reflection_initialize_generic_parameter): Set
9470         `param->pklass->reflection_info'.       
9471
9472 2004-04-07  Jackson Harper  <jackson@ximian.com>
9473
9474         * culture-info-tables.h: Fix date separator symbol.
9475         
9476 2004-04-07  Martin Baulig  <martin@ximian.com>
9477
9478         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
9479         from System.Type to System.MonoType.
9480
9481 2004-04-07  Martin Baulig  <martin@ximian.com>
9482
9483         * reflection.h
9484         (MonoReflectionGenericParam): Added `has_reference_type' and
9485         `has_value_type' fields.
9486
9487         * reflection.c (mono_image_get_generic_param_info): Encode the
9488         correct flags if we have the `class' or `struct' constraint.
9489
9490 2004-04-07  Martin Baulig  <martin@ximian.com>
9491
9492         * reflection.h
9493         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
9494
9495 2004-04-07  Jackson Harper  <jackson@ximian.com>
9496
9497         * appdomain.c: Revert extra patches, just wanted to bump the
9498         version number.
9499         
9500 2004-04-07  Jackson Harper  <jackson@ximian.com>
9501
9502         * Makefile.am: Add culture-info private headers.
9503         * icall.c: Add new icalls for contructing locales.
9504         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
9505         * locales.h: Declare new culture info construction methods.
9506         * object.h: Add new fields used to avoid the CultureMap to
9507         MonoCultureInfo.
9508         * culture-info.h: Definition of structs used in the culture info
9509         tables.
9510         * culture-info-tables.h: Autogenerated tables that contain culture
9511         info data. This file was generated with the locale-builder tool.
9512         * appdomain.c: Incement corlib version number.
9513         
9514 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
9515
9516         * appdomain.c: (mono_runtime_init) move mono_thread_init
9517         to before mono_object_new calls so critical sections
9518         are initialized before use.
9519
9520 2004-04-07  Martin Baulig  <martin@ximian.com>
9521
9522         * icall.c
9523         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
9524         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
9525         (ves_icall_MonoGenericParam_initialize): Removed.
9526         (monogenericparam_icalls): Removed.
9527         (generictypeparambuilder_icalls): Added new table for
9528         System.Reflection.Emit.GenericTypeParameterBuilder.
9529
9530         * reflection.c
9531         (mono_reflection_define_generic_parameter): Removed.
9532         (mono_reflection_initialize_generic_parameter): This is now called
9533         from GenericTypeParameterBuilder's .ctor.
9534
9535 2004-04-06  Martin Baulig  <martin@ximian.com>
9536
9537         * class.c (mono_class_init): Don't inflate nested classes in a
9538         generic instance.
9539         (mono_type_get_name_recurse): Include the generic arguments for
9540         generic instances and generic type declarations.
9541         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
9542         (_mono_class_get_instantiation_name): Removed.
9543         (mono_class_create_generic): Always use `gklass->name' as our name.
9544
9545         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
9546
9547         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
9548         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
9549         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
9550         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
9551         closed generic methods here.
9552
9553         * reflection.c
9554         (mono_reflection_generic_inst_get_nested_types): Removed.
9555         (inflate_mono_method): Copy the generic parameters from the
9556         MonoMethodHeader into out MonoGenericMethod.
9557
9558 2004-04-06  Martin Baulig  <martin@ximian.com>
9559
9560         * row-indexes.h
9561         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
9562
9563         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
9564
9565         * reflection.c (build_compressed_metadata): If we have any entries
9566         in the GenericParam, MethodSpec or GenericParamConstraint tables,
9567         set the header version to 1.1.
9568
9569 2004-04-06  Martin Baulig  <martin@ximian.com>
9570
9571         * class.c (mono_class_init): If we're a generic instance,
9572         initialize our nested classes, too.
9573         (_mono_class_get_instantiation_name): Deal with the new `!%d'
9574         suffix. 
9575
9576 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9577
9578         * process.c: quote the argument passed to the shell on windows.
9579
9580 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
9581
9582         * threads.c (mono_alloc_special_static_data): Allow this to be
9583         called during startup.
9584
9585 2004-04-02  Martin Baulig  <martin@ximian.com>
9586
9587         * icall.c
9588         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
9589
9590 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
9591
9592         * icall.c: Fix build.
9593
9594 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
9595
9596         * Makefile.am: Added security.c|h.
9597         * icall.c: Added icall for get_UserName;
9598         * security.c: New file for security related icalls. Added function
9599         get_UserName for System.Environment (fix #56144).
9600         * security.h: New. Header file for security.c
9601
9602 2004-04-02  Dick Porter  <dick@ximian.com>
9603
9604         * icall.c: Deleted the icalls that were obsoleted some time ago
9605         by the ICU string code, and which were mixed into the icall
9606         rearranging.  Fixes bug 55969.
9607
9608         * string-icalls.h: 
9609         * string-icalls.c: Deleted the code that those icalls reference.
9610
9611 2004-04-01  Martin Baulig  <martin@ximian.com>
9612
9613         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
9614
9615         * class.c (mono_class_from_generic_parameter): Don't set 
9616         TYPE_ATTRIBUTE_INTERFACE.
9617         (my_mono_class_from_generic_parameter): Likewise.
9618
9619 2004-04-01  Martin Baulig  <martin@ximian.com>
9620
9621         * loader.c (find_method): Added an optional `MonoClass *ic'
9622         argument to search in a specific interface.
9623         (mono_get_method_constrained): New public function.
9624
9625 2004-04-01  Martin Baulig  <martin@ximian.com>
9626
9627         * reflection.c (mono_image_get_generic_field_token): Use the
9628         `handleref' cache here.
9629
9630 2004-04-01  Martin Baulig  <martin@ximian.com>
9631
9632         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
9633
9634         * reflection.c (create_generic_typespec): Use the `typespec' hash
9635         here, not the `typeref' one.    
9636
9637 2004-04-01  Martin Baulig  <martin@ximian.com>
9638
9639         * class.c (mono_class_inflate_generic_type): Moved the
9640         functionality into a new static inflate_generic_type() which
9641         returns NULL if it didn't do anything.  Only increment the
9642         `mono_stats.inflated_type_count' if we actually inflated
9643         something.
9644         (mono_class_get_full): Check the classes type to see whether we
9645         need to inflate it; also inflate MONO_TYPE_(M)VAR.
9646
9647 2004-04-01  Jackson Harper  <jackson@ximian.com>
9648
9649         * reflection.c: Set culture for assembly references.
9650         
9651 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
9652
9653         * reflection.[ch], icall.[ch], Fix support for pinning variables.
9654
9655 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9656
9657         * assembly.c:
9658         (do_mono_assembly_open): the critical section also covers
9659         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
9660
9661 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9662
9663         * threads.c:
9664         (mono_manage_threads): abort the background threads when finishing.
9665         Fixes bug #47232.
9666
9667 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9668
9669         * gc.c: only close the done_event handle if there was no timeout.
9670         C-ified comments.
9671
9672 2004-03-30  Martin Baulig  <martin@ximian.com>
9673
9674         * icall.c (icall_entries): It's called "System.Activator", not
9675         "System.Activation".    
9676
9677 2004-03-30  Martin Baulig  <martin@ximian.com>
9678
9679         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
9680         (mono_class_create_from_typespec): Likewise.
9681
9682 2004-03-30  Martin Baulig  <martin@ximian.com>
9683
9684         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
9685         `has_ctor_constraint' and `initialized'.
9686
9687 2004-03-30  Martin Baulig  <martin@ximian.com>
9688
9689         * reflection.c (encode_new_constraint): New static function to add
9690         the constructor constraint attribute to a type parameter.
9691         (encode_constraints): Call encode_new_constraint() if necessary.
9692
9693         * reflection.h
9694         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
9695
9696         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
9697         
9698 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
9699
9700         * reflection.c, icall.c: add support for pinning variables. 
9701
9702 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
9703
9704         * marshal.c (mono_marshal_get_managed_wrapper):
9705         init bool local with zero rather than null.
9706
9707 2004-03-29  Martin Baulig  <martin@ximian.com>
9708
9709         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
9710         the "official" behavior here.
9711         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
9712
9713 2004-03-29  Martin Baulig  <martin@ximian.com>
9714
9715         * icall.c: Reflect latest API changes.
9716
9717 2004-03-29  Martin Baulig  <martin@ximian.com>
9718
9719         * loader.c (mono_get_method_from_token): Also call
9720         mono_metadata_load_generic_params () for abstract and interface
9721         methods; replace the type arguments in the method signature with
9722         the ones which are loaded from the metadata.
9723
9724 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
9725
9726         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
9727         of the lock is not the current thread. MS.NET don't do it, in spite of
9728         what the documentation says. See bug #56157.
9729
9730 2004-03-28  Martin Baulig  <martin@ximian.com>
9731
9732         * class.c (mono_class_init): Don't call init_properties() and
9733         init_events() for generic instances; set `prop->parent' when
9734         inflating properties.
9735
9736         * reflection.c (mono_generic_inst_get_object): Call
9737         `mono_class_init (ginst->klass)'.
9738         (mono_type_get_object): Only create a MonoGenericInst if your
9739         generic type is a TypeBuilder.
9740         (do_mono_reflection_bind_generic_parameters): Only set
9741         `ginst->is_dynamic' if our generic type is a TypeBuilder.
9742
9743 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
9744
9745         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
9746         Fixes #56091.
9747
9748 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9749
9750         * icall.c: added Kill_internal icall.
9751         * process.[ch]: added Kill_internal icall.
9752
9753 2004-03-25  Martin Baulig  <martin@ximian.com>
9754
9755         * class.h (MonoStats): Added `generic_instance_count',
9756         `inflated_method_count', `inflated_type_count' and
9757         `generics_metadata_size'.       
9758
9759 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9760
9761         * reflection.c: no warnings now.
9762
9763 2004-03-25  Martin Baulig  <martin@ximian.com>
9764
9765         * class.c (mono_class_get_full): New public function; does a
9766         mono_class_get(), but also takes a `MonoGenericContext *'.
9767
9768         * loader.c (mono_field_from_memberref): Renamed to
9769         `field_from_memberref', made static and added `MonoGenericContext *'
9770         argument.
9771         (mono_field_from_token): Added `MonoGenericInst *' argument.
9772         (method_from_memberef): Likewise.
9773         (mono_get_method_from_token): Likewise.
9774         (mono_get_method_full): New public function; does a
9775         mono_get_method(), but also takes a `MonoGenericContext *'.
9776
9777         * verify.c (mono_method_verify): Get the method's generic context
9778         and pass it to mono_field_from_token(), mono_get_method_full() and
9779         mono_class_get_full().
9780
9781 2004-03-25  Martin Baulig  <martin@ximian.com>
9782
9783         * class.c (mono_class_inflate_generic_type): Take a
9784         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
9785         `MonoGenericMethod *'.
9786
9787 2004-03-25  Martin Baulig  <martin@ximian.com>
9788
9789         * loader.h (MonoMethodInflated): Store the MonoGenericContext
9790         instead of the MonoGenericMethod here.
9791
9792 2004-03-25  Martin Baulig  <martin@ximian.com>
9793
9794         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
9795         each time we create a new MonoGenericInst, we also create a new
9796         context which points back to us.
9797
9798         * class.c (inflate_method): Use `ginst->context' instead of
9799         creating a new context.
9800
9801         * loader.c (method_from_memberref): Use
9802         `klass->generic_inst->context' instead of creating a new context.
9803
9804 2004-03-25  Martin Baulig  <martin@ximian.com>
9805
9806         * class.h (MonoGenericContext): New struct.
9807         (MonoGenericMethod): Removed `generic_inst'.
9808
9809         * class.c (mono_class_inflate_generic_method): Take a
9810         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
9811
9812 2004-03-25  Martin Baulig  <martin@ximian.com>
9813
9814         * loader.h (MonoMethodInflated): New typedef.
9815
9816         * metadata.h (MonoMethodSignature): Removed `gen_method', make
9817         `generic_param_count' consume just 30 bits, added `is_inflated'
9818         and `has_type_parameters' flags (one bit each).
9819
9820         * class.c (mono_class_inflate_generic_method): Create a
9821         MonoMethodInflated instead of a MonoMethodNormal and set
9822         `is_inflated' in the method signature.
9823
9824         * class.h (MonoGenericMethod): Removed `generic_method'.
9825
9826 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
9827
9828         * image.c: Make sure the name of a MonoImage is always an absolute path.
9829           This fixes bug #54415.
9830
9831 2004-03-24  Martin Baulig  <martin@ximian.com>
9832
9833         * class.c (mono_class_setup_vtable): If we're a generic instance,
9834         use our generic type's vtable size.
9835
9836 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
9837
9838         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
9839         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
9840         problems.
9841
9842 2004-03-23  Martin Baulig  <martin@ximian.com>
9843
9844         * class.h (MonoDynamicGenericInst): Added `int count_events' and
9845         `MonoEvent *events'.
9846
9847         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
9848         (typebuilder_icalls): Added "get_event_info"; calls
9849         mono_reflection_event_builder_get_event_info(). 
9850
9851         * reflection.c (mono_reflection_generic_inst_initialize): Added
9852         `MonoArray *events'.
9853         (mono_reflection_event_builder_get_event_info): New function.
9854
9855 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
9856
9857         * object.h: add mono_type_initialization_init
9858
9859         * object.c (mono_runtime_class_init): 
9860         implement class constructor synchronization rules
9861         to cope with threading issues.  
9862         add mono_type_initialization_init
9863
9864         * appdomain.c (mono_runtime_init): call 
9865         mono_type_initialization_init
9866
9867         * class.h: removing initializing field from MonoVTable
9868
9869 2004-03-23  Martin Baulig  <martin@ximian.com>
9870
9871         * class.c (my_mono_class_from_generic_parameter): Use
9872         `param->name' if it's not NULL. 
9873
9874 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
9875
9876         * class.c: do not insert non-virtual methods in the vtable.
9877         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
9878         that means the method is non-virtual. This never would have
9879         happened before.
9880
9881 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
9882
9883         * profiler.c: Added lock for accessing coverage_hash.
9884
9885 2004-03-22  Martin Baulig  <martin@ximian.com>
9886
9887         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
9888         `method->method->signature->generic_param_count != 0' to make it
9889         work for interface methods.
9890
9891 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9892
9893         * process.c: quote the string passed to the shell using g_shell_quote.
9894
9895 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9896
9897         * threads.c:
9898         (mono_threads_manage): don't remove the finalizer thread and self
9899         from the threads hash table so that mono_thread_manage can be called
9900         more than once.
9901
9902 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9903
9904         * process.c: quote the arguments when UseShellExecute is true. Fixes
9905         bug #55790.
9906
9907 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9908
9909         * threads.c: set mono_thread_detach as a cleanup routine for every
9910         thread. This way it's always executed upon thread termination, either
9911         aborted or finished normally. No more xsp hangs!
9912
9913 2004-03-17  Martin Baulig  <martin@ximian.com>
9914
9915         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
9916         `int count_nested' and a `MonoType **nested'.
9917
9918         * reflection.c (mono_reflection_bind_generic_parameters): Moved
9919         most of the functionality into a new static
9920         do_mono_reflection_bind_generic_parameters() and don't take a
9921         `MonoType *nested_in' argument any more.  Don't compute nested
9922         types here.
9923         (mono_reflection_generic_inst_get_nested_types): New public method
9924         to get nested types.
9925
9926         * class.c (mono_class_create_generic): Set `klass->nested_in' if
9927         we're a nested class.
9928
9929         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
9930         mono_reflection_generic_inst_get_nested_types() to compute the
9931         nested types.
9932
9933 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
9934
9935         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
9936         descriptive error message under windows.
9937         
9938 2004-03-17  Martin Baulig  <martin@ximian.com>
9939
9940         * class.c (dup_type): Added `const MonoType *original' argument;
9941         copy the attrs from the original type.
9942
9943 2004-03-17  Martin Baulig  <martin@ximian.com>
9944
9945         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
9946         `m->generic_inst_cache' here.
9947
9948 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
9949
9950         * exception.h exception.c: Add stack_overflow_exception.
9951
9952 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9953
9954         * threadpool.c:
9955         (overlapped_callback): call SetEvent *after* invoking the callback.
9956         No need to call CloseHandle.
9957
9958 2004-03-16  Martin Baulig  <martin@ximian.com>
9959
9960         * reflection.c (mono_image_get_fieldref_token): Take a
9961         `MonoReflectionField *' instead of a `MonoClassField *' and a
9962         `MonoClass *'; store the `MonoReflectionField *' in the hash.
9963
9964 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9965
9966         * appdomain.c: don't add the culture to the filename we're looking for
9967         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
9968
9969 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9970
9971         * locales.c: don't ignore symbols when doing case insensitive compares.
9972         Thanks Dick! Fixes bug #54046.
9973
9974         * threads.c: surround 'threads' usage with enter/leave in
9975         mono_thread_manage.
9976
9977 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
9978
9979         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
9980         implicitly marshalled as [Out]. Fixes #55450.
9981
9982         (mono_marshal_get_runtime_invoke): Zero out the result if there is
9983         an exception.
9984
9985 2004-03-16  Martin Baulig  <martin@ximian.com>
9986
9987         * class.c (mono_class_from_generic_parameter): Use the actual
9988         parameter name. 
9989
9990 2004-03-16  Martin Baulig  <martin@ximian.com>
9991
9992         * reflection.c (type_get_signature_size): New static function.
9993         Compues the size of the type in a method signature.
9994         (method_get_signature_size): New static function; calls
9995         type_get_signature_size() to compute the actual size of the
9996         method's signature.
9997         (method_encode_signature): Use method_get_signature_size() to get
9998         the signature's size rather than using `nparams * 10'.
9999
10000 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10001
10002         * file-io.h: define here WapiOverlapped on windows. I don't want the
10003         regular OVERLAPPED one.
10004
10005         * file-io.c:
10006         * threadpool.c: somehow, BindIoCompletionCallback is not found.
10007         Disabling AIO on windows.
10008
10009 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10010
10011         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
10012         bug #55385.
10013
10014 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10015
10016         * appdomain.c: upgraded corlib version.
10017
10018         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
10019         and BeginWrite. Allow opening files for asynchrnous operations.
10020
10021         * file-io.h: new struct that maps FileStreamAsyncResult.
10022         * icall.c: added new icalls.
10023         * process.[ch]: support setting child process environment variables
10024         and use the SHELL or COMSPEC when UseShellExecute is true.
10025
10026         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
10027         callback for async. IO is here and also BindHandle.
10028
10029         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
10030         from here.
10031
10032 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
10033
10034         * reflection.c (create_custom_attr): Allow len == 0.
10035
10036         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
10037         computation on big-endian machines.
10038
10039 2004-03-13  Martin Baulig  <martin@ximian.com>
10040
10041         * class.h (MonoGenericInst): Added `int count_ifaces'.
10042
10043         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
10044         `ginst->count_ifaces' instead `klass->interface_count' since we
10045         may get called before the vtable is created.
10046
10047         * loader.c (mono_method_get_param_names): If we're a generic
10048         instance, return and don't initialize the class.
10049
10050         * reflection.c (mono_reflection_setup_generic_class): Don't call
10051         ensure_runtime_vtable().
10052         (mono_reflection_bind_generic_parameters): Set
10053         `ginst->count_ifaces'.
10054
10055 2004-03-11  Jackson Harper <jackson@ximian.com>
10056
10057         * icall.c:
10058         * unicode.c:
10059         * unicode.h: Remove unused System.Char icalls.
10060         
10061 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
10062
10063         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
10064         code when we P/Invoke the first library in Windows.Forms, instead
10065         of when we first open the assembly.
10066
10067         * assembly.c: Drop the lookup from here.
10068
10069 2004-03-10  Martin Baulig  <martin@ximian.com>
10070
10071         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
10072         class for properties, fields and events.  Finally fixes #54945.
10073
10074 2004-03-10  Martin Baulig  <martin@ximian.com>
10075
10076         * metadata.c (mono_metadata_class_equal): New static function;
10077         checks whether two generic instances or two generic parameters are
10078         equal.
10079         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
10080         compare classes.        
10081
10082 2004-03-10  Martin Baulig  <martin@ximian.com>
10083
10084         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
10085
10086         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
10087         argument and write it into the `reflection_info' field.
10088
10089         * icall.c
10090         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
10091         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
10092
10093 2004-03-09  Jackson Harper  <jackson@ximian.com>
10094
10095         * char-conversions.h: use 8 bits for numeric data its all we need
10096         * icall.c: numeric data is only 8 bits now.
10097
10098 2004-03-09  Martin Baulig  <martin@ximian.com>
10099
10100         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
10101
10102         * class.c (init_properties, init_events): Initialize the new
10103         `parent' field.
10104
10105         * reflection.c (typebuilder_setup_properties): Likewise.
10106         (typebuilder_setup_events): Likewise.
10107
10108         * reflection.h (MonoEventInfo): Replaced `parent with
10109         `declaring_type' and `reflected_type'.
10110
10111         * icall.c (ves_icall_get_property_info): Distinguish between
10112         declaring and reflected type.
10113         (ves_icall_get_event_info): Likewise.
10114
10115 2004-03-09  Martin Baulig  <martin@ximian.com>
10116
10117         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
10118         (ves_icall_Type_GetField): Correctly set field->klass.
10119
10120 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
10121
10122         * loader.h: Fix warning.
10123
10124 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
10125
10126         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
10127         library routine if present.  Notice that it will still continue
10128         executing even if its missing, for those working on the Gtk#
10129         edition of Windows.Forms.
10130
10131         * assembly.c (do_mono_assembly_open): If loading the
10132         System.Windows.Forms call mono_loader_wini_init.
10133
10134 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
10135
10136         * class.h: Added MonoRemoteClass struct.
10137         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
10138         function for MonoStrings.
10139         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
10140         Added internal call for getting the proxy type.
10141         * marshal.c: Get the type of transparent proxies from its remote_class.
10142         Added methods that generate the IL for type checks and casts:
10143         mono_marshal_get_isinst, mono_marshal_get_castclass, 
10144         mono_marshal_get_proxy_cancast.
10145         * marshal.h: Declaration of the previous new methods.
10146         * object.c: Added new moethods for creating and updating MonoRemoteClass
10147         instances: mono_remote_class, mono_upgrade_remote_class, 
10148         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
10149         * verify.c: FIx transparent_proxy_fields layout.
10150         * appdomain.c: Bump corlib version.
10151
10152 2004-03-04  Jackson Harper  <jackson@ximian.com>
10153
10154         * icall.c: Add icall to access char conversion tables.
10155         * char-conversions.h: Character conversion tables.
10156         * Makefile.am: Add char-conversions.h private header file.
10157         
10158 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
10159
10160         * appdomain.c (unload_thread_main): Increase unloading timeout to
10161         10 sec as a temporary workaround for Nant problems.
10162
10163 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
10164
10165         * gc.c: Add checks for GC_enable and GC_disable.
10166
10167         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
10168         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
10169         (bug #54988).
10170         
10171 2004-02-27  Martin Baulig  <martin@ximian.com>
10172
10173         * reflection.c (mono_reflection_bind_generic_parameters): Take a
10174         `MonoReflectionType *' instead of a `MonoType *'.
10175
10176 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
10177
10178         * gc.c (run_finalize): Avoid finalizing the object representing the
10179         finalizer thread.
10180         (finalizer_thread): Fix warning.
10181
10182 2004-02-25  Martin Baulig  <martin@ximian.com>
10183
10184         * class.c (_mono_class_get_instantiation_name): Added `int offset'
10185         argument for nested types.
10186         (mono_class_create_generic): Added support for nested generictypes.
10187
10188         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
10189         `GList *nested'.
10190
10191         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
10192
10193         * reflection.c (method_encode_signature): Increase the minimum
10194         value of `size' from 10 to 11.
10195         (mono_reflection_bind_generic_parameters): Take `int type_argc'
10196         and `MonoType **types' arguments instead of the `MonoArray
10197         *types'; added `MonoType *nested_in'.  Recursively instantiate
10198         nested classes. 
10199
10200 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
10201
10202         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
10203         stack_overflow_ex members which are used by exception handling.
10204
10205         * appdomain.c (mono_runtime_init): Initialize the new members.
10206
10207         * gc.c (mono_gc_enable): New helper function.
10208         * gc.c (mono_gc_disable): New helper function.
10209
10210 2004-02-23  Martin Baulig  <martin@ximian.com>
10211
10212         * icall.c: I must have been really stupid - make it actually work
10213         this time ;-)
10214
10215 2004-02-23  Martin Baulig  <martin@ximian.com>
10216
10217         * loader.c (method_from_memberref): Only inflate the method if
10218         it's in another klass.
10219
10220 2004-02-23  Martin Baulig  <martin@ximian.com>
10221
10222         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
10223         (mono_class_init): If we're a generic instance and an interface,
10224         compute `class->interface_id'; also create `class->interfaces'
10225         here and inflate them.
10226
10227         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
10228         `ginst->is_open'.
10229         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
10230
10231         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
10232
10233 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
10234
10235         * reflection.c (method_encode_code): Improved the error message
10236         generated by the exception.
10237
10238 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10239
10240         * icall.c: Martin did not do what he said in the ChangeLog for
10241         2004-02-18, but put back the changes for properties and events.
10242         Commenting those changes out again and adding comment to bug #54518.
10243         
10244         * process.c: removed warning.
10245
10246 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
10247
10248         * marshal.c (emit_struct_conv): Print an error message instead of
10249         asserting when a type does not have the StructLayout attribute.
10250
10251 2004-02-20  Martin Baulig  <martin@ximian.com>
10252
10253         * reflection.c (mono_type_get_object): Also use the cache for
10254         generic instances.
10255         (mono_reflection_bind_generic_parameters): Always compute
10256         `ginst->ifaces'.        
10257
10258 2004-02-20  Martin Baulig  <martin@ximian.com>
10259
10260         * class.h (MonoGenericMethod): Removed `klass'.
10261
10262         * class.c (mono_class_inflate_generic_method): Added `MonoClass
10263         *klass' argument.
10264
10265 2004-02-20  Martin Baulig  <martin@ximian.com>
10266
10267         * reflection.c (method_encode_methodspec): Actually use the
10268         uninflated signature for the memberref.
10269
10270 2004-02-20  Martin Baulig  <martin@ximian.com>
10271
10272         * class.h (MonoGenericMethod): Removed `declaring'.
10273
10274         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
10275         is NULL, compute it here.
10276
10277 2004-02-20  Martin Baulig  <martin@ximian.com>
10278
10279         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
10280
10281         * metadata.c (mono_metadata_generic_inst_hash): New method.
10282         (mono_metadata_generic_inst_equal): New method.
10283
10284         * reflection.c (mono_reflection_bind_generic_parameters): Use the
10285         `klass->image->generic_inst_cache' cache to avoid creating
10286         duplicate MonoGenericInst's.
10287
10288         * class.c (mono_class_inflate_generic_type): Use the cache.
10289
10290 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
10291
10292         * object.c: fixed gc descriptor calculation for embedded valuetypes.
10293
10294 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10295
10296         * icall.c: added Socket.WSAIoctl icall.
10297
10298         * socket-io.[ch]: implemented
10299         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
10300
10301 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
10302
10303         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
10304
10305 2004-02-18  Urs C Muff  <umuff@quark.com>
10306
10307         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
10308         this work on PPC and other big-endian architectures.
10309
10310         * debug-mono-symfile.h: Prepended the names of all the `guint32'
10311         fields with an underscore to make sure they're only accessed by
10312         the read32() macro.
10313
10314 2004-02-18  Martin Baulig  <martin@ximian.com>
10315
10316         * icall.c: Put the klass->refclass changes back for methods and
10317         fields, but not for properties and events.  We're currently not
10318         distinguishing between DeclaringType and ReflectedType for
10319         properties and events, that's what caused the regressions.
10320
10321 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10322
10323         * object.c:
10324         (mono_async_result_new): the handle can be NULL.
10325
10326         * threadpool.c: Use an event instead of a semaphore, don't initialize
10327         it until needed. This saves quite a few semaphores from being created
10328         when using the threadpool.
10329
10330 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
10331
10332         * object.c (mono_string_is_interned_lookup): Fix interning of long
10333         strings. Fixes #54473.
10334
10335         * domain.c (ldstr_equal): Optimize if the two strings are equal.
10336
10337         * icall.c: Revert the klass->refclass changes since they introduce
10338         regressions (bug #54518).
10339
10340 2004-02-18  Martin Baulig  <martin@ximian.com>
10341
10342         * class.c (mono_class_init): If we're a generic instance and don't
10343         come from a TypeBuilder, inflate our members here.
10344         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
10345         (mono_class_create_generic): New public method.
10346         (mono_class_initialize_generic): Removed.
10347         (get_instantiation_name): Renamed to
10348         _mono_class_get_instantiation_name() and made it public.
10349
10350 2004-02-18  Martin Baulig  <martin@ximian.com>
10351
10352         * class.c (mono_class_inflate_generic_type): Clear the new
10353         instance's `nginst->klass' when inflating a generic instance.
10354         (mono_class_is_subclass_of): Added (basic) support for generic
10355         instances.
10356
10357 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
10358
10359         * appdomain.h, domain.c: use a MonoCodeManager instead of a
10360         MonoMempool to hold compiled native code.
10361
10362 2004-02-17  Martin Baulig  <martin@ximian.com>
10363
10364         * class.h (MonoDynamicGenericInst): Added `count_properties' and
10365         `properties'.
10366
10367         * reflection.c (mono_reflection_generic_inst_initialize): Added
10368         `MonoArray *properties' argument.
10369
10370         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
10371
10372 2004-02-17  Martin Baulig  <martin@ximian.com>
10373
10374         * icall.c (ves_icall_Type_GetFields): Renamed to
10375         ves_icall_Type_GetFields_internal() and added a
10376         `MonoReflectionType *rtype' argument; pass it to
10377         mono_field_get_object() to set the field's "reflected" type.
10378         (ves_icall_Type_GetConstructors): Likewise.
10379         (ves_icall_Type_GetEvents): Likewise.
10380         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
10381         argument; pass it to mono_method_get_object() to set the method's
10382         "reflected" type.       
10383
10384 2004-02-17  Martin Baulig  <martin@ximian.com>
10385
10386         * class.h (MonoDynamicGenericInst): New type.
10387         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
10388
10389         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
10390         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
10391         (ves_icall_MonoGenericInst_GetFields): New interncall.
10392
10393         * class.c (mono_class_from_generic): Don't call
10394         mono_class_initialize_generic() if this is a dynamic instance;
10395         ie. it's being created from a TypeBuilder.
10396         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
10397         `class->byval_arg.type'.
10398
10399         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
10400         to `inflate_method' and made static.
10401         (mono_reflection_inflate_field): Removed.
10402         (mono_reflection_generic_inst_initialize): New public method.
10403
10404         * reflection.h (MonoReflectionGenericInst): Removed `methods',
10405         `ctors' and `fields'; added `initialized'.
10406
10407 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
10408
10409         * debug-helpers.c (mono_method_full_name): Fix output for empty
10410         namespaces.
10411
10412 2004-02-12  Martin Baulig  <martin@ximian.com>
10413
10414         * class.h (MonoClassField): Added `MonoType *generic_type'.
10415
10416         * reflection.c (mono_image_get_fieldref_token): Added support for
10417         instantiated generic types.
10418         (field_encode_inflated_field): Removed.
10419         (mono_image_get_inflated_field_token): Removed.
10420         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
10421
10422         * reflection.h (MonoReflectionInflatedField): Removed.
10423
10424 2004-02-12  Martin Baulig  <martin@ximian.com>
10425
10426         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
10427         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
10428
10429         * reflection.c (mono_image_get_methodspec_token): Take a
10430         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
10431         (mono_image_create_token): Check whether we have a
10432         `method->signature->gen_method' and call
10433         mono_image_get_methodspec_token() if appropriate.
10434         (inflated_method_get_object): Removed.
10435         (mono_reflection_bind_generic_method_parameters): Return a
10436         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
10437         (mono_reflection_inflate_method_or_ctor): Likewise.
10438
10439         * reflection.h (MonoReflectionInflatedMethod): Removed.
10440
10441 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
10442
10443         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
10444         for custom valuetype marshalling.
10445
10446         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
10447
10448 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10449
10450         * icall.c: fixed WSAGetLastError_internal name.
10451
10452 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
10453
10454         * threads.c (mono_thread_attach): Allow this to be called multiple
10455         times for a thread.
10456         
10457         * threads.c (build_wait_tids): Do not wait for ourselves.
10458
10459         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
10460         appdomain list is empty.
10461
10462         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
10463         memory returned by mono_string_builder_to_utf16, since it points into
10464         managed memory. Thanks to Bernie Solomon for noticing this.
10465
10466         * icall.c: Add AppDomainSetup icalls.
10467
10468         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
10469
10470         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
10471         types.
10472
10473         * reflection.c (reflection_methodbuilder_to_mono_method): Save
10474         custom attributes to the method_aux struct. Also fix array indexes etc.
10475
10476         * loader.c (mono_method_get_param_names): Make dynamic case work again.
10477         
10478 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
10479
10480         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
10481         (both static and runtime) and reduce startup time.
10482
10483 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
10484
10485         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
10486         AsAny marshalling conversion instead of crashing.
10487
10488         * marshal.c: Fix warnings.
10489
10490 2004-02-09  Martin Baulig  <martin@ximian.com>
10491
10492         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
10493
10494         * reflection.h (MonoReflectionInflatedMethod): Removed the
10495         `declaring' field, it's now in the unmanaged MonoGenericMethod.
10496
10497         * reflection.c (method_encode_methodspec): Removed the `method'
10498         argument; we get it from `gmethod->declaring'.
10499         (inflated_method_get_object): Removed the `declaring' argument.
10500
10501 2004-02-09  Martin Baulig  <martin@ximian.com>
10502
10503         * class.h (MonoGenericMethod): New type.
10504         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
10505         `generic_method'.
10506
10507         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
10508         a `MonoGenericMethod *gen_method' one.
10509
10510         * class.c (mono_class_inflate_generic_type): Take an additional
10511         `MonoGenericMethod * argument.  This is only non-NULL if we're
10512         inflating types for a generic method.   
10513         (mono_class_inflate_generic_signature): Renamed to
10514         inflate_generic_signature() and made static; take a
10515         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
10516         (inflate_generic_header): Take a `MonoGenericMethod *' argument
10517         instead of a `MonoGenericInst *' one.
10518         (mono_class_inflate_generic_method): Likewise.
10519
10520         * reflection.c (encode_generic_method_sig): Take a
10521         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
10522         (method_encode_methodspec): Likewise.
10523         (inflated_method_get_object): Likewise. 
10524
10525         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
10526         field with a `MonoGenericMethod *gmethod' one.  
10527
10528 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
10529
10530         * class.h (mono_class_has_parent): add parens to expansion
10531         so you can ! this.
10532
10533 2004-02-08  Martin Baulig  <martin@ximian.com>
10534
10535         * image.h (MonoImage): Removed `generics_cache'.
10536
10537         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
10538         instead of a `MonoType *' argument; removed the `inflate_methods'
10539         argument.  Don't inflate methods here.
10540
10541         * loader.c (find_method): If it's a generic instance, call
10542         mono_class_init() on the `sclass->generic_inst->generic_type'.
10543
10544         * metadata.c (mono_type_size): Make this work on uninitialized
10545         generic instances; call it on the `ginst->generic_type's class.
10546
10547         * reflection.c (mono_reflection_bind_generic_parameters): Call
10548         mono_class_from_generic() to create the `ginst->klass'.
10549
10550 2004-02-08  Martin Baulig  <martin@ximian.com>
10551
10552         * class.h (MonoClass): Changed type of `generic_inst' from
10553         `MonoType *' to `MonoGenericInst *'.
10554
10555 2004-02-08  Martin Baulig  <martin@ximian.com>
10556
10557         * icall.c (ves_icall_Type_BindGenericParameters): Just call
10558         mono_type_get_object(), this is now creating a `MonoGenericInst'
10559         for MONO_TYPE_GENERICINST.
10560         (ves_icall_MonoGenericInst_GetParentType): Likewise.
10561         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
10562
10563         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
10564         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
10565         (inflated_method_get_object): Added `MonoClass *refclass' argument.
10566         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
10567         and reflected type.
10568
10569         * reflection.h (MonoReflectionInflatedMethod): Removed
10570         `declaring_type' and `reflected_type'.
10571
10572 2004-02-08  Martin Baulig  <martin@ximian.com>
10573
10574         * class.h (MonoGenericInst): Added `MonoType *parent' and
10575         `MonoType **ifaces'.
10576
10577         * reflection.h (MonoReflectionGenericInst): Removed `klass',
10578         `parent' and `interfaces'.
10579
10580         * reflection.c (mono_reflection_bind_generic_parameters): Take a
10581         `MonoType *' argument and return a `MonoType *'.
10582
10583         * icall.c
10584         (ves_icall_MonoGenericInst_GetParentType): New interncall.
10585         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
10586
10587 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
10588
10589         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
10590         valuetype marshalling.
10591
10592 2004-02-06  Martin Baulig  <martin@ximian.com>
10593
10594         * class.c
10595         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
10596         (my_mono_class_from_generic_parameter): Likewise.
10597
10598 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
10599
10600         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
10601         contents of the symbol files lazily.
10602
10603         * object.h (MonoThread): Add 'name' and 'name_len' fields.
10604
10605         * threads.h threads.c icall.c: New icalls for getting and setting the
10606         threads name.
10607
10608 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
10609
10610         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
10611         Raise an exception when the domain is not found.
10612
10613 2004-02-03  Martin Baulig  <martin@ximian.com>
10614
10615         * reflection.c (mono_image_get_methodspec_token): Use the
10616         uninflated signature; fixes gen-33.
10617
10618 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
10619
10620         * gc.c threads.c: Make the finalizer thread a normal managed thread so
10621         the finalizer code can use thread functionality.
10622
10623         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
10624         the finalizer thread.
10625
10626         * threads.c: Make some functions more robust.
10627
10628         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
10629
10630         * metadata.h: Add new marshalling conventions.
10631
10632         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
10633         stringbuilder marshalling. Fixes #53700.
10634
10635         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
10636
10637         * reflection.c (mono_image_get_type_info): Save declarative security
10638         info.
10639
10640         * reflection.c (mono_image_get_field_info): Handle uninitialized 
10641         unmanaged fields as well.
10642
10643         * appdomain.c: Bump corlib version.
10644
10645 2004-02-01  Martin Baulig  <martin@ximian.com>
10646
10647         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
10648         method type arguments.  
10649
10650 2004-01-30  Duncan Mak  <duncan@ximian.com>
10651
10652         * marshal.h: Add prototype for
10653         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
10654         and
10655         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
10656         fix the build.
10657
10658 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
10659
10660         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
10661         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
10662
10663 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
10664
10665         * marshal.c (mono_marshal_get_native_wrapper): Add support for
10666         custom marshalling of valuetypes.
10667
10668         * marshal.c: Fix some warnings.
10669
10670 2004-01-29  Martin Baulig  <martin@ximian.com>
10671
10672         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
10673         for generic method parameters.
10674
10675         * reflection.c (method_encode_methodspec): Write the uninflated
10676         signature into the methodspec table.
10677         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
10678         is always the uninflated method.
10679         (reflection_methodbuilder_to_mono_method): Copy the generic
10680         parameters from the MethodBuilder into `header->gen_params'.
10681
10682 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
10683
10684         * class.c (mono_class_from_generic_parameter): Fix warning.
10685
10686 2004-01-27  Martin Baulig  <martin@ximian.com>
10687
10688         * class.c (mono_class_from_generic_parameter): Don't create
10689         `klass->methods' here.  
10690
10691 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
10692
10693         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
10694         extension since it does not work with libraries named lib<FOO>.dll.so.
10695
10696 2004-01-25  Martin Baulig  <martin@ximian.com>
10697
10698         * class.c (mono_class_inflate_generic_type): Added support for
10699         MONO_TYPE_GENERICINST.
10700
10701         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
10702         inflate methods on open constructed types.      
10703
10704 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10705
10706         * object.c: fire ProcessExit event in the root AppDomain after running
10707         Main. Fixes bug #53299.
10708
10709 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
10710
10711         * socket-io.c: include the new socket-wrappers.h header.
10712         Use the wrappers instead of the unix socket functions to make the code
10713         more clear.
10714
10715 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
10716
10717         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
10718
10719         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
10720         Fixes #22532.
10721
10722 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
10723
10724         * reflection.c (mono_image_create_pefile): Handle the case when the
10725         entry point is not a MethodBuilder.
10726
10727         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
10728         field to ReflectionMethod since it is not allways a builder.
10729
10730         * reflection.c (type_get_fully_qualified_name): New helper function to
10731         return the fully qualified name of a type.
10732
10733         * reflection.c (encode_marshal_blob): Always emit the fully qualified
10734         type name for custom marshallers.
10735
10736         * reflection.c (mono_marshal_spec_from_builder): Ditto.
10737
10738         * class.c (mono_class_setup_vtable): If a parent class already 
10739         implements an interface, use the implementing methods from that class.
10740         Fixes #53148.
10741
10742 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10743
10744         * threadpool.c: just return instead of ExitThread to allow for thread
10745         clean up earlier.
10746
10747 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
10748
10749         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
10750         when closing resource modules.
10751
10752         * reflection.c (mono_image_create_pefile): Handle the case when the
10753         entry point is not a MethodBuilder.
10754
10755         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
10756         field to ReflectionMethod since it is not allways a builder.
10757
10758 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
10759
10760         * marshal.c (mono_marshal_get_managed_wrapper): 
10761         mono_marshal_alloc takes native int so CONV_I
10762         the arg for 64bits.
10763
10764 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
10765
10766         * reflection.c (fixup_cattrs): New function to fixup the methoddef
10767         tokens in the cattr table. Fixes #53108.
10768
10769 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10770
10771         * loader.c: don't trim ".dll" before looking up in the config file.
10772         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
10773
10774 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
10775
10776         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
10777         Return the module which contains the resource as well.
10778         (ves_icall_System_Reflection_Module_Close): New icall.
10779
10780         * appdomain.c: Bump corlib version number.
10781
10782         * image.c (mono_image_addref): New public function.
10783
10784         * assembly.c: Call mono_image_addref.
10785
10786         * reflection.c (mono_module_get_object): Increase reference count of 
10787         the image.
10788
10789         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
10790         Fixes #22532.
10791
10792         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
10793         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
10794         proper exceptions on DllImport problems.
10795
10796 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
10797
10798         * class.c, metadata.c: eliminate CSIZE macro.
10799
10800 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
10801
10802         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
10803         * object.h: Added async_callback field in MonoAsyncResult.
10804         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
10805         * verify.c: Added async_callback in MonoAsyncResult layout.
10806
10807 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
10808
10809         * reflection.c (mono_reflection_get_custom_attrs): Add support
10810         for Modules.
10811
10812 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
10813
10814         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
10815         marshalling.
10816         (mono_marshal_method_from_wrapper): Add null pointer check.
10817
10818 2004-01-16  Martin Baulig  <martin@ximian.com>
10819
10820         * debug-mono-symfile.h: Set version number to 36 and reflect
10821         latest symbol writer changes.
10822
10823 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
10824
10825         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
10826         multi-dimensional arrays.
10827         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
10828         (mono_class_from_mono_type): Use bounded_array_class_get.
10829         
10830         * class.c (mono_bounded_array_class_get): New function which takes
10831         a 'bounded' bool argument to distinguish vectors from one dimensional
10832         arrays.
10833
10834         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
10835         bounded_array_class_get if the array has bounds.
10836
10837         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
10838         Search modules loaded using AssemblyBuilder:AddModule as well.
10839
10840 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10841
10842         * appdomain.c: increased corlib version.
10843         * filewatcher.c: removed g_print.
10844         * icall.c:
10845         (get_property_info): only allocate what is actually requested.
10846         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
10847
10848 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10849
10850         * Makefile.am: added filewatcher.[ch]
10851         * filewatcher.[ch]: FileSystemWatcher runtime support.
10852         * icall.c: added new FSW icalls.
10853
10854 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
10855
10856         * string-icalls.c: fix stringbuilder regression as suggested by
10857         Iain McCoy <iain@mccoy.id.au>.
10858
10859 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
10860
10861         * process.c (process_read_stringtable_block): Recognize '007f' as
10862         a language neutral stringtable block.
10863
10864 2004-01-12  Patrik Torstensson
10865
10866         * object.h (MonoStringBuilder) : Changed layout to support our
10867         new stringbuilder class.
10868         * marshal.c: Change marshalling to support the new layout of 
10869         string builder.
10870         * appdomain.c: increased version number because new layout of
10871         string builder.
10872
10873 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
10874
10875         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
10876         assembly name as an string instead of an AssemblyName, since it is
10877         easier to extract info from it.
10878
10879         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
10880         the culture subdirectories too. Fixes #52231.
10881
10882 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10883
10884         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
10885         It takes 2 new parameters with an optional name for the method to look
10886         for and case ignoring info.
10887
10888         * threadpool.c: removed unused variable.
10889
10890 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10891
10892         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
10893         It takes 2 new parameters with an optional name for the property to look
10894         for and case ignoring info.
10895         Fixes bug #52753.
10896
10897 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
10898
10899         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
10900         Fix #52451.
10901
10902 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10903
10904         * appdomain.c:
10905         * assembly.c: escape the uri before passing it to g_filename_from_uri.
10906         Fixes bug #52630.
10907
10908 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
10909
10910         * reflection.c: Add support for more than one unmanaged resource.
10911
10912         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
10913         in field->def_value, as done in all other cases.
10914
10915         * reflection.c (mono_reflection_get_custom_attrs): Add support for
10916         TypeBuilders.
10917
10918         * reflection.c (mono_reflection_create_runtime_class): Remove 
10919         errorneous assignment to klass->element_class, since it is already
10920         done in mono_reflection_setup_internal_class.
10921
10922 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10923
10924         * gc.c: added missing LeaveCriticalSection.
10925         * icall.c: indented a couple of lines.
10926         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
10927         if we call EndInvoke inside a callback. Fixes bug #52601.
10928
10929 2004-01-07  Martin Baulig  <martin@ximian.com>
10930
10931         * mono-debug-debugger.h
10932         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
10933
10934 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
10935
10936         * appdomain.c: Use messages in NotImplementedException.
10937
10938         * exception.c (mono_get_exception_not_implemented): Now this takes
10939         a message argument.
10940
10941         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
10942         exception instead of g_asserting an aborting when something is not
10943         implemented.
10944
10945         Add some inline docs.
10946
10947 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
10948
10949         * reflection.h: Update after changes to object layout.
10950
10951         * reflection.c: Implement saving of unmanaged aka win32 resources.
10952
10953         * appdomain.c: Bump version number.
10954
10955         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
10956         Handle missing domains gracefully.
10957
10958 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
10959
10960         * file-io.c : On Windows, there are much more invalid_path_chars.
10961
10962 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
10963
10964         * class.h, object.c: prepare for GetType () speedup.
10965
10966 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
10967
10968         * profiler.c: workaround for --profile null reference exception on
10969           cygwin. Patch by Patrik Torstensson.
10970
10971 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
10972
10973         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
10974         make work for unaligned access.
10975
10976 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
10977
10978         * class.c: small cleanup (class->fields [i] -> field).
10979         * image.c: check address of metadata is valid.
10980
10981 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
10982
10983         * assembly.h assembly.c (mono_assembly_loaded): New public function to
10984         search the list of loaded assemblies.
10985
10986         * reflection.c (mono_reflection_type_from_name): Use 
10987         mono_assembly_loaded instead of mono_image_loaded.
10988
10989         * reflection.c: Fix warnings.
10990
10991 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
10992
10993         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
10994         is dynamic. This is needed since an assembly can contain both dynamic and
10995         non-dynamic images.
10996
10997         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
10998         assembly->dynamic.
10999
11000         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
11001
11002         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
11003         to store modules loaded using AddModule.
11004
11005         * reflection.c (mono_image_fill_file_table): Generalize this so it works
11006         on Modules.
11007
11008         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
11009
11010         * reflection.c (mono_image_fill_export_table_from_module): New function to
11011         fill out the EXPORTEDTYPES table from a module.
11012
11013         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
11014         into a separate function. Also handle loaded non-dynamic modules.
11015
11016         * reflection.c (mono_image_basic_init): Fix memory allocation.
11017
11018         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11019
11020         * assembly.c (mono_assembly_load_references): Make this public.
11021
11022 2003-12-19  Martin Baulig  <martin@ximian.com>
11023
11024         * class.c (mono_class_initialize_generic): Made this static, take
11025         a `MonoGenericInst *' instead of a `MonoClass *'.
11026         (mono_class_from_generic): Call mono_class_initialize_generic()
11027         unless we're already initialized or being called from
11028         do_mono_metadata_parse_generic_inst().
11029
11030         * class.h (MonoGenericInst): Added `initialized' and
11031         `init_pending' flags.
11032
11033         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
11034         `mono_class_init (gklass)' or mono_class_initialize_generic()
11035         here; set `generic_inst->init_pending' while parsing the
11036         `type_argv'.
11037
11038 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
11039
11040         * locales.c: include string.h for memxxx prototypes
11041
11042 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
11043
11044         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
11045         constructor when accessing literal fields.
11046
11047 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
11048
11049         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11050
11051         * reflection.c (assembly_add_resource_manifest): New function to fill
11052         the MANIFESTRESOURCE table.
11053
11054         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
11055
11056         * reflection.h: Update to changes in class layout.
11057
11058         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
11059         Reenable call to mono_runtime_is_shutting_down ().
11060
11061         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
11062         determine if the runtime is shutting down.
11063
11064 2003-12-16  Jackson Harper <jackson@ximian.com>
11065
11066         * icall.c: comment out call to mono_runtime_is_shutting_down to
11067         fix build.
11068         
11069 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
11070
11071         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
11072         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
11073
11074 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
11075
11076         * reflection.c: move definition of swap_with_size
11077         to before its first call
11078
11079 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
11080
11081         * appdomain.c (mono_runtime_is_shutting_down): New public function.
11082
11083         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
11084         icall.
11085
11086         * object.c: Fix warnings.
11087
11088         * icall.c (ves_icall_Type_Get...): Only consider inherited static
11089         members if FlattenHierarchy is set.
11090
11091         * reflection.c (mono_image_add_decl_security): New function to emit
11092         declarative security.
11093
11094         * reflection.h reflection.c: Add support for declarative security.
11095
11096         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11097         
11098 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
11099
11100         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11101         
11102         * appdomain.c verify.c: Moved corlib version checking into its own
11103         function in appdomain.c since it needs to create vtables etc.
11104
11105 2003-12-13  Patrik Torstensson <p@rxc.se>
11106
11107         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
11108         instead of unwrapped server.
11109
11110 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
11111
11112         * verify.c (check_corlib): Fix field index.
11113
11114 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
11115
11116         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
11117         GetGacPath icall.
11118
11119 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
11120
11121         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
11122         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
11123         cope with sizeof(size_t) != sizeof(guint32).
11124
11125 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11126
11127         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
11128         in case of failure.
11129
11130 2003-12-10  Mark Crichton <crichton@gimp.org>
11131
11132         * icall.c: removed the GetNonZeroBytes.  We now handle this case
11133         in managed code.
11134
11135         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
11136
11137 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
11138
11139         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
11140         marked as deleted.
11141
11142 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
11143
11144         * verify.c (check_corlib): Handle the case when the version field is 
11145         initialized by a static constructor.
11146
11147 2003-12-08  Patrik Torstensson  <p@rxc.se>
11148
11149     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
11150
11151 2003-12-08  Martin Baulig  <martin@ximian.com>
11152
11153         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
11154         a MonoReflectionGenericParameter, also take the parameter index
11155         and name as arguments.
11156         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
11157         (ves_icall_MonoGenericParam_initialize): New interncall.
11158         (ves_icall_Type_make_byref_type): New interncall.
11159
11160         * reflection.h (MonoReflectionGenericParam): Derive from
11161         MonoReflectionType, not just from MonoObject.  Added `refobj' and
11162         `index' fields.
11163
11164         * reflection.c (mono_reflection_define_generic_parameter): Create
11165         and return a new MonoReflectionGenericParam; don't initialize the
11166         constraints here.
11167         (mono_reflection_initialize_generic_parameter): New public method;
11168         initializes the constraints and creates the `param->pklass'.
11169
11170 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
11171
11172         * reflection.h reflection.c: Use the new fields 'num_types', 
11173         'num_fields' and 'num_methods' to track the number of types etc.
11174
11175         * verify.c (check_corlib): Check corlib version number.
11176
11177 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
11178
11179         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
11180         function works on all methods.
11181
11182 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
11183
11184         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
11185         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
11186         the custom_type_info flag of the transparent proxy.
11187         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
11188         objects that supports IRemotingTypeInfo.
11189         * object.h: Added custom_type_info field in transparent proxy.
11190
11191 2003-12-06  Martin Baulig  <martin@ximian.com>
11192
11193         * class.c (mono_class_create_from_generic): Removed.
11194         (mono_class_from_generic): Check `ginst->klass' before doing
11195         anything else.  This is important to fully support "recursive"
11196         generic types.
11197
11198         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
11199         empty `generic_inst->klass' before doing anything else.
11200
11201 2003-12-06  Dick Porter  <dick@ximian.com>
11202
11203         * verify.c: 
11204         * object.h:
11205         * icall.c:
11206         * locales.c: Use C structs to access class fields.  Don't do a
11207         conversion between MonoString and UChar because both are
11208         platform-endian UTF-16.  Compare now takes startindex and count
11209         parameters.  Add a char overload for IndexOf.  Speed up the
11210         invariant string IndexOf.
11211
11212 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
11213
11214         * Makefile.am (monosn_LDADD): Fix parallel build.
11215
11216 2003-12-04  Martin Baulig  <martin@ximian.com>
11217
11218         * icall.c
11219         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11220         (ves_icall_Type_make_array_type): New interncall.       
11221
11222 2003-12-04  Martin Baulig  <martin@ximian.com>
11223
11224         * locales.c: also change it in the !HAVE_ICU case.
11225
11226 2003-12-04  Dick Porter  <dick@ximian.com>
11227
11228         * icall.c:
11229         * locales.c: construct_compareinfo is now in CompareInfo, not
11230         CultureInfo.
11231
11232 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
11233
11234         * image.c (mono_image_load_file_for_image): Cache loaded images in the
11235         image->files array.
11236
11237         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
11238         table as well.
11239
11240         * assembly.c (mono_assembly_load_references): Only load references
11241         once.
11242
11243         * class.c (mono_class_from_name): Avoid linear search of the 
11244         EXPORTEDTYPE table.
11245
11246         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
11247
11248 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
11249
11250         * image.h (MonoImage): Add 'field_cache' field.
11251
11252         * loader.c (mono_field_from_token): Cache field lookups.
11253         
11254         * reflection.c (mono_module_get_object): Fix name property.
11255
11256         * icall.c (ves_icall_get_enum_info): Update after changes to 
11257         mono_metadata_get_constant_index ().
11258
11259         * icall.c: Get rid of get_type_info icall, use a separate icall for
11260         each type property to avoid needless memory allocations. Fixes #51514.
11261
11262         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
11263         to avoid needless binary searches.
11264
11265         * class.c (class_compute_field_layout): Move the initialization of
11266         field->def_value to mono_class_vtable ().
11267
11268         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
11269         non-corlib types.
11270
11271         * object.c (mono_object_allocate): Make it inline.
11272
11273         * object.c (mono_object_allocate_spec): Make it inline.
11274         
11275 2003-12-02  Dick Porter  <dick@ximian.com>
11276
11277         * locales.c (create_NumberFormat): NumberFormatInfo construction.
11278         Patch by Mohammad DAMT (mdamt@cdl2000.com).
11279
11280 2003-12-01  Dick Porter  <dick@ximian.com>
11281
11282         * threads.c: Fix signature and call in CreateMutex and
11283         CreateEvent.
11284
11285 2003-12-01  Dick Porter  <dick@ximian.com>
11286
11287         * icall.c: 
11288         * locales.c: Implement string compares and searching
11289
11290         * object.h: Add extra Thread field
11291
11292 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
11293
11294         * reflection.c (fixup_method): Add support for MonoCMethod.
11295
11296 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
11297
11298         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
11299
11300         * reflection.c (assembly_name_to_aname): Allow extra characters in
11301         assembly names. Fixes #51468.
11302
11303 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
11304
11305         * exception.c (mono_exception_from_name_domain): New helper function.
11306
11307         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
11308         exception object in the correct domain.
11309
11310         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
11311         formatting + make a copy a the input data.
11312
11313         * loader.c (mono_get_method_from_token): Methods which contain
11314         native code do not have entries in the ImplMap.
11315
11316         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
11317         Thanks to Gonzalo for spotting this.
11318         
11319         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
11320         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
11321
11322         * assembly.h (mono_assembly_load_from): Split the second part of 
11323         assembly loading into a new public function.
11324
11325         * exception.h (mono_get_exception_bad_image_format): New function.
11326
11327 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
11328
11329         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
11330         Enumerate all modules inside a dynamic assembly. Fixes #51293.
11331         
11332         * icall.c: Add new icall for creating dynamic methods.
11333
11334         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
11335
11336         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
11337
11338         * reflection.c (mono_reflection_create_dynamic_method): New icall to
11339         create a dynamic method.
11340
11341         * reflection.c (resolve_object): New helper function.
11342
11343         * reflection.c: Generalize ReflectionMethodBuilder and the functions
11344         which manipulate it so they can also work on dynamic methods.
11345
11346         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
11347         creating the MonoReflectionMethodAux structure if it is not needed.
11348         
11349         * reflection.h verify.c: Update after changes to object layout.
11350
11351         * reflection.c (method_builder_encode_signature): Fix compilation on
11352         gcc 2.95.x.
11353
11354 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
11355
11356         * appdomain.h: Added support for context static fields. Added static_data
11357           field to MonoAppContext and renamed thread_static_fields to a more
11358           generic special_static_fields in MonoAppDomain, since it can now contain
11359           context static fields.
11360         * domain.c: Updated hashtable name.
11361         * object.c: Replaced field_is_thread_static() for a more generic
11362           field_is_special_static() which also checks for context static attribute.
11363           In mono_class_vtable(), added support for static context fields.
11364         * threads.c: Changed methods that manage thread static fields to more
11365           generic methods so they can be reused both for thread and context static
11366           data.
11367         * threads.h: Declared some new methods.
11368
11369 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
11370
11371         * reflection.h: Update after changes to the managed types.
11372
11373         * reflection.c (encode_custom_modifiers): New helper function.
11374
11375         * reflection.c (method_encode_signature): Emit custom modifiers.
11376
11377         * reflection.c (field_encode_signature): Emit custom modifiers.
11378
11379 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
11380
11381         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
11382
11383         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
11384         implementation.
11385
11386         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
11387         icall.
11388
11389         * object.c (mono_field_get_value_object): New function.
11390
11391         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
11392         specific.
11393
11394 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
11395
11396         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
11397         return a preallocated out-of-memory exception instance.
11398
11399         * object.c (out_of_memory): Use the new function.
11400
11401         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
11402         flag is before the custom modifiers. Fixes #49802.
11403
11404 2003-11-16  Martin Baulig  <martin@ximian.com>
11405
11406         * class.c (mono_class_is_open_constructed_type): Implemented the
11407         MONO_TYPE_GENERICINST case.
11408
11409 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
11410
11411         * assembly.c (mono_assembly_fill_assembly_name): New function to
11412         fill out the MonoAssemblyName structure.
11413         (mono_assembly_open): Use the new function.
11414
11415         * icall.c (fill_reflection_assembly_name): New helper function.
11416
11417         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
11418         new function.
11419
11420         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
11421
11422 2003-11-15  Martin Baulig  <martin@ximian.com>
11423
11424         * class.c (mono_class_is_open_constructed_type): New public
11425         function; checks whether a type is an open constructed type,
11426         ie. whether it still contains type parameters.
11427         (mono_class_inflate_generic_type): If we're a type parameter and
11428         the inflated type is also a MONO_TYPE_(M)VAR, return the original
11429         type.
11430
11431         * class.h (MonoGenericInst): Added `guint32 is_open'.
11432
11433         * loader.c (method_from_methodspec): Check whether we're an open
11434         or closed constructed type and set `ginst->is_open'.
11435
11436         * reflection.c (mono_reflection_bind_generic_parameters): Check
11437         whether we're an open or closed constructed type and set
11438         `ginst->is_open'.
11439         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
11440         from open constructed types.
11441
11442 2003-11-15  Martin Baulig  <martin@ximian.com>
11443
11444         * reflection.c (mono_reflection_bind_generic_parameters): If we're
11445         a generic instance (instead of a generic type declaration) with
11446         unbound generic parameters, bind them to our actual types.
11447
11448 2003-11-14  Martin Baulig  <martin@ximian.com>
11449
11450         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
11451
11452         * reflection.c (mono_reflection_bind_generic_parameters): If we're
11453         an interface type, populate `res->interfaces' with instantiated
11454         versions of all the interfaces we inherit.
11455
11456 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
11457
11458         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
11459         when MONO_PATH is set but doesn't contain the install dir.
11460
11461 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11462
11463         * icall.c:
11464         (ves_icall_Type_GetInterfaces): don't return an interface twice when
11465         it's also implemented in base classes. Fixes bug #50927.
11466
11467 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
11468
11469         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
11470         if this method is called from a finalizer. Fixes #50913.
11471
11472 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
11473
11474         * threads.c: Implement VolatileRead/VolatileWrite
11475
11476         * icall.c: Add new icalls for VolatileRead/VolatileWrite
11477
11478 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
11479
11480         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
11481         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
11482         2.95.3.
11483
11484         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
11485         from Peter Ross (pro@missioncriticalit.com).
11486         
11487 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
11488
11489         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
11490
11491 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
11492
11493         * assembly.c (mono_assembly_load_references): Disable check because it
11494         triggers on older corlibs which lots of people have.
11495
11496 2003-11-12  Jackson Harper  <jackson@ximian.com>
11497
11498         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
11499         load corlib.dll if mscorlib.dll is not found.
11500         * assembly.h: Remove corlib name define.
11501         * class.c:
11502         * domain.c:
11503         * image.c: Change corlib name to mscorlib.
11504         
11505 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
11506
11507         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
11508
11509 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
11510
11511         * appdomain.h: Added loader_optimization here to sync with the C#
11512         code, and add disallow_binding_redirects field.
11513
11514 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
11515
11516         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
11517
11518         * reflection.c (mono_image_build_metadata): Fix crash on modules
11519         with no types.
11520
11521         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
11522
11523         * icall.c (ves_icall_get_method_info): Return callingConvention as
11524         well.
11525
11526         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
11527         namespaces from the EXPORTEDTYPE table as well.
11528
11529         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
11530         from all modules inside the assembly.
11531         
11532 2003-11-11  Martin Baulig  <martin@ximian.com>
11533
11534         * reflection.c (mono_reflection_bind_generic_parameters): Make
11535         this work for interfaces.
11536
11537 2003-11-11  Martin Baulig  <martin@ximian.com>
11538
11539         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
11540
11541 2003-11-11  Martin Baulig  <martin@ximian.com>
11542
11543         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
11544         "MonoInflatedMethod" and "MonoInflatedCtor".
11545
11546 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
11547
11548         * reflection.c (resolution_scope_from_image): Use the assembly table
11549         from the manifest module, since other modules don't have it.
11550
11551         * debug-helpers.c (mono_type_full_name): New helper function.
11552
11553         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
11554
11555         * image.c (mono_image_load_file_for_image): New public function which
11556         is a replacement for the load_file_for_image in class.c.
11557
11558         * assembly.c (mono_assembly_load_module): A wrapper for the function
11559         above which does assembly association and reference loading too.
11560
11561         * class.c (mono_class_from_name): Call mono_assembly_load_module.
11562
11563 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11564
11565         * appdomain.c: not all of the attributes for the full assembly name
11566         are required and the order doesn't matter. Fixes bug #50787.
11567
11568 2003-11-10  Dick Porter  <dick@ximian.com>
11569
11570         * locales.c: Use platform-endian UTF16
11571
11572 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
11573
11574         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
11575         
11576 2003-11-10  Martin Baulig  <martin@ximian.com>
11577
11578         * metadata.c
11579         (mono_metadata_load_generic_params): Make this actually work.
11580
11581         * reflection.c (mono_reflection_bind_generic_parameters): If our
11582         parent is a generic instance, pass all the `types' to it, no
11583         matter whether it has the same number of type parameters or not.
11584
11585 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
11586
11587         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
11588
11589         * assembly.c (mono_assembly_load_references): Move the image<->assembly
11590         assignment code to this function so it gets called recursively for all
11591         modules.
11592
11593         * image.c (load_modules): Remove the assembly assignment since it is
11594         now done by mono_assembly_load_references.
11595         
11596         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
11597         Add 'module' argument.
11598         (mono_module_get_types): New helper function.
11599         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
11600
11601 2003-11-08  Martin Baulig  <martin@ximian.com>
11602
11603         * class.c (mono_class_inflate_generic_method): Interface method
11604         don't have a header.
11605
11606         * reflection.c (mono_image_get_methodspec_token): Take an
11607         additional `MonoGenericInst *' argument instead of reading it from
11608         the header; this is necessary to support interfaces.
11609         (mono_image_create_token): Pass the `MonoGenericInst *' from the
11610         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
11611         (inflated_method_get_object): Take an additional `MonoGenericInst *'
11612         argument.
11613
11614         * reflection.h (MonoReflectionInflatedMethod): Added
11615         `MonoGenericInst *ginst'.
11616
11617 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
11618
11619         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
11620
11621 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
11622
11623         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
11624
11625 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
11626
11627         * reflection.c 
11628         (reflection_methodbuilder_from_method_builder):
11629         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
11630         initialize a ReflectionMethodBuilder structure.
11631         (mono_image_get_methodbuilder_token):
11632         (mono_image_get_ctorbuilder_token): New functions to emit memberref
11633         tokens which point to types in another module inside the same assembly.
11634
11635         * reflection.c: Use the new helper functions.
11636         
11637         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
11638
11639         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
11640         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
11641
11642         * reflection.c (resolution_scope_from_image): Emit a moduleref if
11643         neccesary.
11644
11645         * reflection.c (mono_image_build_metadata): Emit metadata only for the
11646         current module. Emit the manifest only for the main module.
11647
11648         * reflection.c (mono_image_create_token): Add assertion when a 
11649         memberref needs to be created.
11650
11651         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
11652
11653         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
11654         larger buffer for the custom attribute blob. Fixes #50637.
11655         
11656 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11657
11658         * threadpool.c: notify listener on async processing handles after
11659         invoking the async callback. Thanks to Zoltan.
11660
11661 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
11662
11663         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
11664         avoid code duplication.
11665
11666         * reflection.h (MonoDynamicImage): New type which is currently unused,
11667         but will be used through the ref.emit code in place of 
11668         MonoDynamicAssembly.
11669
11670         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
11671         object layout.
11672
11673         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
11674         a MonoDynamicImage instead of just a MonoImage.
11675         
11676         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
11677         icalls to ModuleBuilder but keep their semantics, so they will work
11678         with moduleb->assemblyb. This will change later.
11679         
11680 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
11681
11682         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
11683         object layout.
11684
11685         * reflection.c (mono_image_build_metadata): Avoid creation of a default
11686         main module, since it is now done by the managed code.
11687
11688 2003-11-03  Martin Baulig  <martin@ximian.com>
11689
11690         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
11691         `ginst->klass' here.
11692         (method_encode_methodspec): Don't use the `ginst->generic_method's
11693         klass if it's a generic instance, use `ginst->klass' in this case.
11694
11695 2003-11-03  Martin Baulig  <martin@ximian.com>
11696
11697         * reflection.c (mono_image_get_generic_method_param_info):
11698         Removed, use mono_image_get_generic_param_info() instead.
11699         (mono_image_get_type_info): Write the GenericParam table before
11700         the Method table.  This is neccessary because in the GenericParam
11701         table, type parameters of the class (ie. '!0' etc.) must come
11702         before the ones from its generic methods (ie. '!!0' etc).
11703
11704 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
11705
11706         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
11707
11708 2003-11-02  Martin Baulig  <martin@ximian.com>
11709
11710         * reflection.c (create_generic_typespec): Take a
11711         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
11712         the generic parameters from it.
11713
11714 2003-11-02  Martin Baulig  <martin@ximian.com>
11715
11716         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
11717         instead of a `MonoClassField *' since we just need the type.
11718         (create_generic_typespec): New static function.  Creates a
11719         TypeSpec token for a generic type declaration.
11720         (mono_image_get_generic_field_token): New static function.
11721         (mono_image_create_token): If we're a FieldBuilder in a generic
11722         type declaration, call mono_image_get_generic_field_token() to get
11723         the token.
11724
11725 2003-11-02  Martin Baulig  <martin@ximian.com>
11726
11727         * reflection.h
11728         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
11729         `MonoReflectionGenericInst *declaring_type' and
11730         `MonoReflectionGenericInst *reflected_type' fields.
11731
11732         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
11733         `MonoReflectionGenericInst *declaring_type' and a
11734         `MonoReflectionGenericInst *reflected_type' argument instead of a
11735         single `MonoReflectionGenericInst *type' one.  Set
11736         `res->declaring_type' and `res->reflected_type' from them.
11737         (mono_reflection_inflate_field): Likewise.      
11738
11739 2003-11-02  Martin Baulig  <martin@ximian.com>
11740
11741         * class.c (mono_class_setup_vtable): Don't store generic methods
11742         in the vtable.  
11743
11744 2003-11-02  Martin Baulig  <martin@ximian.com>
11745
11746         * reflection.h (MonoReflectionGenericInst): Added
11747         `MonoReflectionType *declaring_type'.
11748
11749         * reflection.c (mono_reflection_bind_generic_parameters): Use
11750         `if (tb->parent)' instead of `klass->parent'.
11751
11752 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
11753
11754         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
11755         with an empty ASSEMBLY table.
11756
11757         * reflection.c (mono_image_build_metadata): Avoid using the same loop
11758         variable in the inner and outer loops.
11759
11760 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
11761
11762         * metadata.h (mono_metadata_make_token): Put parentheses around macro
11763         argument.
11764
11765         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
11766         
11767         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
11768         icalls. Instead, do everything in managed code. This is needed since
11769         it is hard to restore the original domain etc. in unmanaged code in the
11770         presence of undeniable exceptions.
11771
11772         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
11773         New icalls to push and pop appdomain refs.
11774
11775 2003-10-31  Martin Baulig  <martin@ximian.com>
11776
11777         * class.c (inflate_generic_type): Renamed to
11778         mono_class_inflate_generic_type() and made it public.
11779
11780         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
11781         New interncall.
11782
11783         * loader.c (mono_field_from_memberref): Also set the retklass for
11784         typespecs.
11785
11786         * fielder.c (mono_image_get_inflated_field_token): New static
11787         method; creates a metadata token for an inflated field.
11788         (mono_image_create_token, fixup_method): Added support for
11789         "MonoInflatedField".
11790         (fieldbuilder_to_mono_class_field): New static function.
11791         (mono_reflection_inflate_field): New public function.
11792
11793         * reflection.h
11794         (MonoReflectionGenericInst): Added `MonoArray *fields'.
11795         (MonoReflectionInflatedField): New typedef.     
11796
11797 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
11798
11799         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
11800         for Solaris and other platforms without s6_addr16
11801
11802 2003-10-30  Martin Baulig  <martin@ximian.com>
11803
11804         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
11805         argument instead of two.
11806         (mono_class_inflate_generic_signature): Likewise.
11807         (inflate_generic_header): Likewise.
11808         (mono_class_inflate_generic_method): Likewise.  In addition, if
11809         `ginst->klass' is set, it becomes the new `method->klass'.
11810
11811         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
11812         field.
11813
11814         * reflection.c (encode_generic_method_sig): Write a 0xa as the
11815         first byte. [FIXME]
11816         (method_encode_methodspec): If we have generic parameters, create
11817         a MethodSpec instead of a MethodRef.
11818         (fixup_method): Added support for "MonoInflatedMethod" and
11819         "MonoInflatedCtor".
11820         (mono_image_create_token): Added support for "MonoInflatedMethod"
11821         and "MonoInflatedCtor".
11822         (inflated_method_get_object): New static function; returns a
11823         managed "System.Reflection.MonoInflatedMethod" object.
11824         (mono_reflection_bind_generic_method_parameters): Return a
11825         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
11826         (mono_reflection_inflate_method_or_ctor): Likewise.
11827         (mono_image_get_generic_method_param_info): Initialize unused
11828         fields to zero.
11829         (mono_image_get_generic_param_info): Likewise.
11830
11831         * reflection.h (MonoReflectionInflatedMethod): New public
11832         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
11833         "S.R.MonoInflatedCtor" classes.
11834
11835         * loader.c (method_from_memberref): If we're a TypeSpec and it
11836         resolves to a generic instance, inflate the method.
11837
11838 2003-10-28  Dick Porter  <dick@ximian.com>
11839
11840         * object.c (mono_runtime_run_main): Convert command-line arguments
11841         into utf8, falling back to the user's locale encoding to do so.
11842
11843 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
11844
11845         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
11846         at this time.
11847
11848         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
11849
11850         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
11851         up icalls at method definition time. Partially fixes #33569.
11852
11853 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
11854
11855         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
11856         marshalling of arrays. Fixes #50116.
11857
11858         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
11859
11860         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
11861         points to a vtable in the dying appdomain.
11862
11863         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
11864         listeners into unmanaged code inside the lock.
11865
11866         * object.c (mono_class_vtable): Turn off typed allocation in non-root
11867         domains and add some comments.
11868
11869 2003-10-25  Martin Baulig  <martin@ximian.com>
11870
11871         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
11872
11873         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
11874
11875         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
11876         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
11877         currently parsing.  Create the generic class and store it in
11878         `generic_inst->klass' before parsing the type arguments.  This is
11879         required to support "recursive" definitions; see mcs/tests/gen-23.cs
11880         for an example.
11881         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
11882         to support recursive typespec entries.
11883
11884         * class.c (mono_class_setup_parent): If our parent is a generic
11885         instance, we may get called before it has its name set.
11886         (mono_class_from_generic): Splitted into
11887         mono_class_create_from_generic() and mono_class_initialize_generic().
11888
11889 2003-10-25  Martin Baulig  <martin@ximian.com>
11890
11891         * icall.c (ves_icall_Type_BindGenericParameters): Return a
11892         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
11893         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
11894         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
11895
11896         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
11897         (create_typespec): Likewise.
11898         (mono_reflection_bind_generic_parameters): Return a
11899         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
11900         (mono_reflection_inflate_method_or_ctor): New public function.
11901
11902         * reflection.h (MonoReflectionGenericInst): New typedef.        
11903
11904 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
11905
11906         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
11907         inside the domain lock. Fixes #49993.
11908         
11909         * object.c (mono_class_vtable): When typed allocation is used, 
11910         allocate vtables in the GC heap instead of in the mempool, since the
11911         vtables contain GC descriptors which are used by the collector even
11912         after the domain owning the mempool is unloaded.
11913
11914         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
11915
11916         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
11917         reflect what it does. Also invalidate mempools instead of freeing
11918         them if a define is set.
11919
11920         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
11921         of the appdomain.
11922         
11923         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
11924         hold the finalizable objects in this domain.
11925
11926         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
11927         appdomain.
11928
11929         * appdomain.c (mono_domain_set): New function to set the current
11930         appdomain, but only if it is not being unloaded.
11931
11932         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
11933         appdomain which is being unloaded.
11934         
11935         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
11936         unloading of the root appdomain.
11937
11938         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
11939         icall to execute a method in another appdomain. Intended as a 
11940         replacement for InternalSetDomain, which can confuse the code 
11941         generation in the JIT.
11942
11943         * appdomain.c (mono_domain_is_unloading): New function to determine
11944         whenever an appdomain is unloading.
11945
11946         * appdomain.c (mono_domain_unload): New function to correctly unload
11947         an appdomain.
11948
11949         * assembly.c (mono_assembly_load_references): Check that an assembly
11950         does not references itself.
11951
11952         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
11953         domain manually, it asks the finalizer thread to do it, then waits for
11954         the result. Also added a timeout.
11955
11956         * icall.c: Register the new icalls.
11957
11958         * threads.h threads.c: Export the mono_gc_stop_world and 
11959         mono_gc_start_world functions.
11960         
11961         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
11962         function to fill out the mempool with 0x2a.
11963
11964 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
11965
11966         * reflection.h (MonoReflectionMethodAux): New structure to store
11967         information which is rarely used, thus is not in the MonoMethod
11968         structure.
11969
11970         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
11971         store the aux info.
11972
11973         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
11974         and marshalling info into the aux structure.
11975
11976         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
11977         from the aux structure.
11978
11979         * loader.c (mono_method_get_param_names): Retrieve the param names from
11980         the aux structure.
11981         
11982 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
11983
11984         * exception.h exception.c: Add AppDomainUnloadedException && fix 
11985         warning.
11986
11987 2003-10-21  Dick Porter  <dick@ximian.com>
11988
11989         * socket-io.c
11990         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
11991         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
11992
11993 2003-10-21  Martin Baulig  <martin@ximian.com>
11994
11995         * reflection.c (mono_reflection_bind_generic_parameters):
11996         `klass->parent' is NULL for interfaces.
11997
11998 2003-10-21  Martin Baulig  <martin@ximian.com>
11999
12000         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12001
12002 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
12003
12004         * exception.c (mono_exception_from_name_msg): New helper function for
12005         creating exceptions and initializing their message field.
12006
12007         * exception.c: Simplify functions using the new helper.
12008
12009         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
12010         New function.
12011
12012         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
12013         mono_raise_exception, since otherwise gcc doesn't generate the function
12014         epilog for raise_exception, confusing the stack unwinding in the JIT.
12015         Fixes #45043.
12016
12017         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
12018         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
12019         Fixes #49499.
12020
12021 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12022
12023         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
12024         utf8.
12025
12026 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
12027
12028         * icall.c: Removed GetUninitializedObject method because
12029           AllocateUninitializedClassInstance does the same.
12030
12031 2003-10-18  Martin Baulig  <martin@ximian.com>
12032
12033         * class.c (inflate_generic_signature): Renamed to
12034         mono_class_inflate_generic_signature() and made it public.
12035         (my_mono_class_from_generic_parameter): New static function; if we
12036         don't already have the generic parameter's MonoClass, create a
12037         very simple one which is just used internally in the runtime and
12038         not passed back to managed code.
12039
12040         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
12041
12042         * metadata.h (MonoMethodSignature): Moved the
12043         `MonoGenericParam *gen_params' to the MonoMethodHeader.
12044         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
12045
12046         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
12047         ves_icall_MonoMethod_GetGenericArguments(); this is now an
12048         interncall on the MonoMethod class, not on MethodInfo.
12049         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
12050         calling mono_reflection_bind_generic_method_parameters() directly.
12051
12052         * loader.c (mono_method_get_signature): If this is a MethodSpec;
12053         return the already computed `method->signature'.
12054         (method_from_methodspec): New static function to load a method
12055         from a MethodSpec entry.
12056         (mono_get_method_from_token): Call the new method_from_methodspec()
12057         for MethodSpec tokens.  
12058         (mono_get_method_from_token): If we're a generic method, load the
12059         type parameters.
12060
12061         * reflection.c (mono_image_get_memberref_token): Allow
12062         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
12063         table.
12064         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
12065         (mono_image_create_token): First check whether it's a generic
12066         method (so we'd need to create a MethodSpec), then do the other
12067         two alternatives.
12068         (mono_reflection_bind_generic_method_parameters): Return a
12069         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
12070         called directly from the interncall.
12071
12072 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
12073
12074         * reflection.c (load_public_key): Move loading of the public key
12075         into managed code.
12076
12077         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
12078
12079         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
12080         fields.
12081
12082         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
12083         culture, hash_alg and public_key. Fixes #49555.
12084
12085 2003-10-17  Martin Baulig  <martin@ximian.com>
12086
12087         * class.h (MonoGenericInst): Moved this declaration here and added
12088         `MonoMethod *generic_method'.
12089
12090         * icall.c
12091         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
12092         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
12093
12094         * metadata.c (mono_metadata_type_equal): Two types of
12095         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
12096         index; ie. don't compare the address of the `MonoGenericParam'
12097         structure.
12098         (mono_metadata_load_generic_params): Removed the `MonoMethod
12099         *method' argument.
12100
12101         * metadata.h (MonoGenericInst): Moved declaration to class.h.
12102         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
12103
12104         * reflection.c (method_encode_signature): Encode the number of
12105         generic parameters.
12106         (encode_generic_method_sig): New static function.
12107         (method_encode_methodspec): New static function; creates an entry
12108         in the MethodSpec table for a generic method.
12109         (mono_image_get_methodspec_token): New static function.
12110         (mono_image_create_token): Call mono_image_get_methodspec_token()
12111         for generic methods.
12112         (mono_reflection_bind_generic_method_parameters): New public
12113         function.  Instantiates a generic method.
12114
12115 2003-10-16  Martin Baulig  <martin@ximian.com>
12116
12117         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
12118         *gen_params' here from MonoMethodHeader.
12119
12120         * metadata.c (mono_metadata_parse_method_signature): If we have
12121         generic parameters, initialize `method->gen_params' and then set
12122         the correct `type->data.generic_param' in all the parameters.
12123
12124 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
12125
12126         * threads.c (mono_threads_get_default_stacksize): New function to 
12127         return the default stacksize.
12128
12129         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
12130         termination of the finalizer thread, since the previous method had
12131         race conditions. Fixes #49628.
12132
12133         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
12134         as for the other managed threads.
12135
12136 2003-10-16  Martin Baulig  <martin@ximian.com>
12137
12138         * class.c (inflate_generic_signature): Copy `generic_param_count'
12139         and `gen_params'.
12140
12141         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
12142         New interncall.
12143
12144         * metadata.c (mono_metadata_parse_method_signature): Actually set
12145         the `method->generic_param_count' here.
12146         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
12147
12148 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
12149
12150         * object.h: Add a new field to TypedRef to simplify the implementation
12151         of the REFANY opcodes in the JIT.
12152
12153         * icall.c: Make use of the new field.
12154
12155         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
12156         dynamically.
12157
12158 2003-10-15  Martin Baulig  <martin@ximian.com>
12159
12160         * class.c (mono_class_from_gen_param): Renamed to
12161         mono_class_from_generic_parameter() and moved most of the
12162         functionality from mono_reflection_define_generic_parameter()
12163         here; ie. we create a "real" class here.
12164         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
12165         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
12166         previously been called.
12167
12168         * class.h (MonoGenericParam): Moved the declaration of this struct
12169         here from metadata.h and added `MonoMethod *method'.
12170
12171         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
12172         interncall.
12173
12174         * loader.c (mono_get_method_from_token): If we have any generic
12175         parameters, call mono_metadata_load_generic_params() to read them
12176         from the MONO_TABLE_GENERICPAR.
12177
12178         * metadata.c (mono_metadata_load_generic_params): Added
12179         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
12180
12181         * metadata.h (MonoMethodSignature): Replaced
12182         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
12183         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
12184
12185         * reflection.c (mono_reflection_define_generic_parameter): Moved
12186         most of the functionality into the new
12187         mono_class_from_generic_parameter(); set the `method' field if
12188         we're a method parameter.       
12189
12190 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
12191
12192         * marshal.c (emit_struct_conv): if native size is 0
12193         emit no code.
12194
12195 2003-10-14  Martin Baulig  <martin@ximian.com>
12196
12197         * icall.c: The generics API has changed in the spec since it was
12198         added to System.Type; these modifications make it match the spec
12199         again.
12200         (ves_icall_Type_GetGenericParameters): Renamed to
12201         `ves_icall_Type_GetGenericArguments'.
12202         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
12203         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
12204         `ves_icall_MonoType_get_HasGenericArguments'.
12205         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
12206         `ves_icall_MonoType_get_IsGenericParameter'.
12207         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
12208         this is no interncall anymore.
12209         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
12210         `ves_icall_TypeBuilder_get_IsGenericParameter'.
12211
12212 2003-10-14  Martin Baulig  <martin@ximian.com>
12213
12214         * reflection.c (mono_reflection_bind_generic_parameters): Also
12215         inflate generic methods if we're reading the class from IL.
12216
12217 2003-10-13  Martin Baulig  <martin@ximian.com>
12218
12219         * reflection.c (mono_reflection_define_generic_parameter): This
12220         method isn't called directly from the icall anymore; take a
12221         `MonoReflectionAssemblyBuilder *' so we can use this for type and
12222         method generic parameters.
12223         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
12224         (method_builder_encode_signature): Encode generic parameters.
12225         (mono_image_get_method_info): Write generic params to the
12226         MONO_TABLE_GENERICPARAM table.
12227
12228         * reflection.h (MonoReflectionMethodBuilder): Added
12229         `MonoArray *generic_params'.
12230
12231         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
12232
12233         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
12234         wrapper for mono_reflection_define_generic_parameter().
12235         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
12236
12237 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
12238
12239         * marshal.h: Add missing function to fix build.
12240
12241         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
12242         the SetLastError pinvoke attribute.
12243
12244         * marshal.c (mono_marshal_set_last_error): New helper function called
12245         by the generated code.
12246         
12247         * marshal.c (mono_mb_emit_branch): New helper function.
12248
12249         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
12250
12251         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12252         classes as parameters and return values of delegates. Fixes #29256. 
12253
12254 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
12255
12256         * locales.c: use gint32 in non HAVE_ICU case
12257
12258 2003-10-11  Martin Baulig  <martin@ximian.com>
12259
12260         * mono-debug.c (mono_debug_add_method): Added a workaround for
12261         bug #48591.
12262
12263 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
12264
12265         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
12266         delegates passed to native code must use the STDCALL calling 
12267         convention. Fixes #35987.
12268
12269 2003-10-10  Martin Baulig  <martin@ximian.com>
12270
12271         * class.c (inflate_generic_type): If we're inflating for a generic
12272         type instance (and not for a generic method), return
12273         MONO_TYPE_MVAR unchanged.
12274
12275 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12276
12277         * string-icalls.c: Join ignores null strings in the source array.
12278         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
12279         * threads.c: GetAvailableTheads is slightly more accurate.
12280
12281 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
12282
12283         * threads.h threads.c : add mono_threads_set_default_stacksize
12284         and pass default to CreateThread calls.
12285
12286 2003-10-09  Dick Porter  <dick@ximian.com>
12287
12288         * icall.c:
12289         * locales.h:
12290         * locales.c: Internal calls for constructing CultureInfo and
12291         related objects from libicu (if its available.)
12292
12293 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
12294
12295         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
12296
12297 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12298
12299         * threadpool.c: added an argument to async_invoke_thread that is the
12300         item to process, pass the MonoAsyncResult to the thread start function
12301         when creating a new thread. This way we don't need to acquire any lock
12302         when we're creating a new thread. Readded a semaphore for faster
12303         response times (instead of that Sleep i added).
12304
12305 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
12306
12307         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
12308         get daylight change dates better on Windows, fix handling
12309         of platforms without tm_gmtoff.
12310
12311 2003-10-06  Martin Baulig  <martin@ximian.com>
12312
12313         * class.c (inflate_generic_method): Renamed to
12314         mono_class_inflate_generic_method() and made public.
12315         (mono_class_init): Don't inflate the generic methods here.
12316         (mono_class_from_generic): Added `gboolean inflate_methods'
12317         argument.  Inflate the methods here.
12318
12319         * loader.c (mono_method_get_param_names): Ignore instances of
12320         generic types for the moment.
12321
12322         * reflection.c (fixup_method): Added support for inflated methods.
12323         (mono_image_create_token): Use mono_image_get_methodref_token()
12324         for inflated methods.
12325         (mono_custom_attrs_from_param): Ignore instances of generic types
12326         for the moment.
12327         (mono_reflection_bind_generic_parameters): New public function.
12328         Moved all the functionality from
12329         ves_icall_Type_BindGenericParameters() here and added support for
12330         dynamic types.
12331         (mono_reflection_define_generic_parameter): Initialize
12332         `klass->methods' here.
12333
12334         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
12335         functionality into mono_reflection_define_generic_parameter().
12336         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
12337         TypeBuilder, return that TypeBuilder.
12338
12339 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12340
12341         * appdomain.c: removed mono_delegate_semaphore.
12342
12343         * threadpool.c:
12344         (mono_thread_pool_add): moved hash table creation inside and the thread 
12345         creation outside of the critical region.
12346         (mono_thread_pool_finish): removed obsolete code.
12347         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
12348         continue or exit the thread depending on the queue.
12349
12350 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
12351
12352         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
12353         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
12354         handle more bool marshalling options
12355
12356 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
12357
12358         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
12359         arrays of structs. Also add a more descriptive error message when
12360         a structure member is marshalled as LPArray.
12361
12362 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
12363
12364         * marshal.c (mono_marshal_get_native_wrapper): Add support for
12365         marshalling arrays of complex types. Fixes #29098. Also remove an
12366         usused and incomplete function.
12367
12368 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
12369
12370         * gc.c: report heap_size - free_bytes as total memory allocated
12371         (bug#49362).
12372
12373 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
12374
12375         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
12376         fix timezone handling problems on Windows.
12377         
12378         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
12379         asserts when the year is outside the range handled by ms the functions.
12380
12381         * class.c (setup_interface_offsets): If the class is an interface,
12382         fill out its interface_offsets slot.
12383
12384 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12385
12386         * threadpool.c: mark threadpool threads as background.
12387
12388 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
12389
12390         * decimal.c - define DECINLINE to nothing if not using GCC
12391
12392 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
12393
12394         * assembly.c: More refcount fixes.
12395
12396 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12397
12398         * string-icalls.c: if we're not trimming, return the same string.
12399         When not splitting, don't create a new string.
12400
12401 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12402
12403         * image.c:
12404         (mono_image_open): increment the ref_count inside the critical section.
12405
12406 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
12407
12408         * image.c (mono_image_open): Fix reference counting bug.
12409
12410 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
12411
12412         * marshal.c (mono_marshal_type_size) struct alignment changed for 
12413         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
12414         64bits. Avoid leak in mono_marshal_get_native_wrapper when
12415         mono_lookup_pinvoke_call throws.        
12416
12417 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
12418
12419         * reflection.c (mono_reflection_parse_type): Fix #49114.
12420
12421         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
12422         temporary workaround for cygwin header problem.
12423
12424         * object.c (mono_object_isinst): Synchronize this with the code
12425         generated by the JIT for casts.
12426
12427 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
12428
12429         * reflection.c (encode_type): Fix #38332.
12430
12431 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
12432
12433         * marshal.c (mono_marshal_method_from_wrapper): New function to return
12434         the original method from the wrapper method.
12435
12436 2003-09-25  Martin Baulig  <martin@ximian.com>
12437
12438         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
12439         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
12440         (ves_icall_Type_get_IsGenericInstance): New interncall.
12441
12442 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
12443
12444         * object.c: fix cast warning in big endian code.
12445
12446 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
12447
12448         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
12449         
12450 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12451
12452         * assembly.c: don't call check_env from mono_assembly_load. It's
12453         already done once in mono_assemblies_init and may cause headaches when
12454         multiple threads are loading assemblies.
12455
12456 2003-09-19  Martin Baulig  <martin@ximian.com>
12457
12458         * reflection.c (mono_reflection_define_generic_parameter): Don't
12459         allocate `klass->methods', set `klass->flags' to
12460         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
12461
12462 2003-09-18  Martin Baulig  <martin@ximian.com>
12463
12464         * class.c (mono_class_init): Don't create `class->methods' if it's
12465         already initialized.
12466
12467         * metadata.c (mono_metadata_load_generic_params): Make this
12468         actually work.
12469
12470         * reflection.c (mono_reflection_define_generic_parameter): Set
12471         parent class and interfaces from the constraints.
12472
12473         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
12474         to keep this struct in sync with the declaration in TypeBuilder.cs.
12475
12476 2003-09-17  Martin Baulig  <martin@ximian.com>
12477
12478         * metadata.h (MonoType): Replaced the data's `int type_param'
12479         field with `MonoGenericParam *generic_param'.
12480         (MonoGenericParam): Added `MonoClass *klass'.
12481
12482         * class.c (mono_class_from_gen_param): Removed the
12483         `MonoImage *image' and `int type_num' arguments.
12484
12485         * metadata.c (mono_metadata_parse_generic_param): New static
12486         method; creates a MonoGenericParam which just contains the index.
12487         (do_mono_metadata_parse_type): Call
12488         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
12489         MONO_TYPE_MVAR.
12490
12491         * reflection.c (mono_image_typedef_or_ref): Generic type
12492         parameters may be in the same assembly, but never use a typedef
12493         for them.
12494         (mono_reflection_define_generic_parameter): We're now creating a
12495         "real" class for the type parameter; it's now safe to call
12496         mono_class_from_mono_type() on the class'es type, it'll do the
12497         right thing.
12498
12499 2003-09-16  Martin Baulig  <martin@ximian.com>
12500
12501         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
12502         `symfile->range_entry_size' and `symfile->class_entry_size' here;
12503         the `symfile' data structure must be fully initialized before it
12504         gets added to the table.
12505
12506 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
12507
12508         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
12509
12510         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
12511         class init trampolines.
12512
12513 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
12514
12515         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
12516         to the built-in profiler to turn off time and allocation profiling
12517         respectively.
12518
12519 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
12520
12521         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
12522         g_direct_equal.
12523
12524         * debug-helpers.c (mono_method_full_name): Print the wrapper type
12525         in human readable form.
12526
12527 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
12528
12529         * reflection.c icall.c: Fixed warnings.
12530
12531         * image.c (load_class_names): Use a temporary hash table to hold the
12532         namespaces in order to avoid doing many string comparisons.
12533
12534         * image.h: Fix typo.
12535
12536         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
12537         Pass NULL instead of g_direct_equal to the GHashTable constructor 
12538         since the NULL case is short-circuited inside g_hash_table_lookup, 
12539         leading to better performance.  
12540
12541         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
12542         obtain the first custom attribute for a given index. Depends on the
12543         CustomAttribute table being sorted by the parent field.
12544
12545         * reflection.c (mono_custom_attrs_from_index): Use the new function 
12546         for better performance.
12547
12548 2003-09-07  Martin Baulig  <martin@ximian.com>
12549
12550         * class.c (mono_class_init): If we're a generic instance, inflate
12551         all our methods instead of loading them from the image.
12552         (mono_class_from_generic): Set `class->methods = gklass->methods'.
12553
12554 2003-09-07  Martin Baulig  <martin@ximian.com>
12555
12556         * mono-debug-debugger.c: Added support for constructors.
12557
12558 2003-09-06  Martin Baulig  <martin@ximian.com>
12559
12560         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
12561         New interncall.
12562
12563         * reflection.c (mono_reflection_setup_generic_class): Call
12564         ensure_runtime_vtable() to create the vtable.
12565
12566 2003-09-05  Martin Baulig  <martin@ximian.com>
12567
12568         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
12569         MONO_TYPE_MVAR.
12570
12571 2003-09-04  Martin Baulig  <martin@ximian.com>
12572
12573         * reflection.c (mono_reflection_define_generic_parameter): Generic
12574         parameters start with zero.
12575
12576 2003-09-04  Martin Baulig  <martin@ximian.com>
12577
12578         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12579
12580         * reflection.h (MonoReflectionGenericParam): New typedef.
12581         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
12582         the generic parameters from the managed TypeBuilder.
12583
12584         * reflection.c (mono_reflection_define_generic_parameter): New function.
12585         (mono_reflection_create_runtime_class): Encode generic parameters.
12586         (mono_reflection_setup_generic_class): New function; this is
12587         called after adding adding all generic params to the TypeBuilder.
12588         (encode_type): Added MONO_TYPE_VAR.
12589
12590 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12591
12592         * class.h class.c (mono_class_needs_cctor_run): Moved this method
12593         here from the JIT.
12594
12595         * assembly.h assembly.c: Moved the AOT loading code into an assembly
12596         load hook.
12597
12598 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
12599
12600         * reflection.h reflection.c class.h class.c: Delete duplicate 
12601         definition of mono_type_get_name () from reflection.c and export the
12602         one in class.c.
12603
12604         * class.c: Class loading fixes from Bernie Solomon 
12605         (bernard@ugsolutions.com).
12606
12607         * reflection.c: Endianness fixes from Bernie Solomon 
12608         (bernard@ugsolutions.com).
12609         
12610 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
12611
12612         * assembly.h assembly.c: Define a file format version for AOT
12613         libraries.
12614         
12615         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
12616
12617         * appdomain.h (MonoJitInfo): New field to determine whenever the
12618         code is domain neutral.
12619         
12620 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
12621
12622         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
12623
12624 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
12625
12626         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
12627         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
12628         Avoid caching the result since strings must be domain specific. Fixes
12629         #48050.
12630
12631 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
12632
12633         * marshal.c (mono_marshal_init): Make this callable multiple times
12634         since it is hard to find a correct place to call it.
12635
12636         * object.c (mono_runtime_class_init): Execute static constructors in
12637         the correct appdomain.
12638
12639         * image.c (build_guid_table): Handle the case when multiple images have
12640         the same GUID.
12641
12642 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12643
12644         * icall.c: added a couple of icalls for System.Web.
12645
12646 2003-08-28  Martin Baulig  <martin@ximian.com>
12647
12648         * icall.c (ves_icall_Type_BindGenericParameters): Use
12649         `klass->generic_inst' instead of `&klass->byval_arg' in the
12650         mono_type_get_object() call.  The returned type must be
12651         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
12652
12653 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
12654
12655         * NOTES: New file.
12656
12657         * object.c (mono_class_proxy_vtable): Make it thread safe.
12658
12659         * pedump.c: Fix warning.
12660
12661         * object.c appdomain.h: Get rid of metadata_section. 
12662         It is no longer needed and it was causing deadlocks with domain->lock.
12663
12664         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
12665
12666 2003-08-26  Martin Baulig  <martin@ximian.com>
12667
12668         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
12669
12670 2003-08-26  Martin Baulig  <martin@ximian.com>
12671
12672         * pedump.c (main): Call mono_metadata_init(),
12673         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
12674         and mono_loader_init().
12675
12676 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
12677
12678         * loader.h: Add missing include to fix build.
12679
12680         * image.h: mono_image_load_references is no more.
12681
12682         * assembly.c: Reworked assembly loading to make it really thread safe.
12683         After these changes, the assembly returned by mono_assembly_open is
12684         fully initialized, i.e. all its references assemblies are loaded.
12685
12686         * assembly.c (mono_image_load_references): Renamed to 
12687         mono_assembly_load_references, and made private, since clients no
12688         longer need to call it.
12689
12690         * class.c: Removed calls to mono_assembly_load_references, since it was
12691         a source of deadlocks.
12692
12693         * loader.h loader.c class.h class.c: Protect data structures using a 
12694         new lock, the loader lock.
12695
12696         * class.c (mono_class_setup_vtable): Create temporary hash tables and
12697         GPtrArrays only when needed.
12698
12699         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
12700         into empty structures by mcs. Fixes pinvoke7.cs.
12701         
12702         * domain.c (mono_init): Call a new initialization function.
12703
12704         * appdomain.c (mono_runtime_init): Call the new initializer function
12705         of the marshal module.
12706
12707         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
12708         inserted into empty structures by mcs. Fixes pinvoke7.cs.
12709
12710         * marshal.h marshal.c: Added locks around the wrapper caches to make
12711         this module thread safe.
12712
12713         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
12714         this argument. Fixes pinvoke1.exe.
12715
12716 2003-08-25  Lluis Sanchez <lluis@ximian.com>
12717
12718         * object.h: Added call_type field to MonoMethodMessage and the corresponding
12719         enumeration of values. Removed fields to store remote call output values in
12720         MonoAsyncResult. Not needed any more.
12721         * object.c: Initialize call_type and async_result fields in mono_message_init.
12722         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
12723         dispatching the message.
12724         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
12725         async call to finish. To do it use a message with EndInvoke call type.
12726
12727 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
12728
12729         * loader.h loader.c (mono_method_hash_marhal_info): New function which
12730         determines whenever a method has marshalling info.
12731
12732 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12733
12734         * assembly.c: fix the build on windows.
12735
12736 2003-08-22 Lluis Sanchez <lluis@ximian.com>
12737
12738         * object.cs: Fixed bug #47785.
12739
12740 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
12741
12742         * string-icalls.c (StringReplace): If their are no occurances of
12743         the old string found return a reference to the supplied
12744         string. This saves some memory and matches MS behavoir.
12745         
12746 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12747
12748         * socket-io.c: fixed compilation for systems that define AF_INET6
12749         and don't define SOL_IP/SOL_IPV6.
12750
12751 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
12752
12753         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
12754         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
12755
12756         * rawbuffer.c rawbuffer.h: Make this module thread safe.
12757
12758         * domain.c: Make this module thread safe.
12759
12760         * domain.c (mono_init): Call new initialization function.
12761
12762         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
12763         reference types too. Fixes #38812.
12764
12765         * image.c (mono_image_init): Fixed warnings.
12766
12767         * class.c (mono_class_from_typeref): Handle assembly load failure
12768         correctly.
12769
12770         * appdomain.c (add_assemblies_to_domain): Handle the case when
12771         the references of an assembly are not yet loaded.
12772
12773         * metadata.c image.c assembly.c: Moved initialization of global
12774         variables to a separate function called at startup since lazy 
12775         initialization of these variables is not thread safe.
12776         
12777         * image.c assembly.c: Made this module thread safe by adding locks in 
12778         the appropriate places.
12779
12780         * domain.c (mono_init): Call the new initialization functions of the
12781         three modules.
12782
12783 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
12784
12785         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
12786           make a direct call. It is proxy's work to make the call asynchronous.
12787           mono_delegate_end_invoke(): If the targe is a proxy, just collect
12788           the return values.
12789         * object.cs: mono_method_call_message_new(): read AsyncResult and
12790           state object from parameters list, if this info is requested.
12791         * object.h: Added fields to store remote call output values in
12792           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
12793
12794 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
12795
12796         * object.h: add needed fields to MonoThread.
12797         * threads.c, threads.h: allow registering a function to cleanup data
12798         allocated per thread by the JIT.
12799
12800 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12801
12802         * loader.h: portability fix by Bernie Solomon
12803         * <bernard@ugsolutions.com>.
12804
12805 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
12806
12807         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
12808         return a MonoArray. This simplifies the code and also ensures that
12809         the cache allways contains an object reference as a value.
12810
12811         * icall.c (ves_icall_get_parameter_info): Simplified using the new
12812         function.
12813
12814 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12815
12816         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
12817         fixes a problem with byte ordering when getting the address family for
12818         a socket.
12819
12820 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
12821
12822         * .cvsignore: Added monosn.
12823
12824         * reflection.h reflection.c loader.c: Added support for parameter
12825         marshalling to dynamically created types. Fixes #47295.
12826
12827 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
12828
12829         * rand.c: remove useless warnings.
12830
12831 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12832
12833         * class.c: implemented ldtoken for methods and fieldrefs.
12834
12835 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12836
12837         * threadpool.c: when mono_async_invoke was called, no one took care of
12838         monitoring the queue. So if the method invoked took some time and we
12839         got new async invoke requests after 500 ms (the thread created waited
12840         that long in WaitForSingleObject), the new async invoke was not called
12841         until the previous one finished.
12842
12843         This is fixed now. Thanks to Totte for helping with it.
12844
12845 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12846
12847         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
12848
12849 2003-08-11  Martin Baulig  <martin@ximian.com>
12850
12851         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
12852
12853 2003-08-06  Martin Baulig  <martin@ximian.com>
12854
12855         * mono-debug-debugger.c: Added support for static fields,
12856         properties and methods.
12857
12858 2003-08-06  Martin Baulig  <martin@ximian.com>
12859
12860         * mono-debug-debugger.c: Don't store the MonoString's vtable to
12861         make this work for applications with multiple application domains.
12862
12863 2003-08-04  Martin Baulig  <martin@ximian.com>
12864
12865         * mono-debug-debugger.c: Completely reworked the type support; the
12866         most important thing is that we're now just using one single
12867         `MonoType' instance per type.
12868
12869 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
12870
12871         * mono-endian.h, mono-endian.c, icall.c: Added icall
12872         ves_icall_System_Double_AssertEndianity to assert double word endianity
12873         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
12874
12875 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12876
12877         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
12878         support, icalls and fixes.
12879
12880 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
12881
12882         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
12883         classes that are a punctuation character in .NET is not the same a
12884         g_unichar_ispunct.
12885
12886 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12887
12888         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
12889
12890 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
12891
12892         * icall.c: Add new MemCopy internalcall.
12893         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
12894         Simplified code; It is not necessary to handle all the cases here,
12895         as the C# code takes care of it.  Only handle the case of the name
12896         resource embedded into the assembly.
12897
12898         Changed signature to return the data pointer and the size of the
12899         data. 
12900
12901 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
12902
12903         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
12904         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
12905
12906 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
12907
12908         * socket-io.c: ignore EINTR error in select.
12909
12910 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
12911
12912         * class.h, class.c: removed unused subclasses field in MonoClass.
12913
12914 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
12915
12916         * icall.c: improve fix of get_base_definition(). If the parent class
12917           doesn't have the mehod, look at the parent of the parent.
12918         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
12919           to check if a parameter is an in or out parameter
12920           (PARAM_ATTRIBUTE_IN is not set by default).
12921           mono_method_return_message_restore(): Use mono_class_value_size to
12922           get the size of a value type. mono_type_stack_size (parameterType)
12923           does not return the correct value if parameterType is byRef.
12924           mono_load_remote_field(), mono_load_remote_field_new(),
12925           mono_store_remote_field(), mono_store_remote_field_new():
12926           raise exception if the remote call returns an exception.
12927
12928 2003-07-28  Martin Baulig  <martin@ximian.com>
12929
12930         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
12931         method.  This is a wrapper around mono_runtime_invoke() which
12932         boxes the instance object if neccessary.
12933
12934 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12935
12936         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
12937         metadata.h, row-indexes.h, verify.c: first cut of generics support.
12938
12939 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12940
12941         * icall.c: disable mcs bug workaround.
12942
12943 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
12944
12945         * object.c (mono_runtime_class_init): Take the metadata_section
12946         mutex before obtaining the domain mutex.
12947
12948         * appdomain.h: Added definition of metadata_section mutex here. 
12949
12950         * object.c: define metadata_mutex here.
12951
12952 2003-07-24  Ravi Pratap  <ravi@ximian.com>
12953
12954         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
12955         fixed.
12956
12957 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
12958
12959         * reflection.c: Fix bug #46669
12960
12961 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12962
12963         * exception.c:
12964         * exception.h:
12965         * icall.c:
12966         * object.h: fill in the type name for TypeLoadException.
12967
12968 2003-07-23  Ravi Pratap  <ravi@ximian.com>
12969
12970         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
12971         relationship between TypeBuilders while compiling corlib) and bug
12972         45993 (Array types returned from the runtime while compiling
12973         corlib were from the loaded corlib).
12974
12975 2003-07-22  Martin Baulig  <martin@ximian.com>
12976
12977         * mono-debug-debugger.c: Reworked the type support a bit more;
12978         distinguish between types and classes.
12979
12980 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
12981
12982         * icall.c: add IsArrayImpl icall.
12983
12984 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
12985
12986         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
12987         initializing real_size only once. Also fix bug #46602.
12988
12989 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
12990
12991         * object.c: Renamed mono_metadata_section to metadata_section.
12992
12993 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
12994
12995         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
12996           empty array if the type is an array. Fixed.
12997           ves_icall_MonoMethod_get_base_definition: if the base method
12998           is abstract, get the MethodInfo from the list of methods of
12999           the class.
13000         * reflection.c: ParameterInfo.PositionImpl should be zero-based
13001           and it was 1-based. Fixed in mono_param_get_objects.
13002
13003 2003-07-20  Martin Baulig  <martin@ximian.com>
13004
13005         * mono-debug.h: Set version number to 31.
13006         (mono_debug_init): Added `MonoDomain *' argument.
13007
13008         * mono-debug-debugger.c: Reworked the type support; explicitly
13009         tell the debugger about builtin types; pass the `klass' address to
13010         the debugger.
13011
13012 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
13013
13014         * image.c: Allow new metadata tables to be loaded without a
13015         warning. Also update the warning message to give the new constant value.
13016                 
13017 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13018
13019         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
13020         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
13021         array type representation changes.
13022
13023 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13024
13025         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
13026         on Environment.Exit () call.
13027
13028 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13029
13030         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
13031         requires a matching corlib.
13032
13033 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
13034
13035         * Changelog: My editor decided to add a CR to each line. Sorry about that.
13036           Committed again without the CRs.
13037         
13038 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
13039
13040         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
13041           getting it from the "this" socket instance. Did not work
13042           if the socket is a subclass of Socket.
13043           Also fixed bug #35371.
13044
13045 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13046
13047         * metadata.c: fixed size for TypedByRef.
13048         * loader.c: when searching for a method, consider the vararg amrker.
13049         * unicode.c, decimal.c: constify some arrays.
13050
13051 2003-07-15  Dick Porter  <dick@ximian.com>
13052
13053         * socket-io.c: Fixed compilation for gcc < 3.2.
13054
13055         Fixed compilation for machines that don't have AF_INET6 (thanks to
13056         Bernie Solomon <bernard@ugsolutions.com> for that part.)
13057
13058         Fixed compile warnings.
13059         
13060         Fixed formatting and line endings.
13061
13062 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
13063
13064         * socket-io.h:
13065         * socket-io.c: Added IPv6 support.
13066
13067 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
13068
13069         * class.c (mono_class_is_assignable_from): New function to implement
13070         the is_assignable_from logic. Used by mono_object_isinst, 
13071         Type::IsAssignableFrom () and the interpreter.
13072
13073         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
13074         Object, even interfaces.
13075         
13076         * object.c (mono_object_isinst): Implement in terms of 
13077         is_assignable_from.
13078
13079         * icall.c (ves_icall_type_is_assignable_from): New icall.
13080
13081 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
13082
13083         * domain.c (foreach_domain): fix compiler warning.
13084
13085 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
13086
13087         * image.c (load_metadata_ptrs): use g_strndup because strndup is
13088         not available on all plattforms
13089
13090 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
13091
13092         * image.h image.c: Store the metadata version string in MonoImage.
13093         * icall.c: New icall to retrieve the image version.
13094         * reflection.c (create_dynamic_image): Fill in the image version field
13095         * reflection.c (build_compressed_metadata): Use the image version
13096         from the image structure.
13097
13098 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13099
13100         * appdomain.c: modified comment.
13101         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
13102         That will be its last iteration when mono_gc_cleanup is called from
13103         mono_runtime_cleanup and before the domain is unloaded.
13104
13105         Fixes bug #45962.
13106
13107 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
13108
13109         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
13110         attributes.
13111
13112 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13113
13114         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
13115         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
13116         Bernie Solomon <bernard@ugsolutions.com>.
13117
13118 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13119
13120         * object.c, object.h: provide mono_object_new_fast() for faster
13121         allocation in some special cases.
13122
13123 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13124
13125         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
13126         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
13127
13128 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13129
13130         * threadpool.c: fix leaks.
13131
13132 2003-07-01  Dick Porter  <dick@ximian.com>
13133
13134         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
13135         using MonoGHashTables.  Fixes threadpool bug posted to list.
13136
13137 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13138
13139         * image.h, image.c: added support to load an assembly from a byte array.
13140         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
13141         assembly bundle support.
13142
13143 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
13144
13145         * threadpool.c (mono_thread_pool_add): keep a reference to the
13146         AsyncResult to prevent GC
13147
13148 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13149
13150         * class.c: leak fix.
13151
13152 2003-06-25  Dick Porter  <dick@ximian.com>
13153
13154         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
13155         for the async object, the WaitHandle object will close the handle.
13156         Fixes bug 45321.
13157
13158 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13159
13160         * class.c: in mono_array_class_get (), lookup from the hash with the
13161         same type we insert: this works around a bug in
13162         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
13163         lluis. The real fix will have to wait for after the release.
13164
13165 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13166
13167         * icall.c: fix memory leak when getting type members.
13168
13169 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13170
13171         * reflection.c: added more pubtoken special cases.
13172
13173 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13174
13175         * class.c: handle field offset correctly when class size
13176         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
13177
13178 2003-06-20  Martin Baulig  <martin@ximian.com>
13179
13180         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
13181         *image' field.
13182
13183 2003-06-20  Martin Baulig  <martin@ximian.com>
13184
13185         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
13186
13187 2003-06-20  Martin Baulig  <martin@ximian.com>
13188
13189         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
13190         just distinguish between variables in registers and variables at
13191         an offset relative to a register.
13192
13193 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13194
13195         * icall.c: #ifdef out latest changes until mcs is fixed.
13196
13197 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13198
13199         * icall.c: return members in metadata order.
13200
13201 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13202
13203         * icall.c: avoid infinite loop in GetTimeZoneData.
13204
13205 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13206
13207         * icall.c: added Marshal.Prelink/All icalls.
13208
13209 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13210
13211         * object.c, object.h: fix warnings and do some overflow checking
13212         when creating arrays.
13213
13214 2003-06-17  Dick Porter  <dick@ximian.com>
13215
13216         * file-io.h:
13217         * file-io.c: File attributes need to be tweaked slightly when
13218         passed from the managed to the w32 world.
13219
13220 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13221         * profiler.h profiler-private.h profiler.c: Rework last patch
13222         based on suggestion by Paolo.
13223         
13224 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13225
13226         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
13227         instruction level coverage data collection.
13228         * profiler.h profiler.c (: Added new callback function which can be
13229         used by the profiler to limit which functions should have coverage
13230         instrumentation.
13231         * profiler.c (mono_profiler_load): Call g_module_build_path to
13232         generate the file name of the profiler library.
13233
13234 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13235
13236         * profiler.c, profiler.h, profiler-private.h: added basic block 
13237         coverage profiling API.
13238
13239 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
13240
13241         * reflection.c (mono_reflection_create_runtime_class): Add support
13242         for events in dynamically generated code.
13243
13244         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
13245         not allocated.
13246
13247 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13248
13249         * icall.c: when getting timezone info, return reasonable values if we
13250         can't get the actual data.
13251
13252 2003-06-14  Dick Porter  <dick@ximian.com>
13253
13254         * threads.c (start_wrapper): Remove the reference to the thread
13255         object in the TLS data, so the thread object can be finalized.
13256         This won't be reached if the thread threw an uncaught exception,
13257         so those thread handles will stay referenced :-( (This is due to
13258         missing support for scanning thread-specific data in the Boehm GC
13259         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
13260
13261 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
13262
13263         * reflection.c: ensure streams and tables are first allocated with
13264         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
13265
13266 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13267
13268         * icall.c: fixed GetElementType for byrefs (bug# 44792).
13269
13270 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
13271
13272         * reflection.c (mono_reflection_create_runtime_class): Add support for
13273         properties to dynamically created classes.
13274         * reflection.c: Fix a few places where non-MonoObjects were inserted
13275         into the tokens hashtable.
13276
13277 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13278
13279         * object.c: some support to handle out of memory exceptions.
13280
13281 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
13282
13283         * marshal.c (mono_marshal_get_native_wrapper): support reference
13284         return types
13285
13286 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13287
13288         * object.h, object.c: more portability stuff from Bernie Solomon.
13289         Unexport mono_object_allocate(). Added mono_object_unbox ().
13290         Set exitcode when an unhandled exception is thrown.
13291
13292 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
13293
13294         * marshal.c (mono_marshal_get_native_wrapper): use custom
13295         marshaler for return types.
13296
13297 2003-06-10  Dick Porter  <dick@ximian.com>
13298
13299         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
13300         ip_mreq is available
13301
13302 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13303
13304         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
13305         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
13306         by Bernie Solomon <bernard@ugsolutions.com>.
13307
13308 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
13309
13310         * gc.c (mono_gc_init): Avoid error message on shutdown when
13311         GC_DONT_GC=1 is used.
13312
13313         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
13314         New icall to return the GUID of a module.
13315
13316 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13317
13318         * class.c: ensure instance size always includes the parent's size
13319         even whem class size is set explicitly (fixes bug#44294).
13320
13321 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13322
13323         * profiler.h, profiler.c: made the simple profiler thread-safe,
13324         get more accurate timing info. Allow the loading of an
13325         externally-developed profiler module.
13326
13327 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
13328
13329         * marshal.c (mono_marshal_get_native_wrapper): improved
13330         class/byref arguments.
13331         (mono_marshal_get_native_wrapper): better string marshaling support.
13332
13333 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13334
13335         * class.c: ensure .pack and .size are handled correctly and
13336         simplified layout of static fields.
13337
13338 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13339
13340         * appdomain.c
13341         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
13342
13343         * loader.c (mono_lookup_pinvoke_call): look for modules in the
13344         current directory (fix bug 44008)
13345
13346 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
13347
13348         * marshal.c (mono_marshal_get_native_wrapper): started support for
13349         custom marshalers.
13350         (mono_delegate_to_ftnptr): consider marshalling specifications
13351
13352 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13353
13354         * reflection.c, reflection.h: emit custom marshal info.
13355
13356 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13357
13358         * object.c: free the GError.
13359         * icall.c: added CloseEvent_internal.
13360         * threads.[ch]:
13361         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
13362         call.
13363
13364 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
13365
13366         * loader.c (mono_method_get_signature): Add support for dynamic
13367         assemblies.
13368
13369 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13370
13371         * reflection.c: fixed bug #43905.
13372
13373 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13374
13375         * class.c, domain.c, icall.c, metadata.h, object.h: support for
13376         handling TypedReference and ArgIterator.
13377         * loader.c, loader.h: added function to get signature at call site.
13378
13379 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13380
13381         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
13382         data readonly. Buglets and warning fixes. Some MethodSpec support.
13383
13384 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13385
13386         * class.h, class.c, object.c: remove relative numbering support.
13387
13388 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
13389
13390         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
13391         free the string, until we get a chance to fix Gtk#
13392
13393 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13394
13395         * marshal.c: revert last patch.
13396
13397 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13398
13399         * icall.c: updates for new mono_class_vtable() not calling
13400         the type constructor anymore.
13401
13402 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13403
13404         * object.h, object.c: separate vtable creation from type
13405         initialization. Make running the .cctor thread safe.
13406
13407 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
13408
13409         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
13410
13411 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
13412
13413         * loader.c (mono_get_method): consider calling convention
13414
13415 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
13416
13417         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
13418         to return the invisible global type for a module.
13419
13420         * reflection.c (mono_image_build_metadata): Emit global fields too.
13421
13422 2003-05-20  Peter Williams  <peterw@ximian.com>
13423
13424         * loader.c (mono_lookup_internal_call): Add a few newlines.
13425
13426 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
13427
13428         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
13429         literal strings.
13430
13431         * appdomain.c (set_domain_search_path): Recalculate search path when
13432         AppDomainSetup.PrivateBinPath changes.
13433
13434         * object.c (mono_class_compute_gc_descriptor): It turns out some
13435         parts of the class libs (like System.Thread) holds pointers to
13436         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
13437         to treat native int a pointer type here.
13438         
13439 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
13440
13441         * appdomain.h, domain.c: add hashtable for jump target resolution.
13442
13443 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
13444
13445         * reflection.h reflection.c icall.c: Added new icalls 
13446         GetManifestResourceInfoInternal, GetModulesInternal and support
13447         infrastructure.
13448
13449 2003-05-16  Dick Porter  <dick@ximian.com>
13450
13451         * icall.c:
13452         * file-io.h:
13453         * file-io.c: Implement System.IO.MonoIO::GetTempPath
13454
13455 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
13456
13457         * object.c: mono_store_remote_field: little fix to previous patch.
13458
13459 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13460
13461         * class.c: add constructors to array classes.
13462         * icall.c: special case array construction for InternalInvoke (),
13463
13464 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
13465
13466         * class.h class.c reflection.c object.c: Added support for field
13467         defaults in dynamically generated classes.
13468
13469 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13470
13471         * reflection.c: properly encode charset for ddlimport.
13472
13473 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13474
13475         * threads.c: allow compiling without GC.
13476
13477 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13478
13479         * appdomain.h, object.c, object.h, threads.c, threads.h: added
13480         handling of thread static data.
13481
13482 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13483
13484         * reflection.h, reflection.c: added mono_custom_attrs_free ().
13485
13486 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
13487
13488         * class.c (mono_array_class_get): always set the serializable flags
13489         (mono_array_class_get): always set the SEALED attribute for array types
13490
13491 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
13492
13493         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
13494         attributes (fix for bug 42021).
13495
13496 2003-05-12  Dick Porter  <dick@ximian.com>
13497
13498         * gc.c: Don't run finalizers when the finalizer thread is
13499         finishing up, because the default domain has already been
13500         destroyed.
13501
13502 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
13503
13504         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
13505         value is null, we should throw an exception.   This is slightly
13506         different than the other conventions used for the constructor.
13507
13508 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13509
13510         * socket-io.c: fixed windows build.
13511
13512 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13513
13514         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
13515
13516 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
13517
13518         * object.c (mono_string_new_wrapper): Compatibility fix for MS
13519         compilers.
13520
13521 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
13522
13523         * class.c (mono_class_layout_fields): Add experimental GC aware
13524         auto layout facility. Requires class library changes to work correctly.
13525
13526         (mono_class_setup_vtable): Avoid overriding explicit interface
13527         method implementations. Fixes iface3.exe test.
13528
13529         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
13530         object reference.
13531         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
13532         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
13533
13534         * metadata.h: Add new type classification macro which determines
13535         whenever the type holds an object reference.
13536
13537 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
13538
13539         * marshal.c (mono_marshal_get_native_wrapper): cleanups
13540
13541 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
13542
13543         * gc.c (finalizer_thread): Work around a GC bug.
13544
13545 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
13546
13547         * marshal.c (emit_struct_conv): allow unions
13548
13549         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
13550
13551 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
13552
13553         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
13554
13555 2003-05-06  Martin Baulig  <martin@ximian.com>
13556
13557         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
13558
13559 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13560
13561         * socket-io.c:
13562         (Select_internal): allow NULLs, don't create arrays if not needed.
13563         Coupled with Socket.cs changes.
13564
13565         * threadpool.c:
13566         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
13567         register a finalizer for it that will close the semaphore handle. This
13568         fixes the leak and make Lupus' test run with > 4080 loops.
13569
13570 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
13571
13572         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
13573         Jerome Laban (bug #42287)
13574
13575 2003-05-02  Martin Baulig  <martin@ximian.com>
13576
13577         * debug-mono-symfile.h
13578         (MonoSymbolFile): Moved declaration into mono-debug.h.
13579         (MonoDebugMethodJitInfo): Likewise.
13580         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
13581         argument.
13582         (_mono_debug_address_from_il_offset): Take a
13583         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
13584
13585         * mono-debug.h
13586         (MonoDebugDomainData): New struct.
13587         (mono_debug_get_domain_data): New function.
13588         (mono_debug_add_method): Take an additional `MonoDomain *'
13589         argument.
13590         (mono_debug_source_location_from_address): Likewise.
13591         (mono_debug_il_offset_from_address): Likewise.
13592         (mono_debug_address_from_il_offset): Likewise.
13593
13594 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
13595
13596         * reflection.c: one more check for null type in custom attrs.
13597
13598 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13599
13600         * reflection.c: avoid warning (comparison is always false due to limited
13601         range of data type).
13602
13603 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13604
13605         * icall.c: throw an exception in Type.GetField if the argument 'name'
13606         is NULL.
13607
13608 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
13609
13610         * reflection.c: fixed handling of enums in named arguments to custom
13611         attributes (bug #42123).
13612
13613 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13614
13615         * reflection.c: use the right array element type and handle
13616         a null for a Type argument, too.
13617
13618 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
13619
13620         * reflection.c: handle arrays as arguments to custom attributes.
13621
13622 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
13623
13624         * reflection.c: handle a string value in a custom attr
13625         ctor that takes an object.
13626
13627 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
13628
13629         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
13630         (fix bug #42063)
13631
13632 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
13633
13634         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
13635
13636 2003-04-27  Martin Baulig  <martin@ximian.com>
13637
13638         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
13639         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
13640         MONO_DEBUGGER_EVENT_BREAKPOINT.
13641         (mono_breakpoint_trampoline_code): Removed.
13642         (mono_debugger_event_handler): The last argument is now a
13643         `guint32'.
13644         (mono_debugger_insert_breakpoint_full): Removed the
13645         `use_trampoline' argument.
13646         (mono_debugger_method_has_breakpoint): Likewise.
13647         (mono_debugger_trampoline_breakpoint_callback): Renamed to
13648         mono_debugger_breakpoint_callback(); take the method and
13649         breakpoint number as arguments.
13650
13651 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13652
13653         * metadata.c: fix off by one when loading parameters attributes.
13654
13655 2003-04-24  Martin Baulig  <martin@ximian.com>
13656
13657         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
13658
13659 2003-04-24  Martin Baulig  <martin@ximian.com>
13660
13661         * mono-debug-debugger.c: Moved all code which interacts with the
13662         Mono Debugger here.
13663
13664         * debug-mono-symfile.c: This code now just deals with the symbol
13665         file itself, the debugger code is now in mono-debug-debugger.c.
13666
13667 2003-04-23  Martin Baulig  <martin@ximian.com>
13668
13669         * mono-debug.c (mono_debug_source_location_from_il_offset):
13670         New method; like mono_debug_source_location_from_address(), but
13671         takes an IL offset instead of a machine address.
13672
13673 2003-04-23  Martin Baulig  <martin@ximian.com>
13674
13675         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
13676         `line' field; this is now computed by the debugger.
13677
13678 2003-04-23  Martin Baulig  <martin@ximian.com>
13679
13680         * mono-debug.[ch]: New files.  This is the new debugging interface.
13681
13682         * mono-debug-debugger.[ch]: New files.  Moved all code which
13683         interacts with the Mono Debugger here.
13684
13685 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
13686
13687         * domain.c (mono_init): initialize mono_defaults.monitor_class
13688
13689 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
13690
13691         * reflection.c (method_encode_code): Add a spicy exception to help
13692         future compiler authors.
13693
13694 2003-04-21  Martin Baulig  <martin@ximian.com>
13695
13696         * icall.c
13697         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
13698         Make this work with relative pathnames; g_filename_to_uri() needs
13699         an absolute filename.
13700
13701 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
13702
13703         * icall.c: Track name changes in Object and ValueType.
13704
13705 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
13706
13707         * metadata.c (mono_type_stack_size): size should be a multiple of
13708         sizeof (gpointer)
13709
13710 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13711
13712         * gc.c:
13713         (internal_domain_finalize): moved into mono_domain_finalize. No need
13714         to create another thread because the finalizers will be run in the
13715         finalizer thread.
13716         
13717         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
13718         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
13719         to be run (MS does this too).
13720
13721 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
13722
13723         * object.c (mono_class_compute_gc_descriptor): Update comment.
13724
13725         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
13726
13727         * image.h: Add synchronized wrapper cache.
13728
13729         * image.c (do_mono_image_open): Initialize cache.
13730
13731         * reflection.c (create_dynamic_mono_image): Initialize cache.
13732
13733 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13734
13735         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
13736         ves_icall_System_Buffer_ByteLengthInternal.
13737
13738 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13739
13740         * reflection.c: setup klass->nested_in earlier. Allow
13741         a dash in the assembly name.
13742
13743 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
13744
13745         * metadata.c (mono_type_to_unmanaged): dont access
13746         type->data.klass for MONO_TYPE_OBJECT
13747         (mono_type_to_unmanaged): consider System.Delegate class
13748
13749 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
13750
13751         * class.c: just setup supertypes in the proper place instead of
13752         initializing the full element class for arrays.
13753
13754 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13755
13756         * class.c: ensure the element class of arrays is initialized.
13757         Setup the supertype info for array classes, too.
13758
13759 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
13760
13761         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
13762
13763 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13764
13765         * Makefile.am: re-added -m option when running cygpath. This way,
13766         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
13767         separator.
13768         * mono-config.c: same codepath for locating mono config file for WIN32
13769         and the rest.
13770         * assembly.c: if mono_assembly_setrootdir is called, don't override
13771         the value set.
13772
13773 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13774
13775         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
13776         MONO_ASSEMBLIES variable.
13777
13778 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13779
13780         * icall.c: added Assembly::GetNamespaces() icall.
13781
13782 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13783
13784         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
13785
13786 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
13787
13788         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
13789         * object.c: fixed bug in the construction of vtable for proxies
13790
13791 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
13792
13793         * object.c (mono_array_new): Mark mono_array_new as an icall.
13794
13795 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13796
13797         * class.c: fixed test for public method when overriding interfaces.
13798         Closes bug #40970.
13799
13800 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13801
13802         * appdomain.h, domain.c: added mono_domain_foreach() to
13803         be able to access the currently loaded appdomains.
13804         * object.c: make string interning work across sppdomains.
13805         Mark some functions for use as icalls.
13806
13807 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
13808
13809         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
13810
13811         * reflection.h reflection.c: Allocate long living data using 
13812         GC_MALLOC_ATOMIC so the collector does not need to scan it.
13813
13814         * reflection.c: Double the allocation size in streams instead of
13815         increasing it, to prevent unneccesary copying on large assemblies.
13816         
13817         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
13818         creation if the assembly does not have the Run flag set.
13819
13820 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13821
13822         * class.h: avoid the C++ keywords in header files (Jerome Laban
13823         spotted and fixed this).
13824
13825 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13826
13827         * object.c:
13828         (mono_unhandled_exception): fill in the arguments for the
13829         UnhandledException event. Only trigger that event for the default
13830         domain (as MS does).
13831
13832 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
13833
13834         * object.c: Improve typed allocation stuff based on suggestions from
13835         Paolo. Also turn it on if the GC library supports it.
13836
13837 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
13838
13839         * object.c object.h class.h: Added experimental typed allocation
13840         facility using the interfaces in gc_gcj.h.
13841
13842         * os/gc_wrapper.h: Added new include files.
13843         
13844 2003-04-03  Martin Baulig  <martin@ximian.com>
13845
13846         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
13847         which is not yet enabled by default.
13848
13849         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
13850         functions.
13851         (mono_gc_lock, mono_gc_unlock): New static functions.
13852
13853         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
13854         functions; stop/start the world for the garbage collector.  This
13855         is using the windows API; we need to complete the SuspendThread()/
13856         ResumeThread() implementation in the io-layer to make this work on Unix.
13857         (mono_gc_push_all_stacks): New public function; tells the garbage
13858         collector about the stack pointers from all managed threads.
13859
13860 2003-04-03  Martin Baulig  <martin@ximian.com>
13861
13862         * object.h (MonoThread): Added `gpointer stack_ptr'.
13863
13864         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
13865
13866 2003-04-03  Martin Baulig  <martin@ximian.com>
13867
13868         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
13869
13870 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
13871
13872         * reflection.c (typebuilder_setup_fields): Initialize field.first and
13873         field.last.
13874
13875 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
13876
13877         * loader.c (mono_lookup_internal_call): Report the corlib that is
13878         out of sync.
13879
13880 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
13881
13882         * icall.c (ves_icall_type_GetTypeCode): fixed check for
13883         System.DBNull (it's class not valuetype).
13884
13885 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13886
13887         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
13888         if the array method was already assigned a token (fixes bug#40646).
13889
13890 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
13891
13892         * reflection.c (mono_reflection_get_type): Attempt type resolve even
13893         if no assembly is given.
13894
13895 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
13896
13897         * metadata.h: Added the new tables.
13898
13899         * row-indexes.h: Added definitions for new tables.
13900
13901         * metadata.c: Add schemas for new tables, and add support for
13902         computing the sizes of them.
13903
13904         * class.c: Update for handling the new type cases.
13905
13906 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
13907
13908         * metadata.h (MONO_TYPE_IS_VOID): new macro
13909
13910 2003-03-31  Martin Baulig  <martin@ximian.com>
13911
13912         * threads.h (MonoThreadCallbacks): Added `thread_created'.
13913
13914         * threads.c (mono_thread_new_init): Call `thread_created' in the
13915         mono_thread_callbacks.
13916
13917 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
13918
13919         * loader.h: added marshalbyrefobject_class to mono_defaults
13920         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
13921         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
13922           generation of output parameters.
13923           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
13924         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
13925           contextbound and the target object belongs to the context of the caller.
13926         * object.h: added context and unwrapped_server variables in MonoRealProxy.
13927         * object.c: Implemented support for interfaces and abstract classes
13928           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
13929           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
13930
13931 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
13932
13933         * class.h class.c (mono_class_is_subclass_of): New function.
13934         
13935         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
13936         routines for most common case (calls from ArrayList::ToArray).
13937
13938         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
13939         routine so programs which call Environment::Exit() can be profiled.
13940
13941         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
13942         Added MONO_ARCH_SAVE_REGS.
13943
13944         * icall.c (ves_icall_type_is_subtype_of): Use new function.
13945
13946 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
13947
13948         * blob.h: Add a couple of new MonoType types definitions.
13949
13950         * tabledefs.h: Add a couple of new call convs.
13951
13952 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
13953
13954         * reflection.h (MonoReflectionDynamicAssembly): track changes in
13955         the layout of the class.
13956
13957         * reflection.c (alloc_table): double the size on overflow to avoid
13958         unnecessary copying.
13959
13960         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
13961         avoid filling out metadata tables and blobs. Also set mb->ilgen to
13962         null so it can be garbage collected.
13963         
13964 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
13965
13966         * reflection.c (mono_reflection_get_type): Return the resolved type
13967         only if it is in the assembly we searched.
13968
13969         * reflection.c (ensure_runtime_vtable): Initialize method slots.
13970
13971         * class.c (mono_class_setup_vtable): Set the slot of the overriding
13972         method.
13973
13974 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13975
13976         * appdomain.c:
13977         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
13978         the right one is 'file:///blah', but MS allows it.
13979         * assembly.c:
13980         (mono_assembly_open): allow 'file://blah'
13981
13982         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
13983
13984 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
13985
13986         * socket-io.c: fixes bug #40310.
13987
13988 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
13989
13990         * reflection.c (mono_reflection_parse_type): handle deeply nested
13991         types correctly.
13992
13993         * reflection.c (mono_image_create_token): Use unique token values
13994         since they will be put into a hash table.
13995
13996         * class.c (mono_class_setup_vtable): If a method occurs in more than
13997         one place in the vtable, and it gets overriden, then change the
13998         other occurances too.
13999
14000         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
14001         object as return type.
14002
14003 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14004
14005         * icall.c: Deleted "ToString" implementation for double and float
14006         because they are full implemented in managed code.
14007
14008 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14009
14010         * reflection.c, reflection.h: implemented and exported functions
14011         to retrieve info about custom attributes.
14012
14013 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14014
14015         * appdomain.c: moved Uri handling to assembly.c
14016         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
14017         work when using a file Uri in *nix and windows.
14018
14019         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
14020         GetReferencedAssemblies.
14021
14022 2003-03-18  Dick Porter  <dick@ximian.com>
14023
14024         * icall.c: Rename a couple of internal calls
14025
14026         * threads.c: Set the thread state to Stopped when a thread exits.
14027         Fixes bug 39377.
14028
14029 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
14030
14031         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
14032         New icall.
14033
14034         * object.c (mono_class_vtable): fix warning.
14035
14036 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
14037
14038         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
14039
14040         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
14041         memory.
14042         (method_encode_clauses): Create exception info structures in the right
14043         order.
14044         (mono_reflection_setup_internal_class): Initialize supertypes field.
14045
14046         * class.c object.c: Handle interfaces which implement other interfaces 
14047         correctly.
14048
14049         * class.h class.c: Move the supertypes array initialization code into 
14050         a separate function so it can be used for dynamic types too. Also call
14051         it earlier, in mono_class_init(), since it can be used before the
14052         type is initialized.
14053
14054 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14055
14056         * Makefile.am:
14057         * assembly.c:
14058         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
14059
14060         * appdomain.c:
14061         * appdomain.h:
14062         * marshal.c:
14063         * object.c: remove warnings.
14064
14065 2003-03-13  Martin Baulig  <martin@ximian.com>
14066
14067         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
14068         (MonoDebugLexicalBlockEntry): New types.
14069
14070         * debug-mono-symfile.c
14071         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
14072
14073 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14074
14075         * process.c: ret can be any non-zero value accroding to MS doc.
14076
14077 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
14078
14079         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
14080         fixing a warning for a miss-used prototype, would have cause
14081         random memory corruption.
14082
14083 2003-03-07  Martin Baulig  <martin@ximian.com>
14084
14085         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
14086         getting really annoying ....
14087
14088 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
14089
14090         * reflection.c (fixup_method): added support for array methods.
14091
14092 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14093
14094         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
14095         (pointed out by Michael Adams).
14096
14097 2003-03-04  Dick Porter  <dick@ximian.com>
14098
14099         * icall.c: Temporarily reverted the Double and Single ToString()
14100         change, because it broke nunit.
14101
14102 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
14103
14104         * object.h, threads.h: make include files compatible with C++
14105         (patch by Jerome Laban <jlaban@wanadoo.fr>).
14106
14107 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14108
14109         * icall.c: Erased ToString helper functions for Double and Single.
14110         Now, that implementations ar all in managed code (Double and Single
14111         Formatters).
14112
14113 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
14114
14115         * appdomain.c: Added method for initializing the default context of
14116         a domain. Added internal call for getting the default context.
14117         * appdomain.h: Added context variable in MonoDomain struct.
14118         * domain.c: mono_domain_set also sets the default context of the domain
14119         * icall.c: Mapped internal method InternalGetDefaultContext.
14120         * object.c: mono_object_get_virtual_method returns always a remoting
14121         wrapper if the object is a transparent proxy.
14122         mono_runtime_invoke_array: when creating an object by calling the
14123         constructor, if the created object is a proxy, then the constructor should
14124         be called using the a remoting wrapper.
14125
14126 2003-03-03  Dick Porter  <dick@ximian.com>
14127
14128         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
14129         variable so it compiles on solaris.  Problem spotted by
14130         Christopher Taylor <ct@cs.clemson.edu>
14131
14132 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14133
14134         * appdomain.c:
14135         (get_info_from_assembly_name): don't leak value.
14136
14137         * icall.c:
14138         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
14139         result.
14140
14141 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14142
14143         * assembly.c: export mono_image_load_references ().
14144         * class.c: handle function pointers. mono_class_from_name() now
14145         supports nested type names directly.
14146
14147 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
14148
14149         * reflection.h reflection.c: Encode already created dynamic methods 
14150         and fields correctly as a DEF instead of a REF.
14151
14152         * reflection.c: Get rid of the force_ref argument to 
14153         mono_image_typedef_or_ref since it was wrong in the first place.
14154
14155         * string-icalls.c: add error checking to string constructors according
14156         to the MSDN docs.
14157
14158         * reflection.c: Emit types in the order their TypeBuilders were 
14159         created. Previously, a new table index was assigned to each type before
14160         the tables were emitted. This was wrong because the signature blob
14161         might already refer to a type by its original table index.
14162
14163 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
14164
14165         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
14166         change.
14167         
14168 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14169
14170         * Makefile.am: make assemblies dir have \ instead of / on windows.
14171
14172 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
14173
14174         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
14175         iterate over the NESTEDCLASS table using a linear search since the
14176         table is not guaranteed to be sorted by the secondary key.
14177
14178         * class.c (mono_class_create_from_typedef): fixed up call to
14179         mono_metadata_nesting_typedef.
14180         
14181 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
14182
14183         * marshal.c (mono_string_to_byvalstr): clear the memory as
14184         suggested by Jerome Laban <jlaban@wanadoo.fr>
14185
14186 2003-02-26  Dick Porter  <dick@ximian.com>
14187
14188         * process.c: Cope with padding in .rsrc blocks
14189
14190 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
14191
14192         * metadata.h: reverted the filter_len change, it breaks reflection
14193         
14194 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
14195
14196         * metadata.h: added a new field to store the filter_len
14197         
14198
14199 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14200
14201         * reflection.c: handle custom attributes for types and members
14202         created with Reflection.Emit (bug#38422).
14203
14204 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
14205
14206         * reflection.c: define RTSpecialName automatically for constructors for
14207         compatibility with MS.NET.
14208
14209         * reflection.c (mono_reflection_create_runtime_class): initialize
14210         nested_in field of dynamically created classes.
14211
14212 2003-02-22  Martin Baulig  <martin@ximian.com>
14213
14214         * debug-mono-symfile.h: Incremented version number.
14215
14216 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
14217
14218         * object.h icall.c process.c: fix warnings.
14219
14220 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
14221
14222         * appdomain.h appdomain.c:
14223         (mono_domain_try_type_resolve): split the 
14224         name_or_tb argument into a name and a tb argument.
14225         (mono_domain_has_type_resolve): new function to check whenever the
14226         application has registered a TypeResolve event handler.
14227         
14228         * icall.c reflection.h reflection.c: move the type resolve logic into
14229         mono_reflection_get_type () so it will be invoked when 
14230         Assembly::GetType () is called.
14231
14232         * reflection.c:
14233         (mono_reflection_get_type): renamed to get_type_internal.
14234         (mono_reflection_get_type): fixed type name generation so it works 
14235         for nested types too.
14236         (mono_reflection_get_type): call has_type_resolve () to avoid the 
14237         costly type name generation if there is no resolve event handler.
14238
14239 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14240
14241         * class.c, image.c: load exported types from file references.
14242
14243 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
14244
14245         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
14246           used to cache the managed methods used to create proxies and make 
14247           remote invocation of methods.
14248         * class.h: Added in MonoVTable a flag to indicate that a class needs 
14249           to be remotely created.
14250         * object.c: Modified the method mono_class_vtable(). It now initializes 
14251           the remote flag of the vtable. Modified mono_object_new_specific(), 
14252           so now it checks the remote flag.
14253         * icall.c: Added a couple of internal methods, one for enabling instance 
14254           creation interception for a type, and one for creating objects bypassing
14255           the remote check.
14256
14257 2003-02-18  Martin Baulig  <martin@ximian.com>
14258
14259         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
14260         New interncall to get a method's metadata token.
14261
14262         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
14263         New interncall for the debugger.
14264
14265 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
14266
14267         * class.c (mono_class_setup_vtable): allocate supertype array
14268
14269 2003-02-18  Martin Baulig  <martin@ximian.com>
14270
14271         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
14272
14273 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14274
14275         * reflection.c:
14276         (assembly_name_to_aname): jump over unknown properties (i've found
14277         something like: 'type, assembly, version=xxx, custom=null, public...',
14278         so now will ignore custom=null and still get the rest of the values).
14279
14280 2003-02-17  Dick Porter  <dick@ximian.com>
14281
14282         * threads.c: Have Thread.Start() wait for a semaphore to signal
14283         that the thread has set up all its local data.  This fixes bug
14284         34323, where Abort() raced the new thread's TLS data.
14285
14286         Also removes the handle_store() call from start_wrapper, because
14287         threads are now always created suspended and there is no longer a
14288         race between the parent and child threads to store the info.
14289
14290 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
14291
14292         * image.c: explain the #- heap issue in a message, hopefully
14293         avoiding FAQs on mono-list.
14294
14295 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14296
14297         * icall.c:
14298         (GetEntryAssembly): if the domain has not invoked
14299         AppDomain.ExecuteAssembly yet, return the assembly of the default
14300         AppDomain.
14301
14302 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
14303
14304         * class.c (mono_ldtoken): make it work in dynamic assemblies.
14305
14306 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14307
14308         * metadata.c, reflection.c: simple speedup to type hash
14309         and equals code.
14310
14311 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
14312
14313         * image.c, image.h, class.c, assembly.c: move module loading
14314         to MonoImage. When loading metadata, consider alignemnet from
14315         the start of metadata, not from the metadata address in memory.
14316
14317 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
14318
14319         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
14320         AssemblyBuilder objects. Factored out custom attribute creation into
14321         a separate function.
14322         (create_custom_attr): new function to create custom attributes.
14323
14324 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
14325
14326         * Makefile.am: Got tired of typing the full pathname to pedump.
14327         Until there is another option, am installing this.
14328
14329 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
14330
14331         * class.c (class_compute_field_layout): always set field->parent 
14332         (mono_ldtoken): use mono_defaults.fieldhandle_class;
14333
14334 2003-02-11  Dick Porter  <dick@ximian.com>
14335
14336         * threads-types.h:
14337         * monitor.c: Rewrote Monitor, making lock much faster and
14338         Pulse/Wait work as specified.  Also uses much fewer handles, and only
14339         creates them as needed.
14340
14341         * exception.c: Added SynchronizationLockException
14342
14343         * threads.c: Deleted old Monitor implementation.  The new one is
14344         in a new file.
14345
14346 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14347
14348         * class.c: handled TypedReference type code. Set the correct size for
14349         class data. Setup interface_offsets for interface classes, too.
14350
14351 2003-02-09  Martin Baulig  <martin@ximian.com>
14352
14353         * debug-mono-symfile.h: Reflect latest symbol writer changes.
14354
14355 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
14356
14357         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
14358         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
14359         * object.c: fixed mono_object_get_virtual_method () for interfaces.
14360         * verify.c: check for code that runs after the end of the method.
14361
14362 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14363
14364         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
14365         "System.Math::Round2".
14366         * sysmath.h: Added Floor, Round and Round2 definitions.
14367         * sysmath.c: Modified certain functions that were not 100% compliant
14368         with MS.NET (math precision) and added the implementation of Floor,
14369         Round and Round2.
14370
14371 2003-02-07  Martin Baulig  <martin@ximian.com>
14372
14373         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
14374
14375 2003-02-07  Martin Baulig  <martin@ximian.com>
14376
14377         * debug-mono-symfile.c: Reflected latest symwriter changes.
14378         (mono_debug_create_mono_symbol_file): Removed.
14379         (mono_debug_open_mono_symbol_file): Take an argument which
14380         specifies whether to create a dynamic symbol file.
14381
14382 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
14383
14384         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
14385
14386 2003-02-05  Martin Baulig  <martin@ximian.com>
14387
14388         * reflection.c (mono_image_build_metadata): Make this public,
14389         protect it against being called multiple times, don't create
14390         resources and don't build the compressed metadata here.
14391         (mono_image_create_pefile): Do this here.
14392
14393         * icall.c
14394         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
14395
14396 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14397
14398         * socket-io.c: fixed bug #36322.
14399
14400 2003-02-06  Piers Haken <piersh@friskit.com>
14401
14402         * appdomain.[ch]:
14403         * class.h:
14404         * debug-mono-symfile.c:
14405         * icall.c:
14406         * loader.c:
14407         * mono-config.c:
14408         * monosn.c:
14409         * reflection.c:
14410         * socket-io.c: warning cleanups
14411
14412 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
14413
14414         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
14415         function. works like remoting invoke, but does a check for the Proxy first.
14416
14417 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
14418
14419         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
14420
14421 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
14422
14423         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
14424         array of pointers.
14425         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
14426         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
14427
14428         * object.c (mono_store_remote_field_new): used by the new jit
14429         instead of mono_store_remote_field
14430         (mono_load_remote_field_new): used by the new jit
14431         instead of mono_load_remote_field
14432
14433 2003-02-05  Patrik Torstensson
14434
14435         * appdomain.c: changed unload to take the domain id instead
14436         of domain
14437         
14438         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
14439
14440
14441 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14442
14443         * appdomain.c: don't look for assemblies in ApplicationBase if
14444         PrivateBinPathProbe is set.
14445
14446 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14447
14448         * object.c: make the first argument in main_args contain the absolute
14449         path to the assembly. Fixes bug #37511.
14450
14451 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14452
14453         * icall.c: get correct UTC offset for countries not using daylight
14454         time saving. Fixes bug #30030.
14455
14456 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14457
14458         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
14459         and 1 are the family).
14460
14461 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
14462
14463         * icall.c (ves_icall_InternalExecute): removed wrong assertion
14464
14465         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
14466
14467 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
14468
14469         * reflection.c: added support for SignatureHelper tokens, which is
14470         needed by the Calli opcode.
14471
14472         * reflection.h: track changes to SignatureHelper class.
14473
14474         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
14475
14476 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14477
14478         * appdomain.c: fixed loading assemblies from PrivateBinPath.
14479
14480 2003-02-03  Patrik Torstensson
14481         * appdomain.[c|h], domain.c : 
14482          - Added support for getting a domain via domain id
14483          - Support for setting and getting domain from System.AppDomain 
14484            (used in cross appdomain channel)
14485          - Added support for get/set for a MonoAppContext on a thread 
14486            (Context class in System.Runtime.Remoting.Contexts),
14487          - Removed hack in Get/SetData and ExecuteAssembly.
14488         
14489         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
14490         the managed world to get control when a proxy is created.
14491
14492         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
14493         
14494 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
14495
14496         * icall.c
14497         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14498         Populate the codebase field as well.
14499
14500 2003-02-02  Martin Baulig  <martin@ximian.com>
14501
14502         * debug-mono-symfile.c
14503         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
14504         (mono_debug_symfile_add_method): Allow interncalls.
14505
14506 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14507
14508         * icall.c: throw parse exception if strtod fails or the string is empty.
14509
14510 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
14511
14512         * marshal.c: handle object type separately from defined
14513         class types.
14514
14515 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
14516
14517         * marshal.c: handle NATIVE_LPSTR for strings when it's
14518         explicitly specified.
14519
14520 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
14521
14522         * reflection.c, reflection.h, icall.c: setup the reflection
14523         handle cache for ModuleBuilders and AssemblyBuilders.
14524
14525 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
14526
14527         * reflection.c (reflection_methodbuilder_to_mono_method): set
14528         pinvoke flag
14529
14530 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14531
14532         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
14533
14534 2003-01-29  Dick Porter  <dick@ximian.com>
14535
14536         * threads.c: No need for the fake_thread kludge now that Thread
14537         doesn't run a class constructor
14538         
14539 2003-01-29  Dick Porter  <dick@ximian.com>
14540
14541         * threads.c: Use g_direct_hash instead of the rather bogus
14542         g_int_hash
14543
14544 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
14545
14546         * marshal.c (mono_marshal_get_native_wrapper): add check for null
14547         (fix pinvoke12.exe)
14548         (mono_marshal_get_struct_to_ptr): generate valid IL code
14549         (mono_marshal_get_ptr_to_struct): generate valid IL code
14550         (*): correctly set sig->pinvoke, we need to memdup the signature
14551         to do that
14552
14553 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14554
14555         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
14556         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
14557
14558 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
14559
14560         * profiler.c: provide more callers information.
14561
14562 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
14563
14564         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
14565
14566         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
14567
14568         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
14569
14570 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
14571
14572         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
14573         exception instead of going into an infinite loop on dates which it 
14574         can't yet handle.
14575
14576         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
14577         out-of-range exception if needed.
14578
14579         * class.c (mono_class_setup_vtable): allow a virtual method to provide
14580         an implementation for an interface method and to override an inherited
14581         method at the same time. 
14582         Imagine a scenario when a virtual method is used to override a
14583         virtual abstract method in a parent class, and this same method 
14584         provides an implementation for an method inherited from an interface. 
14585         In this case, the interface resolution code will set im->slot, which 
14586         means that the virtual method override pass will skip this method 
14587         which means a pointer to the abstract method inherited from the parent
14588         will remain in the vtable of this non-abstract class.
14589
14590         * class.c: (mono_class_setup_vtable): continue search for a real 
14591         method if only an abstract method is found.     
14592
14593 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
14594
14595         * reflection.c: add size to encoding for ByValStr and ByValArray
14596         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
14597
14598 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
14599
14600         * class.c (mono_class_setup_vtable): pass the override info as an
14601         argument.
14602
14603         * class.c (mono_class_setup_vtable): set the slot of overriding methods
14604         correctly.
14605         
14606         * reflection.c (ensure_runtime_vtable); add support for method 
14607         overrides.
14608         
14609 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
14610
14611         * reflection.c (resolution_scope_from_image): Hack to work to work with
14612         dynamic assemblies.
14613
14614         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
14615         added a 'force_ref' argument to force this function to allways return 
14616         a TypeRef. This is needed by mono_image_get_memberref_token ().
14617         
14618 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
14619
14620         * reflection.c (mono_image_get_type_info): interfaces really don't have
14621         a parent.
14622
14623         * reflection.c (mono_image_basic_init): fill out missing fields of
14624         image structure.
14625
14626         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
14627         dynamic assemblies. This is required so dynamic assemblies show up in
14628         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
14629         Type::GetType() etc. This is consistent with MS behaviour.
14630
14631         * image.c image.h reflection.c: add newly created classes to the name 
14632         cache so mono_class_get () will find them.      
14633
14634 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
14635
14636         First part of changes to get IKVM.NET running under mono.
14637         
14638         * appdomain.h, appdomain.c: added new function 
14639         mono_domain_try_type_resolve() which will emit TypeResolve events. 
14640         This function will call AppDomain::DoTypeResolve to do the actual work.
14641
14642         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
14643         moved existing code dealing with dynamic tokens to a new function 
14644         called mono_reflection_lookup_dynamic_token (). This function will 
14645         raise TypeResolve events when appropriate. Since reflection.c is not 
14646         part of libmetadata, a new hook function called 
14647         mono_lookup_dynamic_token() is added to class.c which will call this.
14648
14649         * assembly.h assembly.c: make the invoke_load_hook function public,
14650         so it can be called for dynamic assemblies.
14651
14652         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
14653
14654         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
14655         type isn't found.
14656
14657         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
14658         MonoGHashTable, since it contains pointers to objects which the GC 
14659         needs to track.
14660
14661         * assembly.c (search_loaded): remove unused variable.
14662         
14663 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
14664
14665         * object.c: fixed issue exposed by gcc-generated IL programs
14666         that use RVA data for pointers.
14667
14668 2003-01-25  Martin Baulig  <martin@ximian.com>
14669
14670         * threads.c (start_wrapper): Moved the initialization of
14671         `start_func' above the mono_new_thread_init() call to which we
14672         pass it as argument.
14673
14674 2003-01-24  Martin Baulig  <martin@ximian.com>
14675
14676         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
14677         the MonoThread pointer.
14678
14679 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
14680
14681         * icall.c: Rename `PowImpl' to Pow.
14682
14683 2003-01-23  Dick Porter  <dick@ximian.com>
14684
14685         * threads.c (start_wrapper): Create a Thread object if needed, so
14686         the Main() thread can do the class initialisation in a subthread
14687         that has been set up to allow managed code execution.
14688
14689         Pass the thread ID instead of the MonoThread pointer to the thread
14690         start and attach callbacks.  This change is required, because the
14691         jit thread start callback must be called _before_ the Thread
14692         object can be created.
14693         
14694         (mono_thread_init): Removed much object creation code that is no
14695         longer needed.  No managed code is called from here now.
14696
14697         * object.c (mono_runtime_exec_managed_code): Create a subthread
14698         for Main, and call back to the runtime to use it.
14699         Set the exit code when Main exits.
14700
14701         * gc.c: Make sure domain finalisation happens in a subthread.
14702         Re-enable threaded GC, fixing bug 31333 (again).
14703
14704         * environment.c: System.Environment internall calls (so far just
14705         ExitCode is here, the others are still in icall.c)
14706
14707         * appdomain.c (mono_runtime_cleanup): All threads running managed
14708         code should have finished before mono_runtime_cleanup() is
14709         reached, so no need to clean up threads.
14710
14711 2003-01-22  Martin Baulig  <martin@ximian.com>
14712
14713         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
14714         `gpointer func' arguments.      
14715         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
14716         but added `MonoThread *thread' argument.
14717         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
14718
14719         * threads.c (mono_new_thread_init): Added `gpointer func' argument
14720         and pass it to the mono_thread_start_cb callback.
14721         (mono_install_thread_callbacks): New public function to install a
14722         set of callbacks which are set by the debugger.
14723         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
14724
14725 2003-01-22  Martin Baulig  <martin@ximian.com>
14726
14727         * Makefile.am: Install debug-mono-symfile.h.
14728
14729 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
14730
14731         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
14732
14733 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
14734
14735         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
14736         * class.c (mono_ptr_class_get): correctly set access levels of pointers
14737         (mono_array_class_get): correctly set access levels of arrays
14738
14739 2003-01-20      Patrik Torstensson
14740         * image.h (MonoAssemblyName): changed major, minor, build, revision
14741         from signed to unsigned.
14742
14743 2003-01-20  sean kasun <skasun@azstarnet.com>
14744
14745         * reflection.c (load_cattr_value): Now this handles
14746         MONO_TYPE_SZARRAY.  Fixes bug #35629
14747
14748 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
14749
14750         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
14751         integer value
14752
14753 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14754
14755         * decimal.c: fixed bug #26056.
14756
14757 2003-01-17  Martin Baulig  <martin@ximian.com>
14758
14759         * gc.c: Raise an ExecutionEngineException instead of using g_error().
14760
14761 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14762
14763         * exception.[ch]:
14764         (mono_get_exception_type_initialization): new function.
14765
14766         * object.c: throw a TypeInitializationException when an exception is
14767         thrown invoking the class constructor.
14768
14769 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14770
14771         * reflection.c: fixed attribute reading.
14772
14773 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14774
14775         * icall.c:
14776         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
14777         provided, look for the type in the calling assembly and then in
14778         mscorlib; if the assembly name is provided, only try that one.
14779
14780 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14781
14782         * object.c: register the vtable before there is a chance it's
14783         queried again recursively.
14784
14785 2003-01-13  Duncan Mak  <duncan@ximian.com>
14786
14787         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
14788         gc-internal.h. 
14789         
14790 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
14791
14792         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
14793
14794 2003-01-11  Martin Baulig  <martin@ximian.com>
14795
14796         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
14797         this to 20 for the release.
14798
14799 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
14800
14801         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
14802
14803         * loader.c (mono_method_get_marshal_info): bug fix
14804
14805         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
14806         structures with explicit layout
14807
14808 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14809
14810         * profiler.c: made the output more readable (and sorted). 
14811         Added caller information for the allocation profiler.
14812
14813 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
14814
14815         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
14816
14817 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14818
14819         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
14820         to get value types.
14821         
14822 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
14823
14824         * object.c, profiler.h, profiler.c, profiler-private.h:
14825         Added object allocation profiler.
14826
14827 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
14828
14829         * reflection.h, reflection.c: handle global methods.
14830         Compress blob entries.
14831
14832 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
14833
14834         * marshal.c: fix compilation.
14835
14836 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
14837
14838         * loader.c (mono_method_get_marshal_info): impl.
14839
14840         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
14841
14842 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14843
14844         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
14845         for reference types.
14846
14847 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
14848
14849         * loader.c: fixed off by one error in loaded parameter names.
14850
14851 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
14852
14853         * marshal.c (mono_marshal_get_icall_wrapper): like
14854         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
14855         instead of a MonoMethod.
14856
14857 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14858
14859         * decimal.c: fixed bug #36537.
14860
14861 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
14862
14863         * marshal.c: throw a missing method exception if a
14864         P/Invoke method is not found.
14865
14866 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14867
14868         * icall.c: allow a null this for constructors.
14869
14870 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14871
14872         * icall.c: raise the proper exceptions if the arguments to the
14873         internal Invoke are incorrect.
14874
14875 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
14876
14877         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
14878
14879 2003-01-03  Martin Baulig  <martin@ximian.com>
14880
14881         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
14882
14883 2002-12-31  Martin Baulig  <martin@ximian.com>
14884
14885         * debug-mono-symfile.c: Completely rewrote the type section.
14886         Instead of using individual malloc()ed fields, we use one big
14887         continuous memory area and offsets into this area.
14888         See the comments in the source code for details.
14889
14890 2002-12-30  Martin Baulig  <martin@ximian.com>
14891
14892         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
14893
14894 2002-12-30  Martin Baulig  <martin@ximian.com>
14895
14896         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
14897         line number table in this data blob instead of using an external
14898         pointer.
14899
14900 2002-12-28  Martin Baulig  <martin@ximian.com>
14901
14902         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
14903
14904 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
14905
14906         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
14907         as a boxed return type.
14908
14909 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
14910
14911         * appdomain.c
14912         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
14913         g_build_filename to properly get separators on the filename created.
14914
14915         * object.h: Small change, introduce MonoMarshalByRefObject to
14916         track the layout of that structure in the C# universe as we make
14917         changes there.
14918
14919 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
14920
14921         * object.c: removed assert to allow static fields on interfaces.
14922         * loader.c: a TypeSpec may be used for any type, not just arrays.
14923
14924 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
14925
14926         * class.c, class.h: added mono_class_array_element_size ().
14927         Ignore static methods in interfaces.
14928
14929 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14930
14931         * threads.c: fixed the build under cygwin.
14932
14933 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
14934
14935         * reflection.c: handle nullref constants. Allocate keys for
14936         reflection handles with the GC.
14937
14938 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14939
14940         * threads.c, threads.h: added mono_thread_get_abort_signal()
14941         to get a suitable signal for thread abort.
14942
14943 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14944
14945         * metadata.c: fix handling of ExportedType table.
14946
14947 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14948
14949         * icall.c: added WriteWindowsDebugString internal call.
14950
14951 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14952
14953         * reflection.h: added fields to match C# implementation.
14954
14955 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14956
14957         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
14958
14959 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
14960
14961         * gc.h, gc-internal.h: Rename header for GC internal calls to
14962         gc-internal.h from gc.h as to not clash with Boehm GC having its
14963         header installed as <gc.h> in outside include paths.
14964         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
14965         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
14966
14967 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14968
14969         * icall.c: assign minor, build and revision in FillName.
14970
14971 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
14972
14973         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
14974         Added support for running code generated by Reflection.Emit.
14975
14976 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14977
14978         * appdomain.c: check for NULL argument in LoadFrom.
14979
14980 2002-12-10  Dick Porter  <dick@ximian.com>
14981
14982         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
14983
14984 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14985
14986         * appdomain.c: fix buglet when building exe file name.  Handle full
14987         assembly name (needed after latest changes to AssemblyName).
14988         * image.c:
14989         (mono_image_close): free some hashtables.
14990
14991 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
14992
14993         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
14994         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
14995         on some systems (redhat 7.3) 
14996
14997 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
14998
14999         * threads.c: delete the critical section of a sync block,
15000         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
15001
15002 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
15003
15004         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
15005
15006 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15007
15008         * appdomain.[ch]: handle the assembly preload event to try loading the
15009         assemblies using the paths we have in the current domain.
15010
15011         * assembly.[ch]: created an assembly preload hook that is called to try
15012         loading the assembly by other means that the ones provided here.
15013
15014         * domain.c: initialize the domain search path.
15015
15016         From now on, assemblies (TODO: except corlib and System) are loaded
15017         according to these rules when using mono_assembly_load ():
15018
15019                 1. It tries to load the assembly from the ApplicationBase
15020                 of the current domain appending .dll and .exe (TODO: have to
15021                 try loading from name/name.dll and name/name.exe).
15022
15023                 2. It tries the search path specified in PrivateBinPath for the
15024                 current domain (if any).
15025
15026                 3. Previous behavior.
15027
15028 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
15029
15030         * icall.c: implemented GetInterfaceMap() related icall.
15031         * domain.c, loader.h: load MethodInfo in mono_defaults.
15032
15033 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
15034
15035         * gc.c: disable the finalizer thread for now, untill all the issues
15036         with it are resolved.
15037
15038 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15039
15040         * string-icalls.c: handle embedded nulls in string ctor when the
15041         length is specified.
15042
15043 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15044
15045         * class.c: look for explicit interface implementation in parent
15046         classes, too.
15047
15048 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
15049
15050         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
15051
15052 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
15053
15054         * gc.c: protect handles with a critical section.
15055
15056 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15057
15058         * icall.c:
15059         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
15060         parameters. If no assembly specified, try getting the type from all
15061         the assemblies in the current domain, else, load the assembly and get
15062         the type from it.
15063
15064 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15065
15066         * marshal.c: applied patch from Aleksey Demakov that fixes
15067         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
15068
15069 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15070
15071         * icall.c: fixed get_location.
15072
15073 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
15074
15075         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
15076         declarations to make it work with older gcc. 
15077
15078         * loader.c (mono_get_method): set signature->pinvoke for native calls
15079
15080 2002-11-20  Dick Porter  <dick@ximian.com>
15081
15082         * threads.c (mono_thread_init): Set the main thread's handle
15083
15084 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
15085
15086         * gc.c: allow compilation without GC support. Changed to match the
15087         mono coding style.
15088
15089 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15090
15091         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
15092
15093 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
15094
15095         * reflection.c: set a public key token on the core assemblies.
15096
15097 2002-11-18  Dick Porter  <dick@ximian.com>
15098
15099         * threads.c: Split out some thread initialisation so that other
15100         files can set the start callback function.
15101
15102         * gc.c: Run finalisers in a separate thread, to avoid stack
15103         overflow.  Fixes bug 31333.
15104
15105         * appdomain.c: Set up GC finalisation thread.
15106
15107         * reflection.c: 
15108         * object.c: 
15109         * domain.c: Use gc.h macros for GC_malloc
15110         
15111 2002-11-15  Dick Porter  <dick@ximian.com>
15112
15113         * threadpool.c: 
15114         * threads.c:
15115         * appdomain.c: Removed mono_runtime_init_with_attach(),
15116         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
15117         merging the extra parameter with the existing function.  Removed
15118         unneeded code in mono_thread_attach().
15119
15120 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
15121
15122         * image.c (mono_image_loaded_by_guid): a method to get loaded
15123         images by guid. 
15124         (load_metadata_ptrs): we store the guid as string.
15125
15126 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
15127
15128         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
15129
15130         * metadata.c (mono_guid_to_string): imported method form Zoltan
15131         Varga (slightly modified)
15132
15133         * assembly.c (mono_assembly_open): load precompiled code
15134
15135         * loader.h (MonoMethod): we store the method token for use in the
15136         aot compiler. 
15137
15138 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15139
15140         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
15141         the hook function called when an assembly is loaded.
15142         
15143         * domain.c: Modified file.
15144         (mono_domain_assembly_load): removed hash table insertion of assemblies.
15145
15146         Fixes bug #33196.
15147
15148 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
15149
15150         * reflection.c: Map PEFileKind to the value expected by the WinNT
15151         image loader. 
15152
15153 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15154
15155         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
15156         Read until the buffer is filled completely.
15157
15158 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15159
15160         * icall.c: implemented MonoType.InternalGetEvent ().
15161
15162 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15163
15164         * appdomain.c: implemented InitAppDomainSetup. Delayed
15165         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
15166         the entry_assembly.
15167
15168         * assembly.c: base_dir is now an absolute path ending with
15169         G_DIR_SEPARATOR.
15170
15171         * icall.c: modified get_location according to the above changes.
15172
15173         * object.c: init AppDomain.SetupInformation for the default domain after
15174         we have the entry assembly.
15175
15176         * domain.c: when unloading a domain, setup = NULL.
15177
15178 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
15179
15180         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
15181
15182 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
15183
15184         * object.h, object.c: introduced mono_object_get_virtual_method ()
15185         to lookup the method invoked on an object when a callvirt is done on
15186         a method.
15187         * icall.c: make MethodInfo::Invoke() always do a virtual call.
15188
15189 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15190
15191         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
15192         current domain when loaded an assembly and failed to load it.
15193
15194         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
15195
15196 2002-10-31  Dick Porter  <dick@ximian.com>
15197
15198         * icall.c: 
15199         * file-io.h: 
15200         * file-io.c: Return the error status in a parameter, as the
15201         GetLastError() value has long since been blown away if we try and
15202         look it up in a subsequent internal call invocation.  Delete the
15203         GetLastError() internal call, because it's useless.
15204
15205 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
15206
15207         * class.[ch]: added cast_class to fix bug 29517
15208
15209 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
15210
15211         * marshal.c: create valid IL code in the filter clause:
15212         the new JIT is less forgiving:-)
15213
15214 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15215
15216         * icall.c: removed get_property internal call.
15217
15218 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
15219
15220         * appdomain.h domain.c: Added an ID to appdomains.
15221         
15222         * threads.c threads.h icall.c: Implement icall
15223         Thread:GetDomainID(), and remove unused icall 
15224         CurrentThreadDomain_internal.
15225
15226 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15227
15228         * icall.c: Don't recurse through the base types in GetConstructor.
15229         Fixes bug #32063. 
15230
15231 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15232
15233         * mempool.h, mempool.c: added mono_mempool_empty() and
15234         mono_mempool_stats().
15235
15236 2002-10-23  Dick Porter  <dick@ximian.com>
15237
15238         * file-io.c: 
15239         * file-io.h: 
15240         * icall.c: Added MonoIO.GetFileType internal call
15241
15242 2002-10-17  Dick Porter  <dick@ximian.com>
15243
15244         * appdomain.c (mono_runtime_cleanup): Don't signal the async
15245         delegate semaphore before waiting for all threads to finish,
15246         because new threads can also call async delegates.  Fixes bug
15247         32004.
15248
15249         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
15250         of 3 seconds, in case another async job is queued.  (This part is
15251         needed because the bug fix reintroduced the 3s exit lag.)  This
15252         makes the mono_runtime_shutdown flag superfluous.
15253
15254 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15255
15256         * reflection.c: include ehader size in method section headers.
15257         Really check for suplicated modules entries.
15258
15259 2002-10-17  Martin Baulig  <martin@gnome.org>
15260
15261         * debug-mono-symfile.c: Added back support for locals.
15262
15263 2002-10-14  Martin Baulig  <martin@gnome.org>
15264
15265         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
15266         MONO_TYPE_VOID.
15267
15268 2002-10-14  Martin Baulig  <martin@gnome.org>
15269
15270         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
15271         mono_class_get() instead of looking in the class cache. 
15272
15273 2002-10-13  Martin Baulig  <martin@gnome.org>
15274
15275         * debug-mono-symfile.c: Set version number to 28, include the
15276         signature in method names.
15277
15278 2002-10-13  Martin Baulig  <martin@gnome.org>
15279
15280         * debug-mono-symfile.h: Set version number to 27.
15281
15282 2002-10-11  Martin Baulig  <martin@gnome.org>
15283
15284         * gc.c: Don't register/unregister NULL pointers as disappearing links.
15285
15286 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15287
15288         * metadata.c, metadata.h: added helper function to allocate signatures.
15289
15290 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15291
15292         * icall.c: added internal call to get the location of machine.config.
15293
15294 2002-10-08  Martin Baulig  <martin@gnome.org>
15295
15296         * debug-mono-symfile.c: Ignore classes with a pending init for the
15297         moment.
15298
15299 2002-10-03  Dick Porter  <dick@ximian.com>
15300
15301         * threads.c: Freebsd pthread_t is a pointer
15302
15303 2002-10-03  Dick Porter  <dick@ximian.com>
15304
15305         * socket-io.c: Implemented GetHostName_internal
15306
15307 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15308
15309         * mono-config.c:
15310         (mono_config_parse_file): don't leak the text.
15311
15312 2002-10-02  Martin Baulig  <martin@gnome.org>
15313
15314         * debug-mono-symfile.c: Added support for methods.
15315
15316 2002-10-01  Martin Baulig  <martin@gnome.org>
15317
15318         * debug-mono-symfile.c: Don't emit methods and line numbers for
15319         the dynamic symbol file, just write the type table.  We can easily
15320         have an external helper program which creates a symbol file for an
15321         IL file.        
15322
15323 2002-10-01  Dick Porter  <dick@ximian.com>
15324
15325         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
15326         Only add the handle to the cleanup array when we're about to
15327         launch the thread.  Bug 31425 deadlocked when the test was run on
15328         mono under w32.
15329
15330 2002-10-01  Martin Baulig  <martin@gnome.org>
15331
15332         * debug-mono-symfile.c: Added support for properties.
15333
15334 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15335
15336         * reflection.c: unaligned store fix from Mark Crichton
15337         <crichton@gimp.org>.
15338
15339 2002-09-27  Martin Baulig  <martin@gnome.org>
15340
15341         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
15342         New interncall.
15343
15344 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
15345
15346         * assembly.h, assembly.c: use a sane API to hook into the assembly
15347         loading process instead of a useless special-purpouse hack
15348         (ngen needs a hook, too, for example).
15349
15350 2002-09-27  Dick Porter  <dick@ximian.com>
15351
15352         * threads.c (mono_thread_init): Call GetCurrentProcess() so
15353         io-layer can set up some process handle info.  Not needed on w32,
15354         but doesn't hurt either.
15355
15356         * process.c: Pass the program name in the second parameter to
15357         CreateProcess, so the path is searched.  Include the working
15358         directory. Implemented process name, process enumeration, and some
15359         process detail internal calls.
15360         
15361         * icall.c: Added internal calls for process lookup, and some
15362         process details
15363
15364 2002-09-26  Martin Baulig  <martin@gnome.org>
15365
15366         * assembly.c (mono_install_open_assembly_hook): New global
15367         function to install a function to be invoked each time a new
15368         assembly is loaded.
15369         (mono_assembly_open): Run this callback function if set.
15370
15371         * debug-mono-symfile.c: Put back line numbers for the dynamic
15372         symbol file and also record the .il file as source file.  This
15373         allows us to install the temporary symbol file as `file.dbg' just
15374         like a compiler-generated one.
15375
15376 2002-09-26  Nick Zigarovich <nick@chemlab.org>
15377
15378         * Corrected typo in gc.c (BOHEM vs BOEHM).
15379
15380 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15381
15382         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
15383         GetProperties. Also avoid calling g_slist_length in GetProperties and
15384         GetMethods.
15385
15386 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15387
15388         * reflection.c: avoid unaligned stores (bug spotted by
15389         Mark Crichton  <crichton@gimp.org>).
15390
15391 2002-09-25  Martin Baulig  <martin@gnome.org>
15392
15393         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
15394         instead of guint64 for addresses and added prologue/epilogue info.
15395
15396 2002-09-25  Martin Baulig  <martin@gnome.org>
15397
15398         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
15399         store line number info.  For the dynamic symbol file, we only need
15400         to provide the JIT generated dynamic line number info for the dynamic
15401         symbol file.
15402
15403 2002-09-25  Martin Baulig  <martin@gnome.org>
15404
15405         * debug-mono-symfile.h: Incremented version number.
15406
15407 2002-09-24  Martin Baulig  <martin@gnome.org>
15408
15409         * class.c (mono_debugger_class_init_func): New global function
15410         pointer variable.
15411         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
15412         call it.
15413
15414         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
15415         function.  This is called via the mono_debugger_class_init_func
15416         hook to add all types to the dynamic type table.
15417         (ves_icall_MonoDebugger_GetType): New interncall to get a class
15418         from its metadata token.
15419
15420         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
15421         New interncall for the debugger.
15422
15423 2002-09-24  Nick Drochak <ndrochak@gol.com>
15424
15425         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
15426         before using it in case it is null.
15427         
15428 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15429
15430         * metadata.c: allow custom modifiers in local var signatures
15431         (bug spotted by Zoltan Varga).
15432
15433 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15434
15435         * class.c: deal with the <Module> class that may have a NULL vtable.
15436         Eliminate warnings.
15437
15438 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15439
15440         * image.c, image.h: more strong name helpers.
15441         * monosn.c: more work: convert pem keys to cryptoapi format.
15442
15443 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15444
15445         * string-icalls.c: speedup IndexOf.
15446
15447 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15448
15449         * icall.c: updates from Zoltan.2.Varga@nokia.com.
15450
15451 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15452
15453         * icall.c: cleanup: use mono_object_domain ().
15454
15455 2002-09-23  Martin Baulig  <martin@gnome.org>
15456
15457         * debug-mono-symfile.c: Improved type support.
15458
15459 2002-09-22  Martin Baulig  <martin@gnome.org>
15460
15461         * debug-mono-symfile.c: Added support for reference types and strings.
15462
15463 2002-09-22  Martin Baulig  <martin@gnome.org>
15464
15465         * debug-mono-symfile.c: Started to work on the type table.
15466
15467 2002-09-21  Martin Baulig  <martin@gnome.org>
15468
15469         * debug-mono-symfile.c: Largely reworked the symbol table format.
15470         The symbol table is now incrementally updated each time a new
15471         method is added.  We're now also using our own magic and version
15472         so that you don't need to recompile all your classes if the
15473         dynamic table changes.
15474         (mono_debug_update_mono_symbol_file): Removed.
15475         (mono_debug_symfile_add_method): New function to add a method.
15476
15477 2002-09-21  Martin Baulig  <martin@gnome.org>
15478
15479         * icall.c
15480         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
15481         New interncall.
15482
15483         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
15484         New interncall to get a method from its metadata token.
15485
15486 2002-09-21  Martin Baulig  <martin@gnome.org>
15487
15488         * debug-mono-symfile.c: Create type table.
15489
15490 2002-09-20  Martin Baulig  <martin@gnome.org>
15491
15492         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
15493
15494 2002-09-20  Martin Baulig  <martin@gnome.org>
15495
15496         * debug-mono-symfile.c: Provide information about params and locals.
15497
15498 2002-09-20  Martin Baulig  <martin@gnome.org>
15499
15500         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
15501         New interncall.
15502
15503         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
15504         interncall to get a method from its metadata token.
15505
15506 2002-09-20  Martin Baulig  <martin@gnome.org>
15507
15508         * debug-mono-symfile.c: Added a few checks for method->header
15509         being non-NULL.  This should never happen, but for the moment
15510         let's use a g_warning() rather than a g_assert().
15511
15512 2002-09-19  Mark Crichton  <crichton@gimp.org>
15513
15514         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
15515         even if support for it isn't present.  Added an #ifdef to fix this.
15516
15517         * socket-io.c: Added checks back for Solaris support.
15518
15519 2002-09-19  Martin Baulig  <martin@gnome.org>
15520
15521         * debug-mono-symfile.c (read_string, write_string): Reflect latest
15522         changes in the symbol file format.
15523
15524 2002-09-18  Martin Baulig  <martin@gnome.org>
15525
15526         * debug-mono-symfile.c: Set version number to 21.
15527
15528 2002-09-18  Dick Porter  <dick@ximian.com>
15529
15530         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
15531         on netbsd.  Fixes bug 30051.
15532
15533 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15534
15535         * reflection.c:
15536         (set_version_from_string): little fix.
15537
15538 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15539
15540         * monosn.c, Makefile.am: added strong name utility.
15541         * reflection.h, reflection.c: implemented delayed signing,
15542         locale, version and hash id assembly attributes.
15543
15544 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
15545
15546         * loader.c, metadata.c: load param attributes in signatures.
15547
15548 2002-09-16  Martin Baulig  <martin@gnome.org>
15549
15550         * debug-mono-symfile.c: Added string table with all method names.
15551
15552 2002-09-14  Martin Baulig  <martin@gnome.org>
15553
15554         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
15555         fast method lookup.
15556
15557 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
15558
15559         * reflection.c: record the public key token of referenced assemblies.
15560
15561 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15562
15563         * image.c, image.h: added functions to get the strong name and the
15564         public key of an assembly.
15565         * pedump.c: use them.
15566
15567 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
15568
15569         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
15570
15571 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
15572
15573         * marshal.c (mono_marshal_get_managed_wrapper): Added
15574         MONO_TYPE_BOOLEAN 
15575
15576 2002-09-11  Martin Baulig  <martin@gnome.org>
15577
15578         * gc.c: Call GC_unregister_disappearing_link() on all links when
15579         finalizing them, this is necessary to aviod a crash in boehm's
15580         finalize handler.
15581
15582 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15583
15584         * gc.c: handle GetTarget for finalized objects spotted and fixed by
15585         nick@chemlab.org.
15586
15587 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
15588
15589         * icall.c: implemented MonoType::Module.
15590         * reflection.c, reflection.h: mono_module_get_object () from
15591         Tomi Pakarinen <tomi.pakarinen@welho.com>.
15592
15593 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
15594
15595         * icall.c: ignore overridden methods in GetMethods ().
15596         Fix for FieldInfo::SetValue().
15597         * object.c: handle float/double in runtime invoke.
15598
15599 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
15600
15601         * object.c: allow a constructor to be called again on an object.
15602
15603 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15604
15605         * class.h, class.c: move field layout code to it's own function and
15606         export it. Get an interface id earlier. Move fields in MonoClass
15607         so they are more cache friendly and align the bitfields.
15608         * loader.c: temporary handle get_param_names() for a runtime method.
15609         * reflection.c, reflection.h: more code to handle runtime creation of
15610         types.
15611
15612 2002-09-09  Martin Baulig  <martin@gnome.org>
15613
15614         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
15615         signature with the pinvoke field being set for the actual call.
15616
15617 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15618
15619         * icall.c: removed some unused icalls. Start of map of glib charsets
15620         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
15621
15622 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15623
15624         * debug-helpers.c: break infinite loop (found and fixed by
15625         Holger Arnold <harnold@gmx.de>).
15626
15627 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
15628
15629         * icall.c: target may be null in create_delegate.
15630
15631 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15632
15633         * marshal.c: handle a boolean return type.
15634
15635 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15636
15637         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
15638
15639 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15640
15641         * gc.c: fix weakreferences.
15642
15643 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
15644
15645         * icall.c: added icall to get default codepage.
15646
15647 2002-09-03  Dick Porter  <dick@ximian.com>
15648
15649         * threads.h: 
15650         * threads.c: Use MonoThread instead of MonoObject where
15651         apropriate.
15652
15653         Store running thread objects in a hash table, so that we have all
15654         the info to hand when waiting for them to finish
15655         (means we don't need OpenThread() any more, so mingw builds should
15656         be fully functional again.)
15657
15658         * verify.c:
15659         * object.h: Added thread ID to MonoThread
15660
15661 2002-09-03  Martin Baulig  <martin@gnome.org>
15662
15663         * icall.c (System.Reflection.Assembly::get_location): New interncall.
15664
15665 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15666
15667         * icall.c: fixed leak in get_temp_path. Thanks lupus.
15668
15669 2002-09-03  Martin Baulig  <martin@gnome.org>
15670
15671         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
15672         argument to store the end address of the disassembled instruction.
15673
15674         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
15675         here from debug-symfile.h.
15676         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
15677         JIT into this struct.
15678         (MonoSymbolFile): Added `char *image_file' field.
15679         (MonoDebugGetMethodFunc): Removed.
15680         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
15681         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
15682         (mono_debug_find_method): New method.
15683
15684         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
15685         create a full symbol file.
15686         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
15687         and static symbol files.
15688         (mono_debug_find_method): The symbol file keeps an internal method hash,
15689         call this to get a MonoDebugMethodInfo from a MonoMethod.
15690
15691         * debug-symfile.[ch]: Removed.
15692
15693 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
15694
15695         * image.c (do_mono_image_open): Remove linker version check.
15696
15697 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
15698
15699         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
15700         wrappers for instance methods.
15701         
15702 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15703
15704         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
15705
15706 2002-08-28  Dick Porter  <dick@ximian.com>
15707
15708         * Makefile.am: Export HOST_CC for w32 builds
15709
15710 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15711
15712         * file-io.c process.c: MonoString are null terminated, no
15713         need for mono_string_to_utf16() anymore.
15714
15715 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15716
15717         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
15718
15719 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
15720
15721         * icall.c, reflection.h: speedup System.MonoType.
15722
15723 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15724
15725         * reflection.c: allow null as the value of a string argument in
15726         custom attributes constructors.
15727
15728 2002-08-27  Martin Baulig  <martin@gnome.org>
15729
15730         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
15731         `trampoline_address' field.
15732
15733 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
15734
15735         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
15736         check (fixes bug #29486) 
15737
15738 2002-08-27  Martin Baulig  <martin@gnome.org>
15739
15740         * debug-mono-symfile.c: Changed the file format in a way that allows us
15741         open it read-only and to use a specially malloced area for all the
15742         dynamic data.  We can now also generate a symbol file on-the-fly if we're
15743         debugging IL code and there is no MCS generated symbol file for it.
15744
15745 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
15746
15747         * object.c: added a define for a good string and array
15748         creation speedup (not enabled by default because we need to deal with
15749         the synch stuff).
15750
15751 2002-08-26  Martin Baulig  <martin@gnome.org>
15752
15753         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
15754         function to create a dynamic symbol file.  This is used by the
15755         debugger to create a symbol file for IL code on-the-fly.
15756
15757 2002-08-26  Martin Baulig  <martin@gnome.org>
15758
15759         * loader.c (mono_lookup_pinvoke_call): Include the error message
15760         from g_module_error() in the error message.
15761
15762 2002-08-24  Martin Baulig  <martin@gnome.org>
15763
15764         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
15765         function to update the symbol file.  The symbol file is mmap()ed
15766         writable, but private.  This allows us to install the symbol file
15767         together with the assembly.
15768
15769 2002-08-24  Martin Baulig  <martin@gnome.org>
15770
15771         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
15772         but they can read the new symbol file format which mcs is now creating.
15773
15774         * debug-symfile.c (mono_debug_find_source_location): Moved to
15775         debug-mono-symfile.c; this is now operating on the new symbol file.
15776
15777 2002-08-23  Martin Baulig  <martin@gnome.org>
15778
15779         * debug-helpers.c (mono_method_desc_from_method): New function to get
15780         a MonoMethodDesc from a MonoMethod.
15781
15782 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15783
15784         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
15785         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
15786
15787 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
15788
15789         * string-icalls.[ch]: make helper methods static.
15790
15791 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15792
15793         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
15794         types to it and to SetValueInternal.
15795
15796         * object.c: Moved handle_enum label to its proper place. This was the
15797         f... bug! ;-)
15798
15799         This time i compiled mcs and gtk-sharp and they both work.
15800
15801 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15802
15803         * icall.c: reverted partially my previous patch until 
15804         object.c:set_value handles enums correcly.
15805
15806 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15807
15808         * icall.c:
15809         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
15810         (ves_icall_System_Environment_get_MachineName): removed warning when
15811         compiling under cygwin.
15812
15813 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15814
15815         * object.c: fixed field_get_value() for reference types.
15816
15817 2002-08-22  Dick Porter  <dick@ximian.com>
15818
15819         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
15820         Don't free a buffer while it's still needed.  Patch from Jonathan
15821         Liger <Jonathan.liger@wanadoo.fr>
15822
15823 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
15824
15825         * icall.c (ves_icall_System_Environment_get_Platform): Add new
15826         internal call.
15827
15828 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
15829
15830         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
15831         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
15832
15833         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
15834         we call unmanaged code which throws exceptions.
15835
15836 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15837
15838         * appdomain.h: added per-domain entry_assembly.
15839         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
15840         arguments.
15841         * icall.c: Assembly::GetEntryAssembly icall.
15842         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
15843         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
15844
15845 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15846
15847         * appdomain.h, gc.c: added mono_domain_finalize ().
15848
15849 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15850
15851         * object.c:
15852         (mono_print_unhandled_exception): changed g_warning by g_printerr
15853         because g_log has a 1024 characters limit (yeah, i got a big stack
15854         trace). Don't print exception name, that should be in ToString 
15855         returned string.
15856
15857 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15858
15859         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
15860         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
15861
15862 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15863
15864         * object.c:
15865         (mono_print_unhandled_exception): after previous commit, i realized
15866         that MS calls ToString on the exception. I changed this function to
15867         do that. This way we get stack_trace for free.
15868
15869 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15870
15871         * object.c:
15872         (mono_print_unhandled_exception): invoke Message property instead of
15873         getting 'message' field from Exception. Don't allocate memory for
15874         'trace' and 'message' if not needed.
15875
15876 2002-08-18  Dick Porter  <dick@ximian.com>
15877
15878         * unicode.c: Fix asserts to match Encoder.cs checks
15879
15880 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15881
15882         * marshal.c: fix unaligned store issue and a few wrong
15883         opcode argument types.
15884
15885 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15886
15887         * icall.c: added GetUninitializedObjectInternal internal call.
15888
15889 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
15890
15891         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
15892         to the right domain.
15893
15894 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
15895
15896         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
15897
15898         * class.c (class_compute_field_layout): set blittable to false for Strings
15899
15900         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
15901
15902 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15903
15904         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
15905         first chunk of code to create types at runtime. Code to
15906         handle ReflectedType/DeclaringType. Make reflection handles
15907         domain specific.
15908
15909 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
15910
15911         * class.c: set correct name in arrays.
15912
15913 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
15914
15915         * appdomain.c (mono_domain_transfer_object): make it work with
15916         valuetypes. bug fixes.
15917
15918 2002-08-12  Dick Porter  <dick@ximian.com>
15919
15920         * object.h: Rename some parameters to avoid c++ keywords (Patch
15921         from Joseph Wenninger <kde@jowenn.at>)
15922
15923 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
15924
15925         * icall.c: added icall to implement Assembly.GetFile*.
15926
15927 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15928
15929         * reflection.h, reflection.c: code to embed managed resources.
15930
15931 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15932
15933         * class.c: move all the type size stuff into
15934         class_compute_field_layout().
15935
15936 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15937
15938         * class.c: ensure enums have always the correct instance size.
15939         * unicode.c: remove wrong assert.
15940
15941 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
15942
15943         * assembly.c: fix mem corruption issue.
15944         * image.h, image.c: added mono_image_get_resource () to access
15945         managed resources.
15946         * icall.c: implemented Assembly.EntryPoint property and some
15947         Managed Resources related internalcalls.
15948
15949
15950 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15951
15952         * image.c, image.h: impemented mono_image_get_entry_point ().
15953         * appdomain.c: use mono_image_get_entry_point.
15954
15955 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15956
15957         * reflection.c: support the object type argument when loading
15958         custom attributes.
15959
15960 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
15961
15962         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
15963         String as return type.
15964
15965 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
15966
15967         * reflection.c: fix encoding of named args for custom attrs to match
15968         the ms implementation. Read them back when instantiating custom
15969         attributes.
15970
15971 2002-08-02  Radek Doulik  <rodo@ximian.com>
15972
15973         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
15974         by Dietmar as quick fix
15975         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
15976         16 as stack size, used on more places as quick fix before Dietmar
15977         will fix it properly
15978
15979 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15980
15981         * object.h, object.c: added accessors for fields and properties.
15982
15983 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15984
15985         * class.c, class.h: made mono_class_get_field_from_name ()
15986         loop on parent types.
15987         Added mono_class_get_property_from_name ().
15988
15989 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15990
15991         * class.c, class.h: move the code to setup the type vtable in its own
15992         function so that it can be reused also for types created at runtime.
15993         Eliminate the "class" identifier from the header file.
15994         * reflection.c: setup the vtable for enums so that we can create
15995         objects for use in SetConstant ().
15996
15997 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
15998
15999         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
16000         instead of the delegate itself as this pointer (bug #28383)
16001
16002 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
16003
16004         * marshal.c (mono_marshal_get_managed_wrapper): added return type
16005         conversions.
16006
16007 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16008
16009         * loader.c: don't set the pinvoke bit on icalls.
16010
16011 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
16012
16013         * debug-helpers.c (mono_method_full_name): only print a number to
16014         indicate wrapper type (so that the output is more readable in traces).
16015
16016 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
16017
16018         * class.c (mono_class_init): include method override patch from Paolo
16019
16020 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
16021
16022         * icall.c: fixed GetTypeCode().
16023
16024 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
16025
16026         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
16027         use real delegate invoke function to make it work with multicast
16028         delegates (fix bug# 28291).
16029
16030 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16031
16032         * object.c: load constant strings.
16033
16034 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16035
16036         * reflection.c: no magic numbers.
16037         * tabledefs.h: security action enum.
16038
16039 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16040
16041         * assembly.c: fix possible memory corruption.
16042
16043 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16044
16045         * reflection.h, reflection.c: added support for linking resources.
16046         * verify.c: check we have an updated corlib.
16047
16048 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
16049
16050         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
16051         string arrays.
16052         (mono_marshal_string_array): null terminate unmanaged string arrays.
16053         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
16054
16055 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16056
16057         * icall.c: Type.GetType () can now return also types from the
16058         calling assembly.
16059
16060 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16061
16062         * loader.h, loader.c: stack walking support.
16063         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
16064         GetCallingAssembly.
16065
16066 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
16067
16068         * marshal.c: added optimisations for blittable types 
16069
16070         * class.c (mono_array_class_get): do not set blittable attribute on arrays
16071         (mono_class_setup_mono_type): set blittable attribute for single
16072         and double.
16073
16074         * marshal.c (mono_string_utf8_to_builder): impl.
16075         (mono_string_builder_to_utf8): impl.
16076         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
16077
16078 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
16079
16080         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
16081         (mono_marshal_get_managed_wrapper): impl. byref types
16082
16083 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16084
16085         * icall.c:
16086         (search_method): don't display debug message. 
16087
16088 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
16089
16090         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
16091
16092 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16093
16094         * appdomain.c: set the missing filename when throwing exception.
16095
16096 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
16097
16098         * metadata.c (mono_type_size): code cleanup
16099         (mono_type_stack_size): removed some test code
16100
16101 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
16102
16103         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
16104         mono_get_exception_file_not_found now.
16105
16106         * exception.c (mono_exception_from_name_two_strings): New version
16107         that will call a constructor with two string arguments. 
16108         (mono_get_exception_file_not_found): New helper routine, used to
16109         report file-not-found errors.
16110
16111 2002-07-20  Dick Porter  <dick@ximian.com>
16112
16113         * process.h:
16114         * process.c: Pass file handles to CreateProcess
16115         
16116         * icall.c:
16117         * file-io.h:
16118         * file-io.c: Implemented CreatePipe
16119
16120 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
16121
16122         * metadata.c (mono_get_param_info): set alignment for value types
16123
16124 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16125
16126         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
16127         Constify mono_domain_assembly_open().
16128         * loader.c: handle null namespace in icalls.
16129
16130 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
16131
16132         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
16133         (emit_str_to_ptr_conv): marshal object as structs
16134
16135         * metadata.c (mono_type_to_unmanaged): marshal object as structs
16136
16137         * marshal.c (mono_marshal_get_runtime_invoke): support value types
16138
16139 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
16140
16141         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
16142         (mono_marshal_get_native_wrapper): we an now return value types
16143
16144 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16145
16146         * verify.c: more checks implemented.
16147
16148 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
16149
16150         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
16151         (fix bug #27695)
16152         (mono_marshal_get_native_wrapper): allow byref arguments
16153         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
16154         impl. PtrToStringXXX methods
16155         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
16156         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
16157         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
16158         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
16159         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
16160
16161 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16162
16163         * reflection.c: fix buglet in parsing an assembly name.
16164
16165 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
16166
16167         * marshal.c (emit_ptr_to_str_conv): first impl.
16168
16169 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16170
16171         * object.c, class.h: cache the vtable in the class as suggested by
16172         vargaz@freemail.hu (Zoltan Varga).
16173
16174 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16175
16176         * class.h, loader.c: added mono_field_from_token().
16177         * verify.c: first cut of type checking code.
16178
16179 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
16180
16181         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
16182
16183 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
16184
16185         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
16186         (fix bug #27782)
16187         (mono_marshal_get_remoting_invoke): impl.
16188         (mono_delegate_begin_invoke): impl.
16189         (mono_mb_emit_save_args): impl.
16190         (mono_delegate_end_invoke): impl.
16191         (mono_marshal_get_delegate_begin_invoke):
16192         (mono_marshal_get_delegate_end_invoke):
16193         (mono_marshal_get_delegate_invoke): generate a special name for
16194         those methods (including the signature) and associate them whith
16195         the delegate class. 
16196
16197 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
16198
16199         * reflection.[ch]: 
16200         (mono_reflection_type_from_name): now it has a MonoImage parameter
16201         which is used as the default image to search the type in. If the image
16202         is NULL or getting the type from it fails, it defaults to corlib.
16203
16204         * icall.c: changed 1 call to mono_reflection_type_from_name to match
16205         new parameter.
16206
16207 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16208
16209         * reflection.c: update the parameter table index.
16210
16211 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16212
16213         * domain.c: don't include the mark byte in the string hash.
16214
16215 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16216
16217         * icall.cs: icall for Type.GetTypeCode ().
16218         * verify: a couple of fixes and disabled local initialization checks.
16219
16220 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
16221
16222         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
16223
16224         * debug-helpers.c (mono_method_full_name): print the type of the
16225         runtime wrapper
16226
16227         * metadata.c (mono_signature_hash): a hash function for signatures
16228         (mono_signature_hash): better hash algorithm
16229
16230         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
16231
16232         * debug-helpers.c (mono_method_full_name): this can now generate
16233         method names with signatures
16234
16235         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
16236         method dont have this pointers.
16237
16238 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16239
16240         * reflection.c: fixup typebuilder tokens.
16241         * image.c: fix buglet.
16242         * marshal.h: remove whitespace.
16243         * metadata.h, metadata.c: reinstate code that was removed.
16244         * verify.c: handle catch directives and fix another couple of bugs.
16245
16246 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
16247
16248         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
16249         (mono_marshal_get_native_wrapper): make it comp. with the old code
16250         (mono_marshal_get_native_wrapper): support boolean
16251         (mono_marshal_get_managed_wrapper): support more types
16252
16253 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
16254
16255         * class.c (class_compute_field_layout): compute class->blittable attribute.
16256
16257 2002-07-09  Dick Porter  <dick@ximian.com>
16258
16259         * threads.c: Make the thread cleaning up cope with threads that
16260         call ExitThread()
16261
16262 2002-07-08  Radek Doulik  <rodo@ximian.com>
16263
16264         * reflection.c (method_encode_code): use non-translated values to
16265         compute finally_start, this fixes exception handling on ppc, yay!
16266
16267         * decimal.h (struct signscale): fix endianess
16268
16269 2002-07-07  Radek Doulik  <rodo@ximian.com>
16270
16271         * reflection.c: swap box_val and not val
16272
16273 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16274
16275         * reflection.c, reflection.h: handle full assembly info in type name.
16276         Handle Type arguments when loading custom attributes.
16277         * icall.c: updated to use new mono_reflection_type_from_name () method.
16278
16279 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16280
16281         * loader.c:
16282         (method_from_memberref): also print assembly name when method not found.
16283
16284 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16285
16286         * icall.c:
16287         (ves_icall_TypeGetProperties): fixed bug #27473. 
16288
16289 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16290
16291         * reflection.c: display image name and token when cannot find the
16292         .ctor for an attribute.
16293
16294 2002-07-05  Martin Baulig  <martin@gnome.org>
16295
16296         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16297
16298 2002-07-04  Dick Porter  <dick@ximian.com>
16299
16300         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
16301         compile on mingw.  This will cause mingw builds to not wait for
16302         subthreads to terminate after the main thread does.  I've lodged a
16303         bug with the mingw developers for them to wrap OpenThread().
16304
16305 2002-07-03  Dick Porter  <dick@ximian.com>
16306
16307         * threads.c: Store thread IDs instead of handles, because
16308         GetCurrentThread() returns a pseudohandle and therefore stores
16309         useless values.  mono_thread_cleanup() continues checking the
16310         array of threads until it is empty, to cope with subthreads
16311         spawning new threads after the main thread has finished.
16312
16313         * profiler.h:
16314         * profiler.c:
16315         * profiler-private.h: Pass the thread ID to thread profiler
16316         functions, instead of a handle
16317
16318 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16319
16320         * verify.c: fixes to make it more usable.
16321         * pedump.c: added --verify code to verify IL code in an assembly.
16322
16323 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16324
16325         * reflection.c: turn errors into warnings to allow compiling corlib.
16326
16327 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16328
16329         * reflection.c: add special cases to compile corlib.
16330
16331 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16332
16333         * reflection.c: handle properties with only a set method.
16334
16335 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16336
16337         * opcodes.h: add enum with opcodes in opval order.
16338
16339 2002-07-01  Dick Porter  <dick@ximian.com>
16340         
16341         * object.h:
16342         * object.c (mono_runtime_run_main): Removed unneeded argument
16343
16344 2002-06-28  Martin Baulig  <martin@gnome.org>
16345
16346         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16347
16348 2002-06-27  Dick Porter  <dick@ximian.com>
16349
16350         * threads.c: Store the handle in both the parent thread and in the
16351         subthread, to minimise the time between starting a new thread and
16352         storing its ID.
16353
16354 2002-06-26  Dick Porter  <dick@ximian.com>
16355
16356         * appdomain.c (mono_runtime_cleanup): Close the socket library
16357         after all the threads have finished, not before
16358
16359 2002-06-26  Martin Baulig  <martin@gnome.org>
16360
16361         * debug-symfile.c (mono_debug_find_source_location): Added
16362         `guint32 *line_number' argument.  If it's not NULL, store the line number
16363         there and return the file name without the line number.
16364
16365 2002-06-25  Dick Porter  <dick@ximian.com>
16366
16367         * icall.c:
16368         * process.h:
16369         * process.c: Process forking and other support functions
16370
16371 2002-06-25  Dick Porter  <dick@ximian.com>
16372
16373         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
16374         things dont happen when the image is closed.
16375         (mono_image_lookup_resource): Walk the resource section looking
16376         for a particular entry
16377
16378         * cil-coff.h: PE resource section decoding
16379
16380 2002-06-25  Dick Porter  <dick@ximian.com>
16381         
16382         * assembly.h:
16383         * assembly.c: 
16384         (mono_assembly_foreach): Accessor functions to walk the list of
16385         loaded assemblies
16386         (mono_assembly_set_main):
16387         (mono_assembly_get_main): Process methods need to know which
16388         assembly is the "main" one
16389
16390         * object.c (mono_runtime_run_main): Record the main assembly
16391
16392         * debug-helpers.c: Fix typo
16393
16394 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
16395
16396         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
16397         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
16398
16399 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16400
16401         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
16402
16403 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
16404
16405         * image.c (do_mono_image_open): Initialize reference count,
16406         otherwise we leak the MonoImage.
16407
16408 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16409
16410         * reflection.c: small tweak to handle self-hosting.
16411
16412 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16413
16414         * reflection.c: fix type name parse code.
16415
16416 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16417
16418         * reflection.c: break out of the loop.
16419         * image.c: special case corlib.
16420
16421 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16422
16423         * reflection.c: add all the custom attrs at the end to ensure the
16424         ctors have been properly initialized when the attributes are defined
16425         in the current assembly.
16426
16427 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16428
16429         * reflection.c: handle correctly multiple-nested types.
16430
16431 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
16432
16433         * row-indexes.h: fix typos.
16434         * reflection.c: adjust for typos and fix method_def_or_ref
16435         encoding in MethodImpl table.
16436
16437 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16438
16439         * reflection.c: fix entry point patching (thanks Serge!).
16440
16441 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
16442
16443         * verify.c: add check for System.Exception
16444
16445 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16446
16447         * image.c, class.c: minifix for code just c&p'ed.
16448         * reflection.c: warning fix.
16449         * object.h, loader.h, domain.c: load also StringBuilder.
16450
16451 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16452
16453         * marshal.h, marshal.c: some support code to handle complex marshaling.
16454
16455 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16456
16457         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
16458         Better signatures with vtable error dump.
16459
16460 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
16461
16462         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
16463
16464 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
16465
16466         * icall.c (ves_icall_Type_GetField): impl.
16467
16468 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16469
16470         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
16471         to retrieve a marshal description blob for a field or param.
16472
16473 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16474
16475         * reflection.h, reflection.c: change order of nested type emission
16476         to avoid table corruption. The NestedTypes table is sorted.
16477         * icall.c: change order of GetConstructor results to workaround mcs bug.
16478
16479 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16480
16481         * reflection.h, reflection.c: handle field and param marshal
16482         information.
16483
16484 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16485
16486         * icall.c, marshal.c marshal.h: more Marshal class implementation.
16487
16488 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16489
16490         * reflection.c: fix call convention.
16491
16492 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16493
16494         * reflection.h, reflection.c: mono_image_get_memberref_token()
16495         takes a type instead of a class, now. Added
16496         mono_image_get_array_token() to create tokens for the special
16497         multi-dim array methods.
16498
16499 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16500
16501         * assembly.c: handle modules (no assembly table). Split
16502         loading references in its own function.
16503         * class.c: handle moduleref resolution scope.
16504         * image.c, image.h: cache module name in image.
16505
16506 2002-06-07  Martin Baulig  <martin@gnome.org>
16507
16508         * reflection.c (mono_image_get_type_info): Only add a class layout entry
16509         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
16510
16511 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16512
16513         * icall.c: more signature fixes that used uint instead of int.
16514
16515 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16516
16517         * reflection.c: fixed signature of field refs.
16518
16519 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16520
16521         * class.c, reflection.c: handle typerefs of nested types
16522         (both on read and when writing files).
16523
16524 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
16525
16526         * icall.c: fix method signatures that tried to workaround the previous
16527         typo, d'oh!
16528
16529 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16530
16531         * debug-helpers.c: fix typo.
16532
16533 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16534
16535         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
16536         rewrote the PE/COFF writing code (our programs are understood by the
16537         ms runtime, now).
16538
16539 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16540
16541         * gc.c, gc.h, icall.c: weakreference support.
16542
16543 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16544
16545         * Makefile.am, mono-config.c: use $(sysconfdir).
16546
16547 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16548
16549         * icall.c: changed default precision of Double.ToString() to 15.
16550         Fixed memory leak. Unified with Single.ToString.
16551
16552 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
16553
16554         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
16555
16556 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16557
16558         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
16559         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
16560         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
16561         and myself.
16562
16563 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16564
16565         * debug-symfile.c, sysmath.c: yet more compilation fixes.
16566
16567 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16568
16569         * reflection.c, socket-io.c: more compilation fixes.
16570
16571 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16572
16573         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
16574         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
16575         unicode.c: warning and compiler compatibility fixes.
16576
16577 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16578
16579         * class.h, metadata.c: fixed warnings/compilation errors.
16580
16581 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16582
16583         * Makefile.am, mono-config.c, mono-config.h: configuration file
16584         support routines.
16585         * loader.c, loader.h: make Dll mapping configurable at runtime in the
16586         config file. Export methods to insert and lookup mappings.
16587
16588 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16589
16590         * reflection.c: handle types and boxed objects in custom attr
16591         constructors.
16592
16593 2002-05-30  Martin Baulig  <martin@gnome.org>
16594
16595         * debug-symfile.c
16596         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
16597
16598 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
16599
16600         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
16601         to lookup the implmap row for a P/Invoke method.
16602         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
16603         P/Invoke method from the runtime on an as needed basis.
16604
16605 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
16606
16607         * metadata.c (mono_metadata_parse_signature): impl.
16608
16609 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16610
16611         * class.c: handle .pack directive.
16612
16613 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16614
16615         * object.c: initialize static fields with RVA data.
16616
16617 2002-05-25  Martin Baulig  <martin@gnome.org>
16618
16619         * debug-symfile.c
16620         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
16621
16622 2002-05-24  Martin Baulig  <martin@gnome.org>
16623
16624         * debug-symfile.c
16625         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
16626         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
16627         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
16628
16629 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16630
16631         * object.c: special case string ctros in invoke.
16632         * gc.c: silly whitespace changes.
16633
16634 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
16635
16636         * threadpool.[ch]: impl. a threadpool that can
16637         be used by mint and mono.
16638
16639 2002-05-22  Martin Baulig  <martin@gnome.org>
16640
16641         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
16642         The first argument is now a `MonoReflectionModuleBuilder *', the return
16643         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
16644         `methods' field to get the method builder.  The `token' argument is the
16645         unfixed token.
16646
16647         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
16648         invalid characters instead of g_assert_not_reached()ing.  This seems
16649         to be the behaviour of mscorlib.
16650
16651 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
16652
16653         * object.c (mono_runtime_invoke_array): applied patch from Rachel
16654         Hestilow to fix bug #25104
16655
16656 2002-05-21  Martin Baulig  <martin@gnome.org>
16657
16658         * debug-symfile.c (mono_debug_find_source_location): New function.
16659         Looks up an IL offset in the line number table and returns the source
16660         location as a string.
16661
16662 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16663
16664         * icall.c:
16665         (mono_double_ToStringImpl): changed %f by %g until we have something
16666         better.
16667
16668 2002-05-21  Nick Drochak  <ndrochak@gol.com>
16669
16670         * icall.c : Use different name for Math.Pow's icall.  Needed to check
16671         parameters first in C#.
16672
16673 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16674
16675         * icall.c, reflection.h: added icall to get info about an event.
16676
16677 2002-05-20  Radek Doulik  <rodo@ximian.com>
16678
16679         * object.c (mono_value_box): don't use memcpy for boxing on BIG
16680         endian
16681         (mono_value_box): don't use memcpy for small sizes on
16682         architectures with unaligned access
16683
16684 2002-05-20  Martin Baulig  <martin@gnome.org>
16685
16686         * reflection.c (mono_reflection_setup_internal_class): Don't crash
16687         if `tb->parent == NULL'.
16688         (mono_reflection_create_internal_class): New function.  This is
16689         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
16690         for enum types.
16691
16692         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
16693         New interncall.
16694
16695 2002-05-19  Martin Baulig  <martin@gnome.org>
16696
16697         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
16698         argument to get the length, don't default to the array length.
16699
16700 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
16701
16702         * assembly.c (mono_assembly_setrootdir): New function used to
16703         override the MONO_ASSEMBLIES directory.
16704
16705 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16706
16707         * icall.c: ValueType_GetHashCode() initialize local var.
16708
16709 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16710
16711         * reflection.c: sort custom attributes table.
16712
16713 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16714
16715         * reflection.c: support named args in custom attributes (write support).
16716
16717 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16718
16719         * reflection.c: fix finally position calculation.
16720
16721 2002-05-15  Radek Doulik  <rodo@ximian.com>
16722
16723         * reflection.c: fixed endianess at many places
16724
16725         * icall.c (ves_icall_InitializeArray): comment out debug msg
16726
16727 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
16728
16729         * object.c (mono_unhandled_exception): new function to handle
16730         unhandled exceptions.
16731         (mono_unhandled_exception): call the UnhandledException event.
16732         (mono_runtime_delegate_invoke): impl.
16733
16734 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
16735
16736         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
16737         returns the RVA, not the direct pointer to the data. Handle the case
16738         when the class size is fixed.
16739
16740 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16741
16742         * reflection.c: fix some endianess issues.
16743
16744 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
16745
16746         * object.c (mono_runtime_invoke): is now able to catch exceptions.
16747
16748         * threads.c (mono_thread_init): added a callback which is invoked
16749         at thread start.
16750
16751 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
16752         
16753         * icall.c: make GetHashCode return non-negative values.
16754
16755 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
16756
16757         * object.c, icall.c, gc.c: revert to address-based hashcode.
16758
16759 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
16760
16761         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
16762
16763 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16764
16765         * icall.c, class.c: special case <Module>.
16766
16767 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
16768
16769         * icall.c: fix bug in GetNow().
16770
16771 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
16772
16773         * object.c (mono_runtime_class_init): make sure that we call all
16774         static class constructors.
16775
16776 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16777
16778         * reflection.c: sort methodsemantics table.
16779
16780 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16781
16782         * reflection.h, reflection.c: honour init locals setting.
16783
16784 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
16785
16786         * icall.c: copied Double ToStringImpl for Single ToStringImpl
16787
16788 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16789
16790         * reflection.c: support ContructorBuilders in attribute blob creation.
16791
16792 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16793
16794         * reflection.c: some changes to build a binary that can be run
16795         directly in windows.
16796
16797 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
16798
16799         * loader.c: print a big message when an icall can't be found.
16800
16801 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16802
16803         * string-icalls.c: fix bug 24248.
16804
16805 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16806
16807         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
16808         icall.c, reflection.h: separate assembly loading by pathname and by
16809         assembly name. Use the MONO_PATH env var to search for assemblies.
16810
16811 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16812
16813         * assembly.c, image.h: add some support for assemblies
16814         with multiple modules.
16815         * class.c, class.h: export mono_class_from_typeref().
16816         * loader.c: remove duplicated code and use mono_class_from_typeref(),
16817         instead.
16818
16819 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16820
16821         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
16822         documentation says (the ECMA one is correct).
16823
16824 2002-05-02  Dick Porter  <dick@ximian.com>
16825
16826         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
16827         Don't name the synchronisation mutex.
16828
16829 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
16830
16831         * rand.c
16832         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
16833         Make the prototypes match.
16834         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
16835         Same.
16836
16837         * icall.c
16838         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
16839         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
16840         all systems have tm.tm_zone, so use strftime() with %Z to print
16841         the timezone abreviation into a temp string.
16842
16843         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
16844         rather than mono_array_addr() on a MonoString on Big Endian
16845         machines.
16846
16847 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
16848
16849         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
16850         fix bug 24041
16851
16852 2002-04-30  Dick Porter  <dick@ximian.com>
16853
16854         * socket-io.c: Cope with SOCKET being an integer rather than a
16855         pointer now.
16856
16857         * threads.c: Added Thread_free_internal, to deal with thread
16858         handle cleanup.  Moved calls to handle_store() and handle_remove()
16859         to start_wrapper(), so each can only be called once.  Allocate
16860         synchronisation blocks with GC_malloc(), and use GC finalisation
16861         to close the handles.
16862
16863         * icall.c: added System.Threading.Thread::Thread_free_internal
16864
16865 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16866
16867         * icall.c: support Environment.Exit, CommandLineArgs().
16868
16869 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16870
16871         * object.c, object.h: added mono_runtime_run_main () and
16872         mono_runtime_get_main_args () for use in System.Environment.
16873
16874 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16875
16876         * gc.c: fix thinko, enable actual finalization since the jit is now
16877         fixed.
16878
16879 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16880
16881         * gc.c, object.c: take into account that an object may be offset wrt the address
16882         returned by GC_malloc().
16883
16884 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
16885
16886         * image.c: handle files without entries in the assembly table (modules).
16887
16888 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
16889
16890         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
16891         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
16892         allowed to be null when it's System.Object class setup.
16893
16894 2002-04-27  Martin Baulig  <martin@gnome.org>
16895
16896         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
16897         if `tb->parent == NULL' rather than crashing.
16898
16899 2002-04-28  Nick Drochak  <ndrochak@gol.com>
16900
16901         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
16902         calling acos() where asin() should have been called.
16903
16904 2002-04-26  Martin Baulig  <martin@gnome.org>
16905
16906         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
16907         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
16908         there's a subdirectory called `System', but we don't want to read that
16909         subdirectory as an assembly.
16910
16911 2002-04-25  Martin Baulig  <martin@gnome.org>
16912
16913         * debug-symfile.c: Reflect latest MonoString changes.
16914
16915 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16916
16917         * rand.c, rand.h: instance method icalls need to have an explicit
16918         this pointer as first argument in the C implementation.
16919
16920 2002-04-25  Nick Drochak <ndrochak@gol.com>
16921
16922         * icall.c: Fix typo in map for GetNonZeroBytes
16923
16924 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
16925
16926         * string-icalls.c : String does now passes unit tests without any 
16927         errors, the following changes has been made:
16928         
16929         Implemented replace methods.
16930         Renaming of methods to (try) follow the standard.
16931         Fixed compare ordinal
16932         Made all memory allocated directly to function instead of via icall function.
16933         Small performance fix in is_in_array function
16934                         
16935  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
16936
16937         c (mono_string_Internal_ctor_charp_int_int):
16938         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
16939         sindex < 0, throw ArgumentOutOfRangeException instead of
16940         ArgumentNullException.
16941
16942         Added new check for length == 0, however
16943         I need to make it return String.Empty from the C code.
16944         
16945         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
16946         that calculate the length for us here.
16947         
16948         (mono_string_Internal_ctor_sbytep_int_int): Replaced
16949         mono_string_new_utf16 with mono_string_new, since value is utf8.
16950
16951 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16952
16953         * object.c: register the object for finalization if needed.
16954         Allocate one more char in the string for the terminating 0 char.
16955
16956 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16957
16958         * class.c, class.h, image.c: check if a type implemenst a destructor.
16959         Use the proper key for array class lookups.
16960         * icall.c: register the icalls in the System.GC class.
16961         * gc.c, gc.h: GC-related functions and icalls.
16962
16963 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16964
16965         * icall.c:
16966         * socket-io.c:
16967         * unicode.c: free some strings gotten from mono_string_to_utf8 and
16968         changed a couple of free () by g_free ().
16969
16970         * decimal.c: one-liner in the comments for decimal2string ().
16971
16972 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
16973
16974         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
16975
16976 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
16977
16978         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
16979         * object.c (mono_runtime_invoke_array) : handle null in params
16980
16981 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
16982
16983         * string-icalls.c: fixed bug in split (one off bug)
16984
16985 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
16986
16987         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
16988         * icalls.c: added String::Equals as internal method
16989
16990 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
16991
16992         * threads.c: fixed bug in the double interlocked functions
16993
16994 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
16995
16996         * threads.c: implemented all of the new interlocked icalls.
16997         * string-icalls.c: fix a bug in insert.
16998         * icalls.c: added the icalls for interlocked, removed old string functions.
16999         
17000 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17001
17002         * loader.c: fix off-by-one error when reading argument names.
17003
17004 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17005
17006         * profiler.c: win32 counter implementation (untested).
17007         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
17008         (the latter needs testing and more complete impl. from win32 folks).
17009
17010 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
17011
17012         * object.c: mono_array_new_full workaround mono_array_class_get
17013         problem.
17014
17015 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17016
17017         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
17018         * object.h (mono_string_chars): Changed casting type.
17019
17020 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17021
17022         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
17023                            method signatures to use gunichar2 instead of gint16.
17024
17025 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
17026
17027         * object.h, object.c: domain-specific versions of mono_object_new and
17028         mono_array_new.
17029
17030 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
17031
17032         * object.c: changed String layout
17033
17034         * string-icalls.c (mono_string_Internal_ctor_chara): added
17035         internal string constructors.
17036
17037 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
17038
17039         * threads.c: pass 'this' to the thread start routine.
17040
17041 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17042
17043         * string-icalls.c: fix IndexOf and LastIndexOf. Now
17044         InternalCompareStr don't call twice mono_string_cmp_char for the last
17045         character. Improved performance in mono_string_cmp_char.
17046
17047 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17048
17049         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
17050         code into its own library: libmonoruntime.
17051
17052 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
17053
17054         * object.h, object.c: changed array format so that szarrays do not
17055         require a bounds structure.
17056         * icall.c, appdomain.c: support for new szarray format.
17057
17058 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17059
17060         * metadata.c: compare also the retuns type when comparing signatures:
17061         we didn't do this as an optimization since really overloaded methods
17062         must differ also in the arguments, but this doesn't work with
17063         low-level IL code (or when using explicit conversion operators: see
17064         bug#23498 for an example).
17065
17066 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17067
17068         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
17069
17070 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17071
17072         * icall.c: make MonoType::GetElementType its own icall.
17073
17074 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17075
17076         * icall.c: remove MonoMethod_get_Name().
17077         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
17078         object.
17079
17080 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17081
17082         * string-icalls.c: optimized a few methods.
17083
17084 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17085
17086         * icall.c: added all new string internal calls
17087         * string-icalls.c: added, new string internal call implementation.
17088         * object.c: added mono_string_new_size for allocating a string a size
17089
17090 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
17091
17092         * object.c (mono_object_isinst): use the same code as in the
17093         optimized x86 version.
17094
17095 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17096
17097         * profiler.c: TSC-based timer code (faster and more accurate).
17098         Not hooked up in configure, yet (set USE_X86TSC to 1).
17099
17100 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
17101
17102         * profiler.c, profiler.h: track time spent compiling methods.
17103         * threads.c: track thread creation/destruction.
17104
17105 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
17106
17107         * profiler.c, profiler.h, profiler-private.h: profiling interface
17108         and sample implementation. Moved here so that it can be used also by
17109         the jit.
17110
17111 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
17112
17113         * reflection.c, reflection.h: keep types and other handles separate in
17114         the hash tables for referred tokens. Add guid for modules.
17115
17116 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17117
17118         * assembly.c: fix bugs found with valgrind.
17119         * metadata.h, metadata.c: added mono_metadata_guid_heap().
17120
17121 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
17122
17123         * threads: added icall support for getting current domain for
17124                    the thread.
17125  
17126 2002-04-13  Martin Baulig  <martin@gnome.org>
17127
17128         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
17129         (MonoDebugVarInfo): Added `index' field for register based addresses.
17130         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
17131         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
17132         `MonoDebugVarInfo *params' and `guint32 this_offset' with
17133         `MonoDebugVarInfo *this_var'.
17134
17135         * debug-symfile.c (relocate_variable): New static function to write
17136         a location description for a local variable or method parameter.
17137
17138 2002-04-12  Martin Baulig  <martin@gnome.org>
17139
17140         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
17141         stack offset and begin/end scope address of a local variable.
17142         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
17143         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
17144         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
17145
17146         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
17147         Added new relocation types for start/end scope of a local variable.
17148
17149 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17150
17151         * object.h: add mono_object_domain() macro.
17152         * reflection.c: handle typespecs.
17153         * icall.c: MonoMethod::get_Name() implementation.
17154
17155 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17156
17157         * icall.c: String::GetHashCode() icall implementation.
17158
17159 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17160
17161         * icall.c: String::IndexOfAny icall.
17162         * object.c, object.h: make array->max_length more useful.
17163         Intrduced mono_object_class() and mono_string_length() macros.
17164
17165 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17166
17167         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
17168         instead of g_unichar_isdigit.
17169
17170 2002-04-11  Nick Drochak  <ndrochak@gol.com>
17171
17172         * icall.c: Implement a simple Double.ToString().
17173
17174 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17175
17176         * appdomain.h: only io-layer.h is supposed to be included.
17177         * icall.c: explicitly import environ. Fix warning.
17178
17179 2002-04-10  Nick Drochak  <ndrochak@gol.com>
17180
17181         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
17182                 return true even if it's not Daylight Savings time.
17183                 Only return false for the case where the function isn't
17184                 implemented for a plaform (read Windows).
17185
17186 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17187
17188         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
17189         data with a mutex.
17190
17191 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
17192
17193         * mempool.c (mono_mempool_alloc): only use g_malloc when
17194         absolutely necessary.
17195
17196 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
17197
17198         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
17199
17200         * class.c (mono_class_vtable): use domain mempool to allocate vtable
17201         (mono_class_proxy_vtable): use domain mempool
17202
17203 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17204
17205         * appdomain.h, appdomain.c: split initialization that requires the
17206         execution engine support into mono_runtime_init().
17207
17208 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
17209
17210         * class.c (mono_class_init): don't include vtable inside MonoClass
17211         to save some memory, gather some statistics.
17212         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
17213
17214 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17215
17216         * icall.c: internalcall implementation for ValueType.Equals().
17217
17218 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
17219
17220         * object.c (mono_message_init): moved 
17221         (mono_runtime_exec_main): new arch. independent impl.
17222         (mono_runtime_invoke_array): new method - like
17223         mono_runtime_invoke, but you can pass an array of objects.
17224         (mono_remoting_invoke): new arch. independent impl.
17225         (mono_message_invoke): new arch. independent impl.
17226         (mono_runtime_class_init): new arch. independent impl.
17227         (mono_runtime_object_init): new arch. independent impl.
17228
17229 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17230
17231         * metadata.c, object.c, reflection.c: documented the exported
17232         functions.
17233
17234 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17235
17236         * icall.c: simpler code to pass the assembly builder data to corlib.
17237         Implement GetNestedTypes() internalcall.
17238
17239 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17240
17241         * class.c: warn if a type can't be loaded.
17242
17243 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
17244
17245         * image.h: typedef MonoImageOpenStatus
17246         * types.h: removed unused file
17247         
17248 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
17249
17250         * icall.c: Enum_ToObject accepts enum value arguments.
17251
17252 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17253
17254         * class.c: move initialization of properties, events and nested
17255         classes, so that they happen for interfaces, too.
17256
17257 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17258
17259         * icall.c: cleanup some ugly casts in Array_SetValue*.
17260
17261 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17262
17263         * icall.c: the values array fro enums is of the correct type, now.
17264         Implement (correctly) getFullName instead of assQualifiedName for
17265         MonoType.
17266         * reflection.h, reflection.c: added mono_type_get_name ().
17267
17268 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17269
17270         * assembly.c, image.h: for each MonoImage, record from wich assembly
17271         it was loaded.
17272         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
17273         Make Type.Assembly work.
17274
17275 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
17276
17277         * debug-symfile.h: use char* instead of gpointer to avoid
17278         unnecessary casts.
17279
17280         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
17281
17282         * icall.c (ves_icall_InternalExecute): impl. FielSetter
17283         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
17284
17285 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
17286
17287         * icall.c (mono_message_init): impl. (code cleanup)
17288         (ves_icall_InternalExecute): impl. FieldGetter
17289
17290         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
17291         defined we call all (non-static)methods through the vtable. 
17292
17293 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
17294
17295         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
17296         finalizer even though the memory is still referenced (and the chunk of
17297         memory is not freed).
17298
17299 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
17300
17301         * assembly.c: fix brokeness.
17302
17303 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
17304
17305         * class.c: kill some warnings. Check explicit interface method
17306         implementation also without considering the namespace.
17307         Load also literal strings in static class data.
17308
17309 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
17310
17311         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
17312         (default_assembly_name_resolver): Make the resolver take the
17313         "base" directory where the assembly was originally defined, so we
17314         can load DLLs that are in the same directory as the assembly that
17315         is being referenced.
17316
17317 2002-03-28  Dick Porter  <dick@ximian.com>
17318
17319         * file-io.h: 
17320         * file-io.c:
17321         * socket-io.c: 
17322         * unicode.h: 
17323         * unicode.c: Warning cleanups
17324
17325 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
17326
17327         * object.h, reflection.h: use the correct type instead of MonoObject.
17328
17329 2002-03-28  Martin Baulig  <martin@gnome.org>
17330
17331         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
17332         (mono_debug_update_symbol_file): Initialize classes if necessary.
17333
17334 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17335
17336         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
17337         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
17338
17339 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
17340
17341         * assembly.h: fix function prototype.
17342         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
17343         * mono-endian.h: use const cast.
17344
17345 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
17346
17347         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
17348
17349 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17350
17351         * loader.c: don't assert when a typeref can't be loaded, give
17352         a chance to the runtime to trow an exception instead.
17353         * loader.h: fix warning.
17354
17355 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
17356
17357         * class.c (mono_class_proxy_vtable): added proxy support
17358
17359 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
17360
17361         * icall.c: removed last of PAL calls, added System.Environment
17362         * file-io.h, file-io.c: MonoIO implementation
17363         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
17364
17365 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17366
17367         * appdomain.c: do not use the byte marker in ldstr table lookup.
17368         * debug-helpers.c: allow two ':' to separate class and method name.
17369         * object.c: allocate arrays bounds with the GC, too.
17370         * verify: add a few more checks.
17371
17372 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
17373
17374         * reflection.c: output also literal strings. Allocate parameter data
17375         with GC_malloc() (thanks, Martin, for catching this!).
17376
17377 2002-03-26  Martin Baulig  <martin@gnome.org>
17378
17379         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
17380         include the `this' offset in the `param_offsets'.
17381
17382 2002-03-25  Martin Baulig  <martin@gnome.org>
17383
17384         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
17385         mono_debug_get_class() function to get the classes. Added new
17386         relocation types for arrays and strings.
17387         (mono_debug_get_class): New static function to search in all
17388         referenced assemblies for a metadata token.
17389
17390         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
17391
17392 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17393
17394         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
17395         hold gc-allocated objects. Make the string heap a stream like the
17396         others. Removed duplicated code when writing stream info.
17397         Added asserts to catch possible buffer overflows. Set the sorted map
17398         for tables that need sorting. Added some documentation.
17399
17400 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
17401
17402         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
17403         for interned strings and vtables.
17404
17405 2002-03-24  Martin Baulig  <martin@gnome.org>
17406
17407         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
17408         it in the array since it was created with g_slist_prepend().
17409
17410 2002-03-24  Martin Baulig  <martin@gnome.org>
17411
17412         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
17413         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
17414         (mono_debug_method_from_token): Renamed to
17415         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
17416         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
17417
17418         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
17419         relocation types.
17420
17421         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
17422
17423 2002-03-24  Martin Baulig  <martin@gnome.org>
17424
17425         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
17426         (mono_debug_method_from_token): New func.
17427
17428         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
17429         New interncall, calls mono_debug_local_type_from_signature().
17430         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
17431         calls mono_debug_method_from_token().
17432
17433 2002-03-23  Martin Baulig  <martin@gnome.org>
17434
17435         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
17436         specifies the number of bytes to be converted, not the array size.
17437         Return the number of chars, not the number of bytes.
17438         (ves_icall_iconv_get_chars): The `byteCount' argument
17439         specifies the number of bytes to be converted, not the array size.
17440
17441 2002-03-23  Martin Baulig  <martin@gnome.org>
17442
17443         * reflection.h (MonoReflectionSigHelper): New type.
17444
17445         * reflection.c (mono_reflection_sighelper_get_signature_local),
17446         (mono_reflection_sighelper_get_signature_local): New functions.
17447
17448         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
17449         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
17450         interncalls.
17451
17452 2002-03-23  Martin Baulig  <martin@gnome.org>
17453
17454         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
17455         is_writeable is set.
17456         (mono_raw_buffer_update): New function to write the modified map
17457         back to disk.
17458
17459         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
17460
17461         * debug-symfile.c (mono_debug_update_symbol_file): Call
17462         mono_raw_buffer_update() when done writing.
17463
17464 2002-03-23  Martin Baulig  <martin@gnome.org>
17465
17466         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
17467
17468         * debug-symfile.c: Added support for arguments and local variables.
17469
17470 2002-03-23  Dick Porter  <dick@ximian.com>
17471
17472         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
17473         protected by ifdefs, hence breaking the w32 build.
17474
17475 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17476
17477         * object.c: implement is_interned() the right way.
17478
17479 2002-03-21  Martin Baulig  <martin@gnome.org>
17480
17481         * debug-symfile.[ch]: New files to handle debugging information
17482         files. There's also support to dynamically update these symbol
17483         files to include machine dependent information.
17484
17485 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
17486
17487         * threads.c (mono_thread_create): new function to create thread
17488         from C
17489
17490 2002-03-20  Martin Baulig  <martin@gnome.org>
17491
17492         * icall.c (ves_icall_InternalInvoke): Create a new object if the
17493         method is a constructor.
17494         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
17495         points to ves_icall_InternalInvoke().
17496
17497 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
17498
17499         * file-io.c: Flush shouldn't throw exceptions.
17500
17501 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
17502
17503         * file-io.c: FileStream flush support; FileSetLength now
17504         restores file pointer.
17505
17506 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
17507
17508         * class.c: set image for pointer classes.
17509
17510 2002/03/19  Nick Drochak <ndrochak@gol.com>
17511
17512         * sysmath.c: Forgot one.
17513
17514 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
17515
17516         * sysmath.c: Avoid redefining existing names.
17517
17518 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
17519
17520         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
17521         handled by runtime as icall rather than dllimport from libm.so
17522         * file-io.c, file-io.h: fixed handle argument type.
17523
17524 2002-03-18  Dick Porter  <dick@ximian.com>
17525
17526         * reflection.c (mono_image_get_type_info): rename interface to
17527         iface, because of "#define interface struct" on windows.
17528
17529 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
17530
17531         * class.c, class.h: rename and export mono_ptr_class_get().
17532         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
17533         * reflection.c, reflection.h, icall.c: better/saner type name
17534         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
17535         method signatures.
17536
17537 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
17538
17539         * class.c (mono_class_init): removed hardcoded GHC_SLOT
17540
17541         * icall.c (ves_icall_InternalInvoke): impl.
17542
17543 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17544
17545         * reflection.c: output the interface map table, too.
17546
17547 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
17548
17549         * class.c (class_compute_field_layout): separate computation of 
17550         static field layout
17551
17552 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
17553
17554         * icall.c: added System.Buffer support.
17555         * file-io.c: moved file icalls from PAL to FileStream.
17556
17557 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
17558
17559         * icall.c (ves_icall_System_Object_GetHashCode): impl.
17560
17561 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
17562
17563         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
17564
17565 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17566
17567         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
17568
17569 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
17570
17571         * debug-helpers.{c,h}: moved here from monograph some useful functions
17572         to locate a method by name/signature in a class or image. Included
17573         also a small and flexible IL disassembler.
17574
17575 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17576
17577         * reflection.c: fixup tokens in methods with small header size, too.
17578
17579 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
17580
17581         * object.c (mono_string_to_utf8): remove assert(!error), instead
17582         print a warning. 
17583
17584 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
17585
17586         * icall.c: update to the new mono_Array_class_get interface.
17587
17588 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
17589
17590         * appdomain.c, object.c: Boehm-GC enable.
17591         * icall.c: make get_data_chunk() support split data requests.
17592         Ensure a class is initialized in more cases. Return only the first
17593         property found in GetProperties() or the compiler gets confused. 
17594         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
17595         * reflection.h, reflection.c: add fixup mechanism for field and method
17596         tokens. Initialize assembly->typeref in a single place. Output
17597         properties after events. Support custom attributes for events, too.
17598         Typo fix for paramter custom attrs.
17599
17600 2002-03-07  Martin Baulig  <martin@gnome.org>
17601
17602         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
17603
17604 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
17605
17606         * class.c (mono_array_class_get): fix. for multi. dim. arrays
17607
17608 2002-03-06  Martin Baulig  <martin@gnome.org>
17609
17610         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
17611         non-zero lower bounds. See testcases #F10-#F13.
17612
17613 2002-03-05  Martin Baulig  <martin@gnome.org>
17614
17615         * exception.c (mono_get_exception_argument_out_of_range): New exception.
17616
17617         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
17618         ves_icall_System_Array_GetValue(), only calculate the absolute array position
17619         here.
17620         (ves_icall_System_Array_SetValue): Likewise.
17621         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
17622         as argument and does the actual work. This function is used when copying a
17623         multi-dimensional array.
17624         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
17625         now do all the widening conversions of value types.
17626         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
17627
17628 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17629
17630         * class.c: remove some magic numbers and use the smbolic names,
17631         instead. Added init_events() to load event info at class init time.
17632         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
17633         and mono_metadata_methods_from_event().
17634         * reflection.h, reflection.c: added support for writing out the evnets
17635         related information.
17636
17637 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17638
17639         * reflection.h, icall.c: use a different method (GetInterfaces)
17640         to gather interface info and add isbyref, isprimitive and
17641         ispointer to the ves_icall_get_type_info() return value.
17642
17643 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
17644
17645         * class.h: stared adding support for events.
17646         * icall.c: split find_members implementation. Added debug icall to get
17647         the address of an object.
17648         * reflection.c: handle TypeBuilders in mono_type_get_object().
17649
17650 2002-03-01  Martin Baulig  <martin@gnome.org>
17651
17652         * icall.c (ves_icall_System_Array_GetLength): This must throw an
17653         ArgumentOutOfRangeException(), not an ArgumentException().
17654         (ves_icall_System_Array_GetLowerBound): Likewise.
17655         (ves_icall_System_Array_GetValue): Improved argument checking.
17656         (ves_icall_System_Array_SetValue): Improved argument checking.
17657
17658 2002-03-01  Martin Baulig  <martin@gnome.org>
17659
17660         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
17661         called with invalid arguments rather than just dying with g_assert().
17662         (ves_icall_System_Array_SetValue): Likewise.
17663         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
17664         raise a NotImplementedException instead.
17665         (ves_icall_System_Array_GetLength): Added argument checking.
17666         (ves_icall_System_Array_GetLowerBound): Added argument checking.
17667
17668 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
17669
17670         * object.h (mono_assert): new macros mono_assert and
17671         mono_assert_not_reached
17672
17673 2002-02-28  Martin Baulig  <martin@gnome.org>
17674
17675         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
17676         and "System::String::IsInterned" to "System::String::_IsInterned".
17677
17678 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
17679
17680         * icall.c: remove hacks for typebuilder. Added icall to create a
17681         modified type from a tybebuilder.
17682         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
17683         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
17684         to create a backing MonoClass for a TypeBuilder.
17685
17686 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17687
17688         * class.c, class.h: more refactoring of class init.
17689         Export mono_class_setup_mono_type() and mono_class_setup_parent().
17690
17691 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
17692
17693         * marshal.c, marshal.h: start of marshaling interface.
17694
17695 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
17696
17697         * icall.c: fix order in assembly qualified name icall.
17698
17699 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
17700
17701         * class.c: do not free str, since we store it in the hash table.
17702         * reflection.h: add label field to MonoILExceptionInfo.
17703         * reflection.c: handle references to more than one assembly. Handle
17704         case when there isn't a module created in the assembly.
17705
17706 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17707
17708         * class.c: Fix typo. Start refactoring of class init code.
17709
17710 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17711
17712         * appdomain.c: exit with 1 on error.
17713         * class.c: we already have the name in MonoClassField.
17714         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
17715         MonoStreamHeader instead of an offset of image->raw_metadata.
17716
17717 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
17718
17719         * appdomain.c (mono_init): Be even more descriptive about the error.
17720
17721 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
17722
17723         * appdomain.c: give the user an informative message when corlib can't
17724         be loaded.
17725
17726 2002-02-26  Martin Baulig  <martin@gnome.org>
17727
17728         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
17729         New icall to get the time zone data.
17730
17731 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17732
17733         * reflection.c: set virtual and raw size of section correctly.
17734         * threads.c: transfer domain information to newly created threads.
17735
17736 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
17737
17738         * class.c: when instancing a class in a domain, load the default
17739         vaules for static fields from the constant table. Fix System.Enum to
17740         not be an enum.
17741         * icall.c: implement Object::GetType() internalcall. Implemented
17742         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
17743         Fixed checking of binding flags in find_members().
17744         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
17745         * reflection.c: handle enumerations when writing to the constant
17746         table. Use a different object cache for types.
17747
17748
17749 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
17750
17751         * object.c (mono_object_isinst): fix for arrays
17752
17753         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
17754
17755 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
17756
17757         * object.c: don't use mprotect ()  and fix intern pool hash table
17758         lookup for big endian systems.
17759
17760 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17761
17762         * icall.c: change type_is_subtype_of () signature.
17763
17764 2002-02-21  Mark Crichton  <crichton@gimp.org>
17765
17766         * rand.c, rand.h: Added random number generator for
17767         System.Security.Cryptography classes.
17768
17769         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
17770
17771         * icall.c: Added System.Security.Cryptography calls.
17772
17773 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
17774
17775         * class.c, icall.c, metadata.c: better support for pointer types.
17776         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
17777         * reflection.c: Add support for getting custom attrs for properties
17778         and simplify some code.
17779
17780 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17781
17782         * icall.c: change getToken () and add custom attribute GetBlob()helper
17783         method.
17784         * reflection.h: add custom attrs array to the reflection builder structures.
17785         * reflection.c: encode and emit custom attributes for all the relevant
17786         reflection objects. Cache fieldref and methodref tokens. Change
17787         mono_image_create_token() interface to take a MonoDynamicAssembly.
17788         More complete custom attributes decoder. Load custom attributes for
17789         Assembly, Field, Method and Constructor objects, too. Make the
17790         returned array an Attribute[] one, not object[]. Added
17791         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
17792         custom attribute constructor.
17793
17794 2002-02-20  Dick Porter  <dick@ximian.com>
17795
17796         * icall.c:
17797         * rawbuffer.c:
17798         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
17799         problem code out for now).
17800
17801 2002-02-19  Radek Doulik  <rodo@ximian.com>
17802
17803         * object.c (mono_ldstr): use hash table to avoid multiple swapping
17804
17805 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
17806
17807         * icall.c: register the GetCustomAttributes method.
17808         * object.c, object.h: add mono_string_new_len ().
17809         * reflection.h, reflection.c: added mono_runtime_invoke(),
17810         mono_install_runtime_invoke(). Added
17811         mono_reflection_get_custom_attrs () to load custom attributes and
17812         create the attribute objects.
17813
17814 2002-02-19  Dick Porter  <dick@ximian.com>
17815         * threads-dummy-types.c:
17816         * threads-dummy-types.h:
17817         * threads-dummy.c:
17818         * threads-dummy.h:
17819         * threads-pthread-types.c:
17820         * threads-pthread-types.h:
17821         * threads-pthread.c:
17822         * threads-pthread.h:  Deleted obsolete files
17823
17824 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
17825
17826         * class.c (mono_class_vtable): runtime init the class when we
17827         allocate static class data.
17828
17829         * icall.c (ves_icall_System_Array_SetValue): check for null values.
17830
17831         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
17832         and String - but we will need generic marshalling support in the
17833         future. 
17834         (mono_init): set the domain name in a ms compatible way
17835
17836         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
17837         String[].
17838
17839 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
17840
17841         * object.c (mono_array_clone): use alloca() instead of g_malloc  
17842         for sizes
17843
17844         * appdomain.c (mono_domain_unload): impl.
17845
17846 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17847
17848         * appdomain.c, object.c: fix intern pool implementation.
17849         * class.c: fix alignment code.
17850
17851 2002-02-16  Radek Doulik  <rodo@ximian.com>
17852
17853         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
17854         and s2 > s1, just copy lower bytes to be compatible with little
17855         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
17856         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
17857
17858         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
17859         force big_endian to be 1 for big endian machines 
17860         (ves_icall_iconv_new_decoder): ditto
17861
17862 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
17863
17864         * socket-io.c (convert_sockopt_level_and_name): If the system
17865         doesn't define SOL_IP or SOL_TCP, get them by hand using
17866         getprotobyname() and caching the values (because this could be a
17867         slow operation).
17868         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
17869         Use the appropriate struct when the system does support it. Ie,
17870         not all systems have struct ip_mreqn so use struct ip_mreq when
17871         appropriate.
17872
17873 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
17874
17875         * reflection.c: handle finally clauses.
17876
17877 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
17878
17879         * socket-io.c: use g_snprintf() instead of snprintf.
17880
17881 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
17882
17883         * reflection.c (mono_param_get_objects): Cast second argument to
17884         mono_method_get_param_names to a const char** to silence the
17885         compiler warning.
17886
17887         * appdomain.c (mono_domain_assembly_open): Put parens around the
17888         truth statement in the for-loop.
17889
17890         * unicode.c (iconv_convert): Got rid of a compiler warning about
17891         int i being unused when the system has a new iconv.
17892         (iconv_get_length): Same.
17893
17894         * image.c (load_class_names): Cast the second argument to
17895         g_hash_table_insert() to char* to hush compiler warnings about the
17896         arg being a const.
17897         (mono_image_open): Same here.
17898
17899         * socket-io.c: Don't conditionally include sys/filio.h or
17900         sys/sockio.h here anymore since we now get them from
17901         io-layer/io-layer.h
17902         (inet_pton): If the system doesn't support inet_aton, implement
17903         using inet_addr and also #define INADDR_NONE if it isn't defined
17904         by the system.
17905
17906 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
17907
17908         * metadata.c, metadata.h: added function to get packing and size info
17909         of a typedef.
17910         * reflection.h, reflection.c: handle field RVA data. Save info about
17911         the table layout if needed. Assign typedef indexes to all the types
17912         before dumping the info about them to avoid forward reference problems.
17913
17914 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
17915
17916         * socket-io.c (convert_sockopt_level_and_name): ifdef
17917         SO_ACCEPTCONN because it is not defined on my system (old debian)
17918
17919 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17920
17921         * opcode.c: use stddef.h to get NULL.
17922
17923 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
17924
17925         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
17926         for FIONBIO, FIONREAD and SIOCATMARK.
17927         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
17928         define INADDR_NONE and besides, inet_addr() is deprecated and
17929         should not be used. Use inet_pton() instead - it also has the
17930         added bonus that it can easily handle IPv6 addresses as well.
17931         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
17932
17933 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
17934
17935         * decimal.c: remove _MSC_VER conditional.
17936
17937 2002-02-13  Dick Porter  <dick@ximian.com>
17938
17939         * socket-io.c: 
17940         * icall.c: Internal calls for Blocking, Select, Shutdown,
17941         GetSocketOption and SetSocketOption
17942
17943 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17944
17945         * assembly.cs: better resolver: use it instead of some kludgy
17946         code.
17947
17948 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
17949
17950         * reflection.c: the best way to speed-up the compiler is to avoid
17951         infinite loops.
17952
17953 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
17954
17955         * class.c (mono_class_vtable): changed the object layout
17956         (obj->vtable->class). 
17957         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
17958
17959 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17960
17961         * assembly.c: look for assemblies in the assembly dir, too.
17962
17963 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17964
17965         * class.c: fix thinko in mono_class_from_type().
17966
17967 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17968
17969         * exception.h, exception.c: added TypeLoadException.
17970         * object.h, object.c: added mono_array_clone ().
17971         * icall.c: handle throwOnError in AssemblyGetType().
17972         Added Array.Clone().
17973         * opcode.h, opcode.c: use a single value for the opcode val.
17974         Compile fix for non-gcc compilers.
17975
17976 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
17977
17978         * opcodes.c, opcodes.h: export interesting info about opcodes.
17979
17980 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
17981
17982         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
17983         icalls. 
17984
17985         * class.c (class_compute_field_layout): set element_class for enums
17986         (mono_class_create_from_typedef): set element_class for normal classes
17987
17988         * icall.c (ves_icall_System_Enum_get_value): impl.
17989
17990         * class.c (mono_class_create_from_typedef): do not set valuetype
17991         flag for System.ValueType and System.Enum
17992
17993 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
17994
17995         * unicode.c (iconv_convert): fix big endian problem.
17996
17997 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17998
17999         * class.c: add asserts if we are ever going to scribble over memory.
18000         * socket-io.c: not all systems have AF_IRDA defined.
18001
18002 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
18003
18004         * class.c (class_compute_field_layout): do not consider static
18005         fields to compute alignment
18006
18007 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
18008
18009         * appdomain.c (mono_appdomain_get): impl.
18010         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
18011
18012 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18013
18014         * icall.c: ignore "file://" prefix when loading an assembly.
18015
18016 2002-01-23  Dick Porter  <dick@ximian.com>
18017
18018         * socket-io.c:
18019         * icall.c:
18020         * Makefile.am: Added socket support
18021
18022 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
18023
18024         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
18025         code back.  This should return the assemblies that are loaded by
18026         the runtime on behalf of an application domain. 
18027
18028         The current implementation is still broken, it just returns every
18029         assembly loaded, but until we get real applications domain this
18030         will do.
18031
18032 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
18033
18034         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
18035         AppDomain object.
18036
18037 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
18038
18039         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
18040         the mono_class_from_name lookup.
18041         (ves_icall_get_parameter_info): ditto.
18042         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
18043         method.
18044         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
18045
18046 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
18047
18048         * class.c: load also nested classes on class init.
18049         System.ValueType instance methods gets passed boxed
18050         values, unless methods in derived classed that get a pointer to the
18051         data.
18052         * icall.c: use better name parsing code in GetType().
18053         * image.c, image.h: add mono_image_loaded ().
18054         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
18055         * reflection.c, reflection.h: added mono_reflection_parse_type().
18056
18057 2002-01-22  Veronica De Santis <veron78@interfree.it>
18058
18059         * icall.c : Added mapping of internal calls for Manual and Auto reset events
18060         * threads.c : Added the implementation of internal calls for events
18061         * threads.h : Added prototypes of internal calls for events
18062         
18063 2002-01-21  Radek Doulik  <rodo@ximian.com>
18064
18065         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
18066
18067 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
18068
18069         * class.c (mono_class_init): set min_align to 1 (instead of 0)
18070         (mono_class_value_size): use min_align
18071
18072 2002-01-20  Dick Porter  <dick@ximian.com>
18073
18074         * threads.h:
18075         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
18076         so it compiles on w32.
18077
18078 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
18079
18080         * metadata.c (mono_type_stack_size): impl.
18081
18082         * class.c (mono_class_get_field): impl. memberref token
18083
18084 2002-01-16 Veronica De Santis <veron78@@interfree.it>
18085
18086         * icall.h : Added the internal calls mapping for CreateMutex_internal
18087                     and ReleaseMutex_internal.
18088         * threads.h : Added the prototype of mutexes internal calls.
18089         * threads.c : Added the implementations of mutexes internal calls.
18090
18091 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18092
18093         * metaparse.h: removed unused file.
18094         * reflection.c, reflection.h: added stream_data_align () function 
18095         to align data in streams and keep stream aligned. Add support for
18096         exception support in method headers.
18097
18098 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
18099
18100         * unicode.c: make iconv_convert () return the number of bytess written
18101         in the output buffer.
18102
18103 2002-01-15  Dick Porter  <dick@ximian.com>
18104         * threads.c: Make the runtime's idea of infinite timeouts coincide
18105         with the class library's
18106
18107         Fix a particularly egregious bug in mono_thread_cleanup(). That
18108         code was so utterly bogus it must have been written on a Monday.
18109
18110 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18111
18112         * reflection.h: add subtypes field to TypeBuilder.
18113         * reflection.c: encode constants for literal fields.
18114         Handle subtypes. Fix user string token (and add a zero byte)
18115         at the end.
18116         
18117 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
18118
18119         * class.c (mono_class_init): bug fix: assign slot numbers for
18120         abstract methods.
18121
18122 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18123
18124         * reflection.c: don't try to output a code RVA for abstract methods.
18125         Small fixes for method header format. Output parameter info to the
18126         ParamDef table. Save method overriding info to MethodImpl table.
18127         Fix property support. Allow typedef.extends to be a type in the
18128         building assembly.
18129         * verify.c: fix off-by-one error.
18130
18131 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
18132
18133         * class.c: fix mono_class_from_mono_type () for szarray types.
18134         Remove unused cache check in mono_class_from_type_spec().
18135         * icall.c: *type_from_name () functions handle simple arrays and byref.
18136         * reflection.c: handle byref and szarray types. Handle methods without
18137         body (gets P/Invoke compilation working). Handle types and fields in
18138         get_token ().
18139         * reflection.h: add rank to MonoTypeInfo.
18140
18141 2002-01-10  Dick Porter  <dick@ximian.com>
18142
18143         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
18144         internal calls
18145
18146 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18147
18148         * icall.c: initialize class in type_from_handle ().
18149         Loop also in parent classes for get_method ().
18150         * reflection.c: properly encode class and valuetype types.
18151         Start on encoding TypeBuilder types. Handle fieldrefs.
18152         Use correct length when registering a user string.
18153         Handle ConstructorBuilder and MonoMethod in get_token ().
18154         Make mono_type_get_object () aware of cached types.
18155         * object.c: back out change to mono_string_new ().
18156
18157 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
18158         * object.c: mono_string_new should return a NULL when the string 
18159         passed in is NULL -- not try to deference it.
18160         
18161 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18162
18163         * icall.c: hack to make IsSubType work for TypeBuilders.
18164         * reflection.c: emit constructors before methods.
18165         Retrieve param names in mono_param_get_objects().
18166
18167 2002/01/05  Nick Drochak  <ndrochak@gol.com>
18168
18169         * Makefile.am: fix list of headers and sources so automake 1.5
18170         doesn't complain. Removed \# at end of list.
18171
18172 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18173
18174         * reflection.c: get token for a method ref. Set return type of
18175         constructor to void.
18176         * loader.c: debug message.
18177         * class.c: typo fix.
18178
18179 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
18180
18181         * icall.c: fix array init with rank > 1. FindMembers
18182         loops in parent class as well.
18183         * image.c: do not insert nested types in name cache.
18184         * reflection.c: warning fix.
18185         * reflection.h: add override method (for interface impl).
18186
18187 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
18188
18189         * metadata.c: fix customattr decoding.
18190
18191 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
18192
18193         * rawbuffer.cs: Added native Win32 implementation, avoids using
18194         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
18195
18196 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
18197
18198         * class.c: make the low-level routines handle the cache.
18199
18200 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
18201
18202         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
18203
18204 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
18205
18206         * class.c: fix mono_array_element_size() for objects.
18207         * class.h, class.c: add properties to MonoClass and load them
18208         at init time.
18209         * icall.c: check with isinst() when assigning a value to an array
18210         instead of requiring the classes to match exactly.
18211         Implemented icall for System.Type::GetType().
18212         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
18213         enums. Handle bindingflags when looking for methods and fields.
18214         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
18215         and mono_metadata_methods_from_property().
18216         * reflection.h, reflection.c: added structures for propreties,
18217         parameters and enums. Implemented mono_property_get_object() and
18218         mono_param_get_objects().
18219
18220 2001-12-18  Dick Porter  <dick@ximian.com>
18221
18222         * file-io.c: Use mono_string_to_utf16() instead of
18223         mono_string_chars()
18224
18225         * object.c: Added mono_string_to_utf16(), which copies the non
18226         NULL-terminated MonoString into a new double-null-terminated
18227         buffer.
18228
18229 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
18230
18231         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
18232
18233 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
18234
18235         * file-io.c: raise exceptions if handle is invalid.
18236
18237 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
18238
18239         * assembly.c: yet another check for mscorlib.
18240         * class.c, class.h: load nesting info for classes.
18241         * icall.c: many new functions to support the Reflection classes.
18242         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
18243         * reflection.h, reflection.c: mono_image_create_token(),
18244         mono_assembly_get_object(), mono_type_get_object(),
18245         mono_method_get_object(), mono_field_get_object(): methods to return
18246         objects that parallel the C representation of assemblies, types,
18247         methods, fields.
18248
18249 2001-12-11  Dick Porter  <dick@ximian.com>
18250
18251         * icall.c:
18252         * file-io.c: Internal calls for file IO.
18253
18254 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
18255
18256         * tabledefs.h: missing FileAttributes.
18257         * verify.h, verify.c: use is_valid_string () to simplify and check for
18258         valid strings more correctly. Fix warnings and speeling.
18259         Check more tables: Filed, File, ModuleRef, StandAloneSig.
18260         Check code: branches, maxstack, method calls.
18261
18262 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
18263
18264         * object.c (mono_object_allocate): removed static, so that the jit
18265         can allocate value types.
18266
18267         * icall.c (ves_icall_System_DateTime_GetNow): impl.
18268
18269 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18270
18271         * class.c: init enum types right away and register the
18272         token->MonoClass map in mono_class_create_from_typedef ().
18273         * verify.h, verify.c: first cut of the verifier.
18274         * pedump.c: add --verify switch to verify metadata tables.
18275         * tabledefs.h: add some missing enums.
18276
18277 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
18278
18279         * class.c (mono_install_runtime_class_init): impl.
18280         (mono_class_init): renamed mono_class_metadata_init to
18281         mono_class_init, also removed the metadata_inited flag
18282
18283         * object.c (mono_object_isinst): use faster algorithm
18284
18285 2001-11-30  Radek Doulik  <rodo@ximian.com>
18286
18287         * mono-endian.h: reverted last change
18288         added function prototypes
18289
18290         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
18291         add mono-endian.c back
18292
18293         * mono-endian.c: returned back, as Paolo pointed out, it's needed
18294         for unaligned access, I've mistaked it with endianess. I am
18295         sorry.
18296         (mono_read16): fix reverted endianess
18297         (mono_read64): ditto
18298         (mono_read32): ditto
18299
18300 2001-11-30  Dick Porter  <dick@ximian.com>
18301
18302         * exception.c: Implement mono_exception_from_name()
18303
18304 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18305
18306         * metadata.h, metadata.c: remove params_size and locals_size and their
18307         calculation from the metadata code: they are only usefult to the
18308         interp.
18309
18310 2001-11-29  Radek Doulik  <rodo@ximian.com>
18311
18312         * object.c (mono_ldstr): swap bytes here, it's probably not the
18313         best place, but works for me now, I'll redo it once I know mono
18314         better, also note that I add PROT_WRITE and don't reset back, also
18315         note that it's only affects big endians, so x86 should be OK
18316
18317         * mono-endian.h (read16): use just glib macros for both endians
18318
18319         * mono-endian.c: removed as glib macros are used in in
18320         mono-endian.h so we don't need to care about endianess for read
18321         macros as glib does that for us already
18322
18323 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
18324
18325         * class.h, class.h: take minimum alignment into consideration so
18326         that the fields of a class remain aligned also when in an array.
18327
18328 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18329
18330         * loader.h, loader.c: add mono_method_get_param_names().
18331         * class.c: 0-init class fields.
18332
18333 2001-11-26  Dick Porter  <dick@ximian.com>
18334
18335         * icall.c:
18336         * threads-types.h:
18337         * threads.c: New file that handles System.Threading on all platforms
18338
18339         * object.c: 
18340         * object.h: Remove the synchronisation struct from MonoObject,
18341         replace it with a pointer that gets initialised on demand
18342
18343         * Makefile.am: Replace all the system-specific threading code with
18344         a single file that uses the new wrapper library
18345
18346 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
18347
18348         * class.c, class.h: add mono_install_trampoline() so that the runtime
18349         can register a function to create a trampoline: removes the ugly
18350         requirement that a runtime needed to export arch_create_jit_trampoline.
18351         * object.h, object.c: added mono_install_handler() so that the runtime
18352         can install an handler for exceptions generated in C code (with
18353         mono_raise_exception()). Added C struct for System.Delegate.
18354         * pedump.c: removed arch_create_jit_trampoline.
18355         * reflection.c: some cleanups to allow registering user strings and
18356         later getting a token for methodrefs and fieldrefs before the assembly
18357         is built.
18358         * row-indexes.h: updates and fixes from the new ECMA specs.
18359
18360 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
18361
18362         * class.h, class.c: add enum_basetype field to MonoClass.
18363         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
18364         to get index in the constant table reated to a field, param or
18365         property.
18366         * reflection.h, reflection.c: handle constructors. Set public-key and
18367         version number of the built assembly to 0.
18368         * row-indexes.h: update from new ECMA spec.
18369
18370 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18371
18372         * class.h, class.c: add a max_interface_id to MonoClass.
18373         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
18374         since it's used to do that. Added mono_type_type_from_obj().
18375         Make GetType() return NULL instead of segfaulting if the type was not
18376         found. Handle simple arrays in assQualifiedName.
18377         * object.h: add a struct to represent an Exception.
18378         * reflection.c: output call convention in method signature.
18379         Add code to support P/Invoke methods and fixed offsets for fields.
18380
18381 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
18382
18383         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
18384         the value.
18385         * icall.c: use mono_array_addr instead of array->vector: fixes the
18386         reflection image writing.
18387         * reflection.c: init call convention byte to 0 in method signature.
18388         Encode the property signature. Don't output property-related methods
18389         twice. Really process the properties for a type (don't cast a field to
18390         a property, my mom always told me that).
18391         Fix 64 bit issues in pointer alignment in a different and more
18392         readable way.
18393
18394 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
18395
18396         * loader.h: Removed type class from MonoDefaults, added monotype
18397
18398         * loader.c: Loaded MonoType, removed loading of Type
18399
18400         * icall.c (my_mono_new_object): Now returns a System.MonoType,
18401         and fills in System.Type._impl with a RuntimeTypeHandle rather
18402         than the actual MonoClass *
18403
18404         (ves_icall_type_from_handle): change from type_class to
18405         monotype_class
18406
18407         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
18408         implemented
18409
18410         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
18411         implemented
18412
18413         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
18414
18415         (ves_icall_System_Reflection_Assembly_GetType): implemented
18416
18417         (ves_icall_System_MonoType_assQualifiedName): implemented
18418
18419         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
18420
18421 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
18422
18423         * assembly.c (mono_assembly_open): Implement a cache for the
18424         assemblies. 
18425
18426         (mono_assembly_close): only destroy the assembly when the last
18427         reference is gone.
18428         
18429 2001-11-09  Dick Porter  <dick@ximian.com>
18430
18431         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
18432
18433 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
18434
18435         * class.c (mono_class_metadata_init): bug fix: compute the right slot
18436
18437 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18438
18439         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
18440         from Martin Weindel.
18441         * object.h: add mono_string_chars ().
18442
18443 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
18444
18445         * reflection.c (build_compressed_metadata): Eliminates warnings
18446         and uses 64-bit clean code.
18447
18448         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
18449         (mono_type_equal): Change signature to eliminate warnings.
18450
18451 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18452
18453         * icall.c, loader.c: remove the internalcall array constructors.
18454         Changes to match the new MonoArray structure.
18455         * object.h, object.c: an array object doesn't allocate an extra
18456         vector. Add mono_array_new_full () to create jagged arrays easily.
18457
18458 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18459
18460         * metadata.h, metadata.c: add mono_metadata_field_info () to
18461         retreive all the info about a field from vairous tables.
18462         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
18463         * class.h, class.c: augment MonoClassField with more info.
18464         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
18465         policy and load a field's RVA if needed.
18466
18467 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
18468
18469         * class.c (mono_class_metadata_init): create a trampoline for all
18470         virtual functions instead of actually compiling them.
18471
18472 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
18473
18474         * class.h, class.c: include name in MonoClassField.
18475         * class.c: fix fundamental type of System.Object and System.String.
18476         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
18477         tokens in ldtoken.
18478         * icall.c: remove internalcalls for the Reflection stuff that is now
18479         done in C# code.
18480         * loader.c: mono_field_from_memberref () implementation.
18481         * mono-endian.c: thinko (s/struct/union/g).
18482         * object.c, object.h: make the mono_string_* prototypes actually use
18483         MonoString instead of MonoObject.
18484         * reflection.c, reflection.h: updates for changes in the reflection
18485         code in corlib: we use C structures that map to the actual C# classes.
18486         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
18487         fat method header if needed and use the info from the ILGenerator for
18488         methods. Handle fields in types. Misc fixes.
18489
18490 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
18491
18492         * class.c (mono_class_metadata_init): bug fix: always allocate
18493         space for static class data
18494
18495 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
18496
18497         * class.c (mono_compute_relative_numbering): use relative
18498         numbering to support fast runtime type checks.
18499
18500 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
18501
18502         * class.c (mono_class_create_from_typeref): added debugging output
18503         to print class name when MonoDummy is returned instead of real class
18504
18505 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
18506
18507         * class.c (mono_class_metadata_init): interface offset table now
18508         contains pointers into the vtable - this is more efficient for the jit
18509
18510 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
18511
18512         * class.c (mono_class_metadata_init): use a temporary vtable (the
18513         old algorithm only worked for the interpreter, but not for the jit)
18514
18515 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
18516
18517         * loader.c (method_from_memberref): use mono_class_get to get the
18518         class of an array instead of using System.Array directly.
18519         (mono_get_method): also add MEMBERREF methods to the method cache
18520         which usefull for arrays.
18521
18522 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
18523
18524         * pedump.c (arch_compile_method): added to compute vtable entry
18525
18526         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
18527         number of interfaces.
18528         
18529         * class.h: merged MonoArrayClass into MonoClass
18530
18531         * class.c (mono_class_create_from_typedef): compute the vtable size and
18532         allocate space to include the vtable inside MonoClass
18533         (mono_class_metadata_init): initialize the vtable
18534
18535 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
18536
18537         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
18538         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
18539         * image.c: endian fixes by Laurent Rioux.
18540         * object.h, object.c: rename MonoStringObject to MonoString and
18541         MonoArrayObject to MonoArray. Change some function names to conform to
18542         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
18543         guint16* as first argument, so don't use char*.
18544         Provide macros to do the interesting things on arrays in a portable way.
18545         * threads-pthread.c: updates for the API changes and #include <sched.h>
18546         (required for sched_yield()).
18547         * icall.c: updates for the API changes above.
18548         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
18549         platforms that need them.
18550
18551 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
18552
18553         * class.c: set the correct type for all the fundamental
18554         type when loading the class.
18555
18556 2001-10-05  Dick Porter  <dick@ximian.com>
18557
18558         * threads-pthread.c (pthread_mutex_timedlock): Simple
18559         compatibility version for C libraries that lack this call.
18560
18561 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18562
18563         * class.c: MonoTypes stored in MonoClass are stored as
18564         fundamental MonoTypes when the class represents a
18565         fundamental type (System.Int32, ...).
18566         The TypeHandle return by ldtoken is a MonoType*.
18567         * icall.c: ves_icall_get_data_chunk () write out all the
18568         PE/COFF stuff. Implement ves_icall_define_method (),
18569         ves_icall_set_method_body (), ves_icall_type_from_handle ().
18570         * image.c: properly skip unknown streams.
18571         * loader.h, loader.c: add type_class to mono_defaults.
18572         * metadata.c, metadata.h: export compute_size () as
18573         mono_metadata_compute_size () with a better interface.
18574         Typo and C&P fixes.
18575         * pedump.c: don't try to print the entry point RVA if there is no entry point.
18576         * reflection.c, reflection.h: many cleanups, fixes, output method
18577         signatures and headers, typedef and typeref info, compress the metadata
18578         tables, output all the heap streams, cli header etc.
18579         * row-indexes.h: typo fixes.
18580
18581 2001-10-04  Dick Porter  <dick@ximian.com>
18582
18583         * object.h: Add a synchronisation mutex struct to MonoObject
18584
18585         * object.c (mono_new_object): Initialise the object
18586         synchronisation mutexes
18587
18588         * icall.c: System.Threading.Monitor internal calls
18589         
18590         * threads-pthread.h:
18591         * threads-pthread.c: System.Threading.Monitor internal calls
18592
18593         * threads-types.h: New file, includes the system-specific thread
18594         structures
18595         
18596         * threads-pthread-types.h:
18597         * threads-pthread-types.c: New files, handle pthread-specific
18598         synchronisation types
18599
18600         * threads-dummy-types.h: 
18601         * threads-dummy-types.c: New files of dummy support for
18602         thread-specific types
18603
18604         * metadata.c:
18605         * image.c:
18606         * pedump.c: include mono-endian.h not endian.h
18607         
18608         * Makefile.am: More threads files.
18609         Name mono-endian.h not endian.h
18610
18611 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
18612
18613         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
18614         stuff and implement a few more bits.
18615         * icall.c: a field needs to be dereferenced twice. Do not use the same
18616         name for two variables in the same scope.
18617         * image.c, image.h: cleanups.
18618
18619 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
18620
18621         * class.c (mono_class_metadata_init): bug fix: compute the right size
18622
18623 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
18624
18625         * icall.c: implemented some of the Reflection internalcalls.
18626         * image.c, image.h: start writing out the PE/COFF image.
18627         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
18628         that does the reverse than decode_blob_size ().
18629         * object.c: use mono_metadata_encode_value (). Move here
18630         temporary implementation of mono_string_to_utf8 ().
18631         * rawbuffer.c: make malloc_map static.
18632
18633 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18634
18635         * metadata.c: fix type comparison for arrays.
18636         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
18637         Added a couple of new classes to monodefaults.
18638         * icall.c: added a couple of Reflection-related internalcalls.
18639         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
18640         Added a byval_arg MonoType to MonoClass.
18641
18642 2001-09-28  Dick Porter  <dick@ximian.com>
18643
18644         * icall.c:
18645         * threads-pthread.h: 
18646         * threads-pthread.c: Implemented internal calls for
18647         LocalDataStoreSlot operations.  Applied mutexes around all shared
18648         data.  Reworked the thread creation and Start() operations to
18649         avoid a race condition.
18650         
18651         * threads-dummy.h:
18652         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
18653
18654 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
18655
18656         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
18657
18658 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
18659
18660         * class.c, loader.c: warn and return NULL instead of erroring out.
18661         * icall.c: added System.AppDomain::getCurDomain().
18662         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
18663
18664 2001-09-25  Dick Porter  <dick@ximian.com>
18665
18666         * threads-pthread.h:
18667         * threads-pthread.c: Implemented timed thread joining and added
18668         System.Threading.Thread::Join_internal internal call
18669
18670         * icall.c: Added System.Threading.Thread::Join_internal internal call
18671
18672         * threads-dummy.h:
18673         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
18674
18675 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
18676
18677         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
18678         mono_string_intern () to implement the semantics of the ldstr opcode
18679         and the interning of System.Strings.
18680         * icall.c: provide hooks to make String::IsIntern and String::Intern
18681         internalcalls.
18682
18683 2001-09-23  Dick Porter  <dick@ximian.com>
18684
18685         * threads-dummy.c: 
18686         * threads-dummy.h: New files of dummy threading routines
18687
18688         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
18689         support code based on system specifics
18690
18691         Rename PTHREAD_LIBS to THREAD_LIBS
18692         
18693 2001-09-23  Dick Porter  <dick@ximian.com>
18694
18695         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
18696         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
18697         internal calls.
18698         (mono_thread_init): Set up a Thread object instance to return when
18699         the main thread calls Thread.CurrentThread
18700         (mono_thread_cleanup): Wait for all subthreads to exit
18701
18702         * icall.c: New internal calls for System.Threading.Thread::Sleep
18703         (including Schedule) and CurrentThread
18704
18705         * threads.h: New file, to insulate thread-specific stuff from the
18706         rest of the code
18707
18708 2001-09-21  Dick Porter  <dick@ximian.com>
18709
18710         * threads-pthread.h: 
18711         * threads-pthread.c: New file, for handling pthreads-style
18712         threading support.  Start() now starts a new thread and executes
18713         the ThreadStart delegate instance.
18714
18715         * icall.c: Added the internalcall for
18716         System.Threading.Thread::Start_internal
18717
18718         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
18719
18720 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
18721
18722         * loader.c: work around the different signatures for delegates
18723         constructors csc generates in compiled code vs the ones compiled in mscorlib.
18724
18725 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
18726
18727         * class.h, class.c: add mono_class_get_field_from_name ().
18728         * *: Fix C comments and other ANSI C issues.
18729
18730 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
18731
18732         * endian.h, assembly.c: fix some endianness issues.
18733
18734 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
18735
18736         * loader.h, load.c: add delegate_class to mono_defaults.
18737         Handle runtime provided methods in mono_get_method ().
18738
18739 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
18740
18741         * loader.c (mono_get_method): use pinvoke for internal call
18742
18743         * icall.c: use pinvoke for internal call
18744
18745         * loader.c (method_from_memberref): set the method name
18746
18747 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
18748
18749         * metadata.c: help the compiler generate better code for
18750         mono_class_from_mono_type ().
18751
18752 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
18753
18754         * class.c (mono_class_metadata_init): delayed computing of the
18755         class size to mono_class_metadata_init ()
18756
18757 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
18758
18759         * class.c, class.h: add an interfaces member to MonoClass.
18760         * image.c, image.h: add assembly_name field to MonoImage
18761         from the assembly table.
18762         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
18763
18764 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
18765
18766         * class.c: Handle Array in mono_class_from_mono_type ().
18767         * metadata.c, pedump.c: some endian fixes.
18768
18769 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
18770
18771         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
18772         * metadata.c: fix small problem introduced with the latest commit.
18773
18774 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
18775
18776         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
18777         We don't need a MonoMetadata pointer anymore to compare signatures in
18778         mono_metadata_signature_equal (), update callers.
18779         Reduced memory usage an number of allocations for MonoMethodHeader and
18780         MonoMethodSignature.
18781
18782 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
18783
18784         * metadata.c: added compare for szarray.
18785
18786 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
18787
18788         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
18789         and add a couple more types to it and mono_defaults. Give an hint on
18790         classes that need implementing in our corlib and are referenced
18791         in mscorlib.
18792
18793 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
18794
18795         * class.h, class.c: keep track if a class is also an Enum.
18796         * loader.c: Implement a couple more types for use in libffi
18797         marshalling. Gives better diagnostics when failing to dlopen
18798         a library. Set method->klass for P/Invoke methods, too.
18799
18800 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
18801
18802         * class.c, class.h: add a MonoType this_arg to MonoClass that
18803         represents a pointer to an object of the class' type that
18804         can be used by the interpreter and later the type cache.
18805         Add best guess alignment info for valuetype objects.
18806
18807 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
18808
18809         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
18810         into MonoType: one less level of indirection and allocation and
18811         simplifies quite a bit of code. Added cache for MonoTypes that are
18812         used frequently, so that we don't need to allocate them all the time.
18813
18814 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
18815
18816         * class.c (mono_class_create_from_typedef): System.Enum is also a
18817         value type, although it does not derive from System.ValueType
18818         (maybe a bug in the ms compiler?)
18819
18820         * metadata.c (mono_type_size): return the right size for value types
18821
18822         * loader.c (mono_get_method): only initialize method header if not abstract
18823
18824         * class.c (mono_class_from_mono_type): use mono_default values. 
18825
18826 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
18827
18828         * *: use MonoClass pointers instead of <type_tokens>
18829         
18830         * class.h: new flag: metadata_inited.
18831
18832         * class.c (mono_class_metadata_init): impl.
18833         (mono_class_instance_size): impl.
18834         (mono_class_data_size): impl.
18835
18836 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18837
18838         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
18839         MonoClass now has the name and name_space fields. 
18840         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
18841         mono_get_method () takes and optional MonoClass as argument.
18842         Removed mono_typedef_from_name() and added mono_class_token_from_name()
18843         instead that takes advantage of a map from class names to typedef
18844         tokens in MonoImage.
18845
18846 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
18847
18848         * metadata.c: zero is not a valid alignment boundary.
18849         Merge MONO_TYPE_VOID in default decoding code.
18850
18851 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
18852
18853         * image.h: merged MonoMetadata into MonoImage
18854
18855         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
18856         identify the type of elements.
18857
18858 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
18859
18860         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
18861         * cil-coff.h: split MonoMSDOSHeader and add size info.
18862         * image.c: add some consistency checks.
18863         * metadata.c: fix row size computation: one programmer
18864         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
18865         add explanation for the locator routine.
18866         Fix decoding of size in method header.
18867         
18868 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
18869
18870         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
18871         (g_concat_dir_and_file): Bring g_concat_dir_and_file
18872         function from gnome-libs.  This uses the right path separator
18873         based on the OS, and also works around a bug in some systems where
18874         a double slash is not allowed. 
18875         (default_assembly_name_resolver): Use g_concat_dir_and_file
18876         (mono_assembly_open): ditto.
18877
18878 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
18879
18880         * metadata.c (mono_metadata_signature_equal): impl.
18881
18882         * *: void is now a realy MonoType (instead of using NULL)
18883         
18884         * metadata.c (do_mono_metadata_parse_type): use
18885         mono_metadata_parse_type to parse void value.
18886
18887 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
18888
18889         * metadata.c, metadata.h: in the signature and method header store
18890         only the space required for holding the loca vars and incoming arguments.
18891
18892 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
18893
18894         * metadata.c (do_mono_metadata_parse_type): treat void like any
18895         other type (instead of assigning NULL);
18896
18897 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
18898
18899         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
18900
18901 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
18902
18903         * image.c (do_mono_image_open): added a cache for arrays.
18904
18905 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
18906
18907         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
18908         decode a single column from a row in a metadata table and changes
18909         to take advantage of it in the typedef locator (gives a nice speed up).
18910         Store offset info for function params.
18911
18912 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
18913
18914         * image.h (MONO_IMAGE_IS_CORLIB): removed 
18915
18916 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
18917
18918         * assembly.c: how could mono_assembly_close () had ever worked?
18919         * metadata.c, metadata.h: provide offset info for local vars.
18920         Implement mono_type_size () to take care of alignment as well
18921         as size (it was mono_field_type_size in cli/class.c before).
18922
18923 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
18924
18925         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
18926
18927         * assembly.h (CORLIB_NAME): set to corlib.dll
18928
18929         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
18930
18931 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
18932
18933         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
18934         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
18935         tokentype.h: massive namespace cleanup.
18936
18937 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
18938
18939         * metadata.h, metadata.c: decode exception clauses when parsing method header.
18940
18941 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
18942
18943         * metadata.c (mono_metadata_free_type): added check for type !=
18944         NULL (void) before calling mono_metadata_free_type()
18945
18946 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
18947
18948         * metadata.h, row_indexes.h: added header with enumerations to use
18949         to index in the columns from tables in metadata and to decode coded
18950         tokens: we should start using this instead of embedding magic numbers
18951         all over the code.
18952
18953 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
18954
18955         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
18956         Move metadata_t info from cli_image_info_t to MonoImage, where
18957         it's easily accessible. Changed all the uses accordingly.
18958         Added the method and class caches to MonoImage.
18959         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
18960         and mono_metadata_decode_value () signature to be more consistent
18961         with the other parse functions (and simplify code). Taken advantage
18962         of zero-length array allocation with GCC. Removed reduntant (and
18963         wrong) MonoFieldType struct and use MonoParam instead. Changed
18964         mono_metadata_parse_field_type () to use common code for parsing.
18965         Added mono_metadata_typedef_from_field () and
18966         mono_metadata_typedef_from_method () to lookup a typedef index from a
18967         field or method token.
18968         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
18969
18970 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
18971
18972         * metadata.c (mono_metadata_parse_field_type): Implement. 
18973         (do_mono_metadata_parse_type): Split engine from
18974         mono_metadata_parse_type, so that we can create smaller structures
18975         for things that just have one pointer to the MonoType (look at
18976         the MonoFieldType)
18977
18978 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
18979
18980         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
18981         as Jan Gray found out, it is incorrect. 
18982
18983 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
18984
18985         * assembly.c: Implement asssembly loading.  This loads an image
18986         and loads all the referenced assemblies.  Come to think of it, we
18987         could always do lazy loading of the assemblies. 
18988
18989         * image.c (mono_image_open): Keep loaded images in a hashtable.
18990
18991         * image.h (MonoImage): Add reference count.
18992
18993 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
18994
18995         * assembly.c (mono_assembly_open): Keep track of the file name in
18996         case the assembly has no ASSEMBLY table.
18997
18998         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
18999         from get.c here.
19000
19001 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
19002
19003         * metadata.c, metadata.h: decode local vars in method header
19004         parse function. Change callers accordingly.
19005
19006 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
19007
19008         * metadata.h, cil-coff.h: protect against multiple inclusion.
19009         Added some new structures to hold information decoded from metadata:
19010         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
19011         and relevant decoding/free functions.
19012         * metadata.c: implement decoding functions. Add warning for out of bounds
19013         index in mono_metadata_locate(). Implement mono_get_method () to retreive
19014         all the info about a method signature and invocation. Remove check on
19015         uninitialized local var in parse_mh() and fix memory leak.
19016
19017 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
19018
19019         * metadata.h: More macros.
19020
19021         * tokentype.h: New file.
19022
19023 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
19024
19025         * assembly.c: added a consistency check and initialize
19026         some structures with g_new0().
19027         * metadata.c: fixed a couple more bugs in table size computation
19028         and add other checks for out-of bound access to metadata.
19029
19030 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
19031
19032         * metatada.c: fix bugs computing table sizes. Spew a
19033         warning when index in string heap is out of bounds.
19034
19035 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
19036
19037         * metadata.h: Add a couple of macros to manipulate tokens. 
19038
19039 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19040
19041         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
19042         cli_section_tables).
19043
19044 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
19045
19046         * metadata.c (mono_metadata_user_string): New function, provides
19047         access to the UserString heap. 
19048
19049 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
19050
19051         * metadata.c: Add inline documentation.
19052
19053 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
19054
19055         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
19056         files. 
19057
19058 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
19059
19060         * typeattr.h: New file, TypeAttribute flags. 
19061
19062 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
19063
19064         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
19065         mono_assembly_ensure_section): Section loading code.
19066         (load_section_tables): Load the sections.
19067
19068         * mono/metadata/metadata.c (mono_metadata_locate_token,
19069         mono_metadata_locate): Functions to locate the information
19070         definition given a token or a table and an index.
19071         (mono_metadata_compute_table_bases): New.
19072         (compute_size): New function to compute the sizes of the various
19073         tables.
19074
19075         * mono/metadata/metadata.h: Finish listing the different index
19076         types. 
19077
19078         * mono/metadata/pedump.c: Improve to dump new information.
19079
19080 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
19081
19082         * mono/metadata/metadata.c: Entered all the tables matching
19083         Beta2. 
19084
19085         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
19086
19087
19088