2006-06-15 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / metadata / ChangeLog
1 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
2
3         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
4         and later freeing it. Fixes #78638.
5
6 2006-06-15  Miguel de Icaza  <miguel@novell.com>
7
8         * icall.c (mono_class_get_throw): Revert over-zealous error
9         throwing, the caller for mono_class_get_throw will cope with
10         errors when classes are not properly initialized already.
11
12         The code still copes with loader exceptions though.
13
14         Fixes the regression in reftype1 and reftype3 from the CAS tests.
15         
16 2006-06-14  Miguel de Icaza  <miguel@novell.com>
17
18         Fixes the `make run1' version of RuntimeAbort (to be commited,
19         source is in Bugzilla).
20         
21         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
22         FALSE on class loading failure instead of returning true.
23
24         * class.c (mono_class_create_from_typedef): It is possible for
25         mono_metadata_interfaces_from_typedef_full to fail if a class is
26         not found, cope with this.
27         
28
29 2006-06-14  Dick Porter  <dick@ximian.com>
30
31         * socket-io.c: 
32         * process.c: Fix a bunch of signed/unsigned warnings from gcc
33         4.1.1
34
35 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
36
37         * culture-info-table.h : oops, forgot to make it nsync with r61548.
38
39 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
40
41         * icall.c: Another fix for building mono in Visual Studio.
42
43 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
44
45         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
46         
47 2006-06-09  Martin Baulig  <martin@ximian.com>
48
49         * debug-mono-symfile.c: Put this back and really fix it this
50         time. Sorry for all the trouble.
51
52 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
53
54         * icall.c (mono_class_get_throw): Fix a warning.
55         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
56         ReflectionTypeLoadException if needed. Fixes #78606.
57
58         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
59         (mono_class_init): Ditto.
60
61         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
62         ref_only exceptions.
63         (mono_loader_clear_error): Make this work even if there is no error.
64
65 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
66
67         * object-internals.h marshal.c marshal.h icall.c: Implement method 
68         Marshal.GetComSlotForMethodInfo using internal call.
69
70 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
71
72         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
73         a function for signalling it.
74
75         * class.c (mono_class_from_typeref): Use the new kind of loader error when
76         a referenced assembly is not found.
77
78         * loader.c (mono_loader_error_prepare_exception): Add support for 
79         LOADER_ERROR_ASSEMBLY. Fix formatting.
80
81 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
82
83         * domain.c appdomain.c class-internals.h marshal.c: Add support 
84         for VARIANT marshalling on windows and increment corlib version
85         since Variant struct was added.
86
87 2006-06-03  Miguel de Icaza  <miguel@novell.com>
88
89         * debug-mono-symfile.c: Revert Martin's previous patch which broke
90         stack trace line information:
91
92         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
93         (Martin) when looking up B which is between A and C, return A not C.
94
95         Bug is #78573.
96
97         Thanks to Alexander Olk for tracking this down.
98
99 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
100
101         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
102         
103         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
104         avoid clobbering its value.
105         (mono_string_to_lpstr): Fix a warning on windows.
106
107 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
108
109         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
110         it gets GC tracking.
111
112         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
113         GC tracking.
114         
115         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
116
117         * marshal.c threadpool.c: Update callers of mono_async_result_new.
118
119         * appdomain.c: Bump corlib version.
120
121 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
122
123         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
124         CEE_STIND_REF when working with object references.
125
126 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
127
128         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
129         Fixes #78539.
130
131 2006-05-30  Miguel de Icaza  <miguel@novell.com>
132
133         * loader.c (method_from_memberref): Fix argument value for
134         mono_loader_set_error_method_load (I was passing the MonoClass
135         instead of the class name char *).
136
137 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
138
139         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
140         CEE_STIND_REF when working with object references.
141
142 2006-05-30  Martin Baulig  <martin@ximian.com>
143
144         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
145         mono_method_full_name() change and replace the ':' with a '.'
146         here.
147
148 2006-05-30  Martin Baulig  <martin@ximian.com>
149
150         * debug-mono-symfile.c
151         (mono_debug_symfile_lookup_location): Fix the algorithm:
152         when looking up B which is between A and C, return A not C.
153
154 2006-05-29  Martin Baulig  <martin@ximian.com>
155
156         * mono-debug.h
157         (MonoDebugMethodInfo): Make the typedef public.
158         (MonoDebugSourceLocation): New public struct.
159
160         * mono-debug.c
161         (mono_debug_source_location_from_address): Removed.
162         (mono_debug_source_location_from_il_offset): Removed.
163         (mono_debug_il_offset_from_address): Removed.
164         (mono_debug_address_from_il_offset): Removed.
165         (mono_debug_lookup_method): New public function.
166         (mono_debug_lookup_source_location): New public function; replaces
167         the old mono_debug_source_location_from_*() functions; see the
168         inline documentation.
169         (mono_debug_free_source_location): New public function.
170         (mono_debug_print_stack_frame): New public function; see the
171         inline documentation.
172
173         * debug-mono-symfile.c
174         (mono_debug_find_source_location): Renamed into
175         mono_debug_symfile_lookup_location(); only take a
176         `MonoDebugMethodInfo *' and an `offset' argument; added inline
177         documentation.
178         (mono_debug_find_method): Renamed into
179         mono_debug_symfile_lookup_method().
180
181 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
182
183         * assembly.c (mono_assembly_open_full): Dont overwrite the status
184         returned by mono_image_open_full ().
185
186         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
187         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
188         #78517.
189
190         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
191         #78518.
192
193 2006-05-27  Miguel de Icaza  <miguel@novell.com>
194
195         * class.c (mono_class_from_typeref): handle missing images
196         earlier, deals with bug #78418.   Refactor code; 
197
198         Fix a warning introduced in my previous commit (some stale code
199         from before I revisited my patch).
200
201         * class.c (mono_class_create_from_typedef): On failure, remove the
202         class from the MonoImage->class_cache as the class is not
203         initialized;   Fixes the leak pointed out by Paolo.
204
205 2006-05-25  Dick Porter  <dick@ximian.com>
206
207         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
208         DeleteCriticalSections until I figure out which one may still be
209         sometimes locked when mono_thread_cleanup is called.
210
211 2006-05-24  Dick Porter  <dick@ximian.com>
212
213         * threads.c (mono_thread_cleanup): Move the threading cleanup out
214         of mono_thread_manage and back into its own function, so it can be
215         called after the finalizer thread has finished.
216
217         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
218
219 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
220
221         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
222         Fixes #78495.
223
224         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
225         with non-blittable elements.
226         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
227
228 2006-05-24  Martin Baulig  <martin@ximian.com>
229
230         * mono-debug-debugger.h (MonoDebuggerEvent): Added
231         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
232
233         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
234         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
235         `mono_debugger_event_handler' to NULL.
236
237 2006-05-24  Martin Baulig  <martin@ximian.com>
238
239         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
240
241 2006-05-24  Martin Baulig  <martin@ximian.com>
242
243         * mono-debug-debugger.h
244         (mono_debugger_create_notification_function): Added
245         `MonoCodeManager *' argument.
246
247 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
248
249         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
250
251 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
252
253         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
254         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
255         implementation.
256
257 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
258
259         * icall.c: precise GC support: objects can't be stored in unmanaged
260         memory anymore, even if they are kept alive by other references: since
261         they can move the GC needs to be able to always find them.
262
263 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
264
265         * object.c: precise GC support for static fields. Support
266         for moving GCs: write barriers and pinned allocation for interned
267         strings.
268
269 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
270
271         * domain.c, domain-internals.h: precise GC support for the MonoDomain
272         structure.
273
274 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
275
276         * class.c, gc.c: sgen and precise GC updates.
277
278 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
279
280         * marshal.h, marshal.c: added write barrier wrapper and precise type
281         fixes.
282
283 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
284
285         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
286         support.
287
288 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
289
290         * reflection.c: precise and sgen GC updates.
291
292 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
293
294         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
295
296 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
297
298         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
299
300 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
301
302         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
303         MONO_TYPE_OBJECT. Fixes #78462.
304
305 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
306
307         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
308         and blittable types.
309
310 2006-05-17  Miguel de Icaza  <miguel@novell.com>
311
312         * class.c (mono_class_get_exception_for_failure): Implement parts
313         of a TODO: if the loader error is set (instead of the class
314         error), we return a Loader exception that can be properly thrown
315         elsewhere.
316
317         This was exposed by some Winforms 2.0 code that I tried to run
318         (Atsushi pointed me to it).
319
320 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
321
322         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
323         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
324         
325         * marshal.c (emit_marshal_vtype): Add limited support for 
326         UnmanagedType.LPStruct. Fixes #78427.
327
328         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
329         Applied a patch from kangaroo to fix #77523.
330
331 2006-05-17  Martin Baulig  <martin@ximian.com>
332
333         * threads.c
334         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
335         (debugger_thread_created): Removed.
336         (debugger_thread_exited): Removed.
337
338 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
339
340         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
341
342         * object-internals.h (MonoReflectionResource): Sync with managed version.
343
344 2006-05-12  Wade Berrier <wberrier@novell.com>
345
346         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
347
348 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
349
350         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
351         functions try to allocate from the image mempool.
352
353 2006-05-12  Dick Porter  <dick@ximian.com>
354
355         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
356
357 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
358
359         * object.c: The FieldGetter and FieldSetter methods require the full
360         name of the class, not only the name. Fixes bug #78277.
361
362 2006-05-11  Miguel de Icaza  <miguel@novell.com>
363
364         * loader.c (method_from_memberref): Do not pass the NULL klass to
365         mono_loader_set_error_() methods.  Pass the non-NULL value
366         (class). 
367
368 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
369
370         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
371         (mono_assembly_close): Null out assembly->image->references after freeing it.
372
373         * image.c (mono_image_close): Free image->references.
374         
375         * reflection.c (mono_image_basic_init): Fix a small memory leak.
376
377 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
378
379         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
380         before checking if it's NULL (g_assert).
381
382 2006-05-10  Martin Baulig  <martin@ximian.com>
383
384         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
385         I thought I already killed that two months ago, but now it somehow reappeared.
386
387 2006-05-10  Martin Baulig  <martin@ximian.com>
388
389         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
390
391 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
392
393         * reflection.c: Allocate memory for dynamically created methods in the image
394         mempools.
395
396 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
397
398         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
399         don't use the ad pointer before checking if it's NULL (g_assert).
400
401 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
402
403         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
404         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
405
406         * marshal.c: Allocate all signatures from mempools.
407
408         * marshal.c: Allocate some more signatures from mempools.
409
410 2006-05-09  Miguel de Icaza  <miguel@novell.com>
411
412         * object.c (mono_load_remote_field): The code used to provide a
413         temporary variable for returning results if the user did not
414         provide a result pointer.  But our temporary variable was allocted
415         on the satck.
416
417         Fix calling code to always pass a result area.   Coverity ID 103.
418
419 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
420
421         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
422         value, not the old. Fixes #78312.
423         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
424
425         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
426         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
427         per-image cache.
428
429         * assembly.c (mono_assembly_close): Free image->references.
430
431         * assembly.c (mono_assembly_names_equal): Fix a warning.
432         (mono_assemblies_cleanup): Cleanup more global data.
433
434         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
435
436         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
437         ptr_cache and image->modules.
438
439         * image.c (mono_image_init): Allocate array_cache lazily.
440         
441 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
442
443         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
444         behavior was changed recently and has bad side effects.
445
446 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
447
448         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
449         
450         * assembly.c (mono_assembly_close): Remove a debug printf.
451
452         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
453
454         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
455         to also allow for temporary references between mono_image_open ()/close ().
456
457         * domain.c (get_runtimes_from_exe): Add a FIXME.        
458
459 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
460
461         * marshal.c: Fix support for dynamic methods.
462
463         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
464
465         * marshal.c (mono_marshal_cleanup): New cleanup function.
466
467         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
468         image mempools.
469
470         * class.c (mono_class_init): Fix leaking class->nested_classes.
471
472         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
473
474         * image.c (mono_image_init): Initialize the new cashes.
475
476         * image.c (mono_image_close): Destroy the new cashes.
477
478         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
479
480         * mempool.c (mono_mempool_strdup): New helper function.
481
482         * class-internals.h: Add prototype for mono_loader_unlock ().
483
484         * domain.c (mono_jit_info_table_find): Fix a warning.
485         (mono_debugger_check_runtime_version): Ditto.
486
487         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
488         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
489         functions to these modules.
490
491         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
492         metadata modules.
493         
494         * marshal.c (mono_free_bstr): Fix a warning.
495
496         * assembly.c (mono_assembly_open_full): Fix another small leak.
497
498         * object.c: Fix some unload leaks in the remoting code.
499
500         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
501         function.
502
503         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
504
505         * reflection.c: Fix some unload leaks in dynamic assemblies.
506
507 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
508
509         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
510         * marshal.h: Add BSTR support on Win32
511         * icall.c: Add BSTR icalls
512         * metadata.h: Add BSTR enums
513
514 2006-04-28  Miguel de Icaza  <miguel@novell.com>
515
516         Work to catch the crash from #76795 and turn it into an
517         exception.   As I stubbed out pieces of the VisualBasic support,
518         I found a number of places where the code was failing and I added
519         checks to those places. 
520         
521         * metadata.c (do_mono_metadata_parse_generic_class): Make this
522         function return a status code.  If we fail to parse the signature
523         from mono_metadata_parse_generic_inst, return FALSE.
524
525         * loader.c (mono_get_method_from_token): If we fail to load the
526         method (mono_class_get) return NULL.   
527
528         * (method_from_memberref): Return NULL if we are unable to parse
529         the method signature
530
531         (mono_loader_error_prepare_exception): Since we now use the
532         loader_error flag internally to stop processing, and obtaining
533         exceptions that might be thrown will walk this code path the
534         proper way of going from a MonoLoaderError into a
535         MonoException was convoluted.   This new routine encapsulates the
536         process of turning the error into an exception and *clearing* the
537         error afterwards.
538         
539 2006-04-27  Miguel de Icaza  <miguel@novell.com>
540
541         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
542         with missing assemblies), and to cope with:
543
544                 * Missing fieldref from a non-existing assembly.
545                 * Missing methodref from a non-existing assembly.
546
547         The first batch of work to address *some* of the issues from 76661.
548         
549         * object.c (mono_class_create_runtime_vtable): If we fail to
550         initialize the class raise the exception here. 
551
552         * metadata.c (mono_class_get_overrides_full): If any methods fail
553         to load return the failure to the caller.
554
555         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
556         flagging assemblies that failed to load.   
557
558         Do not crash if we are unable to load the assembly.
559
560         (mono_assembly_close): Do nothing with REFERENCE_MISSING
561         assemblies. 
562
563         * loader.c (mono_loader_set_error_type_load): Change the
564         convention to always pass unallocated strings, so we make our own
565         copies (I know our own code had duplicated strings before, but
566         this keeps the normal conventions).
567         (method_from_memberref): Call mono_loader_set_error_method_load
568         for all possible failures of loading the class. 
569         Remove assert, turn into a loader error.
570
571         (mono_loader_error_to_exception): Move this routine from mini
572         (mini_loader_error_to_exception) there was no need to have that in
573         mini. 
574
575         * class.c (mono_class_from_typeref): If we were not able to load
576         the assembly with mono_assembly_load_reference, call the
577         mono_loader_set_error_type_load to register the problem.
578
579         (mono_class_setup_fields): If we fail to load the type from
580         mono_metadata_parse_type_full, call mono_class_set_failure and
581         break from the loop.
582
583         If class->exception_type is set, we do not layout the fields as
584         that might crash the runtime, and instead return (from breaking
585         from the previous loop).
586
587         (mono_class_setup_vtable): This now returns a boolean indicating
588         whether the table was properly setup.   The decision is driven by
589         mono_class_get_overrides_full which might run into non-existing
590         methods. 
591         
592         (mono_class_init): Returns TRUE on success or FALSE if there was a
593         problem in loading the type (incorrect assemblies, missing
594         assemblies, methods, etc).
595
596         When we call mono_class_setup_fields we also check for a potential
597         error inside this call (either a class exception or a general
598         loader exception).
599
600         (mono_class_create_from_typedef): If the parent fails to load
601         (calling mono_class_get_full) return NULL.
602         
603         ** Important **
604
605         calls to mono_metadata_parse_type_full should be checked
606         everywhere and set the mono_class_set_failure
607         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
608
609         The current patch checks the places where my manually constructed
610         tests show the errors are showing up, but we should do it
611         everywhere. 
612
613         ** Important2 **
614
615         mono_class_init return values should be tested everywhere, like
616         the previous case this is something that we should audit
617         everywhere and not only on the cases exposed by the tests I
618         created. 
619
620 2006-04-26  Miguel de Icaza  <miguel@novell.com>
621
622         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
623         boolean parameter and instead pass the information on `options'
624         parameter (FileOptions).
625
626         * icall.c: Register the new signature for MonoIO.Open.
627
628         * debug-helpers.c (dis_one): Trying to understand how coverity
629         works.  Fix Run 5, item 78.
630
631 2006-04-26  Dick Porter  <dick@ximian.com>
632
633         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
634         dereference.
635
636 2006-04-25  Martin Baulig  <martin@ximian.com>
637
638         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
639
640         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
641         debugger_thread_created().
642         (debugger_gc_push_all_stacks): Don't handle the main thread in any
643         special way.
644         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
645         (mono_debugger_finalize_threads): New function; undo the effects
646         of mono_debugger_init_threads().
647         (mono_debugger_create_all_threads): Removed.
648
649 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
650
651         * image.c (mono_image_close): Tidy up trace messages.
652
653         * assembly.c (mono_assembly_close): Ditto.
654
655         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
656         no longer references an already freed assembly. Fixes #78168.
657
658 2006-04-21  Dick Porter  <dick@ximian.com>
659
660         * threads.c (mono_thread_detach): Fix reference counting when
661         detaching threads.
662
663 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
664
665         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
666         #78155.
667
668 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
669
670         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
671         (mono_type_to_stind): Ditto.
672
673         * marshal.c: Use the new helper functions to simplify code.
674
675         * image.c (mono_image_close): Add some code for help debug assembly unloading
676         problems.
677
678         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
679         image mempool.
680
681         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
682         assembly was already loaded in another appdomain. Fixes #78083.
683
684 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
685
686         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
687         referenced assemblies.
688         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
689
690         * domain.c (mono_domain_free): Add a trace message.
691
692         * appdomain.c (add_assemblies_to_domain): Ditto.        
693
694         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
695         field.  
696
697 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
698
699         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
700
701 2006-04-12  Martin Baulig  <martin@ximian.com>
702
703         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
704         `USE_INCLUDED_LIBGC'.   
705
706 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
707
708         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
709         the patch contains ../ and a small directory name later. Hopefully fixes
710         #78035.
711
712 2006-04-10  Martin Baulig  <martin@ximian.com>
713
714         Clean up the debugger's thread-handling code.
715
716         The debugger's thread-handling code has been moved from
717         ../mini/debug-debugger.c to threads.c.  We now iterate directly
718         over the `threads' hash, keep track of exiting threads and also
719         use proper locking.
720
721         We can now debug XSP and XSP based applications with the debugger.
722
723         * object-internals.h (MonoThread): Added `gpointer end_stack'.
724
725         * threads.h
726         (MonoThreadCallbacks): Removed; this was only used by the debugger.
727         (mono_install_thread_callbacks): Likewise.      
728
729         * threads.c (mono_thread_callbacks): Removed.
730         (debugger_thread_created, debugger_thread_exited): New static functions.
731         (start_wrapper): Call debugger_thread_created().
732         (thread_cleanup): Call debugger_thread_exited().
733         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
734         (mono_debugger_init_threads): New public function.
735         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
736         iterate directly over the `threads' hash and also use proper locking.
737
738         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
739
740         * mono-debug-debugger.h
741         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
742
743 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
744
745         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
746         argument type=array. Fixes #78057.
747
748 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
749
750         * culture-info-table.h : regenerated. Fixed bug #69652.
751
752 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
753
754         * loader.c metadata.c: Reapply a variant r59116.
755         
756         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
757
758         * class.c (mono_class_setup_interface_offsets): New internal function.
759
760         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
761         interfaces too. Fixes #77398.
762
763         * reflection.c (encode_cattr_value): Add support for 
764         parameter type=object, argument type=array.
765         (load_cattr_value): Ditto. Fixes #77916.
766
767         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
768         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
769
770         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
771         a byval char array and CharSet is Ansi.
772
773         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
774
775 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
776
777         * metadata.c: Add some locking comments.
778         
779         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
780         mempool.
781         (mono_metadata_free_method_signature): Don't free the signature itself.
782
783         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
784
785         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
786         reference the same MonoImage.
787         (mono_assembly_load_from_full): Add an assert.
788
789 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
790
791         * image.c (mono_image_close): Don't put the image we are about to free into the
792         loaded_images_guid_hash.
793
794         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
795         to reduce code duplication.
796
797         * marshal.c: Register the native functions called by this module as icalls, to
798         somewhat centralize the creation of MonoMethodSignature's.
799
800         * loader.c (mono_method_signature): Add a cache for method signatures.
801
802         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
803         the parameter attributes of a method.
804         (mono_metadata_parse_method_signature_full): Refactored the computation of
805         parameter attributes into a separate function. Also avoid one allocation in
806         most cases.
807
808         * assembly.c (mono_assembly_close): Ditto.
809
810         * image.c (mono_image_close): Log trace messages with INFO level.
811
812         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
813
814         * image.c reflection.c: Correct reference counting of image modules.
815         
816         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
817         of this function from the image mempool.
818         
819         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
820         to allow more cached types to be used.
821
822         * mono-debug.c (mono_debug_add_method): Appled patch from
823         David S. Miller  <davem@sunset.davemloft.net>: Access 
824         minfo->lexical_blocks[] entry elements using read32().
825
826 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
827
828         * loader.c (mono_free_method): No longer free the method header for non-dynamic
829         methods as it is allocated from the mempool.
830
831         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
832         image mempool.
833
834         * metadata-internals.h: Add comments describing the reference counting scheme
835         used for MonoImage and MonoAssembly.
836
837         * image.c assembly.c reflection.c: Rework reference counting of images and 
838         assemblies so they are freed when the runtime is shut down. Free some 
839         additional memory structures when an image is unloaded.
840         
841 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
842
843         * class.c loader.c reflection.c: Allocate more data structures in
844         the image mempool.
845
846 2006-03-31  Miguel de Icaza  <miguel@novell.com>
847
848         * icall.c
849         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
850         build on pre glib 2.4 systems.
851
852 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
853
854         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
855
856         * icall.c: Fix some warnings.
857
858 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
859
860         * culture-info-table.h : regenerated.
861
862 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
863
864         * threads.c, object-internals.h, verify.c: changed the culture caching
865         code to use a normal MonoArray for storage so the GC can keep track of
866         them easily. Fixed bits of the cache logic, too and simplified the
867         code.
868
869 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
870
871         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
872         thread for non-Boehm GCs.
873
874 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
875
876         * domain.c, object.c, domain-internals.h: reduce the amount of memory
877         needed to keep track of the data for static fields.
878
879 2006-03-29  Raja R Harinath  <rharinath@novell.com>
880
881         Fix #75172
882         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
883         for interface classes.  Use 'num_methods' instead.
884         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
885         before using '->vtable_size' field.
886
887 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
888
889         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
890         doesn't contain managed pointers, so use a normal hashtable.
891
892 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
893
894         * reflection.c, class-internals.h, domain.c: fixed handling of types
895         used as values for objects in custom attributes (bug #77915):
896
897 2006-03-24  Martin Baulig  <martin@ximian.com>
898
899         * class.c (mono_class_setup_fields): Added support for generic
900         instances; fixes #77580.
901
902 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
903
904         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
905
906 2006-03-24  Dick Porter  <dick@ximian.com>
907
908         * file-io.c (get_file_attributes): More stat macro breakage.
909         Fixes bug 77759.
910
911 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
912
913         * profiler.c: added the file=filename option in the default profiler
914         to output the profile data to filename.
915
916 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
917
918         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
919         bug #77877.
920
921 2006-03-22  Martin Baulig  <martin@ximian.com>
922
923         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
924         allocated `MonoClassField *' in `fb->handle'.
925
926 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
927
928         * class.c, image.c, metadata-internals.h: implemented new mechanism to
929         allocate interface ID to save memory and allow better ID reuse on
930         appdomain unload. setup_generic_vtable () removal from Martin.
931
932 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
933
934         * object.h, appdomain.c, domain.c, exception.c, icall.c,
935         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
936         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
937         write barriers for reference stores with managed objects accessed with
938         C structures in the runtime and in embedding programs.
939
940 2006-03-20  Raja R Harinath  <rharinath@novell.com>
941
942         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
943         'interface_id' and 'max_interface_id' fields of MonoClasses
944         representing open generic types.
945
946 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
947
948         * object.h, object.c, icall.c: added functions to deal with
949         storing valuetypes that contain references in managed objects.
950         * reflection.c, string-icalls.c, threads.c, marshal.c: small
951         fixes and comments around uses of mono_array_addr ().
952
953 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
954
955         * object.h, icall.c, monitor.c: object.GetHashCode ()
956         implementation that supports the moving garbage collector.
957
958 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
959
960         * icall.c, threads-types.h, threads.c: implemented finalizer for
961         LocalDataStoreSlot.
962
963 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
964
965         * metadata.c (mono_type_size): Add a fixme.
966         (mono_type_stack_size): Ditto.
967
968         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
969         'type_forwarders' field.
970
971         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
972         attribute from net 2.0.
973
974         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
975         from class.c.
976
977         * class.c (mono_class_setup_fields): Fix a warning.
978         
979         * class.c (mono_class_from_name): Add support for assemblyref entries
980         in the EXPORTEDTYPE table.
981
982         * reflection.c: Add support for handling type forwarders under net 2.0.
983
984         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
985         
986 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
987
988         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
989         overwriting entries in ModuleBuild->types, also clean up the code
990         a little. Fixes #77774.
991
992 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
993
994         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
995         load friend assembly info when present.
996
997 2006-03-14  Raja R Harinath  <rharinath@novell.com>
998
999         Fix crasher on gtest-158.cs.
1000         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
1001         the return value if the MonoClass we want is yet in an
1002         inconsistent state.
1003         * class.c (mono_class_create_from_typedef): Add an comment
1004         explaining an order dependency between mono_class_setup_parent and
1005         mono_class_setup_mono_type.
1006
1007 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
1008
1009         * class.c: documentation updates and events bug fix.
1010
1011 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1012
1013         * class.c: some cleanup, locking fixes.
1014
1015 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
1016
1017         * class.c: fix the generics code to setup nested
1018         type info to the instantiated type (bug #77770).
1019
1020 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1021
1022         * marshal.c: fixed a few type correctness issues.
1023
1024 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1025
1026         * loader.c: the Set/Get/Addrtess array methods should be public.
1027
1028 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
1029
1030         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
1031         
1032         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
1033         info->wrapper.
1034
1035 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
1036
1037         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
1038
1039         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
1040
1041         * mempool.c (mono_mempool_alloc): Speed this up a bit.
1042         (mono_mempool_alloc0): Ditto.
1043
1044 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1045
1046         * socket-io.c:
1047         (create_object_from_sockaddr): it was allocating 4 extra bytes
1048         for the AF_UNIX data. Fixes bug #77747.
1049
1050 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
1051
1052         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
1053
1054 2006-03-09  Dick Porter  <dick@ximian.com>
1055
1056         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
1057         Fixes bug 76966 again.
1058
1059 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
1060
1061         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
1062         names from r57532
1063         * appdomain.c: Bumped corlib version to 48 (due to r57532)
1064
1065 2006-03-07  Martin Baulig  <martin@ximian.com>
1066
1067         * object.c
1068         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
1069
1070 2006-03-07  Martin Baulig  <martin@ximian.com>
1071
1072         * class.c
1073         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
1074         regression introduced in r56970; see gtest-252.cs.
1075
1076         * loader.c (mono_get_method_constrained): Correctly handle generic
1077         methods; see gtest-253.cs.
1078
1079 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
1080
1081         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
1082
1083 2006-03-04  Martin Baulig  <martin@ximian.com>
1084
1085         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
1086         compute the parent type at runtime, just like we're already doing
1087         it for interfaces.
1088
1089         * reflection.c
1090         (mono_reflection_bind_generic_parameters): Don't compute the
1091         parent type anymore.
1092
1093         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
1094
1095 2006-03-04  Martin Baulig  <martin@ximian.com>
1096
1097         * mono-debug-debugger.h
1098         (mono_debugger_create_notification_function): Allocate memory at
1099         runtime and return a pointer to it.
1100
1101 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
1102
1103         * assembly.c: Fix windows build.
1104         
1105         * assembly.c: Fix build.
1106
1107         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
1108
1109         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
1110         
1111 2006-03-03  Dick Porter  <dick@ximian.com>
1112
1113         * process.c
1114         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
1115         Check parameters before dereferencing them.  Fixes Aaron's part of
1116         bug 77393.
1117
1118 2006-03-03  Raja R Harinath  <rharinath@novell.com>
1119
1120         Fix performance regression.
1121         * loader.c (find_method_in_class): Add 'from_class' argument.
1122         Rename 'klass' argument to 'in_class'.  The signature is compared
1123         against the method in 'in_class', and the corresponding method is
1124         returned from 'from_class'.
1125         (find_method): Walk both 'in_class' and 'from_class' in parallel.
1126         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
1127         type definition and generic instantiation in parallel.
1128         (mono_get_method_constrained): Update to changes.
1129
1130 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
1131
1132         * threads.c: make sure the domain is correct, too when doing
1133         mono_thread_attach ().
1134
1135 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
1136
1137         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
1138         windows. Fixes #77683.
1139
1140 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
1141
1142         * object.h, *: introduced specific way to set elements of an array
1143         of references to be used as write barrier. Still need to audit the
1144         uses of mono_array_addr.
1145
1146 2006-03-01  Miguel de Icaza  <miguel@novell.com>
1147
1148         * object-internals.h: New field to cache the assmebly name, patch
1149         from Tambet Ingo (tambet@ximian.com)
1150
1151 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1152
1153         * decimal.h, class-internals.h, metadata-internals.h,
1154         file-io.h: mark a few function declarations as internal, to
1155         reduce the number of PLT entries.
1156
1157 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1158
1159         * file-io.c: fix typo in warning message.
1160
1161 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
1162
1163         * loader.c: on unix, lookup the "*A" version of a function
1164         if charset is auto as a second option before failing.
1165
1166 2006-02-28  Raja R Harinath  <rharinath@novell.com>
1167
1168         * class.h (mono_class_inflate_generic_method): Revert to two
1169         argument version.
1170         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
1171         (mono_class_inflate_generic_method_full): Add.
1172         * class.c (mono_class_inflate_generic_method_full): Rename from
1173         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
1174         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
1175         * loader.c, reflection.c: Update to changes.
1176
1177 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
1178
1179         * icall.c: const fixes and small improvements.
1180
1181 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1182
1183         * threadpool.c: for asynchronous connect(), enable the same workaround
1184         for BSD 6 as for the Mac. Fixes bug #77637.
1185
1186 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
1187
1188         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
1189         formatted classes. Fixes #77524.
1190
1191 2006-02-24  Raja R Harinath  <rharinath@novell.com>
1192
1193         * class.c (inflate_generic_type): Add a couple more
1194         micro-optimizations.
1195         (inflate_generic_context): Don't use the 'gmethod' from
1196         'inflate_with'.
1197         (mono_class_inflate_generic_method): If the method has generic
1198         parameters, but the passed-in context doesn't have a 'gmethod',
1199         create one.  Use the possibly simplified generic instantiation
1200         from the declaring class instead of the one passed in.
1201
1202 2006-02-24  Raja R Harinath  <harinath@gmail.com>
1203
1204         Make generic method signature and method header handling lazy.
1205         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
1206         (inflate_generic_header): Likewise.
1207         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
1208         parameter to avoid inflating types.
1209         (mono_get_inflated_method): Empty out.
1210         * class.h (mono_class_inflate_generic_method): Update to changes.
1211         * loader.c (mono_get_method_from_token): Don't parse signature for
1212         generic methods, nor methods of generic classes.
1213         (mono_method_signature): Rename from 'mono_method_signature'.
1214         Inflate signature on demand.
1215         (mono_method_get_header): Inflate method header on demand.
1216         * reflection.c: Update to changes.
1217
1218 2006-02-23  Raja R Harinath  <rharinath@novell.com>
1219
1220         * metadata.c (mono_metadata_inflate_generic_inst): If the
1221         instantiation is closed, don't bother expanding it in the new
1222         context.
1223         * class.c (inflate_generic_class): If the generic instantiation
1224         doesn't change after inflation, return the argument itself.
1225         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
1226         Add bounds checks.
1227         (inflate_generic_context): If neither the generic class nor the
1228         generic method instantiations change, return the original context.
1229         * reflection.c (mono_method_get_object): Do
1230         'mono_get_inflated_method' before accessing the ->klass field.
1231         (inflate_mono_method): Don't create a MonoGenericMethod unless
1232         necessary.
1233         (inflate_method): Don't pass a constructed type as the declaring
1234         type of a methodbuilder.
1235
1236 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
1237
1238         * object.c: fix memory overwrite.
1239
1240 2006-02-22  Dick Porter  <dick@ximian.com>
1241
1242         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
1243         it doesn't work any more.
1244         (mono_threads_request_thread_dump): Fix unused variable warnings.
1245
1246 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1247
1248         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
1249         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
1250         the public header file.
1251
1252 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
1253
1254         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
1255
1256 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
1257
1258         * class-internals.h, object.c: reduce the size of MonoVTable
1259         and store the interface_offsets array at negative offsets.
1260
1261 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
1262
1263         * metadata.c: tweak table descriptors data structures to reduce
1264         size and runtime relocations.
1265
1266 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1267
1268         * marshal.c: fix some types and opcodes to be type-safe
1269         in marshaling wrappers.
1270
1271 2006-02-21  Ankit Jain  <jankit@novell.com>
1272
1273         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
1274
1275 2006-02-21  Raja R Harinath  <rharinath@novell.com>
1276
1277         * metadata.c (get_constraints): Relax debugging checks for monodis.
1278
1279 2006-02-21  Ankit Jain  <jankit@novell.com>
1280
1281         * metadata.c (mono_metadata_load_generic_params): Move the code
1282         checking for ambiguous generic params from here to mono/dis/get.c
1283         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
1284
1285 2006-02-21  Raja R Harinath  <harinath@gmail.com>
1286
1287         Fix assertion triggered when compiling nemerle.
1288         * class.c (mono_get_shared_generic_inst): Rename from
1289         get_shared_inst and make non-static.
1290         * loader.c (mono_get_shared_generic_method): New.  Used to create
1291         the MonoGenericContext-equivalent of a MonoGenericContainer.
1292         (mono_get_method_from_token): Initialize the 'context' field of
1293         the created MonoGenericContainer.
1294         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
1295         * metadata.c (get_constraints): Add sanity check.
1296         * class-internals.h: Add new internal methods.
1297
1298         * reflection.c (verify_safe_for_managed_space): New sanity check.
1299         Currently checks that owner-less generic parameters aren't allowed
1300         in managed space.
1301         (mono_type_get_object): Use it.
1302         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
1303         that are now in mono_type_get_object.
1304         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
1305
1306 2006-02-19  Raja R Harinath  <harinath@gmail.com>
1307
1308         * metadata.c (mono_type_create_from_typespec): Rename from
1309         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
1310         argument and caching of types in the generic container.
1311         (unwrap_arrays, find_generic_param): Remove.
1312         * metadata-internals.h: Update.
1313         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
1314
1315 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
1316
1317         * class.c (mono_class_get_exception_for_failure): Fix a warning.
1318
1319         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
1320         return values. Fixes #77581.
1321
1322         * class.c (mono_fnptr_class_get): Switch name and name_space.
1323
1324         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
1325         classes and add support for [In, Out] attributes.
1326         (mono_marshal_free_asany): Ditto. Fixes #77524.
1327
1328 2006-02-18  Raja R Harinath  <harinath@gmail.com>
1329
1330         * class.c (mono_class_from_generic_parameter): Make more robust to
1331         incomplete MonoGenericContainers from monodis.
1332
1333 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1334
1335         * class-internals.h: added some more exception types.
1336         * class.c, metadata.c: added a few checks to handle missing
1337         types.
1338
1339 2006-02-17  Raja R Harinath  <rharinath@novell.com>
1340
1341         Use owner-less generic-params some more.
1342         * class.c (my_mono_class_from_generic_parameter): Remove.
1343         (mono_class_from_generic_parameter): Handle null image,
1344         param->name and param->owner.
1345         (mono_class_from_mono_type): Update.
1346         (mono_class_create_from_typespec): Remove 'container' parameter.
1347         If that parameter is non-null, the result is always inflated by
1348         'mono_class_get_full' anyway.
1349         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
1350         parameter.
1351         (mono_class_get_full): Update.
1352
1353         * class.c (inflate_generic_type) [GENERICINST]: If the generic
1354         instance is not open, don't bother inflating.
1355         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
1356         parse metadata for inflated classes.
1357         (_mono_class_get): Change GenericContext* parameter to
1358         GenericContainer*.
1359         (mono_class_create_from_typespec): Likewise.  Simplify, and
1360         implement trivially.  All the cases are handled in
1361         mono_class_from_mono_type.  Don't inflate returned class.
1362         (mono_class_get_full): Delegate GENERICINST optimization to
1363         inflate_generic_type.
1364         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
1365
1366 2006-02-16  Dick Porter  <dick@ximian.com>
1367
1368         * socket-io.c (create_object_from_sockaddr): Fix typo.
1369         (create_sockaddr_from_object): Check array lengths before
1370         potentially accessing items off the end.
1371         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
1372         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
1373         (ves_icall_System_Net_Sockets_Socket_Send_internal)
1374         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
1375         length checks to avoid wraparound overflows.
1376         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
1377         contents of the array of sockets
1378         (hostent_to_IPHostEntry2)
1379         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
1380         Check return value of inet_ntop ().
1381         (addrinfo_to_IPHostEntry): Fix typo
1382
1383 2006-02-16  Raja R Harinath  <rharinath@novell.com>
1384
1385         Type metadata parsing doesn't use generic-instantiation information.
1386         * metadata.c (mono_metadata_parse_array_full): Change
1387         MonoGenericContext* parameter to MonoGenericContainer*.
1388         (mono_metadata_parse_type_full): Likewise.
1389         (mono_type_create_from_typespec_full): Likewise.
1390         (mono_metadata_parse_mh_full): Likewise.
1391         (mono_metadata_parse_generic_inst): Likewise.
1392         (do_mono_metadata_parse_generic_class): Likewise.
1393         (do_mono_metadata_parse_type): Likewise.
1394         * metadata-internals.h: Update to changes.
1395         * class.c (mono_class_find_enum_basetype): Likewise.
1396         (mono_class_setup_fields): Likewise.
1397         (mono_class_create_from_typespec): Likewise.
1398         * loader.c (method_from_methodspec): Likewise.
1399         (mono_get_method_from_token): Likewise.
1400         (mono_method_get_header): Likewise.
1401
1402 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1403
1404         * marshal.c: handle additional GENERICINST case (patch from
1405         Thong Nguyen <tum@veridicus.com>).
1406         Fix a few cases where LDIND_I/STIND_I was used for references.
1407
1408 2006-02-16  Raja R Harinath  <rharinath@novell.com>
1409
1410         * reflection.c (mono_reflection_get_token): Remove unused variable.
1411
1412 2006-02-16  Martin Baulig  <martin@ximian.com>
1413
1414         * reflection.c (mono_reflection_get_token): Add support for fields
1415         in instantiated generic types.
1416
1417         * icall.c
1418         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
1419
1420 2006-02-15  Martin Baulig  <martin@ximian.com>
1421
1422         * icall.c
1423         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
1424         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
1425         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
1426         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
1427
1428 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
1429
1430         * class.c, metadata.c, metadata.h, object.c, icall.c,
1431         marshal.c: changed mono_type_get_underlying_type () to do
1432         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
1433         Fixed handling of instantiated generic valuetypes (bug #75479).
1434
1435 2006-02-15  Raja R Harinath  <rharinath@novell.com>
1436
1437         * metadata.c (mono_metadata_decode_signed_value): Simplify.
1438         Delegate to mono_metadata_decode_value, and work on the returned value.
1439
1440         * icall.c (ves_icall_MonoType_GetGenericArguments):
1441         Add consistency check here too.
1442         
1443 2006-02-15  Ankit Jain  <jankit@novell.com>
1444
1445         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
1446         char/short etc.
1447
1448 2006-02-15  Ankit Jain  <jankit@novell.com>
1449
1450         * metadata.c (mono_metadata_decode_signed_value): New function to decode
1451         signed values, used only for representing lower bounds of arrays.
1452         (mono_metadata_parse_array_full): Use new
1453         mono_metadata_decode_signed_value to decode lower bounds.
1454
1455 2006-02-14  Martin Baulig  <martin@ximian.com>
1456
1457         * reflection.c
1458         (mono_reflection_get_token): Support "MonoGenericMethod" and
1459         "MonoGenericCMethod" and allow generic instances / methods.
1460
1461 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
1462
1463         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
1464         to obtain the terminal size using an ioctl.
1465
1466         * object.c (mono_nullable_init): Revert this as nullable reference
1467         types are not valid.
1468         (mono_nullable_box): Ditto.
1469
1470 2006-02-09  Dick Porter  <dick@ximian.com>
1471
1472         * threads.c (mono_thread_detach): Drop a reference to the thread
1473         we're detaching.
1474
1475 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
1476
1477         * object.c (mono_nullable_init): Handle nullable reference types.
1478         (mono_nullable_box): Ditto. Fixes #77446.
1479
1480 2006-02-07  Martin Baulig  <martin@ximian.com>
1481
1482         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
1483
1484 2006-02-07  Ankit Jain  <jankit@novell.com>
1485
1486         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
1487         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
1488         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
1489         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
1490         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
1491         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
1492
1493 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
1494
1495         * class.c (mono_class_create_generic): Set type_token as well.
1496
1497         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
1498         compatible with MS.
1499
1500 2006-02-02  Martin Baulig  <martin@ximian.com>
1501
1502         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
1503         has never been used so far.
1504
1505 2006-02-02  Martin Baulig  <martin@ximian.com>
1506
1507         * mono-debug-debugger.h: Changed comment at the top of this file;
1508         the header is not installed, but it's safe to #include it from
1509         within the JIT.
1510
1511         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
1512         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
1513
1514 2006-02-02  Martin Baulig  <martin@ximian.com>
1515
1516         * mono-debug.h
1517         (MonoSymbolTable): Removed the `metadata_info' field.
1518
1519         * mono-debug.c
1520         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
1521
1522         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
1523         (mono_debugger_add_builtin_types): Removed.
1524         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
1525         (mono_debugger_create_notification_function): We now operate on a
1526         pre-allocated area; take a `gpointer' and return `void'.
1527
1528         * mono-debug-debugger.c
1529         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
1530         (mono_debugger_add_builtin_types): Removed.
1531
1532 2006-02-02  Martin Baulig  <martin@ximian.com>
1533
1534         * threads.c (mono_debugger_create_all_threads): New public method.
1535
1536 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1537
1538         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
1539         breaks on several platforms.
1540
1541 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
1542
1543         * assembly.c: the VS.NET build doesn't supply default values for
1544         MONO_ASSEMBLIES and MONO_CFG_DIR.
1545
1546 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
1547
1548         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
1549         helper function.
1550
1551         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
1552
1553         * loader.c (method_from_memberref): Fix a warning.
1554
1555         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
1556
1557         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
1558         with explicit layout. Fixes #77433.
1559
1560 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
1561
1562         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
1563         max_interface_id is initialized before using it. Fixes #77398.
1564         (ves_icall_Type_GetInterfaces): Ditto.
1565
1566 2006-01-30  Raja R Harinath  <rharinath@novell.com>
1567
1568         * metadata.c (mono_metadata_parse_method_signature_full): Don't
1569         allocate memory for parameter attributes when parsing memberref
1570         signatures.
1571         * loader.c (mono_loader_set_error_method_load): Don't warn.
1572         (method_from_memberref): Ensure MissingMethodException gets thrown
1573         if method is not found.  Make warning more informative.
1574
1575 2006-01-29  Raja R Harinath  <harinath@gmail.com>
1576
1577         Fix #77397
1578         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
1579         return true if is byref.
1580         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
1581         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
1582         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
1583
1584 2006-01-27  Raja R Harinath  <rharinath@novell.com>
1585
1586         Fix tests/find-method.2.il
1587         * loader.c (find_method, find_method_in_class): Remove is_inflated
1588         argument.  Revert 2006-01-18 change.
1589         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
1590         is generic, search for method in its generic definition.
1591         * class.c (mono_class_setup_vtable_general): Print generic
1592         arguments of generic types in debugging printf.
1593
1594 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
1595
1596         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
1597
1598         * threads.c (mono_threads_request_thread_dump): New helper function.
1599
1600 2006-01-25  Raja R Harinath  <rharinath@novell.com>
1601
1602         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
1603
1604 2006-01-25  Ankit Jain  <jankit@novell.com>
1605
1606         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
1607         move definition to ..
1608         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
1609         
1610 2006-01-25  Ankit Jain  <jankit@novell.com>
1611             Raja R Harinath  <rharinath@novell.com>
1612
1613         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
1614         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
1615         as necessary.
1616
1617 2006-01-25  Martin Baulig  <martin@ximian.com>
1618
1619         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
1620         `MonoDebuggerThread' into debug-debugger.c.
1621
1622 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
1623
1624         * profiler.c: fix printing of data.
1625
1626 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
1627
1628         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
1629           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
1630
1631 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
1632
1633         * object.c: fix deadlock related to string interning.
1634
1635 2006-01-23  Martin Baulig  <martin@ximian.com>
1636
1637         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
1638
1639         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
1640
1641 2006-01-23  Martin Baulig  <martin@ximian.com>
1642
1643         * mono-debug.h: Moved the prototypes of some functions which are
1644         used by the JIT here from mono-debug-debugger.h.
1645
1646 2006-01-21  Martin Baulig  <martin@ximian.com>
1647
1648         * Makefile.am: Don't install mono-debug-debugger.h.
1649
1650 2006-01-21  Martin Baulig  <martin@ximian.com>
1651
1652         * mono-debug-debugger.h: Enforce the private status of this header
1653         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
1654         Moved some stuff from mono-debugger-jit-wrapper.h here.
1655
1656 2006-01-20  Raja R Harinath  <rharinath@novell.com>
1657
1658         * class.c (mono_class_from_typeref): Add a sanity test to help
1659         catch lack of assembly load/search hooks.
1660
1661 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
1662
1663         * marshal.c (emit_struct_conv): Relax the fields with same offset
1664         check even more. Fixes #77230.
1665
1666 2006-01-18  Martin Baulig  <martin@ximian.com>
1667
1668         * loader.c (find_method_in_class): Added `gboolean is_inflated'
1669         argument; if false, we compare the uninstantiated signatures.
1670         (method_from_memberref): Compare the uninstantiated signatures;
1671         fixes #76417.
1672
1673 2006-01-18  Robert Jordan  <robertj@gmx.net>
1674
1675         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
1676         Clear the weak link. Fixes bug #77170.
1677
1678         * gc.c (mono_gchandle_free):
1679         Reflect *-gc.c changes (tiny optimization).
1680
1681 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
1682
1683         * metadata.c (mono_metadata_signature_dup): Applied patch from
1684         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
1685         Fixes #77288.
1686
1687 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
1688
1689         * marshal.c (emit_struct_conv): Allow fields with the same offset when
1690         marshalling from native to managed code. Fixes #77230.
1691
1692 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1693
1694         * threadpool.c: fix problem (Mac only) when more than one asynchronous
1695         connect. Fixes bug #77020.
1696
1697 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
1698
1699         * class.c: fixed id assignement for nested interfaces (bug #77275).
1700         Added also better info for --print-vtable debugging.
1701
1702 2006-01-12  Martin Baulig  <martin@ximian.com>
1703
1704         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
1705         interfaces on-the-fly; fixes #76625.
1706
1707         * class-internals.h
1708         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
1709         don't need that anymore.
1710
1711 2006-01-12  Miguel de Icaza  <miguel@novell.com>
1712
1713         * socket-io.c
1714         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
1715         To avoid initing the nested_classes when not needed I turned the
1716         PeerCredData as a toplevel internal class, as it has to be shared
1717         anyways. 
1718
1719         Fixes the CASA issue.
1720
1721 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
1722
1723         * domain.c: Accessors for MonoJitInfo
1724
1725         * profiler-private.h: Add jitinfo to the end jit hook
1726
1727         * profiler.[ch]: Define new hooks, called after jitting which give
1728         the MonoJitInfo that was compiled
1729
1730 2006-01-10  Martin Baulig  <martin@ximian.com>
1731
1732         * class.c (mono_class_setup_events): Add support for generic
1733         classes; fixes #76440.
1734
1735 2006-01-06  Raja R Harinath  <rharinath@novell.com>
1736
1737         Fix #77160.
1738         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
1739         on passed-in method.
1740
1741 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
1742
1743         * object.c (mono_runtime_invoke_array): Add Nullable support.
1744
1745         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
1746
1747 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
1748
1749         * file-io.c: Don't consider sockets as directory and avoid an endless
1750         loop. Fix bug #76966.
1751
1752 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
1753
1754         * object.c (mono_nullable_init): New helper function.
1755         (mono_nullable_box): Ditto.
1756
1757         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
1758
1759         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
1760
1761         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
1762         
1763 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
1764
1765         * class.c (mono_class_is_assignable_from): Make T assignable to 
1766         Nullable<T>.
1767
1768 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
1769
1770         * appdomain.c: Bump corlib version to 46.
1771         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
1772         serialization purpose) and changed ves_icall_System_Reflection_
1773         Assembly_get_code_base signature to accept a boolean (to escape, or 
1774         not, the assembly code base).
1775
1776 2005-12-23  Dick Porter  <dick@ximian.com>
1777
1778         * icall.c: 
1779         * threads-types.h: 
1780         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
1781         CreateEvent icall now returns "created" boolean parameter.
1782
1783 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
1784
1785         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
1786         #76967.
1787
1788         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
1789         when attr_klass is an interface. Fixes #77045.
1790
1791 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
1792
1793         * marshal.c (emit_struct_conv): Fix previous patch.
1794         
1795         * marshal.c (emit_struct_conv): Add a check for fields with the same
1796         offset.
1797
1798 2005-12-20  Raja R Harinath  <rharinath@novell.com>
1799
1800         Fix regression in Mono.C5.
1801         * class.c (mono_class_create_generic): If 'klass' is an interface
1802         set up the interface offsets.
1803         (mono_class_is_assignable_from): Don't throw away generic arguments.
1804
1805 2005-12-19  Raja R Harinath  <rharinath@novell.com>
1806
1807         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
1808         type parameters.
1809
1810 2005-12-15  Raja R Harinath  <rharinath@novell.com>
1811
1812         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
1813         dead store.
1814         (do_mono_metadata_parse_generic_class): Don't pass the current
1815         generic context when parsing the type being instantiated: it
1816         cannot use it, anyway.
1817
1818         * loader.c (method_from_memberref): Don't inflate a signature if
1819         it doesn't contain any type parameters.
1820
1821 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
1822
1823         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
1824
1825 2005-12-14  Martin Baulig  <martin@ximian.com>
1826
1827         * class.c
1828         (mono_type_get_name_recurse): Don't return null for type
1829         parameters and open generic classes.
1830         (mono_class_setup_methods): Don't exclude generic instances.
1831         (mono_get_unique_iid): Use different IDs for different
1832         instantiations of the same generic type.
1833         (mono_class_setup_vtable): Only use setup_generic_vtable() for
1834         open generic instances; create a normal vtable for closed generic
1835         instances.
1836         (mono_class_setup_vtable_general): We're now also called for
1837         closed generic instances.
1838
1839         * reflection.c
1840         (mono_reflection_bind_generic_parameters): Correctly use
1841         mono_metadata_lookup_generic_inst() everywhere.
1842
1843 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
1844
1845         * object.c (mono_class_create_runtime_vtable): Call 
1846         mono_class_setup_vtable ().
1847
1848         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
1849         function.
1850         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
1851         #76959.
1852
1853         * loader.c (mono_loader_set_error_type_load): Print the type load
1854         warnings to the console so they are more visible to the user.
1855         (mono_loader_set_error_method_load): Ditto.
1856
1857         * reflection.c (ensure_runtime_vtable): Revert the last change as it
1858         is still broken.
1859         
1860         * reflection.c (ensure_runtime_vtable): Fix build.
1861
1862         * reflection.c (ensure_runtime_vtable): Disable an optimization which
1863         doesn't work in all cases.
1864
1865 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
1866
1867         * object.c (mono_array_new_full): Treat a single dimensional array
1868         with 0 lower bounds as an szarray. Fixes #76973.
1869
1870         * reflection.c (custom_attr_visible): Really fix this.
1871
1872 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
1873
1874         * reflection.c (custom_attr_visible): Allow nested public attributes
1875         as well.
1876
1877         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
1878         interface check.
1879
1880 2005-12-12  Raja R Harinath  <harinath@gmail.com>
1881
1882         * class.c (set_generic_param_owner): Delete.
1883         (mono_class_create_from_typedef): Don't set ->owner field of
1884         generic parameters to "param containers" of enclosing classes.
1885         * reflection.c (mono_reflection_initialize_generic_parameter):
1886         Likewise.
1887
1888 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
1889
1890         * reflection.c (custom_attr_visible): Fix build.
1891
1892 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
1893
1894         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
1895         private attributes.
1896         
1897         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
1898         handling of null parameter defaults.
1899
1900 2005-12-09  Raja R Harinath  <rharinath@novell.com>
1901
1902         * class.c (mono_class_from_generic_parameter): Don't set
1903         klass->generic_container.
1904         (my_mono_class_from_generic_parameter): Likewise.
1905
1906 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
1907
1908         * reflection.c (load_public_key): Fix a warning.
1909         (method_encode_code): Fix unaligned accesses.
1910
1911 2005-12-07  Martin Baulig  <martin@ximian.com>
1912
1913         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
1914
1915         * reflection.c
1916         (write_generic_param_entry): Encode our custom attrs.
1917
1918         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
1919
1920 2005-12-07  Martin Baulig  <martin@ximian.com>
1921
1922         * reflection.c (encode_new_constraint): Removed; we don't use the
1923         `NewConstraintAttribute' anymore.
1924
1925 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
1926
1927         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
1928         not fire a TypeResolve event when Assembly.GetType () is called.
1929
1930 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
1931
1932         Beginning of support for nullable types in the runtime. Parts of
1933         this patch are from Martin.
1934
1935         * appdomain.c (MONO_CORLIB_VERSION): Bump
1936
1937         * domain.c (mono_init_internal): get the nullable type
1938
1939         * class.c (mono_class_is_nullable): New method
1940         (mono_class_get_nullable_param): New mehod
1941         (mono_class_create_generic): In types T? set cast_class to T
1942
1943         * class-internals.h (MonoDefaults): new nullable default class
1944         (mono_class_get_nullable_param, mono_class_get_nullable_param):
1945         new methods.
1946
1947 2005-12-05  Raja R Harinath  <rharinath@novell.com>
1948
1949         * metadata.c (select_container): New.  Refactor code to select the
1950         appropriate GenericContainer given the type of generic parameter
1951         we are looking for.
1952         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
1953         not a MonoGenericContext.  Use select_container.  Update parameters.
1954         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
1955         and MONO_TYPE_MVAR.
1956         (unwrap_arrays): Remove duplicate tests.
1957         (find_generic_param): Rename from 'has_same_context'.  Now walks a
1958         generic instantiated class to find any arguments that are generic
1959         parameters.
1960         (mono_type_create_from_typespec_full): Use find_generic_param to
1961         avoid evicting some generic instantiations from the typespec
1962         cache.
1963
1964 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
1965
1966         * reflection.c: fixed writing of doubles on ARM FPA.
1967
1968 2005-12-02  Robert Jordan  <robertj@gmx.net>
1969
1970         * icall.c: Fixed EventInfo.ReflectedType (#76829).
1971
1972 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1973
1974         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
1975         least on SUSE 10 they are not the same (on debian, they are just the
1976         same thing).
1977
1978 2005-12-01  Raja R Harinath  <rharinath@novell.com>
1979
1980         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
1981         DeclaringType for VARs and MVARs.
1982         * class.c (set_generic_param_owner): Fix initialization of owner
1983         fields.
1984
1985 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
1986
1987         * icall.c: fixed Enum.ToObject() to correctly convert the values.
1988
1989 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1990
1991         * threadpool.c: workaround for a bug that shows up on the Mac:
1992         select()+connect() on a blocking socket is not like it should
1993         be, so we proceed to connect() in that case, wasting the I/O
1994         threadpool thread until connect succeedes. Fixes bug #75436.
1995
1996 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1997
1998         * threadpool.c: fix typo when setting file descriptor states.
1999
2000 2005-11-28  Raja R Harinath  <rharinath@novell.com>
2001
2002         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
2003         * metadata.c (mono_metadata_parse_method_signature_full): Don't
2004         create a temporary signature container.
2005         (mono_metadata_parse_generic_param): Update to changes.
2006         (mono_type_create_from_typespec_full): Update to changes.
2007         * loader.c (method_from_memberref): Don't use a
2008         MonoGenericContainer while parsing a memberref signature.
2009         (method_from_methodspec): Remove dead-store of the 'container'
2010         variable.  It's overwritten before use.
2011
2012         * metadata.c (mono_type_create_from_typespec_full): Make debugging
2013         checks tighter.
2014         (mono_metadata_parse_generic_param): Likewise.
2015         * loader.c (find_method_in_class): Does not need a
2016         MonoGenericContainer.  Use 'mono_method_signature' rather than
2017         'mono_method_signature_full'.
2018         (find_method, mono_get_method_constrained, method_from_memberref):
2019         Update to changes.
2020
2021         * metadata.c (mono_type_create_from_typespec_full): Ensure that
2022         owner-less generic-parameters are never evicted from the typespec
2023         cache.
2024
2025         * loader.c (method_from_memberref): Don't use the current context
2026         when parsing signatures.
2027         (method_from_methodspec, mono_get_method_from_token): Update to changes.
2028
2029         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
2030         side-effects in g_assert.
2031         * loader.c (mono_get_method_from_token): Resolve klass earlier so
2032         that we don't potentially lose information.
2033
2034 2005-11-26  Dick Porter  <dick@ximian.com>
2035
2036         * icall.c:
2037         * threads.c: icalls to implement basic (ie, not named)
2038         System.Threading.Semaphore.
2039
2040 2005-11-24  Dick Porter  <dick@ximian.com>
2041
2042         * process.c
2043         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2044         Use GetProcessId() if it's available.
2045
2046 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
2047
2048         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
2049
2050 2005-11-23  Raja R Harinath  <rharinath@novell.com>
2051             Ankit Jain  <jankit@novell.com>
2052
2053         * loader.c (mono_get_method_from_token): Initialize 'method' field
2054         of all generic parameters before parsing the signature.  Remove
2055         code that "fixed"-up MVAR references.
2056
2057 2005-11-23  Ankit Jain  <jankit@novell.com>
2058
2059         * metadata.c (mono_metadata_has_generic_params):
2060         (mono_metadata_load_generic_param_constraints):
2061         (mono_metadata_load_generic_params): Move duplicate code ...
2062         (mono_metadata_get_generic_param_row): ... here. Returns the
2063         first row-id in GenericParam table for a given owner (token).
2064         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
2065         prototype.
2066
2067 2005-11-23  Raja R Harinath  <rharinath@novell.com>
2068             Ankit Jain  <jankit@novell.com>
2069
2070         * metadata.c (mono_metadata_class_equal): Pass signature_only when
2071         comparing VARs too.
2072         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
2073         type->data.generic_param only if the type is an MVAR.
2074         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
2075         leak owner-less VARs and MVARs into managed space.
2076
2077 2005-11-21  Martin Baulig  <martin@ximian.com>
2078
2079         * class-internals.h
2080         (MonoMethod): Moved the `generic_container' here from
2081         `MonoMethodNormal' since we now also need it for
2082         `MonoMethodPInvoke';
2083         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
2084         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
2085         an union containing both `MonoMethodNormal' and
2086         `MonoMethodPInvoke'.
2087
2088         * loader.c
2089         (mono_get_method_from_token): Allow implementing generic methods
2090         as interncalls.
2091
2092         * threads.c
2093         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
2094         icall.
2095
2096 2005-11-17  Dick Porter  <dick@ximian.com>
2097
2098         * icall.c: 
2099         * process.h: 
2100         * process.c: Split the Process Start_internal icall into
2101         ShellExecuteEx_internal and CreateProcess_internal, which are
2102         called depending on whether UseShellExecute is true.  Fixes bug
2103         76670.
2104
2105         * appdomain.c (MONO_CORLIB_VERSION): Incremented
2106
2107 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
2108
2109         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
2110         'msize' parameters, use the information in 'mspec' instead.
2111         (emit_object_to_ptr_conv): Ditto.
2112
2113         * marshal.c (emit_struct_conv): Handle explicit layout structs with
2114         fields out of order. Fixes #76733.
2115
2116 2005-11-17  Ankit Jain  <jankit@novell.com>
2117
2118         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
2119
2120 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
2121
2122         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
2123           bug #76575.
2124
2125 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
2126
2127         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
2128         for types with non-auto layout. Fixes #76717.
2129
2130 2005-11-16  Ankit Jain  <jankit@novell.com>
2131
2132         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
2133         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
2134         if generic_context is null.
2135           (mono_metadata_generic_param_equal): param->owner can be null.
2136           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
2137         null.
2138
2139 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
2140
2141         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
2142         the correct value.
2143
2144 2005-11-15  Martin Baulig  <martin@ximian.com>
2145
2146         * object.c (set_value): Use mono_class_from_mono_type() instead of
2147         the hack for generic instances; fixes #76136.
2148
2149 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
2150
2151         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
2152         fields.
2153
2154         * image.c (load_metadata_ptrs): Initialize the new fields.
2155
2156         * reflection.c (create_dynamic_mono_image): Ditto.
2157
2158         * reflection.c (build_compressed_metadata): Use the new fields.
2159
2160         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
2161         icall.
2162
2163         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
2164         icall.
2165         
2166 2005-11-15  Ankit Jain  <jankit@novell.com>
2167             Raja R Harinath  <harinath@gmail.com>
2168
2169         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
2170         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
2171         new per-generic_container cache if the cached MonoType's context matches
2172         the current context.
2173           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
2174         to the expected context.
2175           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
2176
2177 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2178
2179         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
2180         we changed the signature of an icall.
2181         * icall.c: Modify to mono_double_ParseImpl return true/false 
2182         depending on the success, instead of throwing the exception. This will
2183         help us in Double.TryParse methods.
2184         
2185 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
2186
2187         * marshal.c (emit_marshal_object): Throw an exception when
2188         marshalling 'object' instead of crashing. Fixes #76696.
2189
2190 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
2191
2192         * class-internals.h: Add prototype for mono_type_get_full_name ().
2193
2194 2005-11-11  Dick Porter  <dick@ximian.com>
2195
2196         * threads.c (mono_thread_manage): Make sure the main thread has
2197         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
2198
2199 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
2200
2201         * loader.c (mono_loader_set_error_type_load): Log a warning to the
2202         console about the missing type.
2203         (mono_loader_set_error_method_load): Ditto.
2204
2205 2005-11-09  Miguel de Icaza  <miguel@novell.com>
2206
2207         * mono-config.c (mono_get_config_dir): Set the system defaults if
2208         none is specified.
2209
2210         * assembly.c (mono_set_dirs): New API entry point to set the
2211         assembly and the config directory in one call
2212
2213 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
2214
2215         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
2216         the ftnptr was created from a delegate in a domain other than the
2217         current domain. Fixes #75377.
2218
2219         * exception.h exception.c: Add mono_get_exception_not_supported ().
2220
2221 2005-11-08  Martin Baulig  <martin@ximian.com>
2222
2223         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
2224
2225 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
2226
2227         * security-manager.h: Added definitions to deal with strongname key 
2228         pairs bigger (and smaller) than 1024 bits.
2229         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
2230         adjust wrt the public key length being used.
2231
2232 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
2233
2234         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
2235           Windows build (r51396-51397).
2236
2237 2005-11-03  Martin Baulig  <martin@ximian.com>
2238
2239         * class.c (mono_class_setup_vtable_general): Also add generic
2240         methods to the vtable; fixes #76581.
2241
2242 2005-11-01  Miguel de Icaza  <miguel@novell.com>
2243
2244         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
2245         sure that we lookup GetString method from the System.Text.Encoding
2246         class, not the derived class or we get an empty method.
2247
2248         Fixed class #76612.
2249
2250 2005-10-25  Miguel de Icaza  <miguel@novell.com>
2251
2252         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
2253         if it has been previously set (embedders). 
2254
2255         Make mono_set_rootdir available also on Unix.
2256
2257 005-10-24  Robert Jordan  <robertj@gmx.net>
2258
2259         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
2260
2261 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
2262
2263         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
2264         only calls which are made to native code use this flag.
2265
2266         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
2267
2268 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
2269
2270         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
2271         Add support for FieldBuilders.
2272
2273 2005-10-29  Martin Baulig  <martin@ximian.com>
2274
2275         * mono-debug.c
2276         (mono_debug_using_mono_debugger): New public method; returns
2277         whether we're running inside the debugger.
2278
2279 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
2280
2281         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
2282         for Method/Constructor/FieldBuilders.
2283
2284 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
2285
2286         * reflection.c (module_add_cattrs): Save custom attributes for global methods
2287         and fields as well.
2288
2289 2005-10-26  Martin Baulig  <martin@ximian.com>
2290
2291         * mono-debug-debugger.c
2292         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
2293
2294 2005-10-24  Raja R Harinath  <harinath@gmail.com>
2295
2296         * icall.c (base64_to_byte_array): Don't pass an out-of-range
2297         integer to isspace.
2298
2299 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
2300
2301         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
2302         when passing valuetypes byref. Fixes #76502.
2303
2304 2005-10-19  Jackson Harper  <jackson@ximian.com>
2305
2306         * profiler.c: Don't put a . in front of types that are not in a
2307         namespace.
2308
2309 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
2310
2311         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
2312
2313 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
2314
2315         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
2316         #76436.
2317         (mono_marshal_get_ldflda_wrapper): Fix a warning.
2318
2319 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2320
2321         * assembly.c metadata-internals.h icall.c: Define an additional
2322         parameter for mono_assembly_name_parse_full, so we can avoid creating
2323         S.R.AssemblyName.Version when no version info wasn't passed.
2324         
2325 2005-10-09  Miguel de Icaza  <miguel@novell.com>
2326
2327         * class.c (mono_type_get_full_name): Reimplement method that was
2328         removed. 
2329
2330         * image.c: Some docs
2331
2332 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
2333
2334         * profiler.c (output_newobj_profile): Fix printing of Total memory
2335         on x86.
2336
2337 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
2338
2339         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
2340
2341 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
2342
2343         * threads.c: remove debug output.
2344
2345 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
2346
2347         * threads.c (mono_thread_manage): Fix crashes if more than 64
2348         threads need to be aborted. Hopefully fixes #75899.
2349
2350         * assembly.c (mono_stringify_assembly_name): New helper function.
2351
2352         * class.c: Use mono_stringify_assembly_name instead of the similar
2353         static function.
2354
2355         * assembly.h assembly.c: Add support for calling a postload search 
2356         hook if an assembly cannot be loaded.
2357
2358         * appdomain.c: Register new search hooks which call the AssemblyResolve
2359         events in AppDomain. Fixes #75231
2360
2361 2005-10-07  Martin Baulig  <martin@ximian.com>
2362
2363         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
2364         methods without debug info.
2365
2366 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
2367
2368         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
2369         wrappers.
2370
2371 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2372
2373         * file-io.c: now that we return symlinks, use lstat and, when the file
2374         is a symbolic link, stat, to get the file attributes. Also avoid the
2375         conversion to/from utf16/external.
2376
2377 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
2378
2379         * class.c (mono_class_layout_fields): Compute klass->has_references
2380         correctly if an embedded valuetype is not yet initialized. Fixes
2381         #76331.
2382
2383 2005-10-04  Martin Baulig  <martin@ximian.com>
2384
2385         * metadata.c
2386         (mono_metadata_load_generic_param_constraints): New public
2387         function; splitted the constraints loading out from
2388         mono_metadata_load_generic_params().
2389
2390         * class.c (mono_class_create_from_typedef): Call
2391         mono_metadata_load_generic_param_constraints() after setting up
2392         the type and creating our parent; fixes #75329.
2393
2394 2005-10-04  Martin Baulig  <martin@ximian.com>
2395
2396         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
2397         non-dynamic parent classes.
2398
2399 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
2400
2401         * file-io.c : win32 build fix (ETXTBSY seems not found).
2402
2403 2005-10-04  Martin Baulig  <martin@ximian.com>
2404
2405         * reflection.c
2406         (mono_image_get_methodspec_token): Make the cache actually work;
2407         fixes #75974.
2408
2409 2005-10-04  Martin Baulig  <martin@ximian.com>
2410
2411         * class.c (mono_class_name_from_token): Removed the unneccessary
2412         `MonoGenericContext *' argument.
2413
2414 2005-10-04  Martin Baulig  <martin@ximian.com>
2415
2416         * loader.c
2417         (method_from_methodspec): Make the caching work again; fixes the
2418         performance regression from #76262.
2419
2420 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2421
2422         * file-io.c:
2423         * file-io.h:
2424         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
2425         GetFileSystemEntries that performs the same work but without going
2426         into io-layer, locking, etc.
2427
2428 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
2429
2430         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
2431         ThreadState_Stopped as well. Fixes #76047.
2432
2433 2005-09-29  Martin Baulig  <martin@ximian.com>
2434
2435         * class.c
2436         (inflate_generic_context): If the new context has a `gmethod', set
2437         its `container' that that gmethod's `container'.
2438
2439         * metadata.c
2440         (mono_metadata_parse_generic_param): Simplify things;
2441         `generic_container = generic_context->container;' is just fine.
2442
2443         * loader.c (method_from_methodspec): Code cleanups.
2444
2445 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
2446
2447         * decimal.c: fix warning (and let gcc generate correct
2448         code on ARM with optimizations).
2449
2450 2005-09-28  Martin Baulig  <martin@ximian.com>
2451
2452         * loader.c
2453         (method_from_memberref): Added `MonoGenericContext *class_context'
2454         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
2455         (method_from_methodspec): If we're a memberref, use the enclosing
2456         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
2457
2458 2005-09-28  Martin Baulig  <martin@ximian.com>
2459
2460         * object.c (mono_runtime_invoke_array): Added support for
2461         MONO_TYPE_GENERICINST; fixes #75917.
2462
2463 2005-09-27  Martin Baulig  <martin@ximian.com>
2464
2465         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
2466         `k->byval_arg.type' to determine the actual type.
2467
2468         * loader.c (method_from_methodspec): Removed some hacks.
2469
2470 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
2471
2472         * class-internals.h (mono_field_is_deleted): Do the test for
2473         rtspecialname before we check the actual name of the field. This
2474         prevents us from dereferencing a pointer into the string table,
2475         saving us from accessing a few pages
2476
2477         * *.c: Replace the use of {Enter,Leave}CriticalSection with
2478         macros. This will allow a deadlock debugger to easily be plugged
2479         in.
2480
2481 2005-09-27  Martin Baulig  <martin@ximian.com>
2482
2483         * loader.c (method_from_methodspec): Create a "signature"
2484         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
2485
2486 2005-09-27  Martin Baulig  <martin@ximian.com>
2487
2488         * class.c
2489         (inflate_generic_class): Correctly set the new context's
2490         container.
2491
2492         * loader.c
2493         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
2494         instead of a `MonoGenericContext *'.
2495         (mono_method_signature_full): Take a `MonoGenericContainer *'
2496         instead of a `MonoGenericContext *'.
2497
2498         * metadata.c
2499         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
2500         instead of a `MonoGenericContext *'.
2501         (mono_metadata_parse_method_signature_full): Likewise.
2502
2503 2005-09-26  Martin Baulig  <martin@ximian.com>
2504
2505         * class.c
2506         (mono_class_from_generic_parameter): Set `klass->generic_container'
2507         (mono_class_from_generic_parameter): Likewise.
2508         (mono_bounded_array_class_get): We inherit the generic container
2509         from the element class.
2510
2511         * loader.c
2512         (find_method, find_method_in_class): Take a `MonoGenericContext *'
2513         argument rather than computing it here.
2514         (method_from_memberref): Correctly set the generic context before
2515         parsing the signature.  Fixes #75681.
2516
2517 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
2518
2519         * object.c (mono_class_has_special_static_fields): Fix warnings.
2520
2521 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2522
2523         * assembly.c: Add parse_public_key function, to
2524         par the public keys. Also added mono_assembly_name_parse_full,
2525         to define it the parsed key should be freed or not.
2526         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
2527         to parse a long format assembly name.
2528         * metadata-internals.h: Keep mono_assembly_name_parse_full as
2529         private, since calling it to preserve the key requires
2530         freeing it manually.
2531         
2532 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
2533
2534         * locales.c : removed HAVE_ICU part.
2535
2536 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
2537
2538         * object.c (mono_class_create_runtime_vtable): Avoid calling 
2539         field_is_special_static if the klass has no special static fields.
2540
2541         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
2542         (MonoCachedClassInfo): Likewise.
2543
2544         * object.c (mono_class_has_special_static_fields): New helper function.
2545
2546 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
2547
2548         * class.c (mono_class_create_from_typedef): Don't call 
2549         interfaces_from_typedef_full for enums.
2550         (mono_class_create_from_typedef): Compute the base types of enums directly
2551         without calling mono_class_setup_fields ().
2552         (mono_class_find_enum_basetype): New helper function.
2553
2554         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
2555         one place inside the string heap.
2556         
2557 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
2558
2559         * class.c: locking fixes, code cleanups, some docs added.
2560         Allocate some data structures in the image mempool.
2561
2562 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
2563
2564         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
2565         the example code.
2566         
2567 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
2568
2569         * class-internals.h, class.c, reflection.c: reduce memory taken by
2570         MonoClass.
2571
2572 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
2573
2574         * metadata.c, metadata.h, loader.h: documentation updates, code and
2575         API cleanups.
2576
2577 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
2578
2579         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
2580         the example code.
2581
2582         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
2583         page faults caused by the runtime while reading metadata.
2584
2585 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2586
2587         * socket-io.c: the field names were changed 3 months ago and no one
2588         realized until bug #76077 got filed!
2589
2590 2005-09-20  Martin Baulig  <martin@ximian.com>
2591
2592         * icall.c (assembly_icalls): Removed some unused debugger icalls.
2593
2594 2005-09-20  Martin Baulig  <martin@ximian.com>
2595
2596         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
2597         write the rank into the class entry.
2598
2599 2005-09-20  Martin Baulig  <martin@ximian.com>
2600
2601         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
2602
2603 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
2604
2605         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2606
2607         * icall.c (custom_attrs_defined_internal): New icall.
2608
2609         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
2610         function.
2611         (mono_custom_attrs_construct_by_type): New helper function.
2612
2613 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
2614
2615         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
2616         terminate the resulting string. Fixes #76123.
2617
2618 2005-09-16  Martin Baulig  <martin@ximian.com>
2619
2620         * mono-debug.c
2621         (mono_debug_add_method): Ignore inflated methods for the moment.
2622
2623 2005-09-14  Martin Baulig  <martin@ximian.com>
2624
2625         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
2626
2627 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
2628
2629         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
2630         return a success/failure indication.
2631         (mono_metadata_interfaces_from_typedef_full): Ditto.
2632         (get_constraints): Ditto.
2633
2634 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
2635
2636         * marshal.c (emit_marshal_array): Fix handling of null arrays.
2637         
2638         * marshal.c (emit_marshal_array): Add support for returning string
2639         arrays from delegates. Fixes #76063.
2640
2641         * marshal.c: Use the emit_ldloc/stloc macros where possible.
2642
2643 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
2644
2645         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
2646         icall.
2647
2648 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
2649
2650         * reflection.c icall.c: Fix after mono_get_exception_type_load
2651         signature change.
2652
2653         * assembly.c (mono_assembly_get_assemblyref): New helper function.
2654         (mono_assembly_load_reference): Use the new helper.
2655
2656         * class-internals.h (MonoLoaderError): New structure containing 
2657         information about type loading errors.
2658
2659         * class-internals.h loader.c: Add APIs to store per-thread loader
2660         error information.
2661
2662         * loader.c class.c: Set the loader error if needed.
2663
2664         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
2665
2666 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
2667
2668         * decimal.c: fixed to handle the broken ARM fp format.
2669
2670 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
2671
2672         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
2673         broken.
2674
2675 2005-09-06  Martin Baulig  <martin@ximian.com>
2676
2677         * domain.c (supported_runtimes): Added v2.0.50727.
2678
2679 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
2680
2681         * culture-info.h: reduce the size of some structures.
2682
2683 2005-09-05  Martin Baulig  <martin@ximian.com>
2684
2685         Reflect latest API changes in the August CTP.
2686
2687         * icall.c
2688         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
2689         ("MonoType.HasGenericArguments"): Removed.
2690         ("MonoMethod.BindGenericParameters"): Renamed to
2691         "MakeGenericMethod".
2692         ("MethodBuilder.BindGenericParameters"): Renamed to
2693         "MakeGenericMethod".    
2694
2695 2005-09-05  Martin Baulig  <martin@ximian.com>
2696
2697         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
2698
2699 2005-09-05  Martin Baulig  <martin@ximian.com>
2700
2701         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2702
2703         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
2704         generic_container is non-NULL.
2705
2706 2005-09-05  Martin Baulig  <martin@ximian.com>
2707
2708         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2709
2710         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
2711
2712 2005-08-29  Michal Moskal  <malekith@nemerle.org>
2713
2714         * reflection.c (encode_locals,
2715         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
2716         for large generic types.
2717
2718 2005-09-05  Martin Baulig  <martin@ximian.com>
2719
2720         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2721
2722         * class.c (mono_dup_array_type): New public method.
2723         (mono_metadata_signature_deep_dup): New public method.
2724         (dup_type): Correctly duplicate array and function types.
2725
2726 2005-09-05  Martin Baulig  <martin@ximian.com>
2727
2728         Applying a patch from Michal Moskal <malekith@nemerle.org>.
2729
2730         * reflection.c (get_default_param_value_blobs): Handle generic types
2731         and generic methods.
2732
2733 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
2734
2735         * class.c: Fixed error reporting (method/class were inversed) for 
2736         inheritance demands.
2737         * security-manager.c|h: Added the AppDomain when calling the managed
2738         System.Security.SecurityManager.InheritanceDemand method.
2739
2740 2005-09-01  Raja R Harinath  <rharinath@novell.com>
2741
2742         * reflection.c (encode_marshal_blob): 'marshaltype' and
2743         'marshaltyperef' are alternate sources for the custom marshaler
2744         name.
2745
2746 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
2747
2748         * class.c: fix creation of array classes with rank == 1
2749         (patch by Ankit Jain <jankit@novell.com>).
2750
2751 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
2752
2753         * object.c: fix check for creating the bound data for arrays vs
2754         szarrays.
2755
2756 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2757
2758         * object.c: configuration file name is now based on the executable name,
2759         not the image name. Fixes bug #75931.
2760
2761 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
2762
2763         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
2764         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
2765
2766 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
2767
2768         * rand.c: Use wincrypt.h instead of WinCrypt.h.
2769
2770 2005-08-24  Ankit Jain  <jankit@novell.com>
2771             Raja R Harinath  <rharinath@novell.com>
2772
2773         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
2774           called by it recursively.
2775           (mono_class_init): Remove special case in pending_init handling, since it's
2776           superseded by the fix to mono_class_from_typeref.
2777
2778 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
2779
2780         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
2781         BROKEN_THREAD_START stuff.
2782
2783 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
2784
2785         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
2786         trampoline.
2787
2788         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
2789         
2790         * object.c (mono_delegate_ctor): Replace the original function address with
2791         a delegate trampoline.
2792
2793 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
2794
2795         * icall.c: add boolean argument to base64_to_byte_array and 
2796         InternalFromBase64String to control whether a whitespace-only string
2797         is allowed (or should casue a FormatException to be thrown). We need
2798         this as the behavior has changed between MS.NET 1.x and 2.0, and we
2799         to match the MS behaviour in both profiles.
2800         * appdomain.c: Bump corlib version.
2801
2802 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2803
2804         This patch implements a big portion of publisher policy
2805         support, used to bind assembly versions and redirect
2806         one assembly from version A to version B.
2807
2808         * assembly.c:
2809         New GSList loaded_assembly_bindings, for storing the cached
2810         assembly bindings.
2811         (assembly_binding_maps_name): New static function for checking if a 
2812         assembly binding information maps an assembly name.
2813         (mono_assembly_binding_info_free): New function for freeing
2814         assembly binding information resources.
2815         (get_publisher_policy_info): New static function for retrieving 
2816         assembly binding information from a MonoImage.
2817         (compare_versions): New static function for comparing an assembly
2818         binding information data and the version of an assembly name.
2819         (check_policy_versions): New static function for checking if an
2820         assembly binding info mapping an assembly name is valid for it.
2821         (mono_assembly_load_publisher_policy): New static function for
2822         loading the 'policy.major.minor.MyAssembly' image for an assembly
2823         with an assembly name 'aname'.
2824         (mono_assembly_bind_version): New static function for updating
2825         assembly redirection.
2826         (mono_assembly_apply_binding): New static function for applying
2827         assembly binding.
2828         (search_binding_loaded): New static function for searching 
2829         loaded assembly binding infos in the cache domain.
2830         (mono_assembly_load_full): Don't apply assembly binding for
2831         reflection only assemblies.
2832
2833         * metadata-internals.h: Add MonoAssemblyBindingInfo,
2834         which contains information about assembly binding. Also
2835         declare signature for mono_config_parse_publisher_policy ()
2836         function, used to retrieve pub policy info.
2837         
2838         * mono-config.c:
2839         (publisher_policy_start): New static function used to parse publisher 
2840         policy config files.
2841         (publisher_policy_parser): New static MonoParseHandler containing 
2842         the functions used when parsing config files.
2843         (mono_config_parse_publisher_policy): New function for parsing
2844         publisher policy files.
2845         
2846 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
2847
2848         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
2849
2850         * marshal.c (mono_delegate_free_ftnptr): Ditto.
2851
2852         * object.c (mono_get_addr_from_ftnptr): New helper function.
2853
2854         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
2855
2856         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2857
2858 2005-08-19  Dick Porter  <dick@ximian.com>
2859
2860         * threads.c, threads.h, appdomain.c, appdomain.h,
2861         profiler-private.h, monitor.c, object.c, object-internals.h,
2862         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
2863         store the thread ID, so it can hold a 64 bit value if needed.
2864
2865 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
2866
2867         * reflection.c (mono_reflection_create_dynamic_method): Store the
2868         handle class into the method references as well so ldtoken works in
2869         dynamic methods.
2870
2871         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
2872         types.
2873
2874 2005-08-19  Ankit Jain <jankit@novell.com>
2875
2876         Fix #75847.
2877         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
2878           here rather than using the method signature of a arbitrary function
2879           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
2880           two arguments.
2881           Hack done with Harinath.
2882
2883 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2884
2885         * threadpool.c: disable printing stack traces when we get a exception
2886         in a threadpool thread. I need to do more testing to figure out which
2887         cases actually print this. Fixes bug #75828.
2888
2889 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2890
2891         * icall.c: there might be ignored whitespace after the last '='. This
2892         fixes length computation and bug #75840.
2893
2894 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
2895
2896         * assembly.c (mono_assembly_load_full): Consider .exe extension as
2897         well. Fixes #75809.
2898
2899         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
2900         #75784.
2901         
2902         * reflection.c (create_custom_attr_data): Ditto.
2903
2904 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
2905
2906         * locales.c, culture-info.h : removed RegionLCIDMap.
2907         * culture-info-tables.h : regenerated.
2908
2909 2005-08-16  Martin Baulig  <martin@ximian.com>
2910
2911         * class.c (mono_type_get_name_recurse): Small fix.
2912
2913 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
2914
2915         * locales.c : indentation fixie.
2916
2917 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
2918
2919         * object-internals.h,
2920           locales.h,
2921           locales.c,
2922           culture-info.h,
2923           icall.c : added RegionInfo table support.
2924         * culture-info-table.h : regenerated for region support.
2925
2926 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
2927
2928         * reflection.c (resolve_object): handle all kinds of MonoMethod
2929         including generic ones
2930
2931 2005-08-12  Ankit Jain <jankit@novell.com>
2932
2933         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
2934           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
2935
2936 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
2937
2938         * process.c: Don't close a thread handle when it's NULL. This is a
2939         workaround for bug #75733.
2940
2941 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
2942
2943         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
2944
2945 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
2946
2947         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
2948
2949 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2950
2951         * threadpool.c: if a work item in the thread pool has a callback that
2952         catches a exception, don't propagate it after invoking the callback.
2953         Fixes bug #75336.
2954
2955 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
2956
2957         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
2958
2959         * class-internals.h (MonoCachedClassInfo): Add some new fields.
2960
2961         * class.c (mono_class_init): Load field info lazily in the AOT case.    
2962
2963         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
2964
2965 2005-08-03  Ankit Jain  <jankit@novell.com>
2966
2967         Fix #75683.
2968         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
2969           PInvoke calling convention is 0.
2970
2971 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
2972
2973         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
2974         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
2975
2976 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
2977
2978         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
2979         to handle threads not started by the GC (patch by Michael Meeks
2980         <michael.meeks@novell.com>).
2981
2982 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
2983
2984         * reflection.c: Make buffer used in emitting types larger for some
2985         big generic types (patch by Michal Moskal).
2986
2987 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
2988
2989         * mono-debug.c: Fix some (not all) alignment problems.
2990
2991 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2992
2993         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
2994         Invoke mono_image_load_from_data_full passing the refonly
2995         parameter.
2996
2997         * assembly.c
2998         (mono_assembly_open_from_bundle): Add the refonly argument, 
2999         in order to pass it to other methods it calls to.
3000         (do_mono_assembly_open): Add the refonly argument, in order 
3001         to pass it to other methods it calls to.
3002         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
3003         the refonly parameter to it.
3004
3005         * image.c: Add loaded_images_refonly_hash and
3006         loaded_images_refonly_guid_hash to cache the reflection
3007         only loaded images.
3008         (mono_images_init): Initialize the hash tables used for
3009         caching the reflection only images.
3010         (load_modules): Invoke mono_image_open_full passing the refonly
3011         parameter to load the modules the correct way.
3012         (build_guid_table): Add the refonly argument, to re-build the 
3013         correct hash table.
3014         (do_mono_image_open): Added the refonly argument, in order to
3015         define it for the loaded image.
3016         (mono_image_loaded_full): New function, which receives an
3017         additional parameter to look for the image in the refonly or
3018         non-refonly section.
3019         (mono_image_loaded): Updated, using mono_image_loaded_full.
3020         (mono_image_loaded_by_guid_full): The same case that happens
3021         with mono_image_loaded_full.
3022         (mono_image_loaded_by_guid): Likewise.
3023         (register_image): Use the ref_only variable inside MonoImage
3024         to decide in which hash table store the current image.
3025         (mono_image_open_from_data_full): Rename
3026         mono_image_open_from_data to mono_image_open_from_data_full,
3027         adding the refonly argument, to define the ref_only variable 
3028         inside MonoImage.
3029         (mono_image_open_from_data): Return 
3030         mono_image_open_from_data_full.
3031         (mono_image_open_full): Rename mono_image_open to
3032         mono_image_open_full, receiving the new refonly argument,
3033         to pass it to inner methods.
3034         (mono_pe_file_open): Update this function, to open
3035         a MonoImage as a non-refonly image.
3036         (mono_image_close): Use the refonly variable inside
3037         MonoImage to remove the image from the correct caches.
3038
3039         * image.h: Add the signatures of mono_image_open_full,
3040         mono_image_open_from_data_full, mono_image_loaded_full,
3041         mono_image_loaded_by_guid_full.
3042
3043         * metadata-internals.h: Add the ref_only field to 
3044         MonoImage.
3045         
3046 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3047
3048         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
3049         Fix the last behavior, which used to load the assemblies and
3050         extract MonoReflectionAssemblyName information, instead of
3051         extract it from the metadata tables. Needed for Reflection
3052         Only assemblies.
3053         
3054 2005-07-29  Martin Baulig  <martin@ximian.com>
3055
3056         * mono-debug-debugger.c
3057         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
3058         not initialized.
3059
3060         * mono-debug.c
3061         (mono_debug_address_from_il_offset): Check whether we have
3062         debugging support before attempting to take the lock.
3063         (mono_debug_source_location_from_address): Likewise.
3064         (mono_debug_source_location_from_il_offset): Likewise.
3065         (mono_debug_il_offset_from_address): Likewise.
3066         (mono_debug_address_from_il_offset): Likewise.
3067
3068 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
3069
3070         * class.c (mono_class_from_name_case): Add support for dynamic images.
3071         Fixes #75650.
3072
3073         * object.c (mono_class_compute_gc_descriptor): Add a workaround
3074         for #75479.
3075
3076 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
3077         
3078         * reflection.c (mono_method_get_object): Fix warning.
3079
3080 2005-07-28  Martin Baulig  <martin@ximian.com>
3081
3082         * mono-debug.c
3083         (mono_debug_add_wrapper): Also write the wrapper type.
3084
3085 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
3086
3087         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
3088         
3089         * class.c (mono_class_init): Avoid reading nested classes if the AOT
3090         data indicates the class has none.
3091
3092 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
3093
3094         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
3095         loader lock with the debugger lock. Prevents deadlocks for beagle.
3096
3097         Beagle can now run on an smp box for a weekend without any
3098         issues. Woohoo!
3099
3100 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
3101
3102         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
3103         in a module. Fixes #75629.
3104
3105 2005-07-26  Martin Baulig  <martin@ximian.com>
3106
3107         * mono-debug.c (mono_debug_add_wrapper): New static method.
3108         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
3109         interncall or a wrapper.
3110
3111         * mono-debug.h (MonoDebugWrapperData): New public typedef.
3112         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
3113         (MONO_DEBUGGER_VERSION): Bump to 51.
3114
3115         * mono-debug-debugger.c
3116         (mono_debugger_add_type): Removed this empty function.
3117         (mono_debugger_add_method): Likewise.
3118
3119 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
3120
3121         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
3122         before accessing method->slot.
3123
3124 2005-07-21  Jb Evain  <jbevain@gmail.com>
3125
3126         * reflection.c (method_encode_clauses/class): Handle filters clauses.
3127         Fixes #75010.
3128
3129 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
3130
3131         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
3132         #75587.
3133
3134 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
3135
3136         * image.h image.c: Add mono_image_get_guid () API function.
3137
3138 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
3139
3140         There were issues when multiple threads tried to load
3141         assemblies. A deadlock was created between assemblies_mutex and
3142         mono_domain_assemblies_lock. This fixes the issue by making the
3143         assembly ref counting be lock free. See bug 75586.
3144         
3145         * image.c (mono_image_close): The add ref function here was using
3146         Interlocked operations while the unref was using a mutex and a
3147         --. I don't think this was ever a bug that would be exposed in a
3148         non-pendantic way (ie, by an embedder doing a ref on one thread
3149         and an unref on another), but for the sake of correctness, this is
3150         now Interlocked.
3151
3152         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
3153         (mono_assembly_load_reference): Call mono_assembly_addref rather
3154         than touching the refcount ourselves.
3155         (mono_assembly_close): Use InterlockedDecrement to unref the
3156         assembly. Don't acquire the lock unless it is actually needed.
3157
3158 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
3159
3160         * class.c (mono_class_layout_fields): Fix calculation of has_references
3161         for generic types.
3162
3163 2005-07-12  Martin Baulig  <martin@ximian.com>
3164
3165         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3166
3167         * metadata.c
3168         (mono_type_hash): Provide better hashing for generic instances.
3169         (mono_generic_inst_hash): Improve hashing.
3170         (mono_generic_class_hash): Likewise.
3171
3172         * reflection.c (mymono_metadata_type_hash): Improve hashing for
3173         generic instances.
3174
3175 2005-07-12  Martin Baulig  <martin@ximian.com>
3176
3177         * reflection.c (mono_reflection_create_runtime_class): Remove the
3178         hack for generic type definitions and non-`Run' assemblies.
3179         (mono_reflection_bind_generic_parameters): Also use
3180         `klass->wastypebuilder' to check for TypeBuilders.
3181
3182 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
3183
3184         * class.c (mono_class_layout_fields): Fix calculation of has_references
3185         for generic types.
3186
3187         * class.c (inflate_generic_class): Fix a leak.
3188         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
3189         for generic types.
3190
3191 2005-07-11  Martin Baulig  <martin@ximian.com>
3192
3193         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
3194         on error.
3195
3196 2005-07-11  Martin Baulig  <martin@ximian.com>
3197
3198         * loader.c (find_method): Also lookup in
3199         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
3200
3201 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3202
3203         * appdomain.c (mono_domain_unload): Don't free the error message
3204         before passing it to mono_get_exception_...
3205
3206         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
3207         
3208 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
3209
3210         * threads.c: try to better guess an available RT signal (bug #75387).
3211
3212 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3213
3214         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
3215         and CACHE_OBJECT.
3216
3217 2005-07-07  Martin Baulig  <martin@ximian.com>
3218
3219         * class.c (mono_type_get_name_full): Return NULL for
3220         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
3221         fixes #75408.
3222
3223 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3224
3225         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
3226         exit the appdomain as well being aborted.
3227
3228         * threadpool.c: Create all threadpool threads inside the root appdomain, and
3229         change back to the root domain after calling managed code. This enables
3230         appdomains using threadpools to be unloaded.
3231
3232 2005-07-07  Martin Baulig  <martin@ximian.com>
3233
3234         * class-internals.h
3235         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
3236         into `MonoDynamicGenericClass' since we only need it for dynamic
3237         types.
3238
3239         * reflection.c (mono_class_bind_generic_parameters): We don't need
3240         to compute the `parent' here.
3241
3242 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
3243
3244         * culture-info-table.h : regenerated.
3245
3246 2005-07-06  Martin Baulig  <martin@ximian.com>
3247
3248         * icall.c
3249         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
3250
3251         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
3252
3253 2005-07-06  Martin Baulig  <martin@ximian.com>
3254
3255         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
3256         we're doing a signature-only comparision; fixes #74945.
3257
3258 2005-07-06  Martin Baulig  <martin@ximian.com>
3259
3260         * class-internals.h (MonoGenericClass): Moved some things out into
3261         a new `MonoInflatedGenericClass' type.  
3262         (MonoInflatedGenericClass): New type; the `klass' of a
3263         `MonoGenericClass' is now computed lazyly in
3264         mono_get_inflated_generic_class().      
3265
3266         * class.c (mono_get_inflated_generic_class): New public function.
3267         (mono_class_inflate_generic_method): Removed the unused
3268         `MonoClass *' argument.
3269         (setup_generic_vtable): Don't call mono_get_inflated_method() on
3270         all the methods.
3271         (mono_class_create_generic): Make this static and merge it with
3272         mono_class_create_generic_2(); we're now called automatically from
3273         mono_get_inflated_generic_class().
3274
3275         * loader.c (mono_method_signature): Call
3276         mono_get_inflated_method() here.
3277
3278 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
3279
3280         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
3281         type of fields with RVA.
3282
3283         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
3284         for this pseudo class.
3285         (my_mono_class_from_generic_parameter): Likewise.
3286         (mono_class_init): Allow interfaces to have cctors.
3287
3288 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
3289
3290         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
3291         lazily for AOT methods.
3292
3293 2005-07-05  Martin Baulig  <martin@ximian.com>
3294
3295         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
3296         returns FALSE for a successful match, not TRUE.
3297
3298 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
3299
3300         * loader.c (mono_method_get_index): Optimize this a bit.
3301
3302 2005-07-04  Martin Baulig  <martin@ximian.com>
3303
3304         * class.c
3305         (class_compute_field_layout): Move the check for generic type
3306         definitions into mono_class_layout_fields().  Fixes #74684.
3307         (mono_class_from_generic_parameter): Correctly compute
3308         `klass->parent'; fixes #75457.
3309
3310         * reflection.c (register_assembly, register_module): Make sure
3311         `domain->rejobject_hash' is already created.
3312
3313 2005-07-02  Martin Baulig  <martin@ximian.com>
3314
3315         * class-internals.h
3316         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
3317         `MonoDynamicGenericClass'.      
3318
3319 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
3320
3321         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
3322         returned by a field getter is null, since null is a valid value.
3323
3324 2005-07-01  Martin Baulig  <martin@ximian.com>
3325
3326         * reflection.c (mono_reflection_generic_class_initialize): Update
3327         the `dgclass->fields [i].parent' to the correct class.
3328         (mono_image_get_fieldref_token): Use the declaring type, not the
3329         reflected type.
3330
3331 2005-07-01  Martin Baulig  <martin@ximian.com>
3332
3333         * loader.c (find_method): Also look in the interfaces; fixes #75429.
3334
3335 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
3336
3337         * threads.c (thread_cleanup): assert that thread != NULL
3338         (wait_for_tids_or_state_change): We were using the wrong variable
3339         when accessing wait->threads. `i' was always out of the bounds of
3340         the array.
3341
3342 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3343
3344         * loader.c: map user32 and kernel32 to libMonoSupportW
3345
3346 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
3347
3348         * appdomain.c (unload_thread_main): Mark this as WINAPI.
3349
3350 2005-06-28  Martin Baulig  <martin@ximian.com>
3351
3352         * loader.c (method_from_methodspec): Fix #75334.
3353
3354 2005-06-28  Martin Baulig  <martin@ximian.com>
3355
3356         Fix #74953 - Arrays now implement the generic IList<T> interface
3357         on the 2.0 platform.
3358
3359         * class-internals.h (MonoDefaults): Added `generic_array_class'.
3360
3361         * reflection.c (mono_class_bind_generic_parameters): New public
3362         function; similar to mono_reflection_bind_generic_parameters(),
3363         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
3364
3365         * domain.c (mono_init_internal): Try to initialize.
3366         `mono_defaults.generic_array_class' here; this'll only succeed if
3367         we're using the 2.0 corlib.
3368
3369         * icall.c
3370         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
3371         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
3372         (mono_lookup_internal_call): Added support for nested classes.
3373
3374         * loader.c
3375         (mono_get_method_from_token): Set `result->signature->pinvoke' if
3376         we're an interncall and have generic arguments.
3377
3378         * class.c
3379         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
3380         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
3381         instance of System.Array.InternalArray<T> for arrays, so they
3382         implement the generic IList<T> interface.
3383
3384 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
3385
3386         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
3387         (chastamar@yahoo.com). Fixes #75374.    
3388
3389 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
3390
3391         * culture-info-table.h: regenerated.
3392
3393 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3394
3395         * icall.c: handle spaces correctly for base64 strings.
3396
3397 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
3398
3399         * *.c: Kill some warnings.
3400
3401 2005-06-23  Duncan Mak  <duncan@novell.com>
3402
3403         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
3404         that this builds on Solaris 10 (x86).
3405
3406 2005-06-23  Martin Baulig  <martin@ximian.com>
3407
3408         * class.c
3409         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
3410         generic type definitions.
3411
3412 2005-06-23  Martin Baulig  <martin@ximian.com>
3413
3414         Fix #75331.
3415
3416         * metadata.c (mono_class_get_overrides): Renamed to
3417         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
3418         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
3419         pass it to mono_get_method_full().
3420
3421 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
3422
3423         * reflection.c (mono_reflection_create_runtime_class): take the
3424         mono_domain_lock in this method. Prevents deadlocks
3425
3426 2005-06-22  Martin Baulig  <martin@ximian.com>
3427
3428         * loader.c (method_from_methodspec): Fix #75330.
3429
3430 2005-06-22  Martin Baulig  <martin@ximian.com>
3431
3432         * reflection.c (type_get_qualified_name): Use
3433         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
3434         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
3435         argument; use it if we don't have an assembly name.
3436
3437 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
3438
3439         * object.c: In mono_message_init, set "copy out" flag for in
3440         parameters with the [Out] flag.
3441
3442 2005-06-21  Martin Baulig  <martin@ximian.com>
3443
3444         * class.c
3445         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
3446         and MONO_TYPE_PTR.
3447
3448 2005-06-21  Martin Baulig  <martin@ximian.com>
3449
3450         * class.c (mono_class_init): Don't initialize `class->fields' for
3451         generic instances since they're initialized again in
3452         compute_field_layout(). 
3453         (compute_field_layout): Set the field's `generic_info' here; fix
3454         #75320. 
3455
3456 2005-06-21  Martin Baulig  <martin@ximian.com>
3457
3458         * class-internals.h
3459         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
3460
3461         * metadata.c (mono_metadata_generic_method_equal): Also
3462         distinguish the `generic_class'; fixes #75334.
3463
3464 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3465
3466         * domain.c:
3467         * appdomain.c:
3468         * domain-internals.h:
3469         * reflection.c: 'domain_assemblies' field is now protected by its own
3470         lock. Don't call into managed code to run the AssemblyLoad event if we
3471         now there are no registered delegates for it.
3472
3473 2005-06-20  Martin Baulig  <martin@ximian.com>
3474
3475         * class.c (mono_class_is_assignable_from): Use a custom version of
3476         mono_class_has_parent() to make things work for generic instances;
3477         fix #75300.
3478
3479 2005-06-20  Martin Baulig  <martin@ximian.com>
3480
3481         * loader.c (method_from_methodspec): Apply a patch from
3482         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
3483
3484 2005-06-20  Martin Baulig  <martin@ximian.com>
3485
3486         * class.c (mono_class_init): Reverted Zoltan's last change; it
3487         breaks generics.
3488
3489 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
3490
3491         * threads.c (wait_for_tids_or_state_change): Add missing locking.
3492
3493 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3494
3495         * socket-io.c: fix the index in the socket array for writable/error
3496         sockets. Fixes bug #75306.
3497
3498 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
3499
3500         * class.c (mono_class_init): Allow interfaces to have static ctors.
3501
3502 2005-06-17  Martin Baulig  <martin@ximian.com>
3503
3504         * loader.c (method_from_methodspec): Use `context->container' when
3505         parsing the `gmethod->inst'.
3506
3507 2005-06-17  Martin Baulig  <martin@ximian.com>
3508
3509         * class.c (mono_type_get_name_recurse): Don't add the assembly
3510         name for type arguments.
3511
3512 2005-06-15  Martin Baulig  <martin@ximian.com>
3513
3514         * reflection.c (mono_image_get_inflated_method_token): Encode
3515         correct klass; fixes #75260.
3516
3517 2005-06-13 Michal Moskal <malekith@nemerle.org>
3518
3519         * icall.c: Make GetCorrespondingMethod/Constructor take
3520         MonoReflectionMethod method not MonoMethod. Removed
3521         MonoType.GetCorrespondingField, and make
3522         MonoGenericType.GetCorrespondingField take name not
3523         MonoClassField.
3524
3525 2005-06-13  Michal Moskal <malekith@nemerle.org>
3526
3527         * reflection.c (field_encode_signature, encode_locals):
3528          Make sizes of buffers for types larger (for big generic types).
3529          (create_generic_typespec,
3530          mono_reflection_sighelper_get_signature_local,
3531          mono_reflection_sighelper_get_signature_field):
3532          Add asserts for too small buffers.
3533
3534 2005-06-15  Martin Baulig  <martin@ximian.com>
3535
3536         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
3537         if our parent is not a dynamic type.
3538
3539 2005-06-15  Martin Baulig  <martin@ximian.com>
3540
3541         * class-internals.h (MonoTypeNameFormat): New enum.
3542
3543         * class.c
3544         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
3545         (mono_type_get_full_name): Removed.
3546         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
3547         argument instead of the boolean's.
3548
3549         * icall.c (ves_icall_System_MonoType_getFullName):
3550         Added `gboolean assembly_qualified'.    
3551
3552         * reflection.h
3553         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
3554
3555         * reflection.c (mono_reflection_parse_type): Parse the new type
3556         name format.
3557
3558 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3559
3560         * icall.c: no need to convert from utf16 to utf8 and then back again
3561         after the call to GetLogicalDrives.
3562
3563 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3564
3565         * icall.c: frombase64. Fix problems exposed by new tests.
3566
3567 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3568
3569         * icall.c: added internal calls for converting char [] and strings in
3570         base64 into byte [].
3571
3572 2005-06-10  Martin Baulig  <martin@ximian.com>
3573
3574         * class.c (mono_class_create_generic_2): Read the nested classes
3575         from the metadata rather than from `gklass->nested_classes' since
3576         `gklass' might not be initialized yet.
3577
3578 2005-06-09  Duncan Mak  <duncan@novell.com>
3579
3580         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
3581         all public headers. Fixes #74919.
3582
3583 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
3584
3585         * domain.c: The key for proxy_vtable_hash is now a pointer
3586         array. Added new GHashFunc and GCompareFunc functions for this.
3587
3588         * class.h: The list of interfaces in MonoRemoteClass is known in
3589         advance and can't grow (we create a new MonoRemoteClass if needed),
3590         so now the interface array can be allocated together with
3591         MonoRemoteClass.
3592         
3593         * object.c: Added a new method create_remote_class_key.
3594         Fixed mono_remote_class so it does not depend on
3595         mono_upgrade_remote_class.
3596         Removed extend_interface_array.
3597         Added new method clone_remote_class(), which makes a copy of a remote
3598         class and adds a new interface or class to it.
3599         mono_upgrade_remote_class() now creates a new remote class (or gets
3600         it from the cache) if an vtable upgrade is needed. In this way
3601         we make sure that other objects sharing the same remote class
3602         don't get the new vtable with unwanted interfaces.
3603         
3604         * object-internals.h:
3605         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
3606         
3607         * marshal.c: Track changes in mono_upgrade_remote_class().
3608
3609 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
3610         * icall.c: Add runtime methods for obtaining members of inflated
3611         class, which were created from supplied non-inflated members. It
3612         is used in internal Get{Method,Constructor,Field} methods in
3613         System.Type
3614
3615 2005-06-09  Martin Baulig  <martin@ximian.com>
3616
3617         * reflection.c
3618         (mono_reflection_bind_generic_method_parameters): Fix #75169.
3619
3620 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3621         * reflection.c (mono_image_basic_init): Define
3622         Version in MonoDynamicAssembly. 
3623         
3624 2005-06-08  Martin Baulig  <martin@ximian.com>
3625
3626         Fix #75136.
3627
3628         * loader.c
3629         (mono_method_signature_full): New public method; takes a
3630         `MonoGenericContext *'.
3631         (find_method): Use mono_method_signature_full() and pass the
3632         klass'es context to it.
3633
3634         * class.c (mono_class_is_inflated_method): Use
3635         mono_method_signature_full() and pass the context to it.
3636
3637 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
3638
3639         * object.c: add proper locking in mono_remote_class_vtable(),
3640         fixes possible memory corruption.
3641
3642 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
3643
3644         * marshal.c (mono_remoting_marshal_init): set
3645         initialized after initialization.
3646
3647 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
3648
3649         * locales.c : hush.
3650
3651 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
3652
3653         * object.c (extend_interface_array): fix really silly
3654         memory corrupting / comparison bug.
3655
3656 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3657
3658         * reflection.c: Functions added to support the creation
3659         of CustomAttributeData, which includes Attribute data
3660         used by ReflectionOnly methods.
3661
3662         * reflection.h:  mono_reflection_get_custom_attrs_data and
3663          mono_custom_attrs_data_construct added (functions exposed).
3664
3665          * icall.c: Added mono_reflection_get_custom_attrs_data
3666          as icall.
3667         
3668 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
3669
3670         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
3671         lupus's request.
3672
3673 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
3674
3675         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
3676
3677         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
3678         dynamic DllImportAttribute.
3679
3680         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
3681         dynamic DllImportAttribute.
3682
3683         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
3684         Fixes #75162.
3685
3686 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3687
3688         * threads.c: avoid segfault when an unstarted thread is aborted.
3689
3690 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
3691
3692         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
3693         Returns the name and version of the runtime for reporting.
3694
3695 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3696
3697         * appdomain.c: bump corlib version.
3698         * object-internals.h: new field in MonoReflectionAssembly.
3699
3700 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3701
3702         * object-internals.h: Carlos forgot to add this field.
3703
3704 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3705
3706         * icall.c: Added create_version to create instances
3707         of Version of MonoReflectionAssemblyName. This change helps
3708         the AssemblyName tests to keep running fine.
3709         
3710 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
3711   
3712         * object.c (mono_method_return_message_restore): A somehow less
3713         intrusive fix for #75138.
3714
3715 2005-06-03  Raja R Harinath  <rharinath@novell.com>
3716
3717         * object.c (mono_method_return_message_restore): Fix computation
3718         of expected number of out args.
3719
3720 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
3721
3722         * reflection.c (mono_image_get_method_info): Fix the case when the
3723         charset is empty.
3724
3725 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
3726
3727         * object.c: Added missing null check in
3728           mono_method_return_message_restore.
3729
3730 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
3731
3732         * reflection.c (mono_image_get_method_info): Handle the case when
3733         dllentry is empty.
3734
3735 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
3736
3737         * object.c: When creating the vtable for a proxy, take into account
3738         all inherited interfaces, not only the ones registered in
3739         iclass->interfaces. This fixs bug #74996.
3740         Also, in mono_method_return_message_restore, verify that the array
3741         of out args has the expected lengh.
3742
3743 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3744
3745         * socket-io.c: update the timeout in Poll when the call is interrupte.
3746
3747 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3748
3749         * socket-io.c: support abort/suspend in Select_internal after last
3750         change.
3751
3752 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3753
3754         * threadpool.c: remove warning.
3755
3756 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3757
3758         * icall.c:
3759         * socket-io.[ch]: Select_internal uses poll() now when available, thus
3760         removing the 1024 limit from select(). Runtime part of the fix for
3761         bug #71203.
3762
3763 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3764
3765         * socket-io.c: when resolving the addresses for the same
3766         host returned by gethostname(), get the local IPs from the interface
3767         list. Loopback addresses are discarded if the are interfaces up with
3768         non-loopback ones. Fixes bug #63265.
3769
3770 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
3771
3772         * appdomain.c, verify.c, object-internals.h, reflection.c:
3773         bumped corlib number to 36, and added new extra_flags field
3774         to ReflectionMethodBuilder and friends.  Fixes #75060.
3775
3776 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
3777
3778         * gc.c: register a new weak link only if the object is non-null
3779         (fixes bug#75047).
3780
3781 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
3782
3783         * culture-info.h : short time pattern too.
3784
3785 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
3786
3787         * culture-info.h : expand long time pattern string length.
3788
3789 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
3790
3791         * culture-info-table.h : update (more French date format; #72788).
3792
3793 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
3794
3795         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
3796         the method is static. Fixes #75029.
3797
3798 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
3799
3800         * reflection.c: Update the table_idx field of method builders after
3801         saving the module, since it can change. This is a workaround for
3802         bug #74914. 
3803
3804 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
3805
3806         * culture-info-table.h : update (additional French date format).
3807
3808 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
3809
3810         * icall.c (ves_icall_type_Equals): Revert last change.
3811         
3812         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
3813
3814         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
3815
3816 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
3817
3818         * class-internals.h: Added executioncontext_class field to 
3819         MonoDefaults structure.
3820         * domain.c: Cache System.Threading.ExecutionContext class in 
3821         mono_defaults.
3822         * object.c: Capture the ExecutionContext for asynchroneous calls in
3823          mono_async_result_new.
3824         * object-internals.h: Added execution_context and original_context 
3825         fields to MonoAsyncResult. Added execution_context to MonoThread.
3826         * security-manager.c|.h: Added mono_get_context_capture_method to 
3827         return the capture method (if required by the security manager or by
3828         the framework version used).
3829         * threadpool.c: Apply capture (if present) ExecutionContext in 
3830         mono_async_invoke and revert to original context after it completes.
3831
3832 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
3833
3834         * culture-info-table.h : updated (real hacky solution for zh-CHT).
3835
3836 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
3837
3838         * culture-info-table.h : zh-CHT related workaround.
3839
3840 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
3841
3842         * marshal.c (emit_marshal_custom): Add some error checking and call the
3843         methods in the ICustomMarshaler interface. Fixes #74875.
3844         
3845         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
3846         native->managed wrappers.
3847
3848 2005-05-12  Martin Baulig  <martin@ximian.com>
3849
3850         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
3851         here and use the loader lock.
3852
3853         * mono-debug.c: Properly lock when the debugger is not attached.
3854         (mono_debug_init): Release the initial lock if we're not running
3855         in the debugger.
3856
3857 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
3858
3859         * marshal.c (emit_marshal_custom): Pass through NULL values without
3860         calling the custom marshalling routines.
3861
3862         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
3863         conversion in structures. Fixes #74882.
3864
3865 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
3866
3867         * culture-info-table.h : zh-* cultures were missing.
3868
3869 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
3870
3871         * threads.c: Added a new event background_change_event which is signaled
3872         when a thread changes its background mode.
3873         Moved here several checks previously done in managed code. The checks
3874         require the thread lock, and using the thread lock in managed code
3875         can result in deadlocks.
3876         Merged Start_internal and Thread_internal into a single method. Now 
3877         Thread_internal does all work of creating and starting a thread.
3878         Added icalls for setting and getting the state of the object. Moved from
3879         managed code to avoid locking there.
3880         Added wait_for_tids_or_state_change() which is called instad of
3881         wait_for_tids when waiting for non-backround threads to end. This method
3882         will return if one of the threads ends or the background_change_event
3883         is signaled.
3884         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
3885         the background mode. This method signals the background_change_event
3886         event.
3887         * icall.c:
3888         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
3889         removed Start_internal.
3890         
3891 2005-05-11  Martin Baulig  <martin@ximian.com>
3892
3893         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
3894         to order of some fields to get proper alignment on 64-bit machines.
3895
3896 2005-05-11  Martin Baulig  <martin@ximian.com>
3897
3898         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
3899         changes as they're broken and completely fuck up the debugger.
3900
3901         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
3902
3903 2005-05-10  Martin Baulig  <martin@ximian.com>
3904
3905         * reflection.c (mono_reflection_generic_class_initialize): Don't
3906         call mono_class_setup_parent() here.
3907
3908 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3909
3910         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
3911         send/receive timeout use an integer in milliseconds. We were using a
3912         struct timeval.
3913
3914 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3915
3916         * locales.c:
3917         (internal_get_cultures): reserve the first slot of the array for the
3918         InvariantCulture, which will be filled in managed code.
3919
3920 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
3921
3922         * reflection.c (mono_image_fill_module_table): Initialize the
3923         GENERATION field as well.
3924
3925 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3926
3927         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
3928         Monitor.Enter on the object.
3929
3930 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
3931
3932         * threads.c: Enable the wait for running threads when exiting.
3933         * icall.c: Suspend all threads before exiting.
3934
3935 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
3936
3937         * assembly.c (mono_assembly_load_reference): Fix warning.
3938
3939 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3940
3941         * threadpool.c: changed the default number of threads per cpu. From now
3942         on, the default will be 20 + (5 * number of cpus) instead of 50.
3943
3944 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
3945
3946         * loader.c (mono_method_get_signature_full): Add locking here.
3947
3948 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
3949
3950         * appdomain.c: Moved methods for parsing and freeing assembly
3951         names to assembly.c.
3952         * assembly.c, domain-internals.h: Created public methods for parsing
3953         assembly names. Fixed mono_assembly_load_with_partial_name:
3954         it now finds the best match, taking into account the version,
3955         token and culture specified in the partial name. Also return
3956         the latest version if no version information is specified.
3957
3958 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
3959
3960         * threadpool.c: replace check for SocketAsyncCall class.
3961
3962 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3963
3964         * threadpool-internals.h:
3965         * Makefile.am: added threadpool-internals.h
3966
3967         * threadpool.c: call mono_unhandled_exception on exceptions not handled
3968         that happen in threadpool threads (tested on MS).
3969         (mono_thread_pool_remove_socket): new function that dispatch any pending
3970         AIO call on a socket that is closing. By now only epoll really needs it,
3971         as select/poll wake up when the socket closes.
3972
3973
3974         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
3975
3976 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
3977
3978         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
3979
3980 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
3981
3982         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
3983
3984 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
3985
3986         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
3987         has an abort request, convert it into a suspend request.
3988
3989 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
3990
3991         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
3992         warning for the usage of `UnmanagedFunctionPointerAttribute' which
3993         is not supported yet.
3994
3995 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3996
3997         * image.c: register assemblies loaded from data (bundles) in the loaded
3998         assemblies hash. Fixes bug #74772.
3999
4000 2005-04-29  Martin Baulig  <martin@ximian.com>
4001
4002         * class.c (mono_type_get_name_recurse): Update to the new naming
4003         schema from the latest .NET 2.x beta2.
4004         (mono_class_setup_vtable_general): If we're a generic instance,
4005         copy the vtable from our generic type definition and inflate all
4006         the methods in it.
4007
4008         * loader.c (find_method): Update to the new naming schema from the
4009         latest .NET 2.x beta2.
4010
4011 2005-04-29  Raja R Harinath  <harinath@gmail.com>
4012
4013         * class.c (mono_class_init): Add a mono_loader_unlock to the
4014         #74734 fix.
4015
4016 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
4017
4018         * icall.c (ves_icall_System_Environment_Exit): Remove the 
4019         suspend_all_other_threads () call for the time being, since it can hang.
4020
4021         * threads.c (mono_thread_manage): Similarly, disable the waiting for
4022         the background threads to exit, since it can also hang.
4023
4024         * class.c (mono_class_init): Applied patch from Ankit Jain 
4025         (radical@gmail.com). Avoid pending init errors when a field refers
4026         to a nested class using a typeref. Fixes #74734.
4027
4028         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
4029         this for dynamic modules.
4030
4031 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4032
4033         * threads.c: don't wait for threads that are in the process of aborting
4034         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
4035         and waiting for background threads to finish. This makes xsp and
4036         mod-mono-server exit without random length delays and/or hangs.
4037
4038 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4039
4040         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
4041
4042 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
4043
4044         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
4045         dynamic types to prevent infinite loops. Fixes #74727.
4046
4047         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
4048         ..._is_assignable_to.
4049
4050 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
4051
4052         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
4053
4054 2005-04-25  Martin Baulig  <martin@ximian.com>
4055
4056         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
4057
4058         * domain.c
4059         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
4060
4061         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
4062
4063         * reflection.c (build_compressed_metadata): Set metadata header
4064         version to 2.0.
4065
4066 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
4067
4068         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
4069         number into an integral and a decimal part. Fixes #70473.
4070
4071         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
4072
4073 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
4074
4075         * culture-info-table.h : reflected the latest locale-builder output.
4076
4077 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4078
4079         * threadpool.c: check for SuspendRequested too when deciding if
4080         mono_thread_interruption_checkpoint should be called.
4081
4082 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4083
4084         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
4085         * threads.c: remove interruption_mutex and use Interlocked instead. When
4086         suspending all the threads, wait for all the suspended events at once.
4087         If we're shutting down and get an APC that is going to be queued,
4088         call mono_thread_execute_interruption immediately, as the thread might
4089         be sleeping on a pthread condition or mutex.
4090
4091         * icall.c: call mono_runtime_set_shutting_down before suspending the
4092         threads.
4093
4094         Fixes bug #74693. And now xsp is happier when exiting.
4095
4096 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
4097
4098         * loader.c (mono_stack_walk): Fix #74690.
4099
4100 2005-04-22  Martin Baulig  <martin@ximian.com>
4101
4102         * mono-debug.h (MonoDebugMethodJitInfo): Added
4103         `MonoDebugMethodJitInfo *jit'.
4104
4105         * mono-debug.c (mono_debug_read_method): Cache the
4106         MonoDebugMethodJitInfo in `address->jit'.
4107         (mono_debug_free_method_jit_info): New public method.
4108
4109 2005-04-22  Martin Baulig  <martin@ximian.com>
4110
4111         * class.c (mono_class_is_assignable_from): Disallow
4112         type parameter -> interface.
4113
4114 2005-04-21  Dick Porter  <dick@ximian.com>
4115
4116         * threads.c (mono_thread_create): Turn an assertion into an error.
4117
4118 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
4119
4120         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
4121         
4122         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
4123         Fix some gcc 4.0 warnings.
4124
4125 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
4126
4127         * file-io.c: fix alt dir separator char on unix systems
4128         and cleanup (fixes bug #71214).
4129
4130 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
4131
4132         * marshal.c: Use CALLVIRT instead of CALL when dispatching
4133         a call to a remote domain, since the method may be an
4134         interface method in the client domain. This fixes bug #74192.
4135
4136 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4137
4138         * threadpool.c: recv/send are now performed before going back to managed
4139         code to save one transition.
4140
4141 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4142
4143         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
4144
4145         * metadata/threadpool.c: removed hack to workaround the bug above.
4146
4147         Fixes bug #74618.
4148
4149 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
4150
4151         * reflection.c reflection.h: Fix handling of parameter defaults in
4152         dynamic methods. Also fixes handling of parameter attributes.
4153         Fixes #74609.
4154
4155         * mono-debug.c (mono_debug_close_image): Fix warning.
4156
4157 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4158
4159         * socket-io.h: replaced old unused field with new 'blocking'.
4160         * threadpool.c: restore socket blocking state on windows(tm).
4161
4162 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
4163
4164         * icall.c: don't return the codebase in the AssemblyName[] returned by
4165         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
4166         * object-internals.h: Removed FIXME (fields were presents) and fixed
4167         versioncompat declaration.
4168
4169 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4170
4171         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
4172         not closed, so don't cleanup when it happens.
4173
4174 2005-04-13  Chris Toshok  <toshok@ximian.com>
4175
4176         * mono-debug-debugger.h: change prototype for
4177         mono_debugger_lookup_type.
4178
4179         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
4180         this function, although it should probably be named
4181         mono_debugger_init_type.
4182
4183 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4184
4185         * threadpool.c: fix non-AIO case.
4186
4187 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
4188
4189         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
4190         the built-in profiler to measure just JIT compilation times.
4191
4192 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4193
4194         * threadpool.c: the epollfd might be closed by another thread at
4195         any time, so ignore EBADF at treat it as a "we're closing" sign.
4196
4197 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4198
4199         * threadpool.c: release the semaphores with a count equals to the number
4200         of working threads in both IO and regular pools. Fixed typo that messed
4201         up the count of IO pool threads. Don't initialize the pipe handles if
4202         we're using epoll.
4203
4204 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4205
4206         * threadpool.c: some systems don't like a NULL when deleting the socket
4207         from epoll.
4208
4209 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4210
4211         * threadpool.c: fix semaphore allocation.
4212
4213 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4214
4215         * threadpool.c: added epoll() based implementation for asynchronous IO
4216         that is used instead of the default poll() when available.
4217         It can be disabled by setting MONO_DISABLE_AIO.
4218
4219 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4220
4221         * threadpool.c: windows needs 'closesocket' and instead of returning
4222         0 when the stream is closed while in select, it returns -1. Fixes bug
4223         #74573.
4224
4225 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
4226
4227         * class.c (class_compute_field_layout): Fix the regression caused by
4228         the previous try.
4229
4230 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4231
4232         * threadpool.c: separate pool for socket async. IO.
4233         * threadpool.h: mono_max_worker_threads is not a global any more.
4234
4235 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
4236
4237         * class.c (class_compute_field_layout): Fix #74549.
4238
4239 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4240
4241         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
4242         use 2 connected sockets instead.
4243
4244 2005-04-08  Miguel de Icaza  <miguel@novell.com>
4245
4246         * mono-config.c: Add new entry point for mkbundle
4247         mono_config_parse_memory. 
4248
4249 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4250
4251         * threadpool.c: removed another unused function.
4252
4253 2005-04-08  Ankit Jain  <radical@corewars.org>
4254
4255         * reflection.c (get_default_param_value_blobs): Add 'types'
4256         parameter to get the types encoded in the constant table.
4257         (mono_param_get_objects): Use the type from the constant table,
4258         not the type of the parameter, when creating default values.
4259         Handle null default values correctly.
4260
4261 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4262
4263         * file-io.c:
4264         * file-io.h:
4265         * threadpool.c:
4266         * threadpool.h:
4267         * icall.c:
4268         * socket-io.c: removed dead code for async IO.
4269
4270 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4271
4272         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
4273
4274         * threadpool.c: intercept socket async. calls and pass them to a thread
4275         that is polling and dispatching the job items to the threadpool as
4276         socket become ready. Fixes bugs #71217, #71933.
4277
4278         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
4279         between char and short/ushort arrays.
4280
4281         * socket-io.c: remove dead code.
4282
4283 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
4284
4285         * locales.c,
4286           icall.c : removed InternalToUpper_Comp() and
4287           InternalToLower_Comp().
4288
4289 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
4290
4291         * char-conversions.h : The tables were incorrectly generated. Should
4292           be generated against invariant culture.
4293
4294 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
4295
4296         * object.c (mono_runtime_invoke_array): Fix return value when 
4297         passing pre-created valuetype objects to ctors.
4298
4299         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
4300         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
4301         Fixes #74338.
4302
4303 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
4304
4305         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
4306         only used with --security and hides the wrong corlib version error.
4307
4308 2005-03-30  Joshua Tauberer  <tauberer@for.net>
4309
4310         * class.c: Changed mono_class_name_from_token so that types
4311         outside of a namespace don't have an initial period.  Improved
4312         the g_warning message used in _mono_class_get when loading
4313         fails.
4314         * assembly.c: In mono_assembly_load_reference, when an assembly
4315         can't be found, "No such file or directory" is misleading and
4316         unhelpful because a few paths were checked for the presence of
4317         the assembly.  When that happens (ENOENT), display a nicer
4318         message indicating the directories that were searched.  In all
4319         cases, the warning is made easier to read for non-hackers.
4320
4321 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
4322
4323         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
4324         project/solution.
4325         * appdomain.h|domain.c: Removed inline from functions.
4326         * appdomain.c: Reduced warnings when compiling on windows.
4327         * icall.c: Fixed output_debug declaration to gunichar2*.
4328         * mono-config.c: Reduced warnings when compiling on windows.
4329         * rand.c: Added missing "windows.h". Added missing return value.
4330         * rawbuffer.c: Added missing winsock2.h for windows.
4331         * sysmath.h: Added mono-compiler.h header to allow/ease 
4332         compilation with non-GCC compilers.
4333         * threads.c: Fixed declarations to compile with VS.NET C compiler.
4334         Removed cast warnings.
4335
4336         Adapted from the work of J Lothian (for VC6).
4337
4338 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
4339
4340         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
4341         from default_path.
4342
4343 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
4344
4345         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
4346         the 2.0 profile.
4347
4348 2005-03-27  Raja R Harinath  <harinath@gmail.com>
4349
4350         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
4351         has to be in $(exec_prefix).  $(prefix) is for arch-independent
4352         stuff, and it would probably use $(prefix)/share rather than
4353         $(prefix)/lib.
4354
4355 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4356
4357         * console-io.c: added 2 includes that might be missing.
4358
4359 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
4360
4361         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
4362         profile.
4363
4364         * reflection.c (create_custom_attr): Allocate the params array using
4365         alloca so it gets GC tracking.
4366
4367 2005-03-23  Chris Toshok  <toshok@ximian.com>
4368
4369         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
4370         out some spew.
4371
4372 2005-03-24  Raja R Harinath  <rharinath@novell.com>
4373
4374         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
4375         changes to pick up any changes in prefix, etc.
4376
4377 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
4378
4379         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
4380         
4381         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
4382         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
4383
4384 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
4385
4386         * class-internals.h object-internals.h class.c reflection.c: Extend the
4387         mono_lookup_dynamic_token () function to return the class of the
4388         token as well. 
4389
4390         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
4391         well. Fixes #73848.
4392
4393 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
4394
4395         * security-manager.c: Skip inheritance checks for intra-corlib
4396         class inheritance and method overrides. This skips a lot of checks
4397         and (anyway) permissions cannot work until corlib is loaded.
4398
4399 2005-03-23  Martin Baulig  <martin@ximian.com>
4400
4401         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
4402         MONO_TYPE_GENERICINST.  
4403
4404 2005-03-23  Martin Baulig  <martin@ximian.com>
4405
4406         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
4407
4408 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4409
4410         * class.c: added locking comments to some functions.
4411         Cache the interface offsets arrays (saves about 20 KB
4412         of runtime memory in a typical app).
4413         Reduce the time overhead in mono_class_setup_supertypes ().
4414
4415 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
4416
4417         * icall.c: speedup and fix leaks in GetMethodsByName and
4418         GetPropertiesByName.
4419
4420 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4421
4422         * reflection.c: some locking fixes.
4423
4424 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
4425
4426         * metadata.c: added missing break in case statement.
4427
4428 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
4429
4430         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
4431         typedbyref return values. Fixes #73941.
4432
4433 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
4434
4435         * security-manager.c|h: Added demandunmanaged method and 
4436         suppressunmanagedcodesecurity class to MonoSecurityManager.
4437         Renamed aptc class to allowpartiallytrustedcallers.
4438
4439 2005-03-17  Martin Baulig  <martin@ximian.com>
4440
4441         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
4442
4443 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4444
4445         * file-io.c: disabled file async. IO using aio_*. It uses the
4446         threadpool now. Workaround for bug #73718.
4447
4448 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4449
4450         * assembly.h, mono-config.c: added code to deal with bundled configs
4451         for bundled assemblies.
4452
4453 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
4454
4455         * *.c, private.h: cleanup, removing old private.h header file.
4456
4457 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
4458
4459         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
4460         and throw_on_unmappable_char attributes.
4461
4462 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
4463
4464         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
4465         _ProcessName_internal.
4466
4467 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
4468
4469         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
4470         #73631.
4471
4472         * icall.c threads.c threads-types.h: Remove slothash icalls as they
4473         are no longer used.
4474
4475 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
4476
4477         * object.c (compute_class_bitmap): Add support for generics. Fixes
4478         #73527.
4479
4480 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
4481
4482         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
4483
4484 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4485
4486         * filewatcher.c: commented out the code for windows watcher, as we don't
4487         use it (we use the managed implementation instead).
4488
4489 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
4490
4491         * object-internals.h (MonoThread): Remove 'unused1' field.
4492
4493         * appdomain.c: Bump corlib version.
4494
4495         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
4496
4497         * reflection.c (mono_reflection_create_runtime_class): Remove the
4498         AssemblyBuilder.Save optimization since it causes too many problems.
4499
4500 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
4501
4502         * exception.c|h: Added mono_get_exception_reflection_type_load to
4503         create a ReflectionTypeLoadException object.
4504         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
4505         to return NULL is a InheritanceDemand fails during reflection. Updated
4506         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
4507         ReflectionTypeLoadException if an InheritanceDemand fails during 
4508         reflection. Added icall mapping for GetLinkDemandSecurity.
4509         * security-manager.c|h: Added ves_icall_System_Security_
4510         SecurityManager_GetLinkDemandSecurity internal call to return the
4511         class and methods permissions set for a LinkDemand. Removed unused
4512         fields in MonoSecurityManager.
4513
4514 2005-03-10  Martin Baulig  <martin@ximian.com>
4515
4516         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
4517         it's a generic instance.
4518
4519 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
4520
4521         * reflection.c (mono_get_object_from_blob): Applied patch from
4522         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
4523
4524         * class.c (mono_class_is_assignable_from): Another try at fixing 
4525         #73469 without breaking anything.
4526
4527 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
4528
4529         * class.c: (mono_class_is_assignable_from): Revert the last changes
4530         since they don't work with generics.
4531         
4532         * class.c (mono_class_is_assignable_from): Fix build bustage.
4533
4534         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
4535         the managed IsAssignableFrom method. Fixes #73469.
4536
4537         * reflection.c (mono_reflection_call_is_assignable_from): New helper
4538         function.
4539
4540 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
4541
4542         * object.c (mono_load_remote_field_new): Fix returning uninitialized
4543         memory when the remoting callback does not sets the out arguments.
4544         Fixes #73007.
4545
4546         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
4547         by mistake.
4548
4549         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
4550
4551         * object-internals.h (MonoStackFrame): Sync with managed object layout.
4552
4553         * appdomain.c: Bump corlib version.
4554
4555 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
4556
4557         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
4558         function.
4559
4560         * threads.c (mono_thread_attach): Detect threads which are not started
4561         by the GC pthread wrappers.
4562
4563 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
4564
4565         * icall.c: Added new icall for RNG.
4566         * rand.c|h: Added new icall to open the RNG. This allows to share a 
4567         single handle on Linux to access /dev/urandom and fix #73183.
4568
4569 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
4570
4571         * object.c: setting the new vtable in a transparent proxy object must
4572         not change the GC descriptor.
4573
4574 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4575
4576         * object.c: fixed compilation without GCJ support.
4577         * reflection.c: for runtime-created types ensure klass->has_references
4578         is correct (bug #73215).
4579
4580 2005-03-02  Martin Baulig  <martin@ximian.com>
4581
4582         * class.c (mono_class_is_assignable_from): Make this work if
4583         `oklass' is a generic instance; fixes #72831.
4584
4585 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
4586
4587         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
4588         with hasthis set.
4589         
4590         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
4591
4592         * marshal.c: Reorganize native->managed marshalling code to also use
4593         the emit_marshal_... functions.
4594
4595 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
4596
4597         * object.c: typed allocs have issues with bitmap sizes > 30,
4598         so check for max_set >= 30.
4599
4600 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
4601
4602         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
4603         managed code. Fixes #73012.
4604
4605         * metadata.h (MonoMarshalSpec): Add elem_mult field.
4606
4607         * metadata.c reflection.c: Load/Emit elem_mult as well.
4608         
4609         * metadata.h (MonoMarshalSpec): Add comment.
4610
4611         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
4612
4613         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
4614         num_elem to -1 if not given.
4615
4616         * object-internals.h (MonoReflectionMarshal): Add has_size field.
4617
4618         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
4619         given values.
4620
4621 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
4622
4623         * null-gc.c (mono_gc_free_fixed): Was not compilable.
4624
4625 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
4626
4627         * reflection.c (encode_marshal_blob): Encode param_num field as well.
4628
4629         * object-internals.h (MonoReflectionMarshal): Add param_num field.
4630
4631 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
4632
4633         * object.c: generalized the reference bitmap creation
4634         and added hooks for the new GC.
4635         * class-internals.c: removed the gc_bitmap field from MonoClass.
4636
4637 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4638
4639         * domain.c: help the compiler to produce better code
4640         in mono_jit_info_table_find ().
4641
4642 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
4643
4644         * object.c: make all allocations look typed.
4645
4646 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4647
4648         * socket-io.c: load Mono.Posix if it's not loaded already
4649         (fixes bug#73033).
4650
4651 2005-02-24  Martin Baulig  <martin@ximian.com>
4652
4653         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
4654         * reflection.c (dup_type): Likewise.
4655
4656 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
4657
4658         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
4659         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
4660
4661 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4662
4663         * domain.c, threads.c, object-internals.h: make the critical thread
4664         local vars use the fast access mode (even when we're compiled in
4665         a lib). Provide accessors to be used by the jit during codegen.
4666
4667 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4668
4669         * appdomain.c: Changed hook functios behavior to include
4670         support for the reflection only assemblies. Some icalls were changed
4671         to support the mentioned assemblies too. Signatures of static methods
4672         try_assembly_resolve and real_load now have an additional parameter:
4673         refonly.
4674
4675         * assembly.c: General changes to mono_assembly_ methods to support
4676         reflection only api. Functions mono_assembly_open, mono_assembly_load,
4677         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
4678         suffix, to support an additional gbool parameter to specify whether
4679         the assembli is reflection only or not. Created some new hook functions 
4680         to add support for reflection only assemblies. Signatures of static 
4681         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
4682         have now an additional parameter: refonly.
4683
4684         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
4685         indicating whether the assembly is reflection only or not.
4686
4687         * exception.c: Add mono_get_exception_invalid_operation.
4688
4689         * icall.c: Throw an InvalidOperationException when trying to invoke
4690         a property/method/event, or trying to set/get the value of a field.
4691         Also add an icall to retrieve the ref_only flag to the
4692         MonoReflectionAssembly.
4693
4694 2005-02-23  Chris Toshok  <toshok@ximian.com>
4695
4696         Part of fix for #72827.
4697         * mono-debug.c (mono_debug_add_method): add lexical block data to
4698         the info we write.  Kind of a hack at the moment - we copy the
4699         lexical block info from the MonoDebugMethodInfo to the
4700         MonoDebugMethodJitInfo here, before writing it.
4701         (mono_debug_read_method): read the lexical block info.
4702
4703         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
4704
4705         * debug-mono-symfile.h: add lexical block support.
4706
4707         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
4708         support.
4709
4710 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
4711
4712         * loader.c (mono_lookup_pinvoke_call): Fix warning.
4713
4714         * object.c (mono_runtime_free_method): Call mono_free_method () and
4715         put the TODOs there.
4716
4717         * loader.c (mono_free_method): Free up most memory allocated for 
4718         dynamic methods.
4719
4720 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
4721
4722         * reflection.c: properly flag a Type argument to a
4723         named custom attr value (bug #72248).
4724
4725 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4726
4727         * reflection.c: reduce code duplication in named custom
4728         attribute encoding.
4729
4730 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
4731
4732         * reflection.c: properly encode custom attrs of type object
4733         (bug #72649).
4734
4735 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
4736
4737         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
4738
4739 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
4740
4741         * socket-io.c: load System.dll if it's not loaded already
4742         (bug #72850 and #70477).
4743
4744 2005-02-21  Martin Baulig  <martin@ximian.com>
4745
4746         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
4747         generic instances.
4748
4749 2005-02-21  Martin Baulig  <martin@ximian.com>
4750
4751         * reflection.c (mono_image_build_metadata): We also need to
4752         "fixup" the MethodImpl table after we computed the final method
4753         indices.  Call fixup_methodimpl() to do that.
4754         (fixup_methodimpl): New private method.
4755
4756 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
4757
4758         * assembly.c: special case mscorlib.dll (bug#72536),
4759         patch from Carlos Alberto Cortez.
4760
4761 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
4762
4763         * threads-types.h threads.c: Fix build bustage.
4764
4765         * threads.c: Use a union for long<->double conversions.
4766
4767         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
4768         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
4769
4770         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
4771         containing the checkpoint call with NOT_TAKEN.
4772         
4773         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
4774         checkpoint before pushing the arguments, so they won't have to be
4775         spilled to stack.
4776
4777 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4778
4779         * domain.c, assembly.c, domain-internals.h: make some data
4780         const and relocation-free.
4781
4782 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
4783
4784         * object.c, appdomain.c, class-internals.h: introduce the
4785         MonoClassRuntimeInfo structure to hold the info needed to
4786         use a class at runtime. Made mono_class_vtable() lock-free
4787         for all the appdomains.
4788
4789 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
4790
4791         * metadata-internals.h, image.c: introduce a per-image mempool to
4792         be used for memory that has the same lifetime as the image.
4793
4794 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
4795
4796         * domain.c: In mono_init_internal(), instead of selecting the first
4797         runtime version supported by an executable, get a list of all
4798         supported versions and select the one for which an mscorlib exists
4799         (since even if the runtime supports a given version, it doesn't mean
4800         that the framework for that version is installed).
4801         Modified get_runtimes_from_exe to support this behavior.
4802         In supported_runtimes, added information about additional system
4803         assembly versions.
4804         
4805         * assembly.c: Added support for more than one system assembly version
4806         per runtime version. Updated the assembly list.
4807         In mono_assembly_remap_version, removed the initial version check,
4808         since we don't know to which version we need to compare until we
4809         get the version set on which the assembly is based.
4810         Moved the code for loading corlib into the new method
4811         mono_assembly_load_corlib(), so it can be used by the initialization
4812         code.
4813         
4814         * domain-internals.h: Updated data structures and added declaration
4815         for mono_assembly_load_corlib.
4816
4817 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
4818
4819         * reflection.c (resolve_object): Fix the creation of the signature in 
4820         the SignatureHelper case.
4821
4822         * assembly.c (mono_assembly_remap_version): Fix binary search.
4823         
4824 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
4825  
4826         * class.c: Added inheritance check when a method is overloaded (from a
4827         virtual method or when implementing an interface) and when a class is
4828         inherited. Added functions to set a failure for a class and to 
4829         retreive the exception from a failure.
4830         * class-internals.h: Added fields to MonoClass to keep the exception
4831         information status for inheritance (or other exceptions) to be thrown
4832         later (i.e. not at load time).
4833         * object.c: Throw the inheritance SecurityException when a type is to 
4834         be created with either class or method inheritance violations.
4835         * reflection.c|h: Fix when getting declsec from a class. Removed 
4836         unrequired code for class. Improved sanity in parameter naming.
4837         * security-manager.c|h: Added functions to check for class and method
4838         inheritance.
4839
4840 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
4841
4842         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
4843         and has_finalize in dynamic types as well.
4844
4845 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
4846
4847         * culture-info-table.h : fixed currency format for en-GB (and so on).
4848
4849 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
4850
4851         * gc.c: ensure the GC handles never have 0 as a value.
4852
4853 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
4854
4855         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
4856         a pointer to a struct to unmanaged code. Fixes #72625.
4857
4858 2005-02-16  Martin Baulig  <martin@ximian.com>
4859
4860         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
4861
4862 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
4863
4864         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
4865
4866 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
4867
4868         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
4869
4870         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
4871         UnmanagedFunctionPointerAttribute, use it for determining calling convention
4872         etc. Fixes #71471.
4873
4874         * reflection.c (mono_custom_attrs_get_attr): New helper function.
4875
4876         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
4877
4878 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
4879
4880         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
4881         changes to make the current context a field in MonoThread.
4882
4883 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
4884
4885         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
4886         the last change.
4887         
4888         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
4889         extracted from mono_marshal_get_native_wrapper.
4890
4891         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
4892         to create wrappers around native functions.
4893
4894         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
4895         delegates for arbitrary function pointers. Fixes #71472.
4896
4897 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
4898
4899         * threads.c: cleaned up the code a little.
4900
4901 2005-02-15  Martin Baulig  <martin@ximian.com>
4902
4903         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
4904         the data table.
4905
4906         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
4907         allocate larger chunks if needed.
4908
4909 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
4910
4911         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
4912         in by mistake.
4913
4914 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
4915
4916         * domain.c: keep the domains in an array and ensure the domain ids
4917         are kept small, so they can be used as indexes to domain-specific data
4918         with a small memory overhead.
4919
4920 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
4921
4922         * icall.c: Handle byref types in Type icalls. Fixes #72544.
4923
4924 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
4925
4926         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
4927
4928 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
4929
4930         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
4931
4932         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
4933         values.
4934
4935         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
4936         
4937 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
4938
4939         * domain-internals.h: add the hashtable here.
4940
4941         * class-internals.h: Remove `info' from MonoMethod
4942
4943         * domain.c: Add a new hashtable, jit_trampoline_hash
4944
4945 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
4946
4947         * object.c: don't set the value of static fields
4948         (fixes bug#72494).
4949
4950 2005-02-11  Martin Baulig  <martin@ximian.com>
4951
4952         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
4953         (mono_debug_add_method): Silently ignore the method if it's too big.
4954         (mono_debug_add_type): Likewise.
4955
4956 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
4957
4958         * threads.c, appdomain.c: remove #ifdefs from the code.
4959
4960 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
4961
4962         * metadata-internals.h: Added flags to MonoAssembly to cache the most
4963         common security informations. This allows us to stay in unmanaged code
4964         when doing LinkDemand and it's special cases (except for the first 
4965         time for initialization). The flags a very much used with --security.
4966         * reflection.c|h: Added code to get declarative security attributes 
4967         for LinkDemand and InheritanceDemand. This required to refactor the
4968         existing code for Demand.
4969         * security-manager.c|h: Added new method fields for the special cases
4970         of LinkDemand.
4971
4972 2005-02-10  Martin Baulig  <martin@ximian.com>
4973
4974         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
4975         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
4976
4977 2005-02-10  Martin Baulig  <martin@ximian.com>
4978
4979         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
4980         debugging code; this is almost a complete rewrite.
4981
4982         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
4983
4984 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4985
4986         * domain.c, object.h: expose mono_string_equal () and 
4987         mono_string_hash ().
4988         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
4989         it's implemented in managed code.
4990
4991 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4992
4993         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
4994         lo leak objects between appdomains.
4995
4996 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4997
4998         * assembly.c: old compilers compilation fix from 
4999         robertj@gmx.net (Robert Jordan).
5000
5001 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
5002
5003         * class-internals.h: Little reminder for the future.
5004
5005         * debug-helpers.c: Fix up wrapper_type_names
5006
5007 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5008
5009         * image.c, metadata-internals.h: when loading an image from a file,
5010         mmap all of it and use the same codepaths as when using a
5011         in-memory image: the code is simpler and we use less memory
5012         (both writable and readonly).
5013
5014 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5015
5016         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
5017         API to alloc runtime data structures that need to be tracked by the
5018         GC and contain pointers.
5019         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
5020         make the code more readable and eventually use a different GC.
5021
5022 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
5023
5024         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
5025         for out arguments.
5026         
5027 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
5028
5029         * object.c: In release_type_locks(), don't release the cctor lock
5030         if it has already been released. This fixes a crash in the
5031         thread5 test.
5032
5033 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5034
5035         * gc.c, marshal.c, icall.c: register a delegate for finalization
5036         only when the native function pointer has been allocated for it.
5037
5038 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5039
5040         * object.c: cleaned up some code, allocate objects that are
5041         pointer free with the atomic malloc variant. Allocate memory
5042         for static data from the mempool if it's pointer-free.
5043         Allocate the bounds array at the end of the array data, when needed.
5044         * object-internals.h, object.h: move a private function in a private
5045         header.
5046         * class.c: handle missing case in tracking references in fields.
5047
5048 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5049
5050         * class.c, class-internals.h: keep track if a type has
5051         reference fields in either the instance or static fields.
5052
5053 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
5054
5055         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
5056         and renamed to MonoRuntimeInfo. Added fields to store the expected
5057         framework assembly version. Changed mono_get_framework_version and
5058         mono_get_runtime_version for a single mono_get_runtime_info method.
5059         
5060         * assembly.c: Added method to remap system assembly versions to the
5061         current executing runtime version. Removed old mapping code.
5062         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
5063         
5064         * icall.c, reflection.c: Track api changes.
5065
5066 2005-02-06  Miguel de Icaza  <miguel@novell.com>
5067
5068         * loader.c (method_from_memberref): Improve error reporting,
5069         produce the class name instead of the typeref/typedef index. 
5070
5071 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
5072
5073         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
5074
5075 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5076
5077         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
5078         stdcall and charset name mangling.  Reorganize the code and add
5079         some tracing stuff.
5080
5081 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
5082
5083         * monodiet.c: More iters!
5084
5085         * marshal.c: Iter usage.
5086
5087         * icall.c: Iter usage.
5088
5089         * object.c: Use iters.
5090
5091         * debug-helpers.c: More iters
5092
5093 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5094
5095         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
5096         under win32.
5097
5098 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
5099
5100         * mono-debug-debugger.c: use iters
5101
5102         * class.c, class-internals.h: mono_class_setup_events is static
5103         now
5104
5105         * All callers: use iters
5106
5107 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5108
5109         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
5110         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
5111
5112 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
5113
5114         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
5115
5116         * marshal.h: Add prototypes for ldfld/stfld_remote.
5117
5118         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
5119         this is called during startup.
5120         
5121 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
5122
5123         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
5124         MonoThreadsSync struct private in monitor.c. Changed the way
5125         MonoThreadsSync is allocated so it's faster and there is no
5126         need to keep track of it with a finalizer and it uses less memory.
5127         This also finally allows us to allocate mono objects as ptrfree when
5128         there are no reference fields.
5129
5130 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
5131
5132         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
5133         disappearing link to the GC interface and use them to simplify
5134         the gchandles code.
5135
5136 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
5137
5138         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
5139         stfld_remote which call mono_load/store_field_new. This allows methods
5140         calling ldfld/stfld wrappers to be AOTed.
5141
5142         * console-io.c: Include sys/filio.h under solaris.
5143         
5144         * console-io.c: Include curses.h if needed correctly.
5145
5146 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
5147         
5148         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
5149         method->klass as well.
5150
5151         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
5152
5153         * class.c (mono_class_init): Switch on lazy initialization of 
5154         methods.
5155
5156         * class.c (mono_class_get_finalizer): Handle the case when the 
5157         finalizer is inherited.
5158
5159 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5160
5161         * console-io.c: <curses.h> is needed by term.h on solaris.
5162
5163 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
5164
5165         * icall.c, class-internals.h, monodiet.c, class.c: Remove
5166         mono_class_setup_properties where possible. Remove this ftn from
5167         the header file, and make it static.
5168
5169 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
5170
5171         * loader.c: Add missing setup_... call.
5172
5173         * class.c: Add missing setup_... calls.
5174
5175         * class.c (mono_class_init): Switch on lazy initialization of 
5176         the generic vtable.
5177         
5178         * class.c (mono_class_init): Fix generics broken by the recent changes.
5179
5180         * monodiet.c (handle_type): Add missing setup_... calls.
5181
5182         * class.c: Back out garbage in previous patch.
5183         
5184         * class.c: Add missing setup_... calls.
5185
5186         * class.c (mono_class_get_method_from_name_flags): Avoid calling
5187         mono_class_setup_methods () if possible.
5188
5189         * class-internals.h (MonoClass): Add 'has_cctor' flag.
5190
5191         * class-internals.h (MonoCachedClassInfo): New structure.
5192
5193         * class.c: Initialize properties and events fields of MonoClass lazily.
5194
5195         * class.c: Add infrastructure for lazily initializing the methods and
5196         vtable fields of MonoClass. Not yet used.
5197
5198         * class.c (mono_class_get_finalizer): New helper function.
5199
5200         * class.c: Add infrastructure for loading some class related data from
5201         an AOT file.
5202
5203         * object.c: Add infrastructure for initializing the vtable from data
5204         in the AOT file.
5205
5206         * gc.c (run_finalize): Use mono_class_get_finalizer ().
5207
5208         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
5209         appropriate initialization function before accessing parts of the
5210         MonoClass structure.
5211
5212         * marshal.c: Fix warnings.
5213         
5214         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
5215
5216         * mono-debug-debugger.c (get_exception_message): Use 
5217         mono_class_get_method_from_name_flags ().
5218
5219 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
5220
5221         * reflection.c, appdomain.c: Replace a few manual searches that
5222         Zoltan missed. (Paolo approved this part of my initial patch).
5223
5224 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
5225
5226         * profiler.c: disable recording statistical events at report time.
5227
5228 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5229
5230         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
5231         to byteswap arrays of enum values, too (bug #72080).
5232
5233 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
5234
5235         * appdomain.c (set_domain_search_path): Allow this to be called if
5236         domain->setup is not yet set.
5237
5238         * loader.c (mono_method_get_index): New helper function.
5239
5240         * loader.c reflection.c: Use mono_method_get_index ().
5241
5242         * class.c (mono_class_get_method_from_name_flags): New helper method.
5243
5244         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
5245         this.
5246
5247         * class.c (mono_class_get_cctor): New helper method.
5248
5249         * string-icalls.c object.c class.c marshal.c reflection.c: Use
5250         mono_class_get_method () to look up methods.
5251
5252 2005-02-01  Miguel de Icaza  <miguel@novell.com>
5253
5254         * console-io.c: Fix the build, this should work on Windows.
5255
5256 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
5257
5258         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
5259         be set to null to keep things valid
5260
5261 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5262
5263         * icall.c: added Console 2.0 icalls.
5264         * Makefile.am: added console-io.[ch]
5265         * console-io.[ch]: internal calls for Console 2.0 API.
5266
5267 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5268
5269         * class.c: make sure we consider all the interfaces
5270         when calculating max_interface_id (bug found by
5271         Jeroen Frijters running ikvm).
5272
5273 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
5274
5275         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
5276         valuetype fields to null.
5277
5278         * object.c (set_value): Ditto. Fixes #71669.    
5279
5280 2005-01-31  Martin Baulig  <martin@ximian.com>
5281
5282         * metadata.c (mono_metadata_has_generic_params): New public
5283         function; checks whether something is a generic method.
5284
5285 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
5286
5287         * appdomain.c: fix infinite recursion when adding assemblies.
5288
5289 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
5290
5291         * object.c: Fix small typo to return all items for Environment.
5292         GetCommandLineArgs.
5293
5294 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5295
5296         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
5297         reflection.c: more domain and assembly-unload related fixes
5298         and memory leaks plugs.
5299
5300 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
5301
5302         * 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.
5303
5304 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
5305
5306         * loader.c (mono_method_signature): Make this method lazy
5307         (mono_get_method_from_token): Don't computate the signature here.
5308
5309         Doing this saves quite a bit of memory. I got 90 kb on starting up
5310         monodoc. It should also save some disk reads on startup.
5311
5312         * *: MonoMethod->signature might be NULL now. You *MUST* use
5313         mono_method_signature.
5314
5315 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
5316
5317         * object.c (mono_runtime_get_main_args): Return an array from the
5318         current domain here. Fixes #71938.
5319
5320 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
5321
5322         * monitor.c: formatting changes to comply with the
5323         mono coding style and remove #ifdefs from the code.
5324
5325 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5326
5327         * metadata.c, private.h: remove some unneeded data
5328         and use a more compact representation for table schemas.
5329
5330 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
5331
5332         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
5333         to get a better distribution in hash tables.
5334         * *.c: use mono_aligned_addr_hash() where appropriate.
5335         * assembly.c: make var static.
5336
5337 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
5338
5339         * domain-internals.h: Put MonoJitInfo on a diet.
5340
5341         * domain.c: Fix a warning.
5342
5343 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5344
5345         * gc.c: rework the gc handles code to reuse handles
5346         when freed.
5347
5348 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5349
5350         * domain.c: fixed long standing bug in mono_string_equal() which
5351         was brought to light with the ldstr changes.
5352
5353 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
5354
5355         * reflection.c: Remove warning by adding missing include for marshal.h
5356
5357 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5358
5359         * domain.c, object.c: change the ldstr_table to hold
5360         MonoString* as keys: makes the runtime isinterned lookup
5361         faster and simplifies memory management.
5362
5363 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
5364  
5365         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
5366         possible to add imperative security checks before calling the icall.
5367         * reflection.c: Return security attributes on the original MonoMethod
5368         (and not the wrapped one). This fix permissions on icalls.
5369
5370 2005-01-25  Dick Porter  <dick@ximian.com>
5371
5372         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
5373         the check for mktime() support actually test the mktime() return
5374         value.  "Fixes" bug 71682, though the output is still different to
5375         MS.
5376
5377 2005-01-25  Martin Baulig  <martin@ximian.com>
5378
5379         * class.c (mono_class_is_assignable_from): Make this work for
5380         generic instances.
5381
5382 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
5383
5384         * marshal.c (mono_string_utf8_to_builder)
5385         (mono_string_builder_to_utf16): We might not have ownership of the
5386         string. In thise case, we need to create a new buffer.
5387
5388         * object-internals.h (mono_stringbuilder_capacity): sb->str might
5389         be null, in which case, use the default capacity.
5390
5391 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5392
5393         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
5394         GC events to the profiler.
5395
5396 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5397
5398         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
5399         if you don't want the GC to run.
5400
5401 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
5402
5403         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
5404         start providing a GC API and keeping different implementations in
5405         their own file.
5406         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
5407
5408 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
5409
5410         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
5411         mmap rather than allocating a huge buffer.
5412         (mono_debug_close_mono_symbol_file): Free the buffer allocated
5413         above.
5414
5415 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
5416
5417         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
5418         and CheckExecutionRights.
5419         * reflection.c|h: Keep the index of the declarative security to be 
5420         used, instead of the pointer, when AOT compiler is used. Also add 
5421         class initialization when requesting demands.
5422         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
5423         CheckExecutionRights. Both properties are now FALSE by default, and
5424         unmodifiable, unless the --security option is used.
5425
5426 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5427
5428         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
5429         reflection.c: properly refcount images and assemblies, many leaks fixed.
5430
5431 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5432
5433         * threadpool.c: increase the timeout for threads in the thread pool to
5434         10s.  Fixes bug #67159.
5435
5436 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
5437
5438         * class-internals.h: Sun's compiler insists on explicit
5439         signed on bit fields to handle then correctly.
5440
5441 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
5442
5443         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
5444         Make the size of the array fit only the number of invalid path
5445         chars that we have.
5446
5447         * class.c (_mono_class_get): Improve the error reporting when a
5448         class referenced is not found, to assist debugging. 
5449
5450 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
5451
5452         * threads.c: fix off-by-one error.
5453         * domain.c: free data allocated in the domain.
5454
5455 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
5456
5457         * reflection.c (mono_method_body_get_object): Fill out exception info
5458         as well.
5459
5460         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
5461         structure.
5462         
5463 2005-01-19  Martin Baulig  <martin@ximian.com>
5464
5465         * loader.c (mono_get_method_constrained): Make this work again.
5466
5467 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
5468
5469         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
5470         guint16 to match the managed side.
5471
5472         * reflection.c (mono_reflection_body_get_object): Fill out local
5473         variables array.
5474
5475         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
5476         as well.
5477
5478         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
5479         'local_var_sig_token'.
5480
5481 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
5482
5483         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
5484         System.Drawing.
5485
5486         * reflection.c (mono_method_body_get_object): Handle abstract and
5487         runtime methods.
5488
5489 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
5490
5491         * marshal.c, loader.c, class-internals.h, reflection.c:
5492         store the emthod data for a wrapper in an array instead of a list.
5493
5494 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
5495
5496         * marshal.c: change the code to allocate memory more
5497         conservatively for method wrappers.
5498
5499 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
5500
5501         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
5502         fields from MonoClass to the marshal info structure where they belong.
5503
5504 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5505
5506         * class.c, object.c, class-internals.h, marshal.c: rearrange
5507         some fields and tweak some types to lower memory usage.
5508
5509 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
5510
5511         * threads.c (signal_thread_state_change): Handle the case when the
5512         target thread is the current thread.
5513
5514         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
5515
5516         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
5517         emit_ptr_to_object_conv. 
5518
5519         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
5520         marshalling. Fixes #71352.
5521
5522 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
5523
5524         * metadata.h, blob.h: move table enum to blob.h so it can be included
5525         in any header.
5526         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
5527         cut the size of MonoImage/MonoDynamicImage.
5528
5529 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
5530
5531         * profiler.c (mono_profiler_install_simple): Fix default arguments.
5532
5533 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
5534
5535         * reflection.c, reflection.h, icall.c: add a function to check
5536         if an attribute type is defined for a metadata object.
5537
5538 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
5539
5540         * object-internals.h: Added some needed fields from StringBuilder class.
5541         * marshal.c: Set the maxCapacity when creating a StringBuilder.
5542
5543 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
5544
5545         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
5546         threads before shutting down the runtime.
5547
5548         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
5549
5550 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5551
5552         * object-internal.h, threads.c: implement stacksize and 
5553         parameterized thread start functionality (requires
5554         matching corlib). Marked broken code for later removal.
5555
5556 2005-01-12  Martin Baulig  <martin@ximian.com>
5557
5558         * class-internals.h (MonoGenericClass): Moved the `initialized'
5559         flag to MonoDynamicGenericClass, removed `init_pending'.
5560         (MonoGenericInst): Added `is_reference' flag.
5561
5562 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
5563
5564         * reflection.c (mono_image_create_pefile): Only set the pe_offset
5565         inside the MSDOS header. Fixes #71201.
5566
5567         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
5568         gc thread.
5569         (mono_domain_finalize): Ditto.
5570
5571 2005-01-12  Martin Baulig  <martin@ximian.com>
5572
5573         * class.c (mono_get_shared_generic_class): Use the cache for
5574         non-dynamic generic classes.
5575
5576         * class-internals.h (mono_class_create_generic_2): Removed
5577         function prototype, this function is now static inside class.c.
5578
5579         * class.c (mono_class_create_generic_2): Made this static, only
5580         call it from mono_class_init() and mono_class_setup_parent().
5581         (collect_implemented_interfaces_aux): Call mono_class_init() on
5582         the interfaces we collect.
5583         (mono_class_setup_vtable): Call mono_class_init (class->parent).
5584
5585 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
5586
5587         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
5588         it a real thread handle.
5589
5590         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
5591         MonoJitExceptionInfo, since each catch clause needs its own variable.
5592         
5593 2005-01-11  Dick Porter  <dick@ximian.com>
5594
5595         * image.c (mono_pe_file_open): New variant on mono_image_open()
5596         that does not set up the CLI metadata; used for FileVersionInfo so
5597         it can get the data for windows binaries too.
5598         
5599         * process.c (process_read_string_block): Don't read off the end of
5600         the StringTable block.
5601
5602         These both fix bug 70766.
5603
5604 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
5605
5606         * gc.c: set some fields to NULL at GC cleanup time.
5607         * threads.c: if we quit the main thread, call exit ().
5608
5609 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
5610
5611         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
5612
5613 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
5614
5615         * threads.h, threads.c, object.c: added accessor and settor for
5616         main_thread. Handle it specially when exiting from it: wait
5617         for other foreground threads to exit.
5618
5619 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
5620
5621         * process.c, verify.c: remove some bloat.
5622
5623 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
5624
5625         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
5626         the calling convention to cdecl under win32.
5627
5628 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
5629
5630         * object.c (mono_object_get_size): New function to get the size of
5631         an object instance.
5632
5633         * profiler.c (simple_allocation): Use above.
5634
5635 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
5636
5637         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
5638         ves_icall_System_AppDomain_getRootDomain (as it's not required to
5639         get an appdomain by it's id and we can't assume the root's id is 0).
5640         * domain-internals.h: Change the function prototype to match.
5641         * icall.c: Change the icall table for AppDomain.
5642
5643 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
5644
5645         * locales.c (string_invariant_compare_char): Only compute
5646         GUnicodeTypes in the case where we need them.  Test for ordinality
5647         first and return if so.
5648
5649         From the commit:
5650
5651                 /*
5652                  * FIXME: here we must use the information from c1type and c2type
5653                  * to find out the proper collation, even on the InvariantCulture, the
5654                  * sorting is not done by computing the unicode values, but their
5655                  * actual sort order.
5656                  */
5657
5658 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5659
5660         * loader.c: for P/Invoke methods, allow the "Internal" shared
5661         library name to refer to the calling process symbol namespace.
5662
5663 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
5664
5665         * Makefile.am: Add the security manager to the build.
5666         * security-manager.c|h: New. Initialization of the security manager.
5667
5668 2005-01-07  Dick Porter  <dick@ximian.com>
5669
5670         * threads.c: 
5671         * monitor.c: Update thread state during Monitor and WaitHandle
5672         waits.  Fixes bug 71031.
5673
5674 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
5675
5676         * reflection.c (property_encode_signature): Correctly handle when the
5677         property has no methods.
5678
5679 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
5680
5681         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
5682         
5683         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
5684         fields from mb, not rmb. Fixes #71017.
5685
5686         * marshal.c (emit_ptr_to_str_conv): Add support for 
5687         ByValTStr -> string conversion. Fixes #71015.
5688
5689         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
5690
5691         * mempool.c (mono_mempool_contains_addr): New helper function.
5692
5693 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
5694
5695         * metadata.c (mono_metadata_compute_size): Fix size calculation of
5696         HasSematics encoded fields.
5697         
5698         * metadata.c (mono_type_to_unmanaged): Improve error message for 
5699         invalid string marshalling.
5700
5701         * metadata.c: Fix warnings.
5702         
5703 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5704
5705         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
5706         profiler support.
5707
5708 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
5709
5710         * domain.c object.c domain-internals.h: Revert part of r38077 since the
5711         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
5712         tests.
5713
5714 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
5715
5716         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
5717         so methods containing these can be AOTed.
5718
5719 2005-01-03  Martin Baulig  <martin@ximian.com>
5720
5721         * loader.c (find_method): Removed the hack for generic instances.
5722         (method_from_memberref): If our parent is a generic instance, pass
5723         its generic type definition to find_method() and then inflate the
5724         method.
5725         (mono_get_method_constrained): Pass the generic type definition to
5726         find_method() and inflate the method later.
5727
5728         * class-internals.h (MonoStats): Added `generic_class_count'.
5729
5730         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
5731         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
5732
5733         * reflection.c (mono_custom_attrs_from_params): Don't ignore
5734         generic type definitions.
5735
5736 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
5737
5738         * loader.c icall.c: Fix warnings.
5739
5740 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
5741
5742         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
5743         blittable types. Fixes #70864.
5744
5745 2004-12-29  Martin Baulig  <martin@ximian.com>
5746
5747         * icall.c
5748         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
5749
5750         * reflection.c (mono_method_get_object): Create a
5751         "System.Reflection.MonoGenericMethod" for inflated methods; don't
5752         call mono_get_inflated_method().
5753
5754         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
5755
5756 2004-12-27  Martin Baulig  <martin@ximian.com>
5757
5758         * class-internals.h (MonoMethod): Added `is_inflated' flag.
5759         (MonoMethodInflated): Added `inflated' field.
5760
5761         * class.c (mono_class_inflate_generic_method): Don't really
5762         inflate the method here; just set the `is_inflated' flag in the
5763         MonoMethod.
5764         (mono_class_get_inflated_method): Actually inflate the method here
5765         if it's not already inflated; we use the MonoMethodInflated's new
5766         `inflated' field as a cache.
5767
5768 2004-12-26  Martin Baulig  <martin@ximian.com>
5769
5770         * class.c
5771         (inflate_generic_class): Moved some code out of inflate_generic_type().
5772         (mono_class_inflate_generic_method): If we're already inflated,
5773         inflate the context and use the declaring method; ie. make sure
5774         the declaring method of an inflated method is always the generic
5775         method definition.
5776         (mono_class_create_from_typedef): Create
5777         `class->generic_container->context->gclass'.
5778
5779 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
5780
5781         * metadata-internals.h, marshal.c, reflection.c: More
5782         MonoGHashTable->GHashTable.
5783
5784         * domain-internals.h, class.c: Change MonoGHashTable's into
5785         GHashTables for some cases where no gc stuff is used
5786
5787         All users: update apis
5788
5789 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
5790
5791         * metadata.c (builtin_types): Make this `const'. Makes this get
5792         put into the shareable section.
5793         (mono_metadata_init): Casts to make gcc happy.
5794
5795 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
5796
5797         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
5798
5799 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
5800
5801         * icall.c: Added an internal call to retrieve the position and length
5802         of assembly-level declarative security attributes (RequestMinimum, 
5803         RequestOptional and RequestRefuse). This is used by the Assembly class
5804         to re-create the corresponding permission sets.
5805
5806 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
5807
5808         * marshal.c: fix the stelemref wrapper to be type correct
5809         (and faster).
5810
5811 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
5812
5813         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
5814         to do key & 0x7fffffff. Hashtable already does this. It just
5815         results in longer code.
5816
5817 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
5818
5819         * appdomain.c: Bump corlib version.
5820         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
5821         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
5822         * reflection.c|h: Add functions to get declarative security infos
5823         (blob position and length) for assemblies, classes and methods.
5824
5825 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
5826
5827         * reflection.c: sort the constant table (bug #70693).
5828
5829 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
5830
5831         * object-internals.h, threads.c, domain.c: add accessors for
5832         the MonoThread and MonoDomain tls keys.
5833
5834 2004-12-18  Martin Baulig  <martin@ximian.com>
5835
5836         * class.c (inflate_generic_type): If we're inflating a generic
5837         instance, set `ngclass->context->container = context->container';
5838         ie. the container we inflated into.
5839
5840         * metadata.c (mono_metadata_parse_generic_param): Reflect above
5841         inflate_generic_type() changes.
5842
5843 2004-12-17  Martin Baulig  <martin@ximian.com>
5844
5845         * class-internals.h
5846         (MonoGenericClass): Replaced `MonoType *generic_type' with
5847         `MonoClass *generic_class'.  Removed `dynamic_info'; if
5848         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
5849         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
5850
5851 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
5852
5853         * exception.c (mono_exception_from_token): New helper function.
5854
5855 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
5856
5857         * assembly.c (mono_assembly_load_with_partial_name): Call 
5858         mono_assembly_loaded before invoking the preload hooks. Fixes
5859         #70564.
5860
5861         * object-internals.h (MonoThread): Change culture_info and 
5862         ui_culture_info into an array.
5863
5864         * threads.c: Cache culture info objects from more than one appdomain.
5865
5866         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
5867         current UI culture.
5868
5869 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
5870
5871         * threads.h threads.c appdomain.c: Clear the culture_info field of
5872         all threads during unloading if they point to an object in the dying
5873         appdomain.
5874
5875 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
5876
5877         * culture-info.h (TextInfoEntry): New struct
5878         * object-internals.h: sync with managed
5879         * locales.c: fill the `text_info_data' field
5880         * culture-info-tables.h: update
5881
5882 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
5883
5884         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
5885         collector.
5886
5887 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
5888
5889         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
5890         (ves_icall_ModuleBuilder_getMethodToken): Ditto
5891
5892 2004-12-12  Martin Baulig  <martin@ximian.com>
5893
5894         * mono-debug-debugger.c (write_type): If we're an enum and the
5895         builtin types have already been initialized, call mono_class_init().
5896
5897 2004-12-11  Martin Baulig  <martin@ximian.com>
5898
5899         * metadata.c (mono_metadata_load_generic_params): Added
5900         `MonoGenericContainer *parent_container' argument; automatically
5901         compute `container->is_method'; pass the correct owner to
5902         get_constraints().      
5903
5904         * reflection.c (compare_genericparam): Sort the GenericParam table
5905         according to increasing owners. 
5906
5907 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
5908
5909         * profiler.c: allow disabling the default profiler.
5910
5911 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
5912
5913         * decimal.c, icall.c: allow disabling System.Decimal support.
5914
5915 2004-12-09  Marek Safar <marek.safar@seznam.cz>
5916
5917         * reflection.c: Add support for null attribute arguments.
5918
5919 2004-12-09  Martin Baulig  <martin@ximian.com>
5920
5921         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
5922         names to get rid of compiler warnings.
5923
5924 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
5925
5926         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
5927         mono_marshal_load_type_info (). Fixes #69625.
5928         (mono_marshal_get_ptr_to_struct): Likewise.
5929
5930 2004-12-08  Martin Baulig  <martin@ximian.com>
5931
5932         * mono-debug.h: Bumped version number to 47.
5933
5934         * mono-debug-debugger.c
5935         (mono_debugger_event_handler, mono_debugger_event): Take two
5936         guint64 arguments insteed of a gpointer and a guint32.  
5937
5938 2004-12-08  Martin Baulig  <martin@ximian.com>
5939
5940         * debug-mono-symfile.h
5941         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
5942         `address' to `native_offset'.
5943
5944 2004-12-08  Martin Baulig  <martin@ximian.com>
5945
5946         * class.c (mono_class_create_from_typespec): Only inflate if we
5947         either have `context->gclass' or `context->gmethod'.
5948
5949 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
5950
5951         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
5952
5953         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
5954
5955         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
5956
5957         * reflection.c (mono_assembly_get_object): Remove the workaround put
5958         in for the release.
5959         
5960         * appdomain.c: Use the corlib_internal field from MonoAssembly.
5961
5962         * appdomain.c: Bump corlib version.
5963
5964         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
5965         be visible in other appdomains.
5966
5967 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
5968
5969         * threads.c: Interlocked inc and dec for longs were messed up,
5970         use a KISS based impl for this. Fixes 70234
5971
5972 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
5973
5974         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
5975
5976 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
5977
5978         * icall.c: fix to follow policy not to allow struct
5979         arguments in icalls.
5980
5981 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5982
5983         * process.c: make the patch that handles spaces in file paths work
5984         on mono/windows too.
5985
5986 2004-12-06  Martin Baulig  <martin@ximian.com>
5987
5988         * class.c (mono_class_create_generic): Call
5989         mono_class_setup_supertypes() if we're dynamic.
5990         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
5991
5992 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
5993
5994         * object-internals.h: Add new fields to MonoThread.
5995
5996         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5997
5998         * icall.c threads-types.h threads.c: Add new icalls.
5999
6000         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
6001
6002         * object-internals.h (MonoReflectionAssembly): Sync object layout with
6003         managed side.
6004
6005         * appdomain.c: Bump corlib version.
6006
6007         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
6008         internal assemblies. Fixes #69181.
6009
6010 2004-12-05  Martin Baulig  <martin@ximian.com>
6011
6012         * class.c (mono_class_inflate_generic_signature): Make this a
6013         no-op if `context' is NULL or we don't have any type parameters;
6014         also copy `sentinelpos'.        
6015
6016 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
6017
6018         * image.c: Add unbox_wrapper_cache.
6019
6020         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
6021
6022         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
6023         function generator.
6024         
6025         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
6026         Fixes #70173.
6027
6028         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
6029         
6030 2004-12-04  Martin Baulig  <martin@ximian.com>
6031
6032         * loader.c (mono_method_get_signature_full): New public function;
6033         like mono_method_get_signature(), but with an additional
6034         `MonoGenericContext *' argument.
6035
6036         * class.c (mono_class_inflate_generic_signature): Formerly known
6037         as inflate_generic_signature(); make this public.
6038
6039 2004-12-04  Martin Baulig  <martin@ximian.com>
6040
6041         * metadata.c
6042         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
6043         instead of a `MonoGenericContainer *'.  
6044         (mono_metadata_parse_array_full): Likewise.
6045         (mono_metadata_parse_signature_full): Likewise.
6046         (mono_metadata_parse_method_signature_full): Likewise.
6047         (mono_metadata_parse_generic_inst): Likewise.
6048         (mono_metadata_parse_generic_param): Likewise.
6049         (mono_metadata_parse_mh_full): Likewise.
6050         (mono_type_create_from_typespec_full): Likewise.
6051
6052 2004-12-03  Martin Baulig  <martin@ximian.com>
6053
6054         * class-internals.h (MonoGenericContainer): Replaced the
6055         `MonoGenericContext * pointer with a `MonoGenericContext'
6056         structure and made it the first element.
6057
6058 2004-12-03  Martin Baulig  <martin@ximian.com>
6059
6060         * class.c
6061         (inflate_generic_type): Set the `context->container' when creating
6062         a new MonoGenericContext.
6063         (mono_class_inflate_generic_method): Likewise.
6064         (mono_class_create_from_typespec): Just use `context->container'
6065         to get the container.
6066
6067         * loader.c (method_from_methodspec): Set `context->parent' from
6068         `context->container' - and if that's a method container, use its
6069         parent.  Also set the `context->container' when creating a new
6070         MonoGenericContext.
6071         (mono_get_method_from_token): Use just `context->container' to get
6072         the container.
6073
6074         * metadata.c (do_mono_metadata_parse_generic_class): Also set
6075         `gclass->context->container'.
6076
6077         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
6078         the `context->container' when creating a new MonoGenericContext.
6079
6080 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
6081
6082         * reflection.c (compare_genericparam): Sort params with identical
6083         owner by their number. Fixes gen-111 on sparc.
6084
6085 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
6086
6087         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
6088         around the domain changes.
6089
6090         * appdomain.c (mono_domain_unload): Handle the case when the thread
6091         calling Unload is itself being aborted during unloading. Fixes #70022.
6092
6093         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
6094
6095         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
6096         checkpoint_func as an icall so it gets a wrapper.
6097         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
6098         in the cross-appdomain wrappers too.
6099
6100         * threads.c (mono_thread_has_appdomain_ref): Make this public.
6101
6102         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
6103
6104         * reflection.c: Fix some memory leaks.
6105         
6106 2004-12-02  Martin Baulig  <martin@ximian.com>
6107
6108         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
6109
6110         * metadata.c (generic_class_cache): New static hashtable.
6111         (mono_metadata_lookup_generic_class): New public method.
6112
6113 2004-12-02  Martin Baulig  <martin@ximian.com>
6114
6115         * class.c (mono_class_create_from_typedef): Call
6116         mono_class_setup_parent() and mono_class_create_mono_type() before
6117         parsing the interfaces.
6118
6119 2004-12-02  Martin Baulig  <martin@ximian.com>
6120
6121         * metadata.c (generic_inst_cache): New static hashtable.
6122         (mono_metadata_lookup_generic_inst): New public function.
6123         (mono_metadata_inflate_generic_inst): New public function.
6124         (mono_metadata_parse_generic_inst): New public function.
6125         (do_mono_metadata_parse_generic_class): Use the new
6126         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
6127         since this'll also use the cache.
6128
6129         * reflection.c (mono_reflection_bind_generic_method_parameters):
6130         Use mono_metadata_lookup_generic_inst() to use the new cache.
6131
6132         * class.c (inflate_mono_type): Use
6133         mono_metadata_inflate_generic_inst() to inflate a generic
6134         instance; this'll also use the new cache.
6135
6136         * loader.c (method_from_methodspec): Use
6137         mono_metadata_parse_generic_inst() and
6138         mono_metadata_inflate_generic_inst() rather than parsing it
6139         manually, so we can use the new cache.
6140
6141 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
6142
6143         * threads.c (wait_for_tids): Do not incorrectly free threads when 
6144         the wait times out.
6145
6146 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6147
6148         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
6149         iter->args based on whether parameters are passed in registers (i.e.
6150         MONO_ARCH_REGPARMS is defined)
6151
6152 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
6153
6154         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
6155         the exception message. Fixes #70070.
6156         (method_from_methodspec): Fix warnings.
6157
6158 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6159
6160         * process.c: (complete_path) return the path quoted
6161
6162 2004-12-01  Martin Baulig  <martin@ximian.com>
6163
6164         * class-internals.h (MonoGenericInst): New structure.
6165         (MonoGenericClass): Replaced `type_argc', `type_argv' and
6166         `is_open' with `MonoGenericInst *inst'.
6167         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
6168         `is_open' with `MonoGenericInst *inst'.
6169
6170 2004-11-30  Martin Baulig  <martin@ximian.com>
6171
6172         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
6173
6174         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
6175         to `generic_class_cache'.
6176
6177         * metadata.c
6178         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
6179         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
6180         (mono_generic_inst_is_valuetype): Renamed to
6181         mono_generic_class_is_valuetype().
6182
6183         * class-internals.h
6184         (MonoGenericInst): Renamed to MonoGenericClass.
6185         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
6186         (MonoClass): Renamed `generic_inst' to `generic_class'.
6187         (MonoGenericContext): Renamed `ginst' to `gclass'.
6188
6189         * object-internals.h
6190         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
6191
6192         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
6193         mono_reflection_generic_class_initialize().
6194
6195         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
6196         now known as "System.Reflection.MonoGenericClass".
6197         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
6198
6199 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
6200
6201         * class-internals.h: Added a flag field to MonoClass to cache the
6202         declarative security attributes actions associated with the class.
6203         * domain-internals.h: Added booleans to MonoJitInfo to cache the
6204         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
6205         applicable to the JITted method.
6206         * reflection.c|h: Added functions to extract (as flags) which security
6207         actions are available (declaratively) for a method, class or assembly.
6208         * metadata.c|h: Added functions to search the declarative security
6209         table in the metadata.
6210         
6211 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
6212
6213         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
6214         EXPORTEDTYPES are already in the class name cache, so there is no
6215         need to add extra code here to look at them. Just removes a bit of
6216         cruft.
6217
6218         (ves_icall_System_Environment_get_TickCount): No need for #if
6219         WINDOWS. We already have the code in io-layer.
6220
6221 2004-11-28  Martin Baulig  <martin@ximian.com>
6222
6223         * loader.c
6224         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
6225         Fixes gen-112.cs.
6226
6227 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
6228
6229         * assembly.c (do_mono_assembly_open): Instead of having a
6230         conditional WITH_BUNDLE, incorporate support for bundles here, by
6231         having a global `bundles' variable holding a pointer to the actual
6232         bundles. 
6233
6234         (mono_register_bundled_assemblies): New API call used by the
6235         bundle code. 
6236
6237         See mkbundle.1 for details.
6238         
6239 2004-11-27  Martin Baulig  <martin@ximian.com>
6240
6241         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
6242         the vtable for generic methods.
6243
6244 2004-11-26  Martin Baulig  <martin@ximian.com>
6245
6246         * metadata.c
6247         (mono_metadata_generic_method_hash): New public function.
6248         (mono_metadata_generic_method_equal): Likewise.
6249
6250         * class-internals.h
6251         (MonoGenericContainer): Added `GHashTable *method_hash'.
6252
6253         * reflection.c (ReflectionMethodBuilder): Added
6254         `MonoGenericContainer *generic_container'.
6255         (reflection_methodbuilder_to_mono_method): Don't create a new
6256         MonoGenericContainer each time we're called.
6257         (mono_reflection_bind_generic_method_parameters): Use
6258         `container->method_hash' to cache the results so we don't create a
6259         different method if we're called several times with the same
6260         arguments.
6261
6262         * loader.c (method_from_methodspec): Use the new
6263         `container->method_hash' here, too.
6264
6265 2004-11-26  Martin Baulig  <martin@ximian.com>
6266
6267         * class.c (inflate_generic_signature): Correctly compute
6268         `res->has_type_parameters'.
6269         (mono_class_vtable): Use the `has_type_parameters' flag to
6270         determine whether we're a generic method.
6271
6272         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
6273
6274 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
6275
6276         * object.c (mono_runtime_run_main): Fix a small memory leak.
6277
6278 2004-11-25  Martin Baulig  <martin@ximian.com>
6279
6280         * class.c (set_generic_param_owner): Fixed the loop.
6281
6282 2004-11-25  Martin Baulig  <martin@ximian.com>
6283
6284         * object.c (mono_class_vtable): Don't create any JIT wrappers for
6285         generic methods.
6286
6287 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
6288
6289         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
6290         names. Fixes #69787.
6291
6292 2004-11-24  Martin Baulig  <martin@ximian.com>
6293
6294         * class.c (mono_class_create_generic_2): If we don't have a
6295         `ginst->parent', inflate `gklass->parent' to get our parent.
6296
6297 2004-11-24  Martin Baulig  <martin@ximian.com>
6298
6299         * reflection.c (compare_genericparam): Correctly sort the
6300         GenericParam table; fixes #69779.
6301
6302 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
6303
6304         * reflection.c: When writing a PE file, don't create a huge
6305         buffer in memory. Just write the arrays we have to the file.
6306         This reduces memory usage.
6307
6308         * metadata-internals.h: MonoDynamicStream pefile is no longer used
6309         globally.
6310
6311 2004-11-17  Martin Baulig  <martin@ximian.com>
6312
6313         * class.c (mono_class_init): Don't setup `class->parent' for
6314         dynamic instances; moved this to mono_class_generic_2().
6315         (mono_class_create_generic): Also set `klass->inited' for dynamic
6316         generic instances.
6317         (mono_class_create_generic_2): Don't do anything for dynamic
6318         generic instances.  Set `klass->parent' here and also call
6319         mono_class_setup_parent() here. 
6320
6321         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
6322         `MonoType *parent' argument; set `ginst->parent' before calling
6323         mono_class_create_generic_2(), so we set the correct parent.
6324
6325 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
6326
6327         * reflection.c: allow getting attributes from ModuleBuilder
6328         (used by ikvm).
6329
6330 2004-11-17  Martin Baulig  <martin@ximian.com>
6331
6332         * class.c (mono_class_create_from_typedef): If a type parameter is
6333         inherited from an outer class, set its owner to that class.
6334
6335 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
6336
6337         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
6338           for (int*) written size. This fixes bug #69592.
6339
6340 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
6341
6342         * icall.c: Added IsAuthenticodePresnet internal call.
6343         * image.c|h: New function that check a MonoImage for an Authenticode
6344         signature in the certificate PE data directory.
6345         * security.c|h: New internal call to ask the runtime if an 
6346         Authenticode signature seems referenced in the PE header.
6347
6348 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
6349
6350         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
6351
6352         * reflection.c (mono_image_create_pefile): Free the assembly streams
6353         after writing out the assembly file.
6354
6355         * object.c (mono_runtime_run_main): Fix small memory leak.
6356
6357         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
6358         property access modifiers. Fixes #69389.
6359
6360 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
6361
6362         * domain.c, object.c, object-internals.h, domain-internals.h,
6363         object.h, marshal.c: keep dynamic code info per domain.
6364
6365 2004-11-15  Martin Baulig  <martin@ximian.com>
6366
6367         * class.c (mono_type_get_name_recurse): Put type arguments in
6368         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
6369         see bug #68387.
6370
6371 2004-11-15  Martin Baulig  <martin@ximian.com>
6372
6373         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
6374         (mono_class_setup_vtable): When computing `the_cname' for a
6375         generic instance, don't include the namespace since we'd otherwise
6376         add it twice.
6377
6378 2004-11-15  Martin Baulig  <martin@ximian.com>
6379
6380         * class.c (mono_class_create_generic): Changed return type to void.
6381         (mono_class_create_generic_2): New public function; setup
6382         `class->method', `class->field' and `class->interfaces' here
6383         instead of in mono_class_init().
6384
6385         * class.h (mono_class_create_generic): Moved to class-internals.h.
6386
6387 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
6388
6389         * reflection.c (mono_image_create_pefile): take a file HANDLE.
6390         rather than writing to memory, write to this file. Right now,
6391         we are just writting into a buffer, and copying that. However
6392         we can avoid the buffer later.
6393
6394         (mono_dynamic_stream_reset): new function
6395
6396         * icall.c, object-internals.h: update for the above.
6397
6398 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
6399
6400         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
6401         have been using gc'd memory. First it is slower, unlikely
6402         the comment in the source code said, secondly, it increases
6403         our footprint to do it in the gc.
6404
6405         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
6406         the method so that it does not have to copy to managed code.
6407
6408 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
6409
6410         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
6411
6412 2004-11-12  Martin Baulig  <martin@localhost>
6413
6414         * reflection.c (mono_image_create_token): Allow generic method
6415         definitions here, since they may appear in an `.override'; see
6416         gen-98/gen-99 for an example.
6417
6418 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
6419
6420         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
6421         #69365.
6422
6423         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
6424         descriptive.
6425
6426 2004-11-11  Martin Baulig  <martin@ximian.com>
6427
6428         * class.c (mono_class_setup_vtable): In an explicit interface
6429         implementation, the method name now includes the arity.
6430
6431 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
6432
6433         * object.c (mono_array_full_copy): Fix warning.
6434
6435 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
6436
6437         * appdomain.c: Removed look_for_method_by_name(). Use the new method
6438         mono_class_get_method_from_name() instead.
6439         
6440         * class-internals.h: Added two new types of wrappers. 
6441         Added MonoRemotingTarget enum. Added new trampoline function type, which
6442         takes an additional MonoRemotingTarget value as parameter, so it is
6443         possible to request a trampoline for a specific target.
6444         
6445         * class.c: Added new mono_class_get_method_from_name() method.
6446         
6447         * class.h: In MonoRemoteClass, we can have now to vtables, one for
6448         general remoting sinks and one specific for cross domain calls.
6449         
6450         * debug-helpers.c: Added new wrapper names.
6451         
6452         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
6453         of a remote class.
6454         
6455         * image.c: Porperly delete value objects form the remoting invoke hashtable.
6456         
6457         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
6458         with several other methods (mono_marshal_get_xappdomain_dispatch,
6459         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
6460         and others) can generate a fast remoting wrapper for cross domain calls.
6461         More information can be found in docs/remoting.
6462         Other changes: Removed mono_find_method_by_name, and used
6463         mono_class_get_method_from_name instead.
6464         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
6465         is stored in the remoting invoke hashtable.
6466         
6467         * marshal.h: published the new method for getting the xdomain wrapper,
6468         and also added a method for getting the adequate wrapper for a given
6469         method and target.
6470         
6471         * object-internals.h, object.c: Added a couple of methods for capying and
6472         cloning arrays.
6473         Modified mono_install_remoting_trampoline, which takes the new remoting
6474         trampoline that has a remoting target as parameter.
6475         mono_class_proxy_vtable now also takes a remoting target as parameter, and
6476         will return the most suitable vtable for the target.
6477         Added mono_remote_class_vtable, which returns the vtable of a remote class
6478         (which can be the normal remoting vtable or the xdomain vtable).
6479         
6480         * threads.c: the xdomain invoke and dispatch wrappers must also be
6481         protected against interruptions.
6482
6483 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6484
6485         * icall.c: use memmove in BlockCopyInternal when the source and
6486         destination arrays are the same.
6487
6488 2004-11-09  Martin Baulig  <martin@ximian.com>
6489
6490         * class-internals.h (MonoGenericContainer): Removed `method' and
6491         `signature', replaced them with `is_method' and `is_signature'
6492         flags.  Added `context'.
6493
6494         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
6495         instead of a `MonoGenericContainer *'.
6496
6497         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
6498         for dynamic type parameters.
6499         (mono_metadata_load_generic_params): Setup `container->context'.
6500
6501         * reflection.c (mono_reflection_setup_generic_class): Setup
6502         `tb->generic_container->context'.
6503         (do_mono_reflection_bind_generic_parameters): Use
6504         mono_class_inflate_generic_type() to correctly inflate types,
6505         rather than using our own hack just for MONO_TYPE_VAR.
6506
6507 2004-11-09  Martin Baulig  <martin@ximian.com>
6508
6509         * class.c (mono_class_inflate_generic_method): Small fix; don't
6510         crash here.
6511
6512         * icall.c
6513         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
6514         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
6515         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
6516         (ves_icall_Type_BindGenericParameters): Likewise.
6517         (ves_icall_Type_get_IsGenericInstance): Likewise.
6518         (ves_icall_Type_GetGenericParameterPosition): Likewise.
6519         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
6520         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
6521         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
6522
6523 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
6524
6525         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
6526         assembly versions and public key tokens. Fixes #69113.
6527
6528 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
6529
6530         * metadata.c: fix bug introduced with the type cache changes
6531         on 2004-11-06.
6532
6533 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
6534
6535         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
6536         the MonoClass pointer instead of the token in exception clauses.
6537         * reflection.c: updates for the above and make the code not depend
6538         on the structure of MonoExceptionClause.
6539
6540 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
6541
6542         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
6543         Add support for dynamic assemblies. Fixes #69114.
6544
6545         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
6546
6547 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
6548
6549         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
6550         since most only those methods use it. the code member of
6551         MonoMethodPInvoke was dead, so that can be removed too. Also,
6552         remove inline_count (again, not used), and move slot so that it
6553         can share bits with some other flags. This saves 8 bytes in the
6554         structure and gives us about 50 kb back for mcs helloworld.cs
6555
6556         * *.[ch]: Do naming changes for the above.
6557
6558         * loader.c (mono_method_get_header): Lazily init the header
6559         on first access.
6560         (mono_get_method_from_token): don't init the header here
6561         (mono_free_method): the header may never be allocated
6562
6563         Overall, this saves 150 kb of unmanaged allocations
6564         for mcs helloworld.cs. That accounts for 10% of the unmanaged
6565         memory at runtime.
6566         
6567         * loader.c, loader.h (mono_method_get_header): new accessor.
6568
6569         * *.[ch]: use the above method. Prepares us to lazily load
6570         the header.
6571
6572         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
6573         three warnings, which are actual bugs (see 69206).
6574
6575         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
6576         unused. Saves a cool 4 bytes / method.
6577
6578 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
6579
6580         * metadata.c (builtin_types): Add types for System.Object here.
6581         (mono_metadata_parse_type_full): Cache MonoType*'s that are
6582         for a class or valuetype from klass->this_arg or klass->byval_arg.
6583
6584         On mcs for a hello world, this gets us down from 21836 MonoType's
6585         to 14560.
6586
6587         (mono_metadata_free_type): Account for the above change.
6588
6589 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
6590
6591         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
6592         exception instead of asserting if name is null.
6593         (ves_icall_System_AppDomain_GetData): Ditto.
6594
6595 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
6596
6597         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
6598         EnumBuilder.
6599
6600         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
6601         Return NULL when the domain does not have entry_assembly set.
6602
6603         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
6604         Add a 'resource_modules' argument.
6605         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
6606
6607         * reflection.c (mono_reflection_create_runtime_class): Move setting
6608         of wastypebuilder here, so mono_get_type_object () returns a MonoType
6609         for enums too.
6610
6611         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
6612         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
6613         Throw an ArgumentNullException if 'ptr' is null.
6614
6615         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
6616         assemblies here. Fixes #69020.
6617
6618 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
6619
6620         * reflection.c (build_compressed_metadata): Fix the previous patch for
6621         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
6622         the stack.
6623
6624 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
6625
6626         * assembly.c (mono_assembly_names_equal): Allow a match if one of
6627         the cultures is false. Fixes #69090.
6628
6629         * reflection.c (build_compressed_metadata): Fix invalid memory read 
6630         detected by valgrind.
6631         
6632         * reflection.c (mono_reflection_get_type): Avoid triggering a 
6633         TypeResolve multiple times for the same type. Fixes #65577.
6634
6635 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
6636
6637         * marshal.c: Avoid using ldftn to call managed functions. It is
6638         much slower than just a call.
6639
6640         * reflection.c (mono_module_get_object): free the basename we
6641         allocate here from glib.
6642         
6643         * reflection.c (ensure_runtime_vtable): make sure to free
6644         overrides.  Also, we were allocating an array of MonoMethod not an
6645         array of MonoMethod*.
6646
6647         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
6648
6649         * image.c (mono_image_close): free image->guid here.
6650
6651 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
6652
6653         * reflection.c: Fix some spec conformance issues with the PE file
6654         structures so mcs compiled apps run on the Net 2.0 beta.
6655
6656 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
6657
6658         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
6659         Implement this. Fixes #67264.
6660
6661         * debug-helpers.h debug-helpers.c marshal.c: Move 
6662         mono_find_method_by_name to debug-helpers.c.
6663
6664 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
6665
6666         * object.c (mono_release_type_locks): type_initialization_hash is
6667         a GHashTable.
6668
6669         * reflection.c object.c object-internals.h: Fix warnings.
6670
6671         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
6672         without accessors. Fixes #61561.
6673
6674         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
6675         application base from the root domain if not set. Fixes #65641.
6676         (mono_runtime_init): Fix warning.
6677
6678 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6679
6680         * appdomain.c: call mono_thread_pool_init.
6681         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
6682         of worker threads based on the number of CPUs and the environment
6683         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
6684         for non-windows (windows) systems.
6685
6686 2004-10-27  Chris Toshok  <toshok@ximian.com>
6687
6688         * mono-debug-debugger.c (write_class): don't call mono_class_init
6689         here, as even with the check for (!klass->init_pending), we get
6690         into a situation where we're hitting cycles in class
6691         initialization.  Fixes #68816.
6692
6693 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
6694
6695         * image.c: Avoid overwriting values in the loaded_images_hash when an
6696         assembly is loaded multiple times. Fixes #61152.
6697
6698         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
6699         so multiple satellite assemblies for the same name can be loaded.
6700         Fixes #68259.
6701
6702         * mono_domain_assembly_preload: Actually return the loaded assembly, 
6703         not NULL.
6704
6705         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
6706         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
6707
6708         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
6709         pending finalizers are not invoked after the appdomain has been 
6710         unloaded. Fixes #67862.
6711
6712 2004-10-22  Martin Baulig  <martin@ximian.com>
6713
6714         * mono-debug-debugger.c
6715         (mono_debugger_runtime_invoke): Don't box valuetypes.
6716
6717 2004-10-22  Chris Toshok  <toshok@ximian.com>
6718
6719         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
6720         don't hide private methods.
6721
6722 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
6723
6724         * icall.c: Allows the runtime to "share" (when known) the public key
6725         token of an assembly. This avoid the need to recalculate the token 
6726         (from the public key) in managed code.
6727
6728 2004-10-21  Chris Toshok  <toshok@ximian.com>
6729
6730         * debug-helpers.c (append_class_name): argh, revert last patch.
6731         
6732 2004-10-21  Chris Toshok  <toshok@ximian.com>
6733
6734         * debug-helpers.c (append_class_name): use '+' as the delimiter,
6735         not '/', so that it matches what the debugger uses to look up
6736         methods.
6737
6738 2004-10-21  Martin Baulig  <martin@ximian.com>
6739
6740         * mono-debug-debugger.c (mono_debugger_throw_exception): New
6741         public method; this is called each time an exception is thrown and
6742         allows the debugger to use exception catch points.
6743
6744 2004-10-21  Martin Baulig  <martin@ximian.com>
6745
6746         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
6747         the stack pointer and the exception object in some struct and pass
6748         that to the debugger.
6749
6750 2004-10-21  Chris Toshok  <toshok@ximian.com>
6751
6752         * mono-debug-debugger.c (do_write_class): add instance/static
6753         event support.  We don't expose "raise" or "other" yet.
6754         (event_is_static): new method.
6755
6756 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
6757
6758         * mono-debug-debugger.c
6759         (mono_debugger_handle_exception): Remove
6760         bogus return value for fussy compilers.
6761
6762 2004-10-20  Martin Baulig  <martin@ximian.com>
6763
6764         * mono-debug-debugger.c
6765         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
6766         (mono_debugger_handled_exception): Likewise.
6767
6768 2004-10-20  Martin Baulig  <martin@ximian.com>
6769
6770         * mono-debug-debugger.h (MonoDebuggerEvent): Added
6771         MONO_DEBUGGER_EVENT_EXCEPTION.
6772
6773         * mono-debug-debugger.c (mono_debugger_handle_exception): New
6774         public function to send the debugger a notification for an
6775         exception and inform it about a catch/finally clause.
6776
6777 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
6778
6779         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
6780         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
6781         fix 2.95 build. 
6782
6783         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
6784
6785 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
6786
6787         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
6788         marshalled as [In,Out]. Fixes #58325.
6789
6790 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
6791
6792         * reflection.c (mono_method_body_get_object): Implement some fields.
6793
6794 2004-10-12  Martin Baulig  <martin@ximian.com>
6795
6796         * reflection.c (mono_reflection_bind_generic_parameters): Small
6797         fix, correctly retrieve our parent from a generic instance.
6798
6799 2004-10-12  Martin Baulig  <martin@ximian.com>
6800
6801         * metadata.c (mono_metadata_generic_param_equal): We always have
6802         an owner.
6803
6804         * class.c
6805         (mono_class_from_generic_parameter): We need to have an owner.
6806         (my_mono_class_from_generic_parameter): Likewise.
6807
6808         * reflection.c (mono_reflection_setup_generic_class): Renamed to
6809         mono_reflection_create_generic_class() and added a new
6810         mono_reflection_setup_generic_class().  
6811         (mono_reflection_initialize_generic_param): If we're a nested
6812         generic type and inherited from the containing class, set our
6813         owner to the outer class.
6814
6815 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
6816
6817         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
6818
6819         * reflection.c (mono_method_body_get_object): New function to create
6820         a MethodBody object.
6821
6822         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
6823
6824 2004-10-11  Martin Baulig  <martin@ximian.com>
6825
6826         * metadata.c (_mono_metadata_type_equal): Renamed to
6827         do_mono_metadata_type_equal() and made static.
6828
6829 2004-10-11  Martin Baulig  <martin@ximian.com>
6830
6831         * appdomain.c: Bump corlib version number to 28.
6832
6833 2004-10-10  Martin Baulig  <martin@ximian.com>
6834
6835         * class-internals.h
6836         (MonoGenericInst): Added `MonoGenericContainer *container'.
6837         (MonoGenericMethod): Likewise.
6838         (MonoGenericContext): Likewise.
6839         (MonoGenericParam): Added `MonoGenericContainer *owner'.
6840
6841         * metadata.c
6842         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
6843         (do_mono_metadata_parse_generic_inst): Likewise.
6844         (mono_metadata_parse_type_full): New public method.  This is the actual
6845         mono_metadata_parse_type() implementation - with an additional
6846         `MonoGenericContainer *' argument.
6847         (mono_metadata_parse_array_full): Likewise.
6848         (mono_metadata_parse_signature_full): Likewise.
6849         (mono_metadata_parse_method_signature_full): Likewise.
6850         (mono_metadata_parse_mh_full): Likewise.
6851         (mono_type_create_from_typespec): Likewise.
6852         (mono_metadata_interfaces_from_typedef_full): New public method;
6853         this is similar to the other _full() methods, but we take a
6854         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
6855         (mono_metadata_parse_generic_param): Take an additional
6856         `MonoGenericContainer *' argument and lookup the MonoGenericParam
6857         from that container.
6858         (mono_metadata_generic_param_equal): New static method to compare
6859         two type parameters.
6860         (_mono_metadata_type_equal): New static method; takes an
6861         additional `gboolean signature_only' argument - if true, we don't
6862         compare the owners of generic parameters.
6863         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
6864         with a TRUE argument - do a signature-only comparision.
6865
6866         * loader.c: Use the new _full() methods and pass the
6867         MonoGenericContainer to them.
6868
6869         * object-internals.h (MonoReflectionTypeBuilder): Added
6870         `MonoGenericContainer *generic_container' field.
6871         (MonoReflectionMethodBuilder): Likewise.
6872
6873 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
6874
6875         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
6876         case initial images of dynamic assemblies.
6877
6878         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
6879
6880         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
6881
6882         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
6883         length of event->other array.
6884         (typebuilder_setup_events): Ditto.
6885
6886         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
6887         'assembly_by_name' and add an 'assemblies' list.
6888
6889         * assembly.h assembly.c: Add a new search hook for determining whenever
6890         an assembly is already loaded. Use this instead of searching in the
6891         loaded_assemblies list.
6892
6893         * domain.c appdomain.c: Implement the new search hook so loaded 
6894         assemblies are now scoped by appdomain. Fixes #67727.
6895
6896 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
6897
6898         * threads.c (mono_thread_attach): Initialize synch_lock field so
6899         mono_thread_detach works again.
6900
6901         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
6902         'lib' too. Fixes #63130.
6903
6904 2004-10-06  Jackson Harper  <jackson@ximian.com>
6905
6906         * culture-info-tables.h: regenerated.
6907
6908 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
6909
6910         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
6911         implemented by other interfaces in the result. Fixes #65764.
6912         
6913         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
6914         Handle unloadable modules without crashing.
6915
6916         * image.c (load_modules): Revert the previous patch since modules must
6917         have a fixed index inside the array.
6918         
6919         * image.c (load_modules): Don't include native modules in the modules
6920         array.
6921
6922 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
6923
6924         * reflection.h: Add param_defaults field.
6925
6926         * reflection.c: Add support for parameter defaults in dynamic methods.
6927         Fixes #64595.
6928
6929         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
6930         an empty string when a type has no namespace. Fixes #64230.
6931
6932 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
6933
6934         * tabledefs.h: Added "internal" security actions to support non-CAS
6935         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
6936         Note: they do not seems to be used anymore in 2.0 (new metadata format)
6937
6938 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
6939
6940         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
6941         constructor of abstract class. Fixes #61689.
6942
6943 2004-10-04  Martin Baulig  <martin@ximian.com>
6944
6945         * class-internals.h (MonoGenericContainer): New type.
6946         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
6947         `MonoGenericContainer *generic_container'.
6948         (MonoClass): Replaced `gen_params' and `num_gen_params' with
6949         `MonoGenericContainer *generic_container'.
6950
6951         * metadata.c (mono_metadata_load_generic_params): Return a
6952         `MonoGenericContainer *' instead of a `MonoGenericParam *';
6953         removed the `num' argument.
6954
6955 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
6956
6957         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
6958         for dynamic images.
6959
6960         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
6961         machine fields.
6962
6963         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
6964
6965         * reflection.c: Save pe_kind and machine values into the generated
6966         image file.
6967
6968         * appdomain.c: Bump corlib version number.
6969
6970         * object-internals.h: Reorganize layout of LocalBuilder.
6971
6972         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
6973         New helper function.
6974
6975         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
6976         created MonoType for dynamic types. Fixes #66180.
6977
6978 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
6979
6980         * threadpool.c: the ares hashtable needs a critical section around it.
6981         this prevents some nasty segfaults
6982
6983 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
6984
6985         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
6986         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
6987         bug 67324).
6988         
6989 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
6990
6991         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
6992         
6993 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
6994
6995         * image.c: Always canonicalize image file names, to avoid loading
6996         the same assembly twice when referenced using a relative path.
6997
6998 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
6999
7000         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
7001
7002         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
7003
7004         * marshal.c: Fix warnings.
7005
7006 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
7007
7008         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
7009         attempting to marshal the delegate_trampoline as the method_addr.
7010         This patch has a static hashtable of marshalled delegates so that 
7011         we can map delegate_trampoline addresses back to delegates.  This
7012         allows a delegate passed to managed code to be passed back into native
7013         code.  Fixes #67039
7014
7015 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
7016
7017         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
7018
7019         * reflection.c (method_encode_code): Align method headers properly.
7020         Fixes #66025.
7021
7022 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
7023
7024         * marshal.c: In the runtime invoke wrapper, reset the abort
7025         exception if it is cached. This avoids the automatic rethrowal of 
7026         the exception after the catch of the wrapper. Also check for pending
7027         interruptions before calling the managed method. This is done using
7028         the new method emit_thread_force_interrupt_checkpoint, since the
7029         normal checkpoint method is ignored when running the invoke wrapper.
7030         * object.c: If the abort exception is rethrown, set the abort_exc
7031         field of the thread, so it will be rethrown aftere every catch.
7032         * threadpool.c: Only run an interruption checkpoint if what has been
7033         requested is a stop of the thread (aborts will be ignored).
7034         * threads.c: By default, a thread will now never be interrumped while
7035         running the runtime invoke wrapper (this ensures that runtime_invoke
7036         will always return to the caller if an exception pointer is provided).
7037         There is a new special method mono_thread_force_interruption_checkpoint()
7038         to force an interruption checkpoint even if running a protected
7039         wrapper, which is used by the same runtime invoke wrapper to do a check
7040         at a safe point.
7041
7042 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
7043
7044         * object.c, object-internals.h: Implemented mono_release_type_locks,
7045         which releases the cctor locks held by a thread.
7046         * threads.c, threads.h: In thread_cleanup, release cctor locks held
7047         by a thread. Added mono_thread_exit() method to be used to safely stop
7048         a thread.
7049
7050 2004-09-28  Raja R Harinath  <rharinath@novell.com>
7051
7052         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7053         Move null check before dereference.  Avoid indexing beyond the end
7054         of the 'modules' array.
7055
7056 2004-09-28  Raja R Harinath  <rharinath@novell.com>
7057
7058         * metadata-internals.h (MonoImage): Add module_count field.
7059         * image.c (load_modules): Set image->module_count.
7060         (mono_image_load_file_for_image): Use image->module_count.
7061         * reflection.c (mono_image_load_module): Append to image->modules array 
7062         of dynamic assembly.
7063         (mono_module_get_object): Fix loop to actually increment index.
7064         Use image->module_count.
7065         * assembly.c (mono_assembly_load_references): Use image->module_count.
7066         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7067         Likewise.
7068
7069 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
7070
7071         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
7072         Avoid assert on generic types.
7073
7074 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
7075
7076         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
7077
7078         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
7079
7080         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
7081         function to convert a MarshalSpec structure to its managed counterpart.
7082
7083         * reflection.c: Fix warnings.
7084         
7085         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
7086         field.
7087
7088         * icall.c (mono_create_icall_signature): Fix build.
7089
7090 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
7091
7092         * icall.c: Add MakePointType icall.
7093
7094         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
7095         warnings.
7096
7097 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7098
7099         * threadpool.c: reuse allocated slots in the queue.
7100
7101 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
7102
7103         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
7104
7105         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
7106
7107         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
7108         previous change.
7109
7110         * tabledefs.h: Add constants for pinvoke attributes BestFit and
7111         ThrowOnUnmappableChar.
7112
7113         * icall.c (ves_icall_Type_GetPacking): New icall.
7114
7115 2004-09-24  Martin Baulig  <martin@ximian.com>
7116
7117         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
7118
7119 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7120
7121         * appdomain.c:
7122         (mono_domain_set): allow setting a domain that is being unloaded.
7123         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
7124         being unloaded.
7125
7126 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
7127
7128         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
7129         the GetCustomAttributes icall.
7130
7131 2004-09-23  Martin Baulig  <martin@ximian.com>
7132
7133         * object-internals.h (MonoReflectionGenericParam): Replaced
7134         'has_ctor_constraint', `has_reference_type' and `has_value_type'
7135         with `guint32 attrs'.
7136
7137 2004-09-23  Martin Baulig  <martin@ximian.com>
7138
7139         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
7140
7141 2004-09-23  Martin Baulig  <martin@ximian.com>
7142
7143         * object-internals.h (GenericParameterAttributes): New enum.
7144
7145 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
7146
7147         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
7148         
7149         * class.c (init_events): Fill out event->other field.
7150
7151         * class.c: Fix warnings.
7152
7153         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
7154
7155 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
7156
7157         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
7158         walk which doesn't supply the IL offset.
7159
7160 2004-09-22  Martin Baulig  <martin@ximian.com>
7161
7162         * reflection.c (mono_reflection_setup_internal_class): If we're
7163         System.ValueType, System.Object or System.Enum, set
7164         `klass->instance_size' and create the vtable.
7165         (mono_reflection_create_internal_class): If we're an enum type,
7166         get the base class from our current corlib.
7167
7168 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
7169
7170         * reflection.h (MonoResolveTokenError): New type.
7171
7172         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
7173         icall.
7174
7175         * icall.c: Add an 'error' argument to the ResolveToken icalls.
7176
7177 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
7178
7179         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
7180         Support also calling constructors, but only for already allocated objects.
7181
7182 2004-09-17  Geoff Norton <gnorton@customerdna.com>
7183
7184         * reflection.c (type_get_qualified_name): If the klass is null
7185         return the typename to avoid a NullRefEx.
7186         (encode_cattr_value): Get the qualified name of the boxed type,
7187         not the underlying enumtype.  Fixes #62984.
7188
7189 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
7190
7191         * marshal.c: Fix problems with previous checkin.
7192
7193 2004-09-21    <vargaz@freemail.hu>
7194
7195         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
7196         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
7197
7198         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
7199
7200 2004-09-21  Geoff Norton <gnorton@customerdna.com>
7201
7202         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
7203         should only return a type for pointers, arrays, and passbyref types.
7204         Fixes bug #63841.
7205
7206 2004-09-21  Martin Baulig  <martin@ximian.com>
7207
7208         * domain.c (mono_debugger_check_runtime_version): New public
7209         function.
7210
7211         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
7212
7213 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
7214
7215         * reflection.c: Added missing sort to the declarative security 
7216         attributes table. MS implementation stops seeing the attributes if the
7217         token number regress in the table (as shown by ildasm and permview).
7218
7219 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
7220
7221         * object-internals.h (MonoReflectionModule): Add 'token' field.
7222         
7223         * reflection.c (mono_reflection_get_token): Add support for Module
7224         and Assembly.
7225         (mono_module_get_object): Set 'token' field.
7226         (mono_module_file_get_object): Set 'token' field.
7227
7228         * icall.c: Add new Assembly and Module icalls.
7229
7230         * appdomain.c: Bump corlib version.
7231
7232 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
7233
7234         * loader.h loader.c class.h class.c: Add helper functions for obtaining
7235         tokens of metadata objects.
7236
7237         * reflection.h reflection.c (mono_reflection_get_token): New function
7238         to obtain the token of a metadata object.
7239
7240         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
7241
7242 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
7243
7244         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
7245         
7246         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
7247
7248 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
7249
7250         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
7251         * object-internals.h: Added 3 MonoArray* members to MonoReflection
7252         AssemblyBuilder to access the permissions set in the class lib.
7253         * reflection.c: Added security attributes encoding step in 
7254         mono_image_build_metadata.
7255         * tabledefs.h: Added new security actions defined in 2.0:
7256         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
7257
7258 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
7259
7260         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
7261         macro parameter.
7262
7263 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
7264  
7265         * locales.c: nullify the ICU_collator member of CompareInfo when it is
7266           finalized. There where random SIGSEVs at program termination, when
7267           an object being finalized was trying to do a string comparison and
7268           the current culture was already finalized.
7269  
7270 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7271
7272         * threads.c: call thread_cleanup before finishing the thread if we get
7273         there.
7274
7275 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
7276
7277         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
7278         assemblies from the parent. Fixes #65665.
7279
7280 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
7281
7282         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
7283         modifiers.
7284
7285 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
7286
7287         * reflection.h: add prototype for mono_get_dbnull_object
7288         * reflection.c: add prototypes for get_default_param_value_blobs 
7289         and mono_get_object_from_blob for fussier compilers
7290
7291 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
7292  
7293         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
7294         false deadlock checks in class initialization.
7295  
7296 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
7297
7298         * image.c (mono_image_addref): Fix comment.
7299
7300         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
7301         possible.
7302
7303 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
7304
7305         * reflection.c (mono_param_get_objects): Modified to return
7306         ParameterInfo.DefaultValue object.
7307
7308         (get_default_param_value_blobs):
7309         (mono_get_object_from_blob):
7310         (mono_get_dbnull_object): New helper routines. 
7311
7312         * object.c (mono_get_constant_value_from_blob): New helper routine
7313         carved out from get_default_field_value ()
7314
7315         * object-internals.h (mono_get_constant_value_from_blob): Added
7316         function declaration.
7317
7318 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
7319
7320         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
7321         referenced assemblies. Fixes #62135.
7322
7323         * exception.h exception.c (mono_get_exception_file_not_found2): New
7324         helper function.
7325
7326 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
7327
7328         * class.h class.c: Add mono_type_get_underlying_type ().
7329
7330 2004-09-09  Geoff Norton <gnorton@customerndna.com>
7331
7332         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
7333         Fix GetTypes() to support dynamically created assemblies.
7334
7335 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
7336
7337         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
7338         
7339         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
7340         previous patch.
7341
7342         * reflection.h reflection.c loader.c: Allow dynamic construction of
7343         pinvoke methods. Fixes #65571.
7344         
7345         * reflection.c (mono_reflection_get_type): Revert previous change since
7346         it causes regressions.
7347
7348 2004-09-08  Martin Baulig  <martin@ximian.com>
7349
7350         * class.c (class_compute_field_layout): Don't call
7351         mono_class_layout_fields() for open generic instances.
7352
7353 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
7354         * threads.c appdomain.c: fix typo in GC macro
7355
7356 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7357
7358         * threads.c: don't call mono_thread_detach() in start_wrapper(),
7359         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
7360
7361 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
7362
7363         * image.c (mono_image_close): Applied patch from 
7364         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
7365         assembly is loaded multiple times from data.
7366         
7367         * image.c (mono_image_open): Fix warning.
7368
7369 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7370
7371         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
7372         once. Fixes #58334.
7373         
7374         * reflection.c (mono_reflection_create_runtime_class): Initialize
7375         klass->nested_classes. Fixes #61224.
7376
7377 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
7378
7379         * threads.c: sched_yield() on exit, to allow threads to quit.
7380
7381 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7382
7383         * object.c (mono_unhandled_exception): Remove leftover debug code.
7384
7385 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
7386
7387         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
7388
7389 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7390
7391         * marshal.c (emit_marshal_array): Really null terminate string arrays.
7392         
7393         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
7394
7395 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
7396
7397         * marshal.c (emit_marshal_array): Null terminate string arrays.
7398         
7399         * marshal.c (raise_auto_layout_exception): Fix warning.
7400
7401         * reflection.c (mono_param_get_objects): Initialize the default value
7402         with DBNull.Value, not null. Fixes #62123.
7403
7404 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
7405
7406         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
7407         throw an exception with a cute explanation.
7408
7409 2004-09-06  Dick Porter  <dick@ximian.com>
7410
7411         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
7412         Close the new process's thread handle, as we don't use it.  The
7413         handle stays around forever otherwise.
7414
7415 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
7416
7417         * object.c (arith_overflow): Fix warning.
7418
7419         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
7420         calling conventions in method refs. Fixes #65352.
7421
7422         * reflection.c: Fix warnings.
7423
7424 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
7425
7426         * icall.c: Add a new icall for Array.Clear
7427
7428 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
7429
7430         * object.c: When allocating an array, we have to throw
7431         an overflow exception if any of the lengths are < 0.
7432
7433 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
7434
7435         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
7436         properly. Also move implementation of string array marshalling to 
7437         managed code. Fixes #42316.
7438
7439 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7440
7441         * assembly.c: provide more information when loading an assembly fails.
7442
7443 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7444
7445         * filewatcher.c: don't expect the development fam package to be
7446         installed.
7447
7448 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
7449
7450         * marshal.c: Make a copy of the signature cookie since it will be
7451         freed by the caller.
7452         
7453         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
7454
7455         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
7456
7457         * metadata.c (mono_metadata_free_marshal_spec): New function to free
7458         marshal specs.
7459
7460         * marshal.c: More refactoring.
7461         
7462         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
7463         smaller functions.
7464
7465 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
7466
7467         * object.c: In mono_message_invoke, fill the output parameter array after
7468           calling the managed method (it was done before the call). This fixes
7469           bug #59299.
7470
7471 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
7472
7473         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
7474         as well.
7475
7476 2004-09-02  Martin Baulig  <martin@ximian.com>
7477
7478         * class.c (mono_class_instance_size): Don't allow generic type
7479         definitions or open generic instances.
7480         (mono_class_array_element_size): If we're a value type, call
7481         mono_class_instance_size() on the original class.
7482
7483         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
7484         handle generic instances.
7485
7486         * mono-debug-debugger.c (write_type): Handle generic instances
7487         like classes.
7488
7489 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
7490
7491         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
7492         the allocation request fails. Fixes #65089.
7493
7494         * object.c (mono_runtime_free_method): Do not call mono_free_method.
7495         
7496         * object.c (mono_runtime_free_method): New function to free a dynamic
7497         method.
7498
7499         * marshal.c (mono_delegate_free_ftnptr): New function to free the
7500         delegate trampoline.
7501
7502         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
7503         with hasthis as dynamic,
7504
7505         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
7506
7507         * domain.c (mono_jit_info_table_remove): New function to remove an
7508         entry from the jit info table.
7509
7510         * class-internals.h (MonoMethod): Add 'dynamic' field.
7511
7512         * loader.c: Fix warnings.
7513
7514 2004-09-01  Martin Baulig  <martin@ximian.com>
7515
7516         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
7517         instead of mono_debugger_lock() because the latter one is a no-op
7518         unless running in the debugger.
7519
7520 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
7521
7522         * class.c (class_compute_field_layout): Classes with auto-layout or
7523         reference fields are not blittable.
7524         
7525 2004-09-01  Dick Porter  <dick@ximian.com>
7526
7527         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
7528         mono_image_get_filename() to get the assembly location.
7529
7530         * icall.c:
7531         * metadata.h: Fix compile warnings
7532
7533 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
7534
7535         * class.c (class_compute_field_layout): System.Object is blittable.
7536
7537         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
7538         as in/out. Fixes #59909.
7539
7540 2004-09-01  Martin Baulig  <martin@ximian.com>
7541
7542         * metadata.h (MONO_TYPE_ISREFERENCE): Call
7543         mono_metadata_generic_inst_is_valuetype() if we're a generic
7544         instance to check whether our underlying type is a reference type.
7545
7546 2004-09-01  Martin Baulig  <martin@ximian.com>
7547
7548         * metadata.c (mono_type_size): If we're a generic instance, call
7549         mono_class_value_size() for value types.
7550
7551 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
7552
7553         * marshal.c: Implement more custom marshalling functionality. Fixes
7554         #64915.
7555
7556 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
7557
7558         * mono-debug.c, debug-mono-symfile.c: add some locking love.
7559
7560 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
7561
7562         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
7563
7564         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
7565
7566         * icall.c: Fix some warnings.
7567
7568         * threads.c (abort_appdomain_thread): Fix unref errors.
7569         (mono_thread_current): Fix THREAD_DEBUG define.
7570
7571 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
7572
7573         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
7574
7575         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
7576
7577 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
7578
7579         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
7580         string arrays.
7581
7582 2004-08-28  Martin Baulig  <martin@ximian.com>
7583
7584         * metadata.c
7585         (mono_metadata_generic_inst_is_valuetype): New public function.
7586
7587         * metadata.h (MONO_TYPE_ISSTRUCT): Call
7588         mono_metadata_generic_inst_is_valuetype() if we're a generic
7589         instance to check whether our underlying type is a valuetype.
7590
7591 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
7592
7593         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
7594         #63768.
7595
7596 2004-08-25  Martin Baulig  <martin@ximian.com>
7597
7598         * loader.c (mono_get_method_from_token): Abstract methods can also
7599         be generic and thus have type parameters.
7600
7601         * metadata-internals.h
7602         (MonoDynamicImage): Added `GPtrArray *gen_params'.
7603
7604         * reflection.c (mono_image_get_generic_param_info): Don't create a
7605         metadata row, just add an entry to the `gen_params' array.
7606         (build_compressed_metadata): Sort the `gen_params' array and then
7607         actually create the metadata.
7608
7609 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7610
7611         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
7612
7613 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
7614
7615         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
7616
7617 2004-08-24  Martin Baulig  <martin@ximian.com>
7618
7619         * class.cs (mono_class_is_subclass_of): Like an interface, a
7620         generic instance also derives from System.Object.
7621
7622 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
7623
7624         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
7625         custom modifiers to be in any order. Fixes #61990.
7626
7627 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
7628
7629         * object.c: Register mono_object_new_fast icall.
7630         
7631         * object.c (mono_class_get_allocation_ftn): Return to calling
7632         mono_object_new_fast, since it seems faster to compute the object 
7633         size in unmanaged code than passing it as a parameter.
7634
7635         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
7636
7637         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
7638         this function with Boehm as the oom handler, so we don't have to check
7639         the result of GC_malloc.
7640
7641         * object.c: Remove checks for oom.
7642
7643         * object.h object.c (mono_class_get_allocation_ftn): New function to
7644         return the icall which can be used to allocate an instance of a given
7645         class. 
7646
7647         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
7648
7649         * class-internals.h: Add 'enabled' field.
7650
7651 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
7652
7653         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
7654
7655 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
7656         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
7657         value 0x0010.
7658
7659 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
7660
7661         * appdomain.c: use the Tls function for appdomain too,
7662         at Zoltan's request. Actually return in mono_context_get
7663
7664         * appdomain.c, profiler.c, threads.c: use __thread
7665
7666 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
7667
7668         * appdomain.c threads.c: Call GC_CreateThread on windows.
7669
7670         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
7671         multiple libraries since this don't work on windows.
7672
7673 2004-08-18  Martin Baulig  <martin@ximian.com>
7674
7675         * class-internals.h
7676         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
7677         MonoMethodHeader.
7678
7679         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
7680         MonoMethodNormal since we also need it for abstract and interface
7681         methods.
7682
7683         * reflection.c
7684         (build_compressed_metadata): Sort the GenericParam table.
7685         (mono_image_create_token): Added `gboolean create_methodspec'
7686         argument; this is false when generating a MethodImpl token.
7687         (reflection_methodbuilder_to_mono_method): Abstract and interface
7688         methods may also have generic parameters.
7689
7690 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
7691
7692         * appdomain.c: thread local alloc
7693
7694 2004-08-17  Martin Baulig  <martin@ximian.com>
7695
7696         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
7697
7698         * icall.c
7699         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
7700         argument.
7701
7702         * class.c (mono_type_get_full_name): New public function.
7703         (mono_type_get_name): Don't include the type arguments.
7704
7705 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
7706
7707         * Makefile.am: Build static versions of libmetadata and libmonoruntime
7708         for inclusion into the mono executable.
7709
7710 2004-08-16  Martin Baulig  <martin@ximian.com>
7711
7712         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
7713         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
7714
7715 2004-08-14  Martin Baulig  <martin@ximian.com>
7716
7717         * class.c (dup_type): Also copy the `byref' field.
7718
7719 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
7720
7721         * reflection.c (create_dynamic_mono_image): Revert the last change 
7722         since it breaks bootstrap.
7723
7724 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
7725
7726         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
7727
7728         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
7729         not free them with g_free.
7730
7731 2004-08-11  Martin Baulig  <martin@ximian.com>
7732
7733         * reflection.c (mono_reflection_setup_internal_class): Also call
7734         mono_class_setup_mono_type() if we already have a `tb->type.type'.
7735
7736 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
7737
7738         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
7739         called during default (first) AppDomain creation. Keep track of
7740         Evidence when loading assemblies.
7741
7742 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
7743
7744         * opcodes.c, opcodes.h: reduce runtime relocations.
7745
7746 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
7747
7748         * culture-info.h, locales.c: fixes and chages to sue the new
7749         optimized format of the locale data.
7750         * culture-info-tables.h: regenerated.
7751
7752 2004-08-06  Geoff Norton <gnorton@customerdna.com>
7753         
7754         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
7755
7756 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
7757
7758         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
7759         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
7760         * domain-internals.h: icall declaration.
7761         * icall.c: icall registration.
7762         * object-internals.h: New fields in MonoAssembly for CAS.
7763
7764 2004-08-05  Duncan Mak  <duncan@ximian.com>
7765
7766         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
7767         CEE_LDELEM_ANY.
7768
7769 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
7770
7771         * reflection.c: fix to deal with object[] arrays in custom ctors
7772         (bug #62550).
7773
7774 2004-08-05  Martin Baulig  <martin@ximian.com>
7775
7776         * class.c (mono_class_array_element_size): Added support for
7777         generic instances and correctly handle "recursive" types.
7778
7779 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
7780
7781         * assembly.c: Fix warnings.
7782
7783 2004-08-04  Martin Baulig  <martin@ximian.com>
7784
7785         * class.c
7786         (mono_type_get_name_recurse): Added `gboolean include_arity'
7787         argument specifying whether or not we should include the generic
7788         arity in the type name.
7789         (_mono_type_get_name): New static function.
7790         (mono_class_setup_vtable): If we're a generic instance, don't
7791         include the generic arity in the names of explicit method
7792         implementations.        
7793
7794 2004-08-03  Martin Baulig  <martin@ximian.com>
7795
7796         * class.c (mono_type_get_name_recurse): Enclose the generic type
7797         arguments in `<', '>'.
7798
7799 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7800
7801         * gc.c: make GC warning messages use the trace API, they are just
7802         noise to most of the users.
7803
7804 2004-08-03  Martin Baulig  <martin@ximian.com>
7805
7806         * debug-mono-symfile.c (read_string): Correctly read the string.
7807
7808 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
7809
7810         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
7811         
7812         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
7813         icalls.
7814         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
7815
7816 2004-07-30  Martin Baulig  <martin@ximian.com>
7817
7818         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
7819         Reflect latest symbol writer changes.   
7820
7821 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
7822
7823         * object.c: always create an object if null is passed
7824         to Invoke() where a valuetype is expected.
7825
7826 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
7827
7828         * marshal.c (mono_marshal_init): make managed
7829         signatures match native ones better for 64bits.
7830
7831 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7832
7833         * appdomain.c: hack to build correctly the private bin path on windows.
7834         Fixes bug #61991.
7835
7836 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
7837
7838         * assembly.c: Load mscorlib from the correct framework directory
7839           (mono/<version>/mscorlib.dll).
7840         * appdomain.h: Added prototypes for new functions.
7841         * internals.h: Added some prototypes.
7842         * domain.c: When initializing the runtime, get from the executable and
7843           the configuration files the runtime version that the app supports.
7844           Added support methods for reading app.exe.config. Added list of versions
7845           supported by the JIT. Added two new methods: mono_init_from_assembly,
7846           which initializes the runtime and determines the required version from
7847           the provided exe file, and mono_init_version, which initializes
7848           the runtime using the provided version.
7849         * icall.c: Get machine.config from version-specific directory.
7850         * reflection.c: When generating an image, embed the version number
7851           of the current runtime.
7852
7853 2004-07-28  Dick Porter  <dick@ximian.com>
7854
7855         * socket-io.c
7856         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
7857         returned sockaddr size before creating the remote address object.
7858         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
7859         61608.
7860
7861 2004-07-28  Dick Porter  <dick@ximian.com>
7862
7863         * locales.c (string_invariant_compare_char): Fix invariant char
7864         compares between upper and lower cases.  Fixes bug 61458.
7865
7866 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
7867         
7868         * marshal.c: actually cache stelem.ref wrappers.
7869         
7870 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
7871
7872         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
7873         sections and remove the mono_cli_rva_map () function.
7874
7875 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
7876
7877         * debug-mono-symfile.c: fix one more endianess issue, from a patch
7878         by Geoff Norton (<gnorton@customerdna.com>).
7879
7880 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7881
7882         * class.c: fix class loads for pointer types (typeof(int) !=
7883         typeof(int*)).
7884
7885 2004-07-27  Martin Baulig  <martin@ximian.com>
7886
7887         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
7888         reading the debugging information from an external ".mdb" file.
7889
7890 2004-07-24  Martin Baulig  <martin@ximian.com>
7891
7892         * reflection.c (mono_image_get_type_info): Only write a class
7893         layout entry if we actually have a size or a packing size.
7894
7895 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
7896
7897         * reflection.c (type_get_fully_qualified_name): 
7898         insert cast to get type checking of ?: with non-gcc compilers
7899
7900 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
7901
7902         * rand.c: use g_getenv for both lookups of
7903         MONO_EGD_SOCKET
7904
7905 2004-07-17  Martin Baulig  <martin@ximian.com>
7906
7907         * reflection.c (mono_reflection_bind_generic_method_parameters):
7908         Set `gmethod->reflection_info'.
7909
7910 2004-07-17  Martin Baulig  <martin@ximian.com>
7911
7912         * class.c (mono_class_create_from_typedef): Insert the newly
7913         created class into the hash table before computing the interfaces
7914         since we could be called recursively.
7915
7916 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
7917
7918         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
7919         function to implement stelem.ref in managed code
7920         * class-internals.h, debug-helpers.c: a new wrapper type
7921         for the above.
7922
7923 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
7924
7925         * gc.c: allow GC handles to work even when no GC is compiled in.
7926         Fix part of bug #61134 (GetAddrOfPinnedObject).
7927
7928 2004-07-13  Peter Williams  <peter@newton.cx>
7929  
7930         * process.c (complete_path): Make sure we don't attempt to execute
7931         directories.
7932  
7933 2004-07-12  Geoff Norton <gnorton@customerdna.com>
7934
7935         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
7936           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
7937           and will add/subtract the hour if needed
7938
7939 2004-07-12  Martin Baulig  <martin@ximian.com>
7940
7941         * reflection.c (mono_field_get_object): If we have
7942         `field->generic_info', take the attributes from
7943         `field->generic_info->generic_type'.    
7944
7945 2004-07-12  Martin Baulig  <martin@ximian.com>
7946
7947         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
7948         This function must be called before initializing the runtime.
7949         (mono_debug_init_1): New function; call this after initializing
7950         the runtime, but before loading the assembly.  It tells the
7951         debugger to load corlib and the builtin types.
7952
7953         * mono-debug-debugger.c: Did some larger changes in the debugging
7954         code; support recursive class declarations, make sure we actually
7955         add all classes.
7956
7957 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7958
7959         * debug-helpers.c: undo my previous patch and fixed the real issue in
7960         ../mini/exceptions-x86.c
7961
7962 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7963
7964         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
7965         when no HOME env. variable was set and a NullRef was thrown in a .cctor
7966         called from other .cctors.
7967
7968 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
7969
7970         * loader.c: Removed the mono_loader_wine_init hack now that we are
7971         doing a managed version of Windows.Forms.
7972
7973 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
7974
7975         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
7976         threadpool.c, threads.c: remove static data from rootset.
7977
7978 2004-07-09  Dick Porter  <dick@ximian.com>
7979
7980         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
7981         Don't do any more processing if the matched length was 0.  It was
7982         increasing the size of the string before.  Fixes bug 61167.
7983
7984 2004-07-09  Dick Porter  <dick@ximian.com>
7985
7986         * socket-io.h:
7987         * socket-io.c
7988         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
7989         Add support for SO_PEERCRED if its available.
7990
7991 2004-07-09  Peter Bartok <pbartok@novell.com>
7992         * loader.c: winelib.exe.so error message is now only displayed if
7993         MONO_DEBUG is set. To help us avoid questions when people are trying
7994         out the new Managed.Windows.Forms.
7995
7996 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
7997
7998         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
7999         for isinst and castclass wrappers.
8000
8001         * class-internals.h icall.c: Move registration and lookup of JIT icalls
8002         to libmetadata from the JIT, so they could be used by the marshalling
8003         code and the interpreter.
8004
8005         * marshal.c: Register marshalling related JIT icalls here instead of
8006         in mini.c. Use CEE_MONO_ICALL instead of the family of 
8007         CEE_MONO_PROC<x> opcodes to call marshalling functions.
8008
8009         * metadata.h: Remove unneeded marshalling conversions.
8010
8011         * opcodes.c: Update for new opcodes.
8012         
8013 2004-07-08  Martin Baulig  <martin@ximian.com>
8014
8015         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
8016         (mono_debug_get_domain_data): Make this function static.
8017
8018 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8019
8020         * gc.c, object.h: add nice GC handle API for embedders.
8021
8022 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
8023
8024         * reflection.c: more changes for the new api
8025
8026         * object.c: When we reflect on a field w/ a constant value, it
8027         will not have a memory location, so we must access metadata. Also,
8028         allow easier reading of strings so that we can read them from
8029         the constant data.
8030
8031         * class.c (mono_class_layout_fields): no need for literal fields here.
8032
8033         * class-internals.h: api changes for const fields
8034
8035         * icall.c (ves_icall_get_enum_info): use new apis for const fields
8036
8037 2004-07-06  Martin Baulig  <martin@ximian.com>
8038
8039         * mono-debug.h: Increment version number to 44.
8040
8041         * mono-debug.c (mono_debug_add_wrapper): The second argument is
8042         now a gpointer, rewrote this whole method.
8043
8044         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
8045         function.  Add information about the wrapper in a new "misc table".
8046
8047         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
8048         for the new misc table.
8049
8050 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
8051
8052         * metadata-internals.h image.c: Add a cache for helper signatures.
8053
8054         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
8055
8056 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
8057
8058         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
8059         delegates from a delegate. Fixes #61033.
8060         
8061         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
8062         marshalling of stringbuilder arrays. Fixes #59900.
8063
8064 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
8065
8066         * icall.c: Add EnumBuilder:setup_enum_type icall.
8067
8068 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
8069
8070         * icall.c: Added a new icall for the property version of
8071         OffsetOfStringData.
8072
8073 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
8074
8075         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
8076         it has a constant size across platforms.
8077
8078         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
8079         stack trace.
8080
8081 2004-06-29  Martin Baulig  <martin@ximian.com>
8082
8083         * mono-debug.c (mono_debug_add_method): Protect the whole function
8084         in mono_debugger_lock(), not just parts of it.
8085
8086 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8087
8088         * reflection.c: make sure padding bytes in heaps are zeroed.
8089
8090 2004-06-24  David Waite  <mass@akuma.org>
8091
8092         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
8093         image.c, loader.c, locales.c, marshal.c, metadata.c,
8094         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
8095         string-icalls.c, threads.c: change to C90-style comments from C99 /
8096         C++ -style
8097
8098 2004-06-24  Dick Porter  <dick@ximian.com>
8099
8100         * threads.c
8101         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
8102         return createdNew.  Fixes bug 60412.
8103
8104         * threads-types.h: 
8105         * icall.c: Add createdNew parameter to CreateMutex icall
8106
8107 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8108
8109         * reflection.c, object-internals.h: save default value in params.
8110
8111 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8112
8113         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
8114         no need to build a new path combining that with the application base.
8115         Fixes bug #60442.
8116
8117 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
8118
8119         * reflection.c: fixed minor standard compliance issues.
8120
8121 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8122
8123         * reflection.c: fixed issue with encoding some custom attributes
8124         (arrays in properties and fields, bug #60411).
8125
8126 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8127
8128         * reflection.c: fix start address when copying the public key token.
8129
8130 2004-06-23  Martin Baulig  <martin@ximian.com>
8131
8132         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
8133         the `exc' object in a static object to put it into the GC's root set.
8134
8135 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
8136
8137         * reflection.c: make mono_reflection_setup_internal_class ()
8138         callable a second time to setup a new parent class.
8139
8140 2004-06-23  Dick Porter  <dick@ximian.com>
8141
8142         * threads.c: Check for WAIT_IO_COMPLETION return values.
8143
8144 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
8145
8146         * appdomain.c: Removed the g_free on the public key token. Now copy 
8147         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
8148         * assembly.c: Added public key token string value when loading 
8149         assemblies. Fix bug #60439.
8150         * icall.c: Added missing informations (like public key) in 
8151         GetReferencedAssemblies. Fix #60519.
8152         * image.h: Changed definition for public key token from const char*
8153         public_tok_value to guchar public_key_token [17];
8154         * reflection.c: Updated for changes to public key token.
8155
8156 2004-06-22  Lluis Sanchez Gual
8157
8158         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
8159         for the field in base classes.
8160
8161 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8162
8163         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
8164         mark headers as not supported, they are installed only for use by the
8165         debugger.
8166
8167 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
8168
8169         * *.c, *.h: avoid namespace pollution in public headers.
8170
8171 2004-06-21  Martin Baulig  <martin@ximian.com>
8172
8173         * exception.c (mono_get_exception_security): It's in
8174         "System.Security", not in "System".
8175
8176         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
8177         the exception classes.
8178
8179 2004-06-21  Martin Baulig  <martin@ximian.com>
8180
8181         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
8182         Protect the exception object from being finalized.
8183
8184 2004-06-21  Martin Baulig  <martin@ximian.com>
8185
8186         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
8187         public function.
8188
8189 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
8190
8191         * reflection.c: Load the assembly in mono_reflection_type_from_name,
8192         if it was not loaded before. Fix parts of #60439.
8193
8194 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
8195
8196         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
8197         code that was broken since Ben's change: wrappers are now
8198         dependent on the method signature only again.
8199
8200 2004-06-21  Martin Baulig  <martin@ximian.com>
8201
8202         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
8203         added interface support.
8204
8205 2004-06-21  Martin Baulig  <martin@ximian.com>
8206
8207         * class.c (mono_vtable_get_static_field_data): New public method.
8208
8209 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
8210
8211         * filewatcher.c : Windows build fix to be compliant with API changes.
8212
8213 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8214
8215         * class.h, class.c: more accessors.
8216         * metadata.h, metadata.c: prepare for hiding MonoType and
8217         MonoMethodSignature: people should use the accessors from now on
8218         outside of the tree.
8219
8220 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8221
8222         * *.c, *.h: more API cleanups.
8223
8224 2004-06-18  Jackson Harper  <jackson@ximian.com>
8225
8226         * assembly.c: Trace loading assemblies.
8227         * loader.c: Trace loading native libraries.
8228         * mono-config.c: Trace loading config files.
8229         
8230 2004-06-18  Dick Porter  <dick@ximian.com>
8231
8232         * locales.c: Tell ICU the lengths of strings, it can cope with
8233         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
8234
8235 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
8236
8237         * image.c: swapped name/filename;
8238
8239 2004-06-18  Martin Baulig  <martin@ximian.com>
8240
8241         * mono-debug-debugger.c (write_class): Write the parent class at
8242         the end of the header.
8243
8244 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8245
8246         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
8247
8248 2004-06-17  Raja R Harinath  <rharinath@novell.com>
8249
8250         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
8251         (bundle_obj): New conditional define.
8252         (BUILT_SOURCES): Remove.
8253         ($(bundle_srcs)): Make parallel-make safe.
8254         (libmonoruntime_la_LIBADD): Make unconditional.
8255         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
8256         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
8257
8258 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
8259
8260         * culture-info-tables.h: It was inconsistent with the latest
8261           supp info files.
8262
8263 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
8264
8265         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
8266         be loaded.
8267
8268         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
8269         with gcc 2.95.
8270
8271 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8272
8273         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
8274         cleaned up public header threads.h.
8275
8276 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8277
8278         * Makefile.am, *.c, *.h: more API cleanups.
8279
8280 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
8281
8282         * Makefile.am: removed monosn from compilation.
8283         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
8284         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
8285         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
8286         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
8287         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
8288         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
8289
8290 2004-06-15  Jackson Harper  <jackson@ximian.com>
8291
8292         * assembly.c: Make locales lower case when searching the GAC for
8293         assemblies. gacutil will always make locales lowercase when
8294         installing so this effectively makes them case insensitive.
8295         
8296 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
8297
8298         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
8299         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
8300           parameter which allows to choose whether the wait can be interrupted or 
8301           not. Also added the method mono_monitor_enter(), which locks the monitor
8302           using an infinite wait and without allowing interruption.
8303           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
8304           interrupted.
8305         * object.h: Added new fields in MonoThread. suspend_event holds the event
8306           used to susped/resume the thread. synch_lock is the lock object to use for
8307           modifying the thread state.
8308         * threads.c: Use the new synch_lock object for locking, instead of "this",
8309           which can generate deadlocks.
8310           Moved thread state change in Thread.Sleep and Thread.Join from managed
8311           to unmanaged code. This avoids a deadlock when the thread was suspended
8312           just after acquiring the thread lock.
8313           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
8314           Implemented Thread.Suspend using an event instead of ThreadSuspend,
8315           which is not fully implemented in the io-layer.
8316         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
8317
8318 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
8319
8320         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
8321         threads-types.h: more API cleanups.
8322
8323 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8324
8325         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
8326         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
8327         threadpool.c, threads.c: first pass at the exported API cleanup.
8328
8329 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
8330
8331         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
8332
8333 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8334
8335         * icall.c: added internalGetHome.
8336
8337 2004-06-14  Dick Porter  <dick@ximian.com>
8338
8339         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
8340         possible to return successfully when '.' or '..' were the only
8341         entries in a directory, but were skipped.  The MonoIOStat was not
8342         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
8343         Fixes bug 59574.
8344
8345 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8346
8347         * reflection.c: make binaries run on .Net 1.1 by default.
8348
8349 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
8350
8351         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
8352
8353 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
8354
8355         * marshal.c: keep track of struct size with explicit layout
8356         (bug #59979).
8357
8358 2004-06-12  Martin Baulig  <martin@ximian.com>
8359
8360         * mono-debug-debugger.c: Comment out a debugging g_message().
8361
8362 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8363
8364         * reflection.c, reflection.h: do not free custom attrs that are cached.
8365         * icall.c: use braces to make code clearer.
8366
8367 2004-06-11  Martin Baulig  <martin@ximian.com>
8368
8369         * class.h (MonoInflatedField): New type.
8370         (MonoClassField): Replaced `MonoType *generic_type' with
8371         `MonoInflatedField *generic_info'.
8372
8373         * icall.c
8374         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
8375
8376 2004-06-11  Martin Baulig  <martin@ximian.com>
8377
8378         * reflection.c (mono_image_create_method_token): Correctly encode
8379         varargs methods.
8380
8381 2004-06-11  Martin Baulig  <martin@ximian.com>
8382
8383         * metadata.c (mono_metadata_parse_method_signature): When parsing
8384         a MethodDef which has VarArgs, also set sentinelpos if we don't
8385         have any parameters.
8386
8387 2004-06-11  Martin Baulig  <martin@ximian.com>
8388
8389         * verify.c (mono_method_verify): In CEE_CALL, use
8390         mono_method_get_signature() to get the method's signature, unless
8391         we're a PInvoke method.
8392
8393 2004-06-10  Jackson Harper  <jackson@ximian.com>
8394
8395         * assembly.c: Use <path>/lib/mono/gac for the extra paths
8396         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
8397         logical name as the supplied path is just a prefix to the gac not
8398         the direct path to it.
8399         
8400 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
8401
8402         * reflection.c: make the token for a created method match
8403         the token of the MethodBuilder it was created from
8404         (IKVM requires this behaviour now).
8405
8406 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
8407
8408         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
8409         reflection.c, socket-io.c: leak fixes.
8410
8411 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
8412
8413         * icall.c: handle sentinel pos in vararg methods in position different
8414         from 0.
8415
8416 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8417
8418         * culture-info-tables.h: freshly generated.
8419
8420 2004-06-09  Martin Baulig  <martin@ximian.com>
8421
8422         * loader.c (mono_get_method_constrained): Call `mono_class_init
8423         (constrained_class)'.   
8424
8425 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
8426
8427         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
8428         any methods. Fixes #59629.
8429
8430 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
8431
8432         * culture-info-tables.h: reflecting locale-builder updates.
8433
8434 2004-06-08  Dick Porter  <dick@ximian.com>
8435
8436         * object.h:
8437         * locales.c: Fixed compile warnings, including a real bug in
8438         CompareInfo_internal_compare.
8439         
8440 2004-06-08  Dick Porter  <dick@ximian.com>
8441
8442         * locales.c
8443         (ves_icall_System_Globalization_CompareInfo_internal_index):
8444         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
8445         Double-check the resuls of usearches, because ICU currently
8446         ignores most of the collator settings here.  Fixes bug 59720.
8447         
8448 2004-06-08  Dick Porter  <dick@ximian.com>
8449
8450         * locales.c
8451         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
8452         Fix memory leak and segfault-causing typo.  No idea how this one
8453         lasted so long without being noticed.
8454
8455 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
8456
8457         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
8458         any methods. Fixes #59629.
8459
8460 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8461
8462         * assembly.c:
8463         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
8464         own the critical section before). Removed dead code (that's done
8465         in the preload hook).
8466
8467         (mono_assembly_load_with_partial_name): call the preload hook.
8468
8469 2004-06-08  Martin Baulig  <martin@ximian.com>
8470
8471         * metadata.c (mono_metadata_signature_alloc): Default
8472         `sentinelpos' to -1.
8473
8474         * reflection.c (mono_image_get_array_token): Likewise.
8475
8476 2004-06-08  Martin Baulig  <martin@ximian.com>
8477
8478         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
8479
8480         * metadata.c (mono_metadata_parse_method_signature): When parsing
8481         a MethodDef which has VarArgs, set sentinelpos.
8482
8483         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
8484         `gint16' since we're using -1 for non-varargs methods.
8485
8486         * reflection.c
8487         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
8488         (method_encode_signature): Added varargs support.
8489         (method_builder_encode_signature): Likewise.
8490         (mono_image_get_varargs_method_token): New static method.
8491         (mono_image_create_method_token): New public method; this is
8492         called via an icall instead of mono_image_create_token() when
8493         calling a varargs method.       
8494
8495 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
8496
8497         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
8498
8499 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
8500
8501         * culture-info-tables.h : Reflecting the latest locale-builder that
8502           fixed empty array representation ({} to {0}).
8503
8504 2004-06-07  Jackson Harper  <jackson@ximian.com>
8505
8506         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
8507         looking up extra gac paths. This allows MONO_GAC_PATH to act
8508         exactly like a prefix.
8509         
8510 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
8511
8512         * reflection.c (mono_reflection_type_from_name): Make a copy of the
8513         type name before modifying it. Fixes #59405.
8514
8515 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
8516
8517         * culture-info.h: added fields for "all datetime patterns".
8518         * locales.c: (  ves_icall_System_Globalization_CultureInfo
8519           _construct_datetime_format ()): fill xxx_patterns fields.
8520         * object.h: added fields for "all datetime patterns" to
8521           MonoDateTimeFormatInfo.
8522         * culture-info-tables.h: reflecting locale-builder updates.
8523
8524 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
8525
8526         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
8527         the event has no add and remove methods. Fixes #59629.
8528
8529 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
8530
8531         * object.c: Fixed possible integer overflow when allocating large
8532         strings.
8533
8534 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
8535
8536         * culture-info-tables.h: reflecting locale-builder updates.
8537
8538 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
8539
8540         * culture-info-tables.h: reflecting locale-builder updates.
8541
8542 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
8543
8544         * culture-info-tables.h: reflecting locale-builder updates.
8545
8546 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
8547
8548         * threads.c: Made Thread.Sleep abortable.
8549
8550 2004-06-02  Martin Baulig  <martin@ximian.com>
8551
8552         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
8553
8554         * debug-mono-symfile.h: Bumped symbol file version number to 37.
8555
8556 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
8557
8558         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
8559
8560 2004-05-30  Jackson Harper  <jackson@ximian.com>
8561
8562         * reflection.c: Do not hardcode assembly versions or public key
8563         tokens anymore. All of this except the corlib section was dead
8564         code anyways.
8565         
8566 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
8567
8568         * object.c (mono_runtime_invoke_array): Automatically create boxed
8569         objects for byref valuetypes if needed. Fixes #59300.
8570         
8571         * object.c (mono_method_return_message_restore): Handle 
8572         MONO_TYPE_OBJECT as well.
8573
8574 2004-05-28  Jackson Harper  <jackson@ximian.com>
8575
8576         * reflection.c: The modified type encoding was causing build
8577         problems. Reverted for now.
8578         
8579 2004-05-28  Jackson Harper  <jackson@ximian.com>
8580
8581         * reflection.c/h: Take an assembly ref so that we dont create
8582         fully qualified names when encoding types in the same assembly as
8583         the custom attribute being emitted.
8584         * appdomain.c: Increment version number.
8585         
8586 2004-05-26  Duncan Mak  <duncan@ximian.com>
8587
8588         * icall.c
8589         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
8590         Set the full version number (major, minor, build, revision).
8591
8592 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
8593
8594         * marshal.c (emit_struct_conv): increment src/dst after blit
8595         (mono_marshal_get_managed_wrapper,
8596         mono_marshal_get_native_wrapper): make sure we have marshalling
8597         info before marshalling params (info computation affects
8598         blittable)
8599
8600         * class.c (class_compute_field_layout): correctly deal with
8601         blittable
8602         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
8603         value types (as per what windows dows by default)
8604         (mono_class_setup_mono_type): System.ValueType is blittable
8605         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
8606         blittable
8607
8608         * marshal.c (mono_marshal_load_type_info): flag types  as
8609         non-blittable if the native layout doesn't match the managed
8610         layout
8611
8612 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8613
8614         * appdomain.c: don't add stuff in the private search path that is
8615         above the application base. If application base is not set, there's
8616         no private search path.
8617
8618 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
8619
8620         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
8621         byref struct arguments in native->managed marshalling.
8622
8623 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
8624
8625         * marshal.c (mono_marshal_get_runtime_invoke): correctly
8626         cache methods using signature (special case for methods
8627         that are value type or string class)
8628         
8629         * image.c (mono_image_close): clean up allocated GSList's
8630         in runtime_invoke_cache.
8631
8632 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8633
8634         * mono-config.c: set the correct path for mono_cfg_dir on windows when
8635         there's no MONO_CFG_DIR environment variable defined.
8636
8637 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8638
8639         * threads.c: windows version must be >= 0x0500 to include OpenThread.
8640
8641 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
8642
8643         * threadpool.c: Really wait for 500ms after the async call, even if the wait
8644           is interrumped.
8645         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
8646           before waiting for it, and call CloseHandle after the wait to unref it.
8647           This will make sure that handles are not disposed too early.
8648
8649 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8650
8651         * appdomain.c:
8652         * appdomain.h:
8653         * icall.c: removed
8654         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
8655         needed now.
8656
8657         * object.c: se the application_base only for the domain that runs
8658         Main. Fixes bug #59216,
8659
8660 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8661
8662         * appdomain.c:
8663         * object.c: only the domain in which Main is run have
8664         SetupInformation.ConfigurationFile set, so moved a few lines from
8665         appdomain.c to object.c.
8666
8667 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8668
8669         * appdomain.c: we tried to load [name].(dll|exe), but according
8670         to bug #57710, we must also try [culture]/[name].(dll|exe) and
8671         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
8672         There's a test case attached to bug #58922.
8673
8674 2004-05-27  Dick Porter  <dick@ximian.com>
8675
8676         * icall.c:
8677         * file-io.c: Implemented icalls for locking and unlocking regions
8678         in a file.
8679         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
8680         FALSE on error (fixes both compiler warning and real bug.)
8681
8682 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
8683
8684         * culture-info-tables.h: reflecting locale-builder updates.
8685
8686           (Added missing ChangeLog entry for 05/26)
8687
8688 2004-05-27  Jackson Harper  <jackson@ximian.com>
8689
8690         * locales.c: Fix some cut and paste errors.
8691         
8692 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8693
8694         * mono-config.c: set the correct path for config. directory on windows.
8695
8696 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
8697
8698         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
8699           on win32.
8700
8701 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
8702
8703         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
8704         from pinvoke functions.
8705         
8706         * marshal.c (mono_ftnptr_to_delegate): Implement this.
8707
8708 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
8709
8710         * culture-info-tables.h: reflecting locale-builder updates.
8711
8712 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
8713
8714         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
8715         #59086.
8716
8717 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
8718
8719         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
8720         * icall.c: Modified icalls for RNG.
8721         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
8722         Windows (CryptoAPI).
8723
8724 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
8725
8726         * locales.c: Fix build.
8727
8728 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
8729
8730         * culture-info-tables.h: reflecting locale-builder updates.
8731
8732 2004-05-25  Jackson Harper  <jackson@ximian.com>
8733
8734         * locales.c: When creating the current culture use the $LANGs
8735         specific culture. So DateTimeFormat and NumberFormat entries are created.
8736         
8737 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
8738
8739         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
8740         a char array as parameter.
8741
8742 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
8743
8744         * image.c: In mono_image_open(), always use an absolute path name to
8745           look for already loaded images.
8746
8747 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
8748
8749         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
8750         missing in the windows build (like older cygwin include files).
8751
8752 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
8753
8754         * icall.c: Fixed check for possible integer overflow in Buffer_
8755         BlockCopy icall. Replaced comments style // by /* */.
8756
8757 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
8758
8759         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
8760         
8761         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
8762         check after MONO_VTADDR. Fixes pinvoke2.exe.
8763
8764         * marshal.h marshal.c metadata.h: Add beginnings of support for
8765         ftnptr -> delegate marshalling.
8766
8767 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
8768
8769         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
8770         * threads.c: Fix warnings.
8771
8772 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
8773
8774         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
8775         * icall.c: Registered icalls for Suspend and Resume.
8776         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
8777           Thread.Abort.
8778         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
8779         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
8780         * process.c: Use WaitForSingleObjectEx.
8781         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
8782           checkpoints.
8783         * threads.c, threads.h: Make use of new Ex wait methods. Improved
8784           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
8785           for Suspend and Resume. Added new mono_thread_stop, used for stoping
8786           background threads. Added basic support for Abort in Windows.
8787           Start new threads using a managed delegate invoke wrapper. This wrapper
8788           has an interruption checkpoint that is needed since an interruption
8789           can be requested before the thread leaves the unmanaged code that starts 
8790           the thread.
8791         * marshal.c: Added interruption checkpoint after every native call, and
8792           also before managed calls for wrappers called from unmanaged code to
8793           go into managed code.
8794         * object.h: Added new field in MonoThread to keep track of interruption
8795           requests.
8796
8797 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
8798
8799         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
8800         calls.
8801
8802 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8803
8804         * appdomain.c:
8805         * assembly.c:
8806         * gc.c:
8807         * locales.c:
8808         * mono-config.c:
8809         * rand.c: getenv -> g_getenv (windows!)
8810
8811         * process.c: complete_path is also used on non-windows platforms.
8812
8813 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8814
8815         * icall.c: new signature for Process_Start.
8816
8817         * process.[ch]: new signature for Process_Start. If we're on windows
8818         and UseShellExecute is false, we have to search for the program by
8819         ourselves if we don't get a full path.
8820
8821 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
8822
8823         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
8824         marshalling and call CleanUpNativeData if needed. Fixes #58646.
8825
8826 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8827
8828         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
8829         Fixes bug #58373.
8830
8831 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8832
8833         * process.c: use double quotes to quote program name and arguments on
8834         windows. Fixes bug #58575.
8835
8836 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8837
8838         * file-io.c: don't return "." and ".." when using windows Find*File.
8839
8840 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
8841
8842         * marshal.c: Don't pass wrappers to message init because method 
8843         addressed used to lookup metadata. part of remoting[2|3] fix.
8844
8845 2004-05-15  Jackson Harper  <jackson@ximian.com>
8846
8847         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
8848         path is essentially the same as MONO_PATH except that it points to
8849         GACs instead of lib directories.
8850         * loader.h: The user gac is gone so we dont need function to
8851         enable/disable it.
8852         * mono-config.c: user gac option is now gone.
8853         
8854 2004-05-15  Jackson Harper  <jackson@ximian.com>
8855
8856         * culture-info.h: Make defines more consistent, add calendar data
8857         to the culture info table.
8858         * culture-info-tables.h: Add basic calendar data. Basically
8859         everyone gets default gregorian until all the data is
8860         updated.
8861         * locales.c: Use the new consistent defines. Set calendar data for
8862         culture info objects.
8863         * object.h: add a field for calendar data to CultureInfo
8864         
8865 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
8866
8867         * image.c: image->runtime_invoke_cache is keyed on signatures now.
8868         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
8869         a signature.
8870         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
8871         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
8872         an extra param that is the pointer of the method to invoke. The IL for
8873         the invoke method is no longer specific to the method, but to the
8874         signature of the method. Thus, we can share the same code for multiple
8875         methods. This reduces the number of methods that have to be compiled.
8876
8877 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
8878
8879         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
8880
8881         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8882
8883         * icall.c: Optimize Buffer.BlockCopy.
8884
8885 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8886
8887         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
8888         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
8889         quote). Changed them to "MMMM yyyy".
8890
8891 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
8892
8893         * rand.c
8894         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
8895
8896 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
8897
8898         * reflection.h: Updated after changes to managed structures.
8899
8900         * appdomain.c: Bump corlib version.
8901
8902 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8903
8904         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
8905         windows.
8906
8907 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8908
8909         * Makefile.am: link to ../os/libmonoos.la on windows.
8910
8911         * assembly.c:
8912                 -If MONO_DEBUG, warn about non-existing directories in
8913                 MONO_PATH.
8914                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
8915                 compile time variable.
8916                 -Removed init_default_path and call mono_set_rootdir from
8917                 libmonoos.a instead (windows only).
8918
8919         * assembly.h: declare mono_assembly_getrootdir().
8920
8921         * domain.c:
8922         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
8923
8924         * loader.c: s/getenv/g_getenv/
8925
8926 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
8927
8928         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
8929
8930         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
8931
8932         * metadata.h: Add new marshalling conversions.
8933
8934         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
8935         function.
8936
8937         * reflection.c (mono_reflection_get_type): Lookup the type in all
8938         modules of a multi-module assembly. Fixes #58291.
8939
8940 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
8941
8942         * threads.c: Before aborting a background, set the StopRequested
8943         state.  This avoids throwing the Abort exception.
8944         In mono_thread_manage, don't continue with the shutdown until all
8945         aborted threads have actually stopped.
8946
8947 2004-05-10  Jackson Harper  <jackson@ximian.com>
8948
8949         * locales.c: Remove the modifier from culture names.
8950         
8951 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8952
8953         * Makefile.am: monosn is not installed any more. It has been deprecated
8954         in favor of sn.
8955
8956 2004-05-07  Jackson Harper  <jackson@ximian.com>
8957
8958         * locales.c
8959         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
8960         Fix array construction, add bailout if the length is 0.
8961
8962 2004-05-07  Dick Porter  <dick@ximian.com>
8963
8964         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
8965         machine doesn't have a DNS entry.  Patch by Urs Muff
8966         (umuff@quark.com), fixes bug 57928.
8967
8968 2004-05-06  Jackson Harper  <jackson@ximian.com>
8969
8970         * reflection.c: Handle null PublicTokens properly. alloc mem for
8971         assembly names culture so we dont crash when freeing it.
8972         
8973 2004-05-06  Jackson Harper  <jackson@ximian.com>
8974
8975         * assembly.c: Check the usergac when loading with partial names.
8976         
8977 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
8978
8979         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
8980         does nothing for now (not required for Linux/Windows) but the class
8981         library can call it (and a newer or modified runtime could need it).
8982         * icall.c: Registred icall.
8983
8984 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8985
8986         * loader.c: prints a message on module loading error we set MONO_DEBUG
8987         environment variable.
8988
8989 2004-05-05  Jackson Harper  <jackson@ximian.com>
8990
8991         * appdomain.c: Handle PublicKeyToken=null properly.
8992         
8993 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
8994
8995         * environment.c|h: Added icall ves_icall_System_Environment_
8996         GetOSVersionString to get the current OS version as a string.
8997         * icall.c: Registred icall.
8998
8999 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
9000
9001         * object.c: in mono_object_get_virtual_method(), take into account that
9002         non-virtual methods don't have a slot in the vtable. Check needed when
9003         the object is a proxy.
9004
9005 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
9006
9007         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
9008         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
9009
9010         * object.c (mono_class_compute_gc_descriptor): Fix warning.
9011
9012         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
9013         passed when a valuetype is expected.
9014
9015         * object.c (mono_unhandled_exception): Only set the exit code if the
9016         exception happens in the main thread. Fixes thread5.exe.
9017
9018         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
9019         invalid names. Fixes #58047.
9020
9021 2004-05-03  Jackson Harper  <jackson@ximian.com>
9022
9023         * assembly.c: This line was committed accidently and is unneeded.
9024         
9025 2004-05-03  Jackson Harper  <jackson@ximian.com>
9026
9027         * icall.c: Add new icall for Assembly::LoadWithPartialName
9028         * assembly.c/.h: new function that probes the GAC to load partial
9029         assembly names by Paolo Molaro.
9030         
9031 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9032
9033         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
9034         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
9035         (type_get_fully_qualified_name): Added PublicKeyToken when building a
9036         full type name.
9037
9038 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9039
9040         * appdomain.c: fixed check for 'neutral' culture and removed warning.
9041         * reflection.c: fix bug when parsing a full type name and Version is not
9042         the last thing in the string.
9043
9044 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
9045
9046         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
9047         crashes when it is freed.
9048
9049 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9050
9051         * assembly.c: print the compat warning to stderr.
9052
9053 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
9054
9055         * assembly.c (mono_assembly_load_references): Add a compatibility
9056         hack to run old applications that might be still referencing the
9057         3300-based assemblies, only do this for System.xxx.
9058
9059 2004-05-01  Jackson Harper  <jackson@ximian.com>
9060
9061         * appdomain.c: If the culture is neutral we set it to "".
9062         
9063 2004-04-29  Jackson Harper  <jackson@ximian.com>
9064
9065         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
9066
9067 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
9068  
9069         * string-icalls.c: added low overhead function for copying chars
9070         * icall.c: added needed icall for the above function
9071  
9072 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9073
9074         * icall.c: fix return value of get_global_assembly_cache.  Implemented
9075         Environment.GetLogicalDrives.
9076
9077 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
9078
9079         * rand.c: try and talk to egd or prngd
9080         for random bytes if opening devices fail.
9081
9082 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
9083
9084         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
9085         alignment for the type using the native alignment of its members 
9086         instead of using klass->min_align.
9087
9088         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
9089
9090 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9091
9092         * file-io.c:
9093         * socket-io.c: added check for sys/aio.h.
9094
9095 2004-04-28  Dick Porter  <dick@ximian.com>
9096
9097         * threads.c: Don't abort a thread thats already aborting, when
9098         terminating everything.
9099
9100 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9101
9102         * icall.c: added 2 new async calls for Socket.
9103
9104         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
9105         IO on *nix systems.
9106
9107         * threadpool.c: removed unused variable.
9108
9109 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
9110
9111         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
9112
9113 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9114
9115         * locales.c: put back string_invariant_tolower () and
9116         string_invariant_toupper ().
9117
9118 2004-04-26 David Waite <mass@akuma.org>
9119
9120         * file-io.h:
9121         * socket-io.h:
9122         * threads.h:
9123         * unicode.h: remove comma from end of enumeration declarations
9124
9125 2004-04-26 David Waite <mass@akuma.org>
9126
9127         * debug-mono-symfile.h:
9128         * decimal.c:
9129         * mono_debug.h:
9130         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
9131
9132
9133 2004-04-26  Jackson Harper  <jackson@ximian.com>
9134
9135         * appdomain.c: Increment version number.
9136         
9137 2004-04-26  Jackson Harper  <jackson@ximian.com>
9138
9139         * appdomain.c: Set assembly references public token value when
9140         PublicKeyToken is specified, not the hash_value. Free public token
9141         values when free assembly name data. Previously the public key
9142         token was hex decoded, however we are using hex encoded public key
9143         tokens, so this is not neccasary.
9144         * assembly.c: Lookup assemblies in the gac if their public token
9145         value is set. Add function to allow enabling user gac
9146         lookups. Specify whether or not the assembly was loaded from the
9147         GAC. Compare full assembly names when checking the cache for
9148         assemblies (Temporarily disabled see comment in code). Remove
9149         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
9150         specifies trace-loader they get extra info to stdout on the
9151         loading of assemblies.
9152         * image.h: Add a field for an assembly references public token
9153         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
9154         whether an assembly has been loaded from the GAC.
9155         * image.c: Remove a corlib -> mscorlib name mapping.
9156         * loader.h: Add function to enable/disable the user gac.
9157         * mono-config.c: Check if the usergac is enabled in the config
9158         file.
9159         * icall.c: New icall to determine whether or not an assembly has
9160         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
9161         * tabldefs.h: Add constant for assemblyref flag that specifies a
9162         full public key is used instead of a public token.
9163         * reflection.c: Remove mscorlib -> corlib mappings. Set
9164         PublicTokenValue instead of hash value. This value is a hex
9165         string so it does not need to be expanded.
9166
9167 2004-04-26  Martin Baulig  <martin@ximian.com>
9168
9169         * mono-debug-debugger.c (mono_debugger_initialize): Set
9170         `mono_debugger_initialized' before calling mono_debug_lock().
9171
9172 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
9173
9174         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
9175           InternalToUpper/InternalToLower.
9176         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
9177           removed invariant culture shortcut.  This is now done in managed code.
9178         * locales.c: (string_invariant_toupper/tolower) removed.
9179
9180 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9181
9182         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
9183         Added Poll internal call.
9184
9185         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
9186         call for Poll. Select was too heavy for polling a single socket.
9187
9188         * threadpool.[ch]: added mono_threadpool_cleanup.
9189         * threads.c: use it. Don't use Thread_Abort on windows.
9190
9191 2004-04-23  Martin Baulig  <martin@ximian.com>
9192
9193         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
9194
9195 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
9196
9197         * icall.c: Registred new icalls for key pair protection and added an
9198         icall for Environment.GetFolderPath on Windows.
9199         * security.c|h: Added new icalls for key pair protection.
9200
9201 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9202
9203         * socket-io.c: don't display the non-supported family warning for known
9204         families. Now this is not displayed on windows when checking support
9205         for IPv4/IPv6.
9206
9207 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9208
9209         * class.c: don't display the layout warning for static fields.
9210
9211 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
9212
9213         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
9214         * locales.c, locales.h: Added new icalls for culture-specific
9215         Char.ToLower and Char.ToUpper.
9216
9217 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9218
9219         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
9220         by David Waite.
9221
9222 2004-04-20  Martin Baulig  <martin@ximian.com>
9223
9224         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
9225         of the type name before passing it to mono_reflection_type_from_name().
9226
9227 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
9228
9229         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
9230         encodings here. Fixes #56965.
9231
9232 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
9233
9234         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9235         fix test on strstr result not that I can see anything that
9236         relies on the result.
9237
9238 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
9239
9240         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
9241         Fixes #57081.
9242
9243         * marshal.c (mono_marshal_get_string_encoding): New helper function.
9244
9245         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
9246         function to determine which marshalling to use for strings. Fixes
9247         #56965.
9248
9249         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
9250
9251         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
9252
9253 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
9254
9255         * icall.c: #include mono-config.h
9256
9257 2004-04-15  Jackson Harper  <jackson@ximian.com>
9258
9259         * culture-info-tables.h: Fix date formats for en-US culture.
9260         
9261 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
9262
9263         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
9264         ThreadPool.SetMinThreads.
9265         * threadpool.c: Implemented ThreadPool.GetMinThreads and
9266         ThreadPool.SetMinThreads.
9267
9268 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9269
9270         * mono-config.c: also load the .config file in the directory
9271         where the assembly was found.
9272
9273 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
9274
9275         * assembly.c: load per-assembly config files.
9276         * icall.c: decrapified code to get the config dir and moved to
9277         mono-config.c.
9278         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
9279         per-assembly config files. When doing a dll map lookup give precedence
9280         to the per-assembly data.
9281
9282 2004-04-14  Martin Baulig  <martin@ximian.com>
9283
9284         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
9285         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
9286         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
9287
9288         * mono-debugger-debugger.c: While the debugger is locked, remember
9289         whether the symbol tables have changes and send one single
9290         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
9291
9292 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
9293
9294         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
9295
9296         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
9297         function.
9298
9299         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
9300         account when marshalling string arrays. Fixes #56965.
9301
9302 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
9303
9304         * icall.c: Add new icalls mapping for security.
9305         * security.c|h: Add internal calls for WindowsIdentity,
9306         WindowsImpersonationContext and WindowsPrincipal.
9307
9308 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
9309
9310         * class.c: Added comment to ensure the System.MonoDummy class
9311         is removed when no longer necessary
9312
9313 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
9314
9315         * appdomain.c: Pass arguments to the bootstraping exceptions to
9316         minimize JITed methods at boot
9317
9318         * metadata.c (mono_exception_from_name_two_strings): Allow for the
9319         second string to be null.
9320
9321         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9322         Change the protocol to minimize the JIT methods at startup.  Now
9323         it Returns the internal codepage, if the value of "int_code_page"
9324         is 1 at entry, and we can not compute a suitable code page
9325         number, returns the code page as a string.
9326
9327 2004-04-13  Jackson Harper  <jackson@ximian.com>
9328
9329         * culture-info-tables.h: Fix number of decimal digits for all
9330         english locales.
9331
9332 2004-04-13  Jackson Harper  <jackson@ximian.com>
9333
9334         * icall.c: Clairfy out of sync error message. It is not always
9335         your corlib that is out of sync.
9336
9337 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
9338
9339         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
9340         properties when only the set accessor is overriden. Fixes #55874.
9341
9342 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
9343
9344         * assembly.c (mono_assembly_load_references): Make this thread safe.
9345         Fixes #56327.
9346
9347 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
9348
9349         * monosn.c: Add missing initialization calls.
9350
9351 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
9352
9353         * locales.c:
9354         ves_icall_System_Globalization_CultureInfo_construct_number_format
9355         Fix g_assert so it compiles on fussier compilers re int/ptr
9356         mismatch
9357
9358 2004-04-08  Dick Porter  <dick@ximian.com>
9359
9360         * socket-io.h:
9361         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
9362         53992.  Also rearrange the code so that the internal calls return
9363         an error value and exceptions are thrown from managed code.
9364
9365         * icall.c: Add type info to the socket icalls.
9366
9367 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9368
9369         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
9370         owes me a beer.
9371
9372 2004-04-07  Martin Baulig  <martin@ximian.com>
9373
9374         * class.c (mono_class_from_generic_parameter): Don't default
9375         `klass->parent' to `mono_defaults.object_type'.
9376
9377 2004-04-07  Martin Baulig  <martin@ximian.com>
9378
9379         * reflection.c (mono_reflection_initialize_generic_parameter): Set
9380         `param->pklass->reflection_info'.       
9381
9382 2004-04-07  Jackson Harper  <jackson@ximian.com>
9383
9384         * culture-info-tables.h: Fix date separator symbol.
9385         
9386 2004-04-07  Martin Baulig  <martin@ximian.com>
9387
9388         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
9389         from System.Type to System.MonoType.
9390
9391 2004-04-07  Martin Baulig  <martin@ximian.com>
9392
9393         * reflection.h
9394         (MonoReflectionGenericParam): Added `has_reference_type' and
9395         `has_value_type' fields.
9396
9397         * reflection.c (mono_image_get_generic_param_info): Encode the
9398         correct flags if we have the `class' or `struct' constraint.
9399
9400 2004-04-07  Martin Baulig  <martin@ximian.com>
9401
9402         * reflection.h
9403         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
9404
9405 2004-04-07  Jackson Harper  <jackson@ximian.com>
9406
9407         * appdomain.c: Revert extra patches, just wanted to bump the
9408         version number.
9409         
9410 2004-04-07  Jackson Harper  <jackson@ximian.com>
9411
9412         * Makefile.am: Add culture-info private headers.
9413         * icall.c: Add new icalls for contructing locales.
9414         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
9415         * locales.h: Declare new culture info construction methods.
9416         * object.h: Add new fields used to avoid the CultureMap to
9417         MonoCultureInfo.
9418         * culture-info.h: Definition of structs used in the culture info
9419         tables.
9420         * culture-info-tables.h: Autogenerated tables that contain culture
9421         info data. This file was generated with the locale-builder tool.
9422         * appdomain.c: Incement corlib version number.
9423         
9424 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
9425
9426         * appdomain.c: (mono_runtime_init) move mono_thread_init
9427         to before mono_object_new calls so critical sections
9428         are initialized before use.
9429
9430 2004-04-07  Martin Baulig  <martin@ximian.com>
9431
9432         * icall.c
9433         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
9434         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
9435         (ves_icall_MonoGenericParam_initialize): Removed.
9436         (monogenericparam_icalls): Removed.
9437         (generictypeparambuilder_icalls): Added new table for
9438         System.Reflection.Emit.GenericTypeParameterBuilder.
9439
9440         * reflection.c
9441         (mono_reflection_define_generic_parameter): Removed.
9442         (mono_reflection_initialize_generic_parameter): This is now called
9443         from GenericTypeParameterBuilder's .ctor.
9444
9445 2004-04-06  Martin Baulig  <martin@ximian.com>
9446
9447         * class.c (mono_class_init): Don't inflate nested classes in a
9448         generic instance.
9449         (mono_type_get_name_recurse): Include the generic arguments for
9450         generic instances and generic type declarations.
9451         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
9452         (_mono_class_get_instantiation_name): Removed.
9453         (mono_class_create_generic): Always use `gklass->name' as our name.
9454
9455         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
9456
9457         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
9458         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
9459         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
9460         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
9461         closed generic methods here.
9462
9463         * reflection.c
9464         (mono_reflection_generic_inst_get_nested_types): Removed.
9465         (inflate_mono_method): Copy the generic parameters from the
9466         MonoMethodHeader into out MonoGenericMethod.
9467
9468 2004-04-06  Martin Baulig  <martin@ximian.com>
9469
9470         * row-indexes.h
9471         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
9472
9473         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
9474
9475         * reflection.c (build_compressed_metadata): If we have any entries
9476         in the GenericParam, MethodSpec or GenericParamConstraint tables,
9477         set the header version to 1.1.
9478
9479 2004-04-06  Martin Baulig  <martin@ximian.com>
9480
9481         * class.c (mono_class_init): If we're a generic instance,
9482         initialize our nested classes, too.
9483         (_mono_class_get_instantiation_name): Deal with the new `!%d'
9484         suffix. 
9485
9486 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9487
9488         * process.c: quote the argument passed to the shell on windows.
9489
9490 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
9491
9492         * threads.c (mono_alloc_special_static_data): Allow this to be
9493         called during startup.
9494
9495 2004-04-02  Martin Baulig  <martin@ximian.com>
9496
9497         * icall.c
9498         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
9499
9500 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
9501
9502         * icall.c: Fix build.
9503
9504 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
9505
9506         * Makefile.am: Added security.c|h.
9507         * icall.c: Added icall for get_UserName;
9508         * security.c: New file for security related icalls. Added function
9509         get_UserName for System.Environment (fix #56144).
9510         * security.h: New. Header file for security.c
9511
9512 2004-04-02  Dick Porter  <dick@ximian.com>
9513
9514         * icall.c: Deleted the icalls that were obsoleted some time ago
9515         by the ICU string code, and which were mixed into the icall
9516         rearranging.  Fixes bug 55969.
9517
9518         * string-icalls.h: 
9519         * string-icalls.c: Deleted the code that those icalls reference.
9520
9521 2004-04-01  Martin Baulig  <martin@ximian.com>
9522
9523         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
9524
9525         * class.c (mono_class_from_generic_parameter): Don't set 
9526         TYPE_ATTRIBUTE_INTERFACE.
9527         (my_mono_class_from_generic_parameter): Likewise.
9528
9529 2004-04-01  Martin Baulig  <martin@ximian.com>
9530
9531         * loader.c (find_method): Added an optional `MonoClass *ic'
9532         argument to search in a specific interface.
9533         (mono_get_method_constrained): New public function.
9534
9535 2004-04-01  Martin Baulig  <martin@ximian.com>
9536
9537         * reflection.c (mono_image_get_generic_field_token): Use the
9538         `handleref' cache here.
9539
9540 2004-04-01  Martin Baulig  <martin@ximian.com>
9541
9542         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
9543
9544         * reflection.c (create_generic_typespec): Use the `typespec' hash
9545         here, not the `typeref' one.    
9546
9547 2004-04-01  Martin Baulig  <martin@ximian.com>
9548
9549         * class.c (mono_class_inflate_generic_type): Moved the
9550         functionality into a new static inflate_generic_type() which
9551         returns NULL if it didn't do anything.  Only increment the
9552         `mono_stats.inflated_type_count' if we actually inflated
9553         something.
9554         (mono_class_get_full): Check the classes type to see whether we
9555         need to inflate it; also inflate MONO_TYPE_(M)VAR.
9556
9557 2004-04-01  Jackson Harper  <jackson@ximian.com>
9558
9559         * reflection.c: Set culture for assembly references.
9560         
9561 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
9562
9563         * reflection.[ch], icall.[ch], Fix support for pinning variables.
9564
9565 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9566
9567         * assembly.c:
9568         (do_mono_assembly_open): the critical section also covers
9569         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
9570
9571 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9572
9573         * threads.c:
9574         (mono_manage_threads): abort the background threads when finishing.
9575         Fixes bug #47232.
9576
9577 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9578
9579         * gc.c: only close the done_event handle if there was no timeout.
9580         C-ified comments.
9581
9582 2004-03-30  Martin Baulig  <martin@ximian.com>
9583
9584         * icall.c (icall_entries): It's called "System.Activator", not
9585         "System.Activation".    
9586
9587 2004-03-30  Martin Baulig  <martin@ximian.com>
9588
9589         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
9590         (mono_class_create_from_typespec): Likewise.
9591
9592 2004-03-30  Martin Baulig  <martin@ximian.com>
9593
9594         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
9595         `has_ctor_constraint' and `initialized'.
9596
9597 2004-03-30  Martin Baulig  <martin@ximian.com>
9598
9599         * reflection.c (encode_new_constraint): New static function to add
9600         the constructor constraint attribute to a type parameter.
9601         (encode_constraints): Call encode_new_constraint() if necessary.
9602
9603         * reflection.h
9604         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
9605
9606         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
9607         
9608 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
9609
9610         * reflection.c, icall.c: add support for pinning variables. 
9611
9612 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
9613
9614         * marshal.c (mono_marshal_get_managed_wrapper):
9615         init bool local with zero rather than null.
9616
9617 2004-03-29  Martin Baulig  <martin@ximian.com>
9618
9619         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
9620         the "official" behavior here.
9621         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
9622
9623 2004-03-29  Martin Baulig  <martin@ximian.com>
9624
9625         * icall.c: Reflect latest API changes.
9626
9627 2004-03-29  Martin Baulig  <martin@ximian.com>
9628
9629         * loader.c (mono_get_method_from_token): Also call
9630         mono_metadata_load_generic_params () for abstract and interface
9631         methods; replace the type arguments in the method signature with
9632         the ones which are loaded from the metadata.
9633
9634 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
9635
9636         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
9637         of the lock is not the current thread. MS.NET don't do it, in spite of
9638         what the documentation says. See bug #56157.
9639
9640 2004-03-28  Martin Baulig  <martin@ximian.com>
9641
9642         * class.c (mono_class_init): Don't call init_properties() and
9643         init_events() for generic instances; set `prop->parent' when
9644         inflating properties.
9645
9646         * reflection.c (mono_generic_inst_get_object): Call
9647         `mono_class_init (ginst->klass)'.
9648         (mono_type_get_object): Only create a MonoGenericInst if your
9649         generic type is a TypeBuilder.
9650         (do_mono_reflection_bind_generic_parameters): Only set
9651         `ginst->is_dynamic' if our generic type is a TypeBuilder.
9652
9653 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
9654
9655         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
9656         Fixes #56091.
9657
9658 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9659
9660         * icall.c: added Kill_internal icall.
9661         * process.[ch]: added Kill_internal icall.
9662
9663 2004-03-25  Martin Baulig  <martin@ximian.com>
9664
9665         * class.h (MonoStats): Added `generic_instance_count',
9666         `inflated_method_count', `inflated_type_count' and
9667         `generics_metadata_size'.       
9668
9669 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9670
9671         * reflection.c: no warnings now.
9672
9673 2004-03-25  Martin Baulig  <martin@ximian.com>
9674
9675         * class.c (mono_class_get_full): New public function; does a
9676         mono_class_get(), but also takes a `MonoGenericContext *'.
9677
9678         * loader.c (mono_field_from_memberref): Renamed to
9679         `field_from_memberref', made static and added `MonoGenericContext *'
9680         argument.
9681         (mono_field_from_token): Added `MonoGenericInst *' argument.
9682         (method_from_memberef): Likewise.
9683         (mono_get_method_from_token): Likewise.
9684         (mono_get_method_full): New public function; does a
9685         mono_get_method(), but also takes a `MonoGenericContext *'.
9686
9687         * verify.c (mono_method_verify): Get the method's generic context
9688         and pass it to mono_field_from_token(), mono_get_method_full() and
9689         mono_class_get_full().
9690
9691 2004-03-25  Martin Baulig  <martin@ximian.com>
9692
9693         * class.c (mono_class_inflate_generic_type): Take a
9694         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
9695         `MonoGenericMethod *'.
9696
9697 2004-03-25  Martin Baulig  <martin@ximian.com>
9698
9699         * loader.h (MonoMethodInflated): Store the MonoGenericContext
9700         instead of the MonoGenericMethod here.
9701
9702 2004-03-25  Martin Baulig  <martin@ximian.com>
9703
9704         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
9705         each time we create a new MonoGenericInst, we also create a new
9706         context which points back to us.
9707
9708         * class.c (inflate_method): Use `ginst->context' instead of
9709         creating a new context.
9710
9711         * loader.c (method_from_memberref): Use
9712         `klass->generic_inst->context' instead of creating a new context.
9713
9714 2004-03-25  Martin Baulig  <martin@ximian.com>
9715
9716         * class.h (MonoGenericContext): New struct.
9717         (MonoGenericMethod): Removed `generic_inst'.
9718
9719         * class.c (mono_class_inflate_generic_method): Take a
9720         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
9721
9722 2004-03-25  Martin Baulig  <martin@ximian.com>
9723
9724         * loader.h (MonoMethodInflated): New typedef.
9725
9726         * metadata.h (MonoMethodSignature): Removed `gen_method', make
9727         `generic_param_count' consume just 30 bits, added `is_inflated'
9728         and `has_type_parameters' flags (one bit each).
9729
9730         * class.c (mono_class_inflate_generic_method): Create a
9731         MonoMethodInflated instead of a MonoMethodNormal and set
9732         `is_inflated' in the method signature.
9733
9734         * class.h (MonoGenericMethod): Removed `generic_method'.
9735
9736 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
9737
9738         * image.c: Make sure the name of a MonoImage is always an absolute path.
9739           This fixes bug #54415.
9740
9741 2004-03-24  Martin Baulig  <martin@ximian.com>
9742
9743         * class.c (mono_class_setup_vtable): If we're a generic instance,
9744         use our generic type's vtable size.
9745
9746 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
9747
9748         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
9749         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
9750         problems.
9751
9752 2004-03-23  Martin Baulig  <martin@ximian.com>
9753
9754         * class.h (MonoDynamicGenericInst): Added `int count_events' and
9755         `MonoEvent *events'.
9756
9757         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
9758         (typebuilder_icalls): Added "get_event_info"; calls
9759         mono_reflection_event_builder_get_event_info(). 
9760
9761         * reflection.c (mono_reflection_generic_inst_initialize): Added
9762         `MonoArray *events'.
9763         (mono_reflection_event_builder_get_event_info): New function.
9764
9765 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
9766
9767         * object.h: add mono_type_initialization_init
9768
9769         * object.c (mono_runtime_class_init): 
9770         implement class constructor synchronization rules
9771         to cope with threading issues.  
9772         add mono_type_initialization_init
9773
9774         * appdomain.c (mono_runtime_init): call 
9775         mono_type_initialization_init
9776
9777         * class.h: removing initializing field from MonoVTable
9778
9779 2004-03-23  Martin Baulig  <martin@ximian.com>
9780
9781         * class.c (my_mono_class_from_generic_parameter): Use
9782         `param->name' if it's not NULL. 
9783
9784 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
9785
9786         * class.c: do not insert non-virtual methods in the vtable.
9787         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
9788         that means the method is non-virtual. This never would have
9789         happened before.
9790
9791 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
9792
9793         * profiler.c: Added lock for accessing coverage_hash.
9794
9795 2004-03-22  Martin Baulig  <martin@ximian.com>
9796
9797         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
9798         `method->method->signature->generic_param_count != 0' to make it
9799         work for interface methods.
9800
9801 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9802
9803         * process.c: quote the string passed to the shell using g_shell_quote.
9804
9805 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9806
9807         * threads.c:
9808         (mono_threads_manage): don't remove the finalizer thread and self
9809         from the threads hash table so that mono_thread_manage can be called
9810         more than once.
9811
9812 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9813
9814         * process.c: quote the arguments when UseShellExecute is true. Fixes
9815         bug #55790.
9816
9817 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9818
9819         * threads.c: set mono_thread_detach as a cleanup routine for every
9820         thread. This way it's always executed upon thread termination, either
9821         aborted or finished normally. No more xsp hangs!
9822
9823 2004-03-17  Martin Baulig  <martin@ximian.com>
9824
9825         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
9826         `int count_nested' and a `MonoType **nested'.
9827
9828         * reflection.c (mono_reflection_bind_generic_parameters): Moved
9829         most of the functionality into a new static
9830         do_mono_reflection_bind_generic_parameters() and don't take a
9831         `MonoType *nested_in' argument any more.  Don't compute nested
9832         types here.
9833         (mono_reflection_generic_inst_get_nested_types): New public method
9834         to get nested types.
9835
9836         * class.c (mono_class_create_generic): Set `klass->nested_in' if
9837         we're a nested class.
9838
9839         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
9840         mono_reflection_generic_inst_get_nested_types() to compute the
9841         nested types.
9842
9843 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
9844
9845         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
9846         descriptive error message under windows.
9847         
9848 2004-03-17  Martin Baulig  <martin@ximian.com>
9849
9850         * class.c (dup_type): Added `const MonoType *original' argument;
9851         copy the attrs from the original type.
9852
9853 2004-03-17  Martin Baulig  <martin@ximian.com>
9854
9855         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
9856         `m->generic_inst_cache' here.
9857
9858 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
9859
9860         * exception.h exception.c: Add stack_overflow_exception.
9861
9862 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9863
9864         * threadpool.c:
9865         (overlapped_callback): call SetEvent *after* invoking the callback.
9866         No need to call CloseHandle.
9867
9868 2004-03-16  Martin Baulig  <martin@ximian.com>
9869
9870         * reflection.c (mono_image_get_fieldref_token): Take a
9871         `MonoReflectionField *' instead of a `MonoClassField *' and a
9872         `MonoClass *'; store the `MonoReflectionField *' in the hash.
9873
9874 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9875
9876         * appdomain.c: don't add the culture to the filename we're looking for
9877         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
9878
9879 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9880
9881         * locales.c: don't ignore symbols when doing case insensitive compares.
9882         Thanks Dick! Fixes bug #54046.
9883
9884         * threads.c: surround 'threads' usage with enter/leave in
9885         mono_thread_manage.
9886
9887 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
9888
9889         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
9890         implicitly marshalled as [Out]. Fixes #55450.
9891
9892         (mono_marshal_get_runtime_invoke): Zero out the result if there is
9893         an exception.
9894
9895 2004-03-16  Martin Baulig  <martin@ximian.com>
9896
9897         * class.c (mono_class_from_generic_parameter): Use the actual
9898         parameter name. 
9899
9900 2004-03-16  Martin Baulig  <martin@ximian.com>
9901
9902         * reflection.c (type_get_signature_size): New static function.
9903         Compues the size of the type in a method signature.
9904         (method_get_signature_size): New static function; calls
9905         type_get_signature_size() to compute the actual size of the
9906         method's signature.
9907         (method_encode_signature): Use method_get_signature_size() to get
9908         the signature's size rather than using `nparams * 10'.
9909
9910 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9911
9912         * file-io.h: define here WapiOverlapped on windows. I don't want the
9913         regular OVERLAPPED one.
9914
9915         * file-io.c:
9916         * threadpool.c: somehow, BindIoCompletionCallback is not found.
9917         Disabling AIO on windows.
9918
9919 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9920
9921         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
9922         bug #55385.
9923
9924 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9925
9926         * appdomain.c: upgraded corlib version.
9927
9928         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
9929         and BeginWrite. Allow opening files for asynchrnous operations.
9930
9931         * file-io.h: new struct that maps FileStreamAsyncResult.
9932         * icall.c: added new icalls.
9933         * process.[ch]: support setting child process environment variables
9934         and use the SHELL or COMSPEC when UseShellExecute is true.
9935
9936         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
9937         callback for async. IO is here and also BindHandle.
9938
9939         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
9940         from here.
9941
9942 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
9943
9944         * reflection.c (create_custom_attr): Allow len == 0.
9945
9946         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
9947         computation on big-endian machines.
9948
9949 2004-03-13  Martin Baulig  <martin@ximian.com>
9950
9951         * class.h (MonoGenericInst): Added `int count_ifaces'.
9952
9953         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
9954         `ginst->count_ifaces' instead `klass->interface_count' since we
9955         may get called before the vtable is created.
9956
9957         * loader.c (mono_method_get_param_names): If we're a generic
9958         instance, return and don't initialize the class.
9959
9960         * reflection.c (mono_reflection_setup_generic_class): Don't call
9961         ensure_runtime_vtable().
9962         (mono_reflection_bind_generic_parameters): Set
9963         `ginst->count_ifaces'.
9964
9965 2004-03-11  Jackson Harper <jackson@ximian.com>
9966
9967         * icall.c:
9968         * unicode.c:
9969         * unicode.h: Remove unused System.Char icalls.
9970         
9971 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
9972
9973         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
9974         code when we P/Invoke the first library in Windows.Forms, instead
9975         of when we first open the assembly.
9976
9977         * assembly.c: Drop the lookup from here.
9978
9979 2004-03-10  Martin Baulig  <martin@ximian.com>
9980
9981         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
9982         class for properties, fields and events.  Finally fixes #54945.
9983
9984 2004-03-10  Martin Baulig  <martin@ximian.com>
9985
9986         * metadata.c (mono_metadata_class_equal): New static function;
9987         checks whether two generic instances or two generic parameters are
9988         equal.
9989         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
9990         compare classes.        
9991
9992 2004-03-10  Martin Baulig  <martin@ximian.com>
9993
9994         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
9995
9996         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
9997         argument and write it into the `reflection_info' field.
9998
9999         * icall.c
10000         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
10001         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
10002
10003 2004-03-09  Jackson Harper  <jackson@ximian.com>
10004
10005         * char-conversions.h: use 8 bits for numeric data its all we need
10006         * icall.c: numeric data is only 8 bits now.
10007
10008 2004-03-09  Martin Baulig  <martin@ximian.com>
10009
10010         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
10011
10012         * class.c (init_properties, init_events): Initialize the new
10013         `parent' field.
10014
10015         * reflection.c (typebuilder_setup_properties): Likewise.
10016         (typebuilder_setup_events): Likewise.
10017
10018         * reflection.h (MonoEventInfo): Replaced `parent with
10019         `declaring_type' and `reflected_type'.
10020
10021         * icall.c (ves_icall_get_property_info): Distinguish between
10022         declaring and reflected type.
10023         (ves_icall_get_event_info): Likewise.
10024
10025 2004-03-09  Martin Baulig  <martin@ximian.com>
10026
10027         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
10028         (ves_icall_Type_GetField): Correctly set field->klass.
10029
10030 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
10031
10032         * loader.h: Fix warning.
10033
10034 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
10035
10036         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
10037         library routine if present.  Notice that it will still continue
10038         executing even if its missing, for those working on the Gtk#
10039         edition of Windows.Forms.
10040
10041         * assembly.c (do_mono_assembly_open): If loading the
10042         System.Windows.Forms call mono_loader_wini_init.
10043
10044 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
10045
10046         * class.h: Added MonoRemoteClass struct.
10047         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
10048         function for MonoStrings.
10049         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
10050         Added internal call for getting the proxy type.
10051         * marshal.c: Get the type of transparent proxies from its remote_class.
10052         Added methods that generate the IL for type checks and casts:
10053         mono_marshal_get_isinst, mono_marshal_get_castclass, 
10054         mono_marshal_get_proxy_cancast.
10055         * marshal.h: Declaration of the previous new methods.
10056         * object.c: Added new moethods for creating and updating MonoRemoteClass
10057         instances: mono_remote_class, mono_upgrade_remote_class, 
10058         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
10059         * verify.c: FIx transparent_proxy_fields layout.
10060         * appdomain.c: Bump corlib version.
10061
10062 2004-03-04  Jackson Harper  <jackson@ximian.com>
10063
10064         * icall.c: Add icall to access char conversion tables.
10065         * char-conversions.h: Character conversion tables.
10066         * Makefile.am: Add char-conversions.h private header file.
10067         
10068 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
10069
10070         * appdomain.c (unload_thread_main): Increase unloading timeout to
10071         10 sec as a temporary workaround for Nant problems.
10072
10073 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
10074
10075         * gc.c: Add checks for GC_enable and GC_disable.
10076
10077         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
10078         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
10079         (bug #54988).
10080         
10081 2004-02-27  Martin Baulig  <martin@ximian.com>
10082
10083         * reflection.c (mono_reflection_bind_generic_parameters): Take a
10084         `MonoReflectionType *' instead of a `MonoType *'.
10085
10086 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
10087
10088         * gc.c (run_finalize): Avoid finalizing the object representing the
10089         finalizer thread.
10090         (finalizer_thread): Fix warning.
10091
10092 2004-02-25  Martin Baulig  <martin@ximian.com>
10093
10094         * class.c (_mono_class_get_instantiation_name): Added `int offset'
10095         argument for nested types.
10096         (mono_class_create_generic): Added support for nested generictypes.
10097
10098         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
10099         `GList *nested'.
10100
10101         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
10102
10103         * reflection.c (method_encode_signature): Increase the minimum
10104         value of `size' from 10 to 11.
10105         (mono_reflection_bind_generic_parameters): Take `int type_argc'
10106         and `MonoType **types' arguments instead of the `MonoArray
10107         *types'; added `MonoType *nested_in'.  Recursively instantiate
10108         nested classes. 
10109
10110 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
10111
10112         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
10113         stack_overflow_ex members which are used by exception handling.
10114
10115         * appdomain.c (mono_runtime_init): Initialize the new members.
10116
10117         * gc.c (mono_gc_enable): New helper function.
10118         * gc.c (mono_gc_disable): New helper function.
10119
10120 2004-02-23  Martin Baulig  <martin@ximian.com>
10121
10122         * icall.c: I must have been really stupid - make it actually work
10123         this time ;-)
10124
10125 2004-02-23  Martin Baulig  <martin@ximian.com>
10126
10127         * loader.c (method_from_memberref): Only inflate the method if
10128         it's in another klass.
10129
10130 2004-02-23  Martin Baulig  <martin@ximian.com>
10131
10132         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
10133         (mono_class_init): If we're a generic instance and an interface,
10134         compute `class->interface_id'; also create `class->interfaces'
10135         here and inflate them.
10136
10137         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
10138         `ginst->is_open'.
10139         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
10140
10141         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
10142
10143 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
10144
10145         * reflection.c (method_encode_code): Improved the error message
10146         generated by the exception.
10147
10148 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10149
10150         * icall.c: Martin did not do what he said in the ChangeLog for
10151         2004-02-18, but put back the changes for properties and events.
10152         Commenting those changes out again and adding comment to bug #54518.
10153         
10154         * process.c: removed warning.
10155
10156 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
10157
10158         * marshal.c (emit_struct_conv): Print an error message instead of
10159         asserting when a type does not have the StructLayout attribute.
10160
10161 2004-02-20  Martin Baulig  <martin@ximian.com>
10162
10163         * reflection.c (mono_type_get_object): Also use the cache for
10164         generic instances.
10165         (mono_reflection_bind_generic_parameters): Always compute
10166         `ginst->ifaces'.        
10167
10168 2004-02-20  Martin Baulig  <martin@ximian.com>
10169
10170         * class.h (MonoGenericMethod): Removed `klass'.
10171
10172         * class.c (mono_class_inflate_generic_method): Added `MonoClass
10173         *klass' argument.
10174
10175 2004-02-20  Martin Baulig  <martin@ximian.com>
10176
10177         * reflection.c (method_encode_methodspec): Actually use the
10178         uninflated signature for the memberref.
10179
10180 2004-02-20  Martin Baulig  <martin@ximian.com>
10181
10182         * class.h (MonoGenericMethod): Removed `declaring'.
10183
10184         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
10185         is NULL, compute it here.
10186
10187 2004-02-20  Martin Baulig  <martin@ximian.com>
10188
10189         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
10190
10191         * metadata.c (mono_metadata_generic_inst_hash): New method.
10192         (mono_metadata_generic_inst_equal): New method.
10193
10194         * reflection.c (mono_reflection_bind_generic_parameters): Use the
10195         `klass->image->generic_inst_cache' cache to avoid creating
10196         duplicate MonoGenericInst's.
10197
10198         * class.c (mono_class_inflate_generic_type): Use the cache.
10199
10200 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
10201
10202         * object.c: fixed gc descriptor calculation for embedded valuetypes.
10203
10204 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10205
10206         * icall.c: added Socket.WSAIoctl icall.
10207
10208         * socket-io.[ch]: implemented
10209         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
10210
10211 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
10212
10213         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
10214
10215 2004-02-18  Urs C Muff  <umuff@quark.com>
10216
10217         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
10218         this work on PPC and other big-endian architectures.
10219
10220         * debug-mono-symfile.h: Prepended the names of all the `guint32'
10221         fields with an underscore to make sure they're only accessed by
10222         the read32() macro.
10223
10224 2004-02-18  Martin Baulig  <martin@ximian.com>
10225
10226         * icall.c: Put the klass->refclass changes back for methods and
10227         fields, but not for properties and events.  We're currently not
10228         distinguishing between DeclaringType and ReflectedType for
10229         properties and events, that's what caused the regressions.
10230
10231 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10232
10233         * object.c:
10234         (mono_async_result_new): the handle can be NULL.
10235
10236         * threadpool.c: Use an event instead of a semaphore, don't initialize
10237         it until needed. This saves quite a few semaphores from being created
10238         when using the threadpool.
10239
10240 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
10241
10242         * object.c (mono_string_is_interned_lookup): Fix interning of long
10243         strings. Fixes #54473.
10244
10245         * domain.c (ldstr_equal): Optimize if the two strings are equal.
10246
10247         * icall.c: Revert the klass->refclass changes since they introduce
10248         regressions (bug #54518).
10249
10250 2004-02-18  Martin Baulig  <martin@ximian.com>
10251
10252         * class.c (mono_class_init): If we're a generic instance and don't
10253         come from a TypeBuilder, inflate our members here.
10254         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
10255         (mono_class_create_generic): New public method.
10256         (mono_class_initialize_generic): Removed.
10257         (get_instantiation_name): Renamed to
10258         _mono_class_get_instantiation_name() and made it public.
10259
10260 2004-02-18  Martin Baulig  <martin@ximian.com>
10261
10262         * class.c (mono_class_inflate_generic_type): Clear the new
10263         instance's `nginst->klass' when inflating a generic instance.
10264         (mono_class_is_subclass_of): Added (basic) support for generic
10265         instances.
10266
10267 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
10268
10269         * appdomain.h, domain.c: use a MonoCodeManager instead of a
10270         MonoMempool to hold compiled native code.
10271
10272 2004-02-17  Martin Baulig  <martin@ximian.com>
10273
10274         * class.h (MonoDynamicGenericInst): Added `count_properties' and
10275         `properties'.
10276
10277         * reflection.c (mono_reflection_generic_inst_initialize): Added
10278         `MonoArray *properties' argument.
10279
10280         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
10281
10282 2004-02-17  Martin Baulig  <martin@ximian.com>
10283
10284         * icall.c (ves_icall_Type_GetFields): Renamed to
10285         ves_icall_Type_GetFields_internal() and added a
10286         `MonoReflectionType *rtype' argument; pass it to
10287         mono_field_get_object() to set the field's "reflected" type.
10288         (ves_icall_Type_GetConstructors): Likewise.
10289         (ves_icall_Type_GetEvents): Likewise.
10290         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
10291         argument; pass it to mono_method_get_object() to set the method's
10292         "reflected" type.       
10293
10294 2004-02-17  Martin Baulig  <martin@ximian.com>
10295
10296         * class.h (MonoDynamicGenericInst): New type.
10297         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
10298
10299         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
10300         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
10301         (ves_icall_MonoGenericInst_GetFields): New interncall.
10302
10303         * class.c (mono_class_from_generic): Don't call
10304         mono_class_initialize_generic() if this is a dynamic instance;
10305         ie. it's being created from a TypeBuilder.
10306         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
10307         `class->byval_arg.type'.
10308
10309         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
10310         to `inflate_method' and made static.
10311         (mono_reflection_inflate_field): Removed.
10312         (mono_reflection_generic_inst_initialize): New public method.
10313
10314         * reflection.h (MonoReflectionGenericInst): Removed `methods',
10315         `ctors' and `fields'; added `initialized'.
10316
10317 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
10318
10319         * debug-helpers.c (mono_method_full_name): Fix output for empty
10320         namespaces.
10321
10322 2004-02-12  Martin Baulig  <martin@ximian.com>
10323
10324         * class.h (MonoClassField): Added `MonoType *generic_type'.
10325
10326         * reflection.c (mono_image_get_fieldref_token): Added support for
10327         instantiated generic types.
10328         (field_encode_inflated_field): Removed.
10329         (mono_image_get_inflated_field_token): Removed.
10330         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
10331
10332         * reflection.h (MonoReflectionInflatedField): Removed.
10333
10334 2004-02-12  Martin Baulig  <martin@ximian.com>
10335
10336         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
10337         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
10338
10339         * reflection.c (mono_image_get_methodspec_token): Take a
10340         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
10341         (mono_image_create_token): Check whether we have a
10342         `method->signature->gen_method' and call
10343         mono_image_get_methodspec_token() if appropriate.
10344         (inflated_method_get_object): Removed.
10345         (mono_reflection_bind_generic_method_parameters): Return a
10346         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
10347         (mono_reflection_inflate_method_or_ctor): Likewise.
10348
10349         * reflection.h (MonoReflectionInflatedMethod): Removed.
10350
10351 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
10352
10353         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
10354         for custom valuetype marshalling.
10355
10356         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
10357
10358 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10359
10360         * icall.c: fixed WSAGetLastError_internal name.
10361
10362 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
10363
10364         * threads.c (mono_thread_attach): Allow this to be called multiple
10365         times for a thread.
10366         
10367         * threads.c (build_wait_tids): Do not wait for ourselves.
10368
10369         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
10370         appdomain list is empty.
10371
10372         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
10373         memory returned by mono_string_builder_to_utf16, since it points into
10374         managed memory. Thanks to Bernie Solomon for noticing this.
10375
10376         * icall.c: Add AppDomainSetup icalls.
10377
10378         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
10379
10380         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
10381         types.
10382
10383         * reflection.c (reflection_methodbuilder_to_mono_method): Save
10384         custom attributes to the method_aux struct. Also fix array indexes etc.
10385
10386         * loader.c (mono_method_get_param_names): Make dynamic case work again.
10387         
10388 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
10389
10390         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
10391         (both static and runtime) and reduce startup time.
10392
10393 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
10394
10395         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
10396         AsAny marshalling conversion instead of crashing.
10397
10398         * marshal.c: Fix warnings.
10399
10400 2004-02-09  Martin Baulig  <martin@ximian.com>
10401
10402         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
10403
10404         * reflection.h (MonoReflectionInflatedMethod): Removed the
10405         `declaring' field, it's now in the unmanaged MonoGenericMethod.
10406
10407         * reflection.c (method_encode_methodspec): Removed the `method'
10408         argument; we get it from `gmethod->declaring'.
10409         (inflated_method_get_object): Removed the `declaring' argument.
10410
10411 2004-02-09  Martin Baulig  <martin@ximian.com>
10412
10413         * class.h (MonoGenericMethod): New type.
10414         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
10415         `generic_method'.
10416
10417         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
10418         a `MonoGenericMethod *gen_method' one.
10419
10420         * class.c (mono_class_inflate_generic_type): Take an additional
10421         `MonoGenericMethod * argument.  This is only non-NULL if we're
10422         inflating types for a generic method.   
10423         (mono_class_inflate_generic_signature): Renamed to
10424         inflate_generic_signature() and made static; take a
10425         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
10426         (inflate_generic_header): Take a `MonoGenericMethod *' argument
10427         instead of a `MonoGenericInst *' one.
10428         (mono_class_inflate_generic_method): Likewise.
10429
10430         * reflection.c (encode_generic_method_sig): Take a
10431         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
10432         (method_encode_methodspec): Likewise.
10433         (inflated_method_get_object): Likewise. 
10434
10435         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
10436         field with a `MonoGenericMethod *gmethod' one.  
10437
10438 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
10439
10440         * class.h (mono_class_has_parent): add parens to expansion
10441         so you can ! this.
10442
10443 2004-02-08  Martin Baulig  <martin@ximian.com>
10444
10445         * image.h (MonoImage): Removed `generics_cache'.
10446
10447         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
10448         instead of a `MonoType *' argument; removed the `inflate_methods'
10449         argument.  Don't inflate methods here.
10450
10451         * loader.c (find_method): If it's a generic instance, call
10452         mono_class_init() on the `sclass->generic_inst->generic_type'.
10453
10454         * metadata.c (mono_type_size): Make this work on uninitialized
10455         generic instances; call it on the `ginst->generic_type's class.
10456
10457         * reflection.c (mono_reflection_bind_generic_parameters): Call
10458         mono_class_from_generic() to create the `ginst->klass'.
10459
10460 2004-02-08  Martin Baulig  <martin@ximian.com>
10461
10462         * class.h (MonoClass): Changed type of `generic_inst' from
10463         `MonoType *' to `MonoGenericInst *'.
10464
10465 2004-02-08  Martin Baulig  <martin@ximian.com>
10466
10467         * icall.c (ves_icall_Type_BindGenericParameters): Just call
10468         mono_type_get_object(), this is now creating a `MonoGenericInst'
10469         for MONO_TYPE_GENERICINST.
10470         (ves_icall_MonoGenericInst_GetParentType): Likewise.
10471         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
10472
10473         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
10474         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
10475         (inflated_method_get_object): Added `MonoClass *refclass' argument.
10476         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
10477         and reflected type.
10478
10479         * reflection.h (MonoReflectionInflatedMethod): Removed
10480         `declaring_type' and `reflected_type'.
10481
10482 2004-02-08  Martin Baulig  <martin@ximian.com>
10483
10484         * class.h (MonoGenericInst): Added `MonoType *parent' and
10485         `MonoType **ifaces'.
10486
10487         * reflection.h (MonoReflectionGenericInst): Removed `klass',
10488         `parent' and `interfaces'.
10489
10490         * reflection.c (mono_reflection_bind_generic_parameters): Take a
10491         `MonoType *' argument and return a `MonoType *'.
10492
10493         * icall.c
10494         (ves_icall_MonoGenericInst_GetParentType): New interncall.
10495         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
10496
10497 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
10498
10499         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
10500         valuetype marshalling.
10501
10502 2004-02-06  Martin Baulig  <martin@ximian.com>
10503
10504         * class.c
10505         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
10506         (my_mono_class_from_generic_parameter): Likewise.
10507
10508 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
10509
10510         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
10511         contents of the symbol files lazily.
10512
10513         * object.h (MonoThread): Add 'name' and 'name_len' fields.
10514
10515         * threads.h threads.c icall.c: New icalls for getting and setting the
10516         threads name.
10517
10518 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
10519
10520         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
10521         Raise an exception when the domain is not found.
10522
10523 2004-02-03  Martin Baulig  <martin@ximian.com>
10524
10525         * reflection.c (mono_image_get_methodspec_token): Use the
10526         uninflated signature; fixes gen-33.
10527
10528 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
10529
10530         * gc.c threads.c: Make the finalizer thread a normal managed thread so
10531         the finalizer code can use thread functionality.
10532
10533         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
10534         the finalizer thread.
10535
10536         * threads.c: Make some functions more robust.
10537
10538         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
10539
10540         * metadata.h: Add new marshalling conventions.
10541
10542         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
10543         stringbuilder marshalling. Fixes #53700.
10544
10545         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
10546
10547         * reflection.c (mono_image_get_type_info): Save declarative security
10548         info.
10549
10550         * reflection.c (mono_image_get_field_info): Handle uninitialized 
10551         unmanaged fields as well.
10552
10553         * appdomain.c: Bump corlib version.
10554
10555 2004-02-01  Martin Baulig  <martin@ximian.com>
10556
10557         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
10558         method type arguments.  
10559
10560 2004-01-30  Duncan Mak  <duncan@ximian.com>
10561
10562         * marshal.h: Add prototype for
10563         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
10564         and
10565         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
10566         fix the build.
10567
10568 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
10569
10570         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
10571         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
10572
10573 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
10574
10575         * marshal.c (mono_marshal_get_native_wrapper): Add support for
10576         custom marshalling of valuetypes.
10577
10578         * marshal.c: Fix some warnings.
10579
10580 2004-01-29  Martin Baulig  <martin@ximian.com>
10581
10582         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
10583         for generic method parameters.
10584
10585         * reflection.c (method_encode_methodspec): Write the uninflated
10586         signature into the methodspec table.
10587         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
10588         is always the uninflated method.
10589         (reflection_methodbuilder_to_mono_method): Copy the generic
10590         parameters from the MethodBuilder into `header->gen_params'.
10591
10592 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
10593
10594         * class.c (mono_class_from_generic_parameter): Fix warning.
10595
10596 2004-01-27  Martin Baulig  <martin@ximian.com>
10597
10598         * class.c (mono_class_from_generic_parameter): Don't create
10599         `klass->methods' here.  
10600
10601 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
10602
10603         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
10604         extension since it does not work with libraries named lib<FOO>.dll.so.
10605
10606 2004-01-25  Martin Baulig  <martin@ximian.com>
10607
10608         * class.c (mono_class_inflate_generic_type): Added support for
10609         MONO_TYPE_GENERICINST.
10610
10611         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
10612         inflate methods on open constructed types.      
10613
10614 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10615
10616         * object.c: fire ProcessExit event in the root AppDomain after running
10617         Main. Fixes bug #53299.
10618
10619 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
10620
10621         * socket-io.c: include the new socket-wrappers.h header.
10622         Use the wrappers instead of the unix socket functions to make the code
10623         more clear.
10624
10625 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
10626
10627         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
10628
10629         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
10630         Fixes #22532.
10631
10632 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
10633
10634         * reflection.c (mono_image_create_pefile): Handle the case when the
10635         entry point is not a MethodBuilder.
10636
10637         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
10638         field to ReflectionMethod since it is not allways a builder.
10639
10640         * reflection.c (type_get_fully_qualified_name): New helper function to
10641         return the fully qualified name of a type.
10642
10643         * reflection.c (encode_marshal_blob): Always emit the fully qualified
10644         type name for custom marshallers.
10645
10646         * reflection.c (mono_marshal_spec_from_builder): Ditto.
10647
10648         * class.c (mono_class_setup_vtable): If a parent class already 
10649         implements an interface, use the implementing methods from that class.
10650         Fixes #53148.
10651
10652 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10653
10654         * threadpool.c: just return instead of ExitThread to allow for thread
10655         clean up earlier.
10656
10657 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
10658
10659         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
10660         when closing resource modules.
10661
10662         * reflection.c (mono_image_create_pefile): Handle the case when the
10663         entry point is not a MethodBuilder.
10664
10665         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
10666         field to ReflectionMethod since it is not allways a builder.
10667
10668 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
10669
10670         * marshal.c (mono_marshal_get_managed_wrapper): 
10671         mono_marshal_alloc takes native int so CONV_I
10672         the arg for 64bits.
10673
10674 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
10675
10676         * reflection.c (fixup_cattrs): New function to fixup the methoddef
10677         tokens in the cattr table. Fixes #53108.
10678
10679 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10680
10681         * loader.c: don't trim ".dll" before looking up in the config file.
10682         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
10683
10684 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
10685
10686         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
10687         Return the module which contains the resource as well.
10688         (ves_icall_System_Reflection_Module_Close): New icall.
10689
10690         * appdomain.c: Bump corlib version number.
10691
10692         * image.c (mono_image_addref): New public function.
10693
10694         * assembly.c: Call mono_image_addref.
10695
10696         * reflection.c (mono_module_get_object): Increase reference count of 
10697         the image.
10698
10699         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
10700         Fixes #22532.
10701
10702         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
10703         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
10704         proper exceptions on DllImport problems.
10705
10706 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
10707
10708         * class.c, metadata.c: eliminate CSIZE macro.
10709
10710 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
10711
10712         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
10713         * object.h: Added async_callback field in MonoAsyncResult.
10714         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
10715         * verify.c: Added async_callback in MonoAsyncResult layout.
10716
10717 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
10718
10719         * reflection.c (mono_reflection_get_custom_attrs): Add support
10720         for Modules.
10721
10722 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
10723
10724         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
10725         marshalling.
10726         (mono_marshal_method_from_wrapper): Add null pointer check.
10727
10728 2004-01-16  Martin Baulig  <martin@ximian.com>
10729
10730         * debug-mono-symfile.h: Set version number to 36 and reflect
10731         latest symbol writer changes.
10732
10733 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
10734
10735         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
10736         multi-dimensional arrays.
10737         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
10738         (mono_class_from_mono_type): Use bounded_array_class_get.
10739         
10740         * class.c (mono_bounded_array_class_get): New function which takes
10741         a 'bounded' bool argument to distinguish vectors from one dimensional
10742         arrays.
10743
10744         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
10745         bounded_array_class_get if the array has bounds.
10746
10747         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
10748         Search modules loaded using AssemblyBuilder:AddModule as well.
10749
10750 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10751
10752         * appdomain.c: increased corlib version.
10753         * filewatcher.c: removed g_print.
10754         * icall.c:
10755         (get_property_info): only allocate what is actually requested.
10756         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
10757
10758 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10759
10760         * Makefile.am: added filewatcher.[ch]
10761         * filewatcher.[ch]: FileSystemWatcher runtime support.
10762         * icall.c: added new FSW icalls.
10763
10764 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
10765
10766         * string-icalls.c: fix stringbuilder regression as suggested by
10767         Iain McCoy <iain@mccoy.id.au>.
10768
10769 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
10770
10771         * process.c (process_read_stringtable_block): Recognize '007f' as
10772         a language neutral stringtable block.
10773
10774 2004-01-12  Patrik Torstensson
10775
10776         * object.h (MonoStringBuilder) : Changed layout to support our
10777         new stringbuilder class.
10778         * marshal.c: Change marshalling to support the new layout of 
10779         string builder.
10780         * appdomain.c: increased version number because new layout of
10781         string builder.
10782
10783 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
10784
10785         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
10786         assembly name as an string instead of an AssemblyName, since it is
10787         easier to extract info from it.
10788
10789         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
10790         the culture subdirectories too. Fixes #52231.
10791
10792 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10793
10794         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
10795         It takes 2 new parameters with an optional name for the method to look
10796         for and case ignoring info.
10797
10798         * threadpool.c: removed unused variable.
10799
10800 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10801
10802         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
10803         It takes 2 new parameters with an optional name for the property to look
10804         for and case ignoring info.
10805         Fixes bug #52753.
10806
10807 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
10808
10809         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
10810         Fix #52451.
10811
10812 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10813
10814         * appdomain.c:
10815         * assembly.c: escape the uri before passing it to g_filename_from_uri.
10816         Fixes bug #52630.
10817
10818 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
10819
10820         * reflection.c: Add support for more than one unmanaged resource.
10821
10822         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
10823         in field->def_value, as done in all other cases.
10824
10825         * reflection.c (mono_reflection_get_custom_attrs): Add support for
10826         TypeBuilders.
10827
10828         * reflection.c (mono_reflection_create_runtime_class): Remove 
10829         errorneous assignment to klass->element_class, since it is already
10830         done in mono_reflection_setup_internal_class.
10831
10832 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10833
10834         * gc.c: added missing LeaveCriticalSection.
10835         * icall.c: indented a couple of lines.
10836         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
10837         if we call EndInvoke inside a callback. Fixes bug #52601.
10838
10839 2004-01-07  Martin Baulig  <martin@ximian.com>
10840
10841         * mono-debug-debugger.h
10842         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
10843
10844 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
10845
10846         * appdomain.c: Use messages in NotImplementedException.
10847
10848         * exception.c (mono_get_exception_not_implemented): Now this takes
10849         a message argument.
10850
10851         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
10852         exception instead of g_asserting an aborting when something is not
10853         implemented.
10854
10855         Add some inline docs.
10856
10857 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
10858
10859         * reflection.h: Update after changes to object layout.
10860
10861         * reflection.c: Implement saving of unmanaged aka win32 resources.
10862
10863         * appdomain.c: Bump version number.
10864
10865         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
10866         Handle missing domains gracefully.
10867
10868 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
10869
10870         * file-io.c : On Windows, there are much more invalid_path_chars.
10871
10872 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
10873
10874         * class.h, object.c: prepare for GetType () speedup.
10875
10876 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
10877
10878         * profiler.c: workaround for --profile null reference exception on
10879           cygwin. Patch by Patrik Torstensson.
10880
10881 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
10882
10883         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
10884         make work for unaligned access.
10885
10886 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
10887
10888         * class.c: small cleanup (class->fields [i] -> field).
10889         * image.c: check address of metadata is valid.
10890
10891 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
10892
10893         * assembly.h assembly.c (mono_assembly_loaded): New public function to
10894         search the list of loaded assemblies.
10895
10896         * reflection.c (mono_reflection_type_from_name): Use 
10897         mono_assembly_loaded instead of mono_image_loaded.
10898
10899         * reflection.c: Fix warnings.
10900
10901 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
10902
10903         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
10904         is dynamic. This is needed since an assembly can contain both dynamic and
10905         non-dynamic images.
10906
10907         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
10908         assembly->dynamic.
10909
10910         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
10911
10912         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
10913         to store modules loaded using AddModule.
10914
10915         * reflection.c (mono_image_fill_file_table): Generalize this so it works
10916         on Modules.
10917
10918         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
10919
10920         * reflection.c (mono_image_fill_export_table_from_module): New function to
10921         fill out the EXPORTEDTYPES table from a module.
10922
10923         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
10924         into a separate function. Also handle loaded non-dynamic modules.
10925
10926         * reflection.c (mono_image_basic_init): Fix memory allocation.
10927
10928         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10929
10930         * assembly.c (mono_assembly_load_references): Make this public.
10931
10932 2003-12-19  Martin Baulig  <martin@ximian.com>
10933
10934         * class.c (mono_class_initialize_generic): Made this static, take
10935         a `MonoGenericInst *' instead of a `MonoClass *'.
10936         (mono_class_from_generic): Call mono_class_initialize_generic()
10937         unless we're already initialized or being called from
10938         do_mono_metadata_parse_generic_inst().
10939
10940         * class.h (MonoGenericInst): Added `initialized' and
10941         `init_pending' flags.
10942
10943         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
10944         `mono_class_init (gklass)' or mono_class_initialize_generic()
10945         here; set `generic_inst->init_pending' while parsing the
10946         `type_argv'.
10947
10948 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
10949
10950         * locales.c: include string.h for memxxx prototypes
10951
10952 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
10953
10954         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
10955         constructor when accessing literal fields.
10956
10957 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
10958
10959         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10960
10961         * reflection.c (assembly_add_resource_manifest): New function to fill
10962         the MANIFESTRESOURCE table.
10963
10964         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
10965
10966         * reflection.h: Update to changes in class layout.
10967
10968         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
10969         Reenable call to mono_runtime_is_shutting_down ().
10970
10971         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
10972         determine if the runtime is shutting down.
10973
10974 2003-12-16  Jackson Harper <jackson@ximian.com>
10975
10976         * icall.c: comment out call to mono_runtime_is_shutting_down to
10977         fix build.
10978         
10979 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
10980
10981         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
10982         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
10983
10984 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
10985
10986         * reflection.c: move definition of swap_with_size
10987         to before its first call
10988
10989 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
10990
10991         * appdomain.c (mono_runtime_is_shutting_down): New public function.
10992
10993         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
10994         icall.
10995
10996         * object.c: Fix warnings.
10997
10998         * icall.c (ves_icall_Type_Get...): Only consider inherited static
10999         members if FlattenHierarchy is set.
11000
11001         * reflection.c (mono_image_add_decl_security): New function to emit
11002         declarative security.
11003
11004         * reflection.h reflection.c: Add support for declarative security.
11005
11006         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11007         
11008 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
11009
11010         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11011         
11012         * appdomain.c verify.c: Moved corlib version checking into its own
11013         function in appdomain.c since it needs to create vtables etc.
11014
11015 2003-12-13  Patrik Torstensson <p@rxc.se>
11016
11017         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
11018         instead of unwrapped server.
11019
11020 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
11021
11022         * verify.c (check_corlib): Fix field index.
11023
11024 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
11025
11026         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
11027         GetGacPath icall.
11028
11029 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
11030
11031         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
11032         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
11033         cope with sizeof(size_t) != sizeof(guint32).
11034
11035 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11036
11037         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
11038         in case of failure.
11039
11040 2003-12-10  Mark Crichton <crichton@gimp.org>
11041
11042         * icall.c: removed the GetNonZeroBytes.  We now handle this case
11043         in managed code.
11044
11045         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
11046
11047 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
11048
11049         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
11050         marked as deleted.
11051
11052 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
11053
11054         * verify.c (check_corlib): Handle the case when the version field is 
11055         initialized by a static constructor.
11056
11057 2003-12-08  Patrik Torstensson  <p@rxc.se>
11058
11059     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
11060
11061 2003-12-08  Martin Baulig  <martin@ximian.com>
11062
11063         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
11064         a MonoReflectionGenericParameter, also take the parameter index
11065         and name as arguments.
11066         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
11067         (ves_icall_MonoGenericParam_initialize): New interncall.
11068         (ves_icall_Type_make_byref_type): New interncall.
11069
11070         * reflection.h (MonoReflectionGenericParam): Derive from
11071         MonoReflectionType, not just from MonoObject.  Added `refobj' and
11072         `index' fields.
11073
11074         * reflection.c (mono_reflection_define_generic_parameter): Create
11075         and return a new MonoReflectionGenericParam; don't initialize the
11076         constraints here.
11077         (mono_reflection_initialize_generic_parameter): New public method;
11078         initializes the constraints and creates the `param->pklass'.
11079
11080 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
11081
11082         * reflection.h reflection.c: Use the new fields 'num_types', 
11083         'num_fields' and 'num_methods' to track the number of types etc.
11084
11085         * verify.c (check_corlib): Check corlib version number.
11086
11087 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
11088
11089         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
11090         function works on all methods.
11091
11092 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
11093
11094         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
11095         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
11096         the custom_type_info flag of the transparent proxy.
11097         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
11098         objects that supports IRemotingTypeInfo.
11099         * object.h: Added custom_type_info field in transparent proxy.
11100
11101 2003-12-06  Martin Baulig  <martin@ximian.com>
11102
11103         * class.c (mono_class_create_from_generic): Removed.
11104         (mono_class_from_generic): Check `ginst->klass' before doing
11105         anything else.  This is important to fully support "recursive"
11106         generic types.
11107
11108         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
11109         empty `generic_inst->klass' before doing anything else.
11110
11111 2003-12-06  Dick Porter  <dick@ximian.com>
11112
11113         * verify.c: 
11114         * object.h:
11115         * icall.c:
11116         * locales.c: Use C structs to access class fields.  Don't do a
11117         conversion between MonoString and UChar because both are
11118         platform-endian UTF-16.  Compare now takes startindex and count
11119         parameters.  Add a char overload for IndexOf.  Speed up the
11120         invariant string IndexOf.
11121
11122 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
11123
11124         * Makefile.am (monosn_LDADD): Fix parallel build.
11125
11126 2003-12-04  Martin Baulig  <martin@ximian.com>
11127
11128         * icall.c
11129         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11130         (ves_icall_Type_make_array_type): New interncall.       
11131
11132 2003-12-04  Martin Baulig  <martin@ximian.com>
11133
11134         * locales.c: also change it in the !HAVE_ICU case.
11135
11136 2003-12-04  Dick Porter  <dick@ximian.com>
11137
11138         * icall.c:
11139         * locales.c: construct_compareinfo is now in CompareInfo, not
11140         CultureInfo.
11141
11142 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
11143
11144         * image.c (mono_image_load_file_for_image): Cache loaded images in the
11145         image->files array.
11146
11147         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
11148         table as well.
11149
11150         * assembly.c (mono_assembly_load_references): Only load references
11151         once.
11152
11153         * class.c (mono_class_from_name): Avoid linear search of the 
11154         EXPORTEDTYPE table.
11155
11156         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
11157
11158 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
11159
11160         * image.h (MonoImage): Add 'field_cache' field.
11161
11162         * loader.c (mono_field_from_token): Cache field lookups.
11163         
11164         * reflection.c (mono_module_get_object): Fix name property.
11165
11166         * icall.c (ves_icall_get_enum_info): Update after changes to 
11167         mono_metadata_get_constant_index ().
11168
11169         * icall.c: Get rid of get_type_info icall, use a separate icall for
11170         each type property to avoid needless memory allocations. Fixes #51514.
11171
11172         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
11173         to avoid needless binary searches.
11174
11175         * class.c (class_compute_field_layout): Move the initialization of
11176         field->def_value to mono_class_vtable ().
11177
11178         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
11179         non-corlib types.
11180
11181         * object.c (mono_object_allocate): Make it inline.
11182
11183         * object.c (mono_object_allocate_spec): Make it inline.
11184         
11185 2003-12-02  Dick Porter  <dick@ximian.com>
11186
11187         * locales.c (create_NumberFormat): NumberFormatInfo construction.
11188         Patch by Mohammad DAMT (mdamt@cdl2000.com).
11189
11190 2003-12-01  Dick Porter  <dick@ximian.com>
11191
11192         * threads.c: Fix signature and call in CreateMutex and
11193         CreateEvent.
11194
11195 2003-12-01  Dick Porter  <dick@ximian.com>
11196
11197         * icall.c: 
11198         * locales.c: Implement string compares and searching
11199
11200         * object.h: Add extra Thread field
11201
11202 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
11203
11204         * reflection.c (fixup_method): Add support for MonoCMethod.
11205
11206 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
11207
11208         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
11209
11210         * reflection.c (assembly_name_to_aname): Allow extra characters in
11211         assembly names. Fixes #51468.
11212
11213 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
11214
11215         * exception.c (mono_exception_from_name_domain): New helper function.
11216
11217         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
11218         exception object in the correct domain.
11219
11220         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
11221         formatting + make a copy a the input data.
11222
11223         * loader.c (mono_get_method_from_token): Methods which contain
11224         native code do not have entries in the ImplMap.
11225
11226         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
11227         Thanks to Gonzalo for spotting this.
11228         
11229         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
11230         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
11231
11232         * assembly.h (mono_assembly_load_from): Split the second part of 
11233         assembly loading into a new public function.
11234
11235         * exception.h (mono_get_exception_bad_image_format): New function.
11236
11237 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
11238
11239         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
11240         Enumerate all modules inside a dynamic assembly. Fixes #51293.
11241         
11242         * icall.c: Add new icall for creating dynamic methods.
11243
11244         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
11245
11246         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
11247
11248         * reflection.c (mono_reflection_create_dynamic_method): New icall to
11249         create a dynamic method.
11250
11251         * reflection.c (resolve_object): New helper function.
11252
11253         * reflection.c: Generalize ReflectionMethodBuilder and the functions
11254         which manipulate it so they can also work on dynamic methods.
11255
11256         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
11257         creating the MonoReflectionMethodAux structure if it is not needed.
11258         
11259         * reflection.h verify.c: Update after changes to object layout.
11260
11261         * reflection.c (method_builder_encode_signature): Fix compilation on
11262         gcc 2.95.x.
11263
11264 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
11265
11266         * appdomain.h: Added support for context static fields. Added static_data
11267           field to MonoAppContext and renamed thread_static_fields to a more
11268           generic special_static_fields in MonoAppDomain, since it can now contain
11269           context static fields.
11270         * domain.c: Updated hashtable name.
11271         * object.c: Replaced field_is_thread_static() for a more generic
11272           field_is_special_static() which also checks for context static attribute.
11273           In mono_class_vtable(), added support for static context fields.
11274         * threads.c: Changed methods that manage thread static fields to more
11275           generic methods so they can be reused both for thread and context static
11276           data.
11277         * threads.h: Declared some new methods.
11278
11279 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
11280
11281         * reflection.h: Update after changes to the managed types.
11282
11283         * reflection.c (encode_custom_modifiers): New helper function.
11284
11285         * reflection.c (method_encode_signature): Emit custom modifiers.
11286
11287         * reflection.c (field_encode_signature): Emit custom modifiers.
11288
11289 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
11290
11291         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
11292
11293         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
11294         implementation.
11295
11296         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
11297         icall.
11298
11299         * object.c (mono_field_get_value_object): New function.
11300
11301         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
11302         specific.
11303
11304 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
11305
11306         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
11307         return a preallocated out-of-memory exception instance.
11308
11309         * object.c (out_of_memory): Use the new function.
11310
11311         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
11312         flag is before the custom modifiers. Fixes #49802.
11313
11314 2003-11-16  Martin Baulig  <martin@ximian.com>
11315
11316         * class.c (mono_class_is_open_constructed_type): Implemented the
11317         MONO_TYPE_GENERICINST case.
11318
11319 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
11320
11321         * assembly.c (mono_assembly_fill_assembly_name): New function to
11322         fill out the MonoAssemblyName structure.
11323         (mono_assembly_open): Use the new function.
11324
11325         * icall.c (fill_reflection_assembly_name): New helper function.
11326
11327         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
11328         new function.
11329
11330         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
11331
11332 2003-11-15  Martin Baulig  <martin@ximian.com>
11333
11334         * class.c (mono_class_is_open_constructed_type): New public
11335         function; checks whether a type is an open constructed type,
11336         ie. whether it still contains type parameters.
11337         (mono_class_inflate_generic_type): If we're a type parameter and
11338         the inflated type is also a MONO_TYPE_(M)VAR, return the original
11339         type.
11340
11341         * class.h (MonoGenericInst): Added `guint32 is_open'.
11342
11343         * loader.c (method_from_methodspec): Check whether we're an open
11344         or closed constructed type and set `ginst->is_open'.
11345
11346         * reflection.c (mono_reflection_bind_generic_parameters): Check
11347         whether we're an open or closed constructed type and set
11348         `ginst->is_open'.
11349         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
11350         from open constructed types.
11351
11352 2003-11-15  Martin Baulig  <martin@ximian.com>
11353
11354         * reflection.c (mono_reflection_bind_generic_parameters): If we're
11355         a generic instance (instead of a generic type declaration) with
11356         unbound generic parameters, bind them to our actual types.
11357
11358 2003-11-14  Martin Baulig  <martin@ximian.com>
11359
11360         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
11361
11362         * reflection.c (mono_reflection_bind_generic_parameters): If we're
11363         an interface type, populate `res->interfaces' with instantiated
11364         versions of all the interfaces we inherit.
11365
11366 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
11367
11368         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
11369         when MONO_PATH is set but doesn't contain the install dir.
11370
11371 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11372
11373         * icall.c:
11374         (ves_icall_Type_GetInterfaces): don't return an interface twice when
11375         it's also implemented in base classes. Fixes bug #50927.
11376
11377 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
11378
11379         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
11380         if this method is called from a finalizer. Fixes #50913.
11381
11382 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
11383
11384         * threads.c: Implement VolatileRead/VolatileWrite
11385
11386         * icall.c: Add new icalls for VolatileRead/VolatileWrite
11387
11388 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
11389
11390         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
11391         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
11392         2.95.3.
11393
11394         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
11395         from Peter Ross (pro@missioncriticalit.com).
11396         
11397 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
11398
11399         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
11400
11401 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
11402
11403         * assembly.c (mono_assembly_load_references): Disable check because it
11404         triggers on older corlibs which lots of people have.
11405
11406 2003-11-12  Jackson Harper  <jackson@ximian.com>
11407
11408         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
11409         load corlib.dll if mscorlib.dll is not found.
11410         * assembly.h: Remove corlib name define.
11411         * class.c:
11412         * domain.c:
11413         * image.c: Change corlib name to mscorlib.
11414         
11415 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
11416
11417         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
11418
11419 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
11420
11421         * appdomain.h: Added loader_optimization here to sync with the C#
11422         code, and add disallow_binding_redirects field.
11423
11424 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
11425
11426         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
11427
11428         * reflection.c (mono_image_build_metadata): Fix crash on modules
11429         with no types.
11430
11431         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
11432
11433         * icall.c (ves_icall_get_method_info): Return callingConvention as
11434         well.
11435
11436         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
11437         namespaces from the EXPORTEDTYPE table as well.
11438
11439         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
11440         from all modules inside the assembly.
11441         
11442 2003-11-11  Martin Baulig  <martin@ximian.com>
11443
11444         * reflection.c (mono_reflection_bind_generic_parameters): Make
11445         this work for interfaces.
11446
11447 2003-11-11  Martin Baulig  <martin@ximian.com>
11448
11449         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
11450
11451 2003-11-11  Martin Baulig  <martin@ximian.com>
11452
11453         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
11454         "MonoInflatedMethod" and "MonoInflatedCtor".
11455
11456 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
11457
11458         * reflection.c (resolution_scope_from_image): Use the assembly table
11459         from the manifest module, since other modules don't have it.
11460
11461         * debug-helpers.c (mono_type_full_name): New helper function.
11462
11463         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
11464
11465         * image.c (mono_image_load_file_for_image): New public function which
11466         is a replacement for the load_file_for_image in class.c.
11467
11468         * assembly.c (mono_assembly_load_module): A wrapper for the function
11469         above which does assembly association and reference loading too.
11470
11471         * class.c (mono_class_from_name): Call mono_assembly_load_module.
11472
11473 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11474
11475         * appdomain.c: not all of the attributes for the full assembly name
11476         are required and the order doesn't matter. Fixes bug #50787.
11477
11478 2003-11-10  Dick Porter  <dick@ximian.com>
11479
11480         * locales.c: Use platform-endian UTF16
11481
11482 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
11483
11484         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
11485         
11486 2003-11-10  Martin Baulig  <martin@ximian.com>
11487
11488         * metadata.c
11489         (mono_metadata_load_generic_params): Make this actually work.
11490
11491         * reflection.c (mono_reflection_bind_generic_parameters): If our
11492         parent is a generic instance, pass all the `types' to it, no
11493         matter whether it has the same number of type parameters or not.
11494
11495 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
11496
11497         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
11498
11499         * assembly.c (mono_assembly_load_references): Move the image<->assembly
11500         assignment code to this function so it gets called recursively for all
11501         modules.
11502
11503         * image.c (load_modules): Remove the assembly assignment since it is
11504         now done by mono_assembly_load_references.
11505         
11506         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
11507         Add 'module' argument.
11508         (mono_module_get_types): New helper function.
11509         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
11510
11511 2003-11-08  Martin Baulig  <martin@ximian.com>
11512
11513         * class.c (mono_class_inflate_generic_method): Interface method
11514         don't have a header.
11515
11516         * reflection.c (mono_image_get_methodspec_token): Take an
11517         additional `MonoGenericInst *' argument instead of reading it from
11518         the header; this is necessary to support interfaces.
11519         (mono_image_create_token): Pass the `MonoGenericInst *' from the
11520         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
11521         (inflated_method_get_object): Take an additional `MonoGenericInst *'
11522         argument.
11523
11524         * reflection.h (MonoReflectionInflatedMethod): Added
11525         `MonoGenericInst *ginst'.
11526
11527 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
11528
11529         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
11530
11531 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
11532
11533         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
11534
11535 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
11536
11537         * reflection.c 
11538         (reflection_methodbuilder_from_method_builder):
11539         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
11540         initialize a ReflectionMethodBuilder structure.
11541         (mono_image_get_methodbuilder_token):
11542         (mono_image_get_ctorbuilder_token): New functions to emit memberref
11543         tokens which point to types in another module inside the same assembly.
11544
11545         * reflection.c: Use the new helper functions.
11546         
11547         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
11548
11549         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
11550         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
11551
11552         * reflection.c (resolution_scope_from_image): Emit a moduleref if
11553         neccesary.
11554
11555         * reflection.c (mono_image_build_metadata): Emit metadata only for the
11556         current module. Emit the manifest only for the main module.
11557
11558         * reflection.c (mono_image_create_token): Add assertion when a 
11559         memberref needs to be created.
11560
11561         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
11562
11563         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
11564         larger buffer for the custom attribute blob. Fixes #50637.
11565         
11566 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11567
11568         * threadpool.c: notify listener on async processing handles after
11569         invoking the async callback. Thanks to Zoltan.
11570
11571 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
11572
11573         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
11574         avoid code duplication.
11575
11576         * reflection.h (MonoDynamicImage): New type which is currently unused,
11577         but will be used through the ref.emit code in place of 
11578         MonoDynamicAssembly.
11579
11580         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
11581         object layout.
11582
11583         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
11584         a MonoDynamicImage instead of just a MonoImage.
11585         
11586         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
11587         icalls to ModuleBuilder but keep their semantics, so they will work
11588         with moduleb->assemblyb. This will change later.
11589         
11590 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
11591
11592         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
11593         object layout.
11594
11595         * reflection.c (mono_image_build_metadata): Avoid creation of a default
11596         main module, since it is now done by the managed code.
11597
11598 2003-11-03  Martin Baulig  <martin@ximian.com>
11599
11600         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
11601         `ginst->klass' here.
11602         (method_encode_methodspec): Don't use the `ginst->generic_method's
11603         klass if it's a generic instance, use `ginst->klass' in this case.
11604
11605 2003-11-03  Martin Baulig  <martin@ximian.com>
11606
11607         * reflection.c (mono_image_get_generic_method_param_info):
11608         Removed, use mono_image_get_generic_param_info() instead.
11609         (mono_image_get_type_info): Write the GenericParam table before
11610         the Method table.  This is neccessary because in the GenericParam
11611         table, type parameters of the class (ie. '!0' etc.) must come
11612         before the ones from its generic methods (ie. '!!0' etc).
11613
11614 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
11615
11616         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
11617
11618 2003-11-02  Martin Baulig  <martin@ximian.com>
11619
11620         * reflection.c (create_generic_typespec): Take a
11621         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
11622         the generic parameters from it.
11623
11624 2003-11-02  Martin Baulig  <martin@ximian.com>
11625
11626         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
11627         instead of a `MonoClassField *' since we just need the type.
11628         (create_generic_typespec): New static function.  Creates a
11629         TypeSpec token for a generic type declaration.
11630         (mono_image_get_generic_field_token): New static function.
11631         (mono_image_create_token): If we're a FieldBuilder in a generic
11632         type declaration, call mono_image_get_generic_field_token() to get
11633         the token.
11634
11635 2003-11-02  Martin Baulig  <martin@ximian.com>
11636
11637         * reflection.h
11638         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
11639         `MonoReflectionGenericInst *declaring_type' and
11640         `MonoReflectionGenericInst *reflected_type' fields.
11641
11642         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
11643         `MonoReflectionGenericInst *declaring_type' and a
11644         `MonoReflectionGenericInst *reflected_type' argument instead of a
11645         single `MonoReflectionGenericInst *type' one.  Set
11646         `res->declaring_type' and `res->reflected_type' from them.
11647         (mono_reflection_inflate_field): Likewise.      
11648
11649 2003-11-02  Martin Baulig  <martin@ximian.com>
11650
11651         * class.c (mono_class_setup_vtable): Don't store generic methods
11652         in the vtable.  
11653
11654 2003-11-02  Martin Baulig  <martin@ximian.com>
11655
11656         * reflection.h (MonoReflectionGenericInst): Added
11657         `MonoReflectionType *declaring_type'.
11658
11659         * reflection.c (mono_reflection_bind_generic_parameters): Use
11660         `if (tb->parent)' instead of `klass->parent'.
11661
11662 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
11663
11664         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
11665         with an empty ASSEMBLY table.
11666
11667         * reflection.c (mono_image_build_metadata): Avoid using the same loop
11668         variable in the inner and outer loops.
11669
11670 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
11671
11672         * metadata.h (mono_metadata_make_token): Put parentheses around macro
11673         argument.
11674
11675         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
11676         
11677         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
11678         icalls. Instead, do everything in managed code. This is needed since
11679         it is hard to restore the original domain etc. in unmanaged code in the
11680         presence of undeniable exceptions.
11681
11682         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
11683         New icalls to push and pop appdomain refs.
11684
11685 2003-10-31  Martin Baulig  <martin@ximian.com>
11686
11687         * class.c (inflate_generic_type): Renamed to
11688         mono_class_inflate_generic_type() and made it public.
11689
11690         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
11691         New interncall.
11692
11693         * loader.c (mono_field_from_memberref): Also set the retklass for
11694         typespecs.
11695
11696         * fielder.c (mono_image_get_inflated_field_token): New static
11697         method; creates a metadata token for an inflated field.
11698         (mono_image_create_token, fixup_method): Added support for
11699         "MonoInflatedField".
11700         (fieldbuilder_to_mono_class_field): New static function.
11701         (mono_reflection_inflate_field): New public function.
11702
11703         * reflection.h
11704         (MonoReflectionGenericInst): Added `MonoArray *fields'.
11705         (MonoReflectionInflatedField): New typedef.     
11706
11707 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
11708
11709         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
11710         for Solaris and other platforms without s6_addr16
11711
11712 2003-10-30  Martin Baulig  <martin@ximian.com>
11713
11714         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
11715         argument instead of two.
11716         (mono_class_inflate_generic_signature): Likewise.
11717         (inflate_generic_header): Likewise.
11718         (mono_class_inflate_generic_method): Likewise.  In addition, if
11719         `ginst->klass' is set, it becomes the new `method->klass'.
11720
11721         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
11722         field.
11723
11724         * reflection.c (encode_generic_method_sig): Write a 0xa as the
11725         first byte. [FIXME]
11726         (method_encode_methodspec): If we have generic parameters, create
11727         a MethodSpec instead of a MethodRef.
11728         (fixup_method): Added support for "MonoInflatedMethod" and
11729         "MonoInflatedCtor".
11730         (mono_image_create_token): Added support for "MonoInflatedMethod"
11731         and "MonoInflatedCtor".
11732         (inflated_method_get_object): New static function; returns a
11733         managed "System.Reflection.MonoInflatedMethod" object.
11734         (mono_reflection_bind_generic_method_parameters): Return a
11735         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
11736         (mono_reflection_inflate_method_or_ctor): Likewise.
11737         (mono_image_get_generic_method_param_info): Initialize unused
11738         fields to zero.
11739         (mono_image_get_generic_param_info): Likewise.
11740
11741         * reflection.h (MonoReflectionInflatedMethod): New public
11742         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
11743         "S.R.MonoInflatedCtor" classes.
11744
11745         * loader.c (method_from_memberref): If we're a TypeSpec and it
11746         resolves to a generic instance, inflate the method.
11747
11748 2003-10-28  Dick Porter  <dick@ximian.com>
11749
11750         * object.c (mono_runtime_run_main): Convert command-line arguments
11751         into utf8, falling back to the user's locale encoding to do so.
11752
11753 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
11754
11755         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
11756         at this time.
11757
11758         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
11759
11760         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
11761         up icalls at method definition time. Partially fixes #33569.
11762
11763 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
11764
11765         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
11766         marshalling of arrays. Fixes #50116.
11767
11768         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
11769
11770         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
11771         points to a vtable in the dying appdomain.
11772
11773         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
11774         listeners into unmanaged code inside the lock.
11775
11776         * object.c (mono_class_vtable): Turn off typed allocation in non-root
11777         domains and add some comments.
11778
11779 2003-10-25  Martin Baulig  <martin@ximian.com>
11780
11781         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
11782
11783         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
11784
11785         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
11786         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
11787         currently parsing.  Create the generic class and store it in
11788         `generic_inst->klass' before parsing the type arguments.  This is
11789         required to support "recursive" definitions; see mcs/tests/gen-23.cs
11790         for an example.
11791         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
11792         to support recursive typespec entries.
11793
11794         * class.c (mono_class_setup_parent): If our parent is a generic
11795         instance, we may get called before it has its name set.
11796         (mono_class_from_generic): Splitted into
11797         mono_class_create_from_generic() and mono_class_initialize_generic().
11798
11799 2003-10-25  Martin Baulig  <martin@ximian.com>
11800
11801         * icall.c (ves_icall_Type_BindGenericParameters): Return a
11802         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
11803         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
11804         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
11805
11806         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
11807         (create_typespec): Likewise.
11808         (mono_reflection_bind_generic_parameters): Return a
11809         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
11810         (mono_reflection_inflate_method_or_ctor): New public function.
11811
11812         * reflection.h (MonoReflectionGenericInst): New typedef.        
11813
11814 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
11815
11816         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
11817         inside the domain lock. Fixes #49993.
11818         
11819         * object.c (mono_class_vtable): When typed allocation is used, 
11820         allocate vtables in the GC heap instead of in the mempool, since the
11821         vtables contain GC descriptors which are used by the collector even
11822         after the domain owning the mempool is unloaded.
11823
11824         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
11825
11826         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
11827         reflect what it does. Also invalidate mempools instead of freeing
11828         them if a define is set.
11829
11830         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
11831         of the appdomain.
11832         
11833         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
11834         hold the finalizable objects in this domain.
11835
11836         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
11837         appdomain.
11838
11839         * appdomain.c (mono_domain_set): New function to set the current
11840         appdomain, but only if it is not being unloaded.
11841
11842         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
11843         appdomain which is being unloaded.
11844         
11845         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
11846         unloading of the root appdomain.
11847
11848         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
11849         icall to execute a method in another appdomain. Intended as a 
11850         replacement for InternalSetDomain, which can confuse the code 
11851         generation in the JIT.
11852
11853         * appdomain.c (mono_domain_is_unloading): New function to determine
11854         whenever an appdomain is unloading.
11855
11856         * appdomain.c (mono_domain_unload): New function to correctly unload
11857         an appdomain.
11858
11859         * assembly.c (mono_assembly_load_references): Check that an assembly
11860         does not references itself.
11861
11862         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
11863         domain manually, it asks the finalizer thread to do it, then waits for
11864         the result. Also added a timeout.
11865
11866         * icall.c: Register the new icalls.
11867
11868         * threads.h threads.c: Export the mono_gc_stop_world and 
11869         mono_gc_start_world functions.
11870         
11871         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
11872         function to fill out the mempool with 0x2a.
11873
11874 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
11875
11876         * reflection.h (MonoReflectionMethodAux): New structure to store
11877         information which is rarely used, thus is not in the MonoMethod
11878         structure.
11879
11880         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
11881         store the aux info.
11882
11883         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
11884         and marshalling info into the aux structure.
11885
11886         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
11887         from the aux structure.
11888
11889         * loader.c (mono_method_get_param_names): Retrieve the param names from
11890         the aux structure.
11891         
11892 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
11893
11894         * exception.h exception.c: Add AppDomainUnloadedException && fix 
11895         warning.
11896
11897 2003-10-21  Dick Porter  <dick@ximian.com>
11898
11899         * socket-io.c
11900         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
11901         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
11902
11903 2003-10-21  Martin Baulig  <martin@ximian.com>
11904
11905         * reflection.c (mono_reflection_bind_generic_parameters):
11906         `klass->parent' is NULL for interfaces.
11907
11908 2003-10-21  Martin Baulig  <martin@ximian.com>
11909
11910         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11911
11912 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
11913
11914         * exception.c (mono_exception_from_name_msg): New helper function for
11915         creating exceptions and initializing their message field.
11916
11917         * exception.c: Simplify functions using the new helper.
11918
11919         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
11920         New function.
11921
11922         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
11923         mono_raise_exception, since otherwise gcc doesn't generate the function
11924         epilog for raise_exception, confusing the stack unwinding in the JIT.
11925         Fixes #45043.
11926
11927         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
11928         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
11929         Fixes #49499.
11930
11931 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11932
11933         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
11934         utf8.
11935
11936 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
11937
11938         * icall.c: Removed GetUninitializedObject method because
11939           AllocateUninitializedClassInstance does the same.
11940
11941 2003-10-18  Martin Baulig  <martin@ximian.com>
11942
11943         * class.c (inflate_generic_signature): Renamed to
11944         mono_class_inflate_generic_signature() and made it public.
11945         (my_mono_class_from_generic_parameter): New static function; if we
11946         don't already have the generic parameter's MonoClass, create a
11947         very simple one which is just used internally in the runtime and
11948         not passed back to managed code.
11949
11950         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
11951
11952         * metadata.h (MonoMethodSignature): Moved the
11953         `MonoGenericParam *gen_params' to the MonoMethodHeader.
11954         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
11955
11956         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
11957         ves_icall_MonoMethod_GetGenericArguments(); this is now an
11958         interncall on the MonoMethod class, not on MethodInfo.
11959         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
11960         calling mono_reflection_bind_generic_method_parameters() directly.
11961
11962         * loader.c (mono_method_get_signature): If this is a MethodSpec;
11963         return the already computed `method->signature'.
11964         (method_from_methodspec): New static function to load a method
11965         from a MethodSpec entry.
11966         (mono_get_method_from_token): Call the new method_from_methodspec()
11967         for MethodSpec tokens.  
11968         (mono_get_method_from_token): If we're a generic method, load the
11969         type parameters.
11970
11971         * reflection.c (mono_image_get_memberref_token): Allow
11972         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
11973         table.
11974         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
11975         (mono_image_create_token): First check whether it's a generic
11976         method (so we'd need to create a MethodSpec), then do the other
11977         two alternatives.
11978         (mono_reflection_bind_generic_method_parameters): Return a
11979         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
11980         called directly from the interncall.
11981
11982 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
11983
11984         * reflection.c (load_public_key): Move loading of the public key
11985         into managed code.
11986
11987         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
11988
11989         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
11990         fields.
11991
11992         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
11993         culture, hash_alg and public_key. Fixes #49555.
11994
11995 2003-10-17  Martin Baulig  <martin@ximian.com>
11996
11997         * class.h (MonoGenericInst): Moved this declaration here and added
11998         `MonoMethod *generic_method'.
11999
12000         * icall.c
12001         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
12002         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
12003
12004         * metadata.c (mono_metadata_type_equal): Two types of
12005         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
12006         index; ie. don't compare the address of the `MonoGenericParam'
12007         structure.
12008         (mono_metadata_load_generic_params): Removed the `MonoMethod
12009         *method' argument.
12010
12011         * metadata.h (MonoGenericInst): Moved declaration to class.h.
12012         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
12013
12014         * reflection.c (method_encode_signature): Encode the number of
12015         generic parameters.
12016         (encode_generic_method_sig): New static function.
12017         (method_encode_methodspec): New static function; creates an entry
12018         in the MethodSpec table for a generic method.
12019         (mono_image_get_methodspec_token): New static function.
12020         (mono_image_create_token): Call mono_image_get_methodspec_token()
12021         for generic methods.
12022         (mono_reflection_bind_generic_method_parameters): New public
12023         function.  Instantiates a generic method.
12024
12025 2003-10-16  Martin Baulig  <martin@ximian.com>
12026
12027         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
12028         *gen_params' here from MonoMethodHeader.
12029
12030         * metadata.c (mono_metadata_parse_method_signature): If we have
12031         generic parameters, initialize `method->gen_params' and then set
12032         the correct `type->data.generic_param' in all the parameters.
12033
12034 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
12035
12036         * threads.c (mono_threads_get_default_stacksize): New function to 
12037         return the default stacksize.
12038
12039         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
12040         termination of the finalizer thread, since the previous method had
12041         race conditions. Fixes #49628.
12042
12043         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
12044         as for the other managed threads.
12045
12046 2003-10-16  Martin Baulig  <martin@ximian.com>
12047
12048         * class.c (inflate_generic_signature): Copy `generic_param_count'
12049         and `gen_params'.
12050
12051         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
12052         New interncall.
12053
12054         * metadata.c (mono_metadata_parse_method_signature): Actually set
12055         the `method->generic_param_count' here.
12056         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
12057
12058 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
12059
12060         * object.h: Add a new field to TypedRef to simplify the implementation
12061         of the REFANY opcodes in the JIT.
12062
12063         * icall.c: Make use of the new field.
12064
12065         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
12066         dynamically.
12067
12068 2003-10-15  Martin Baulig  <martin@ximian.com>
12069
12070         * class.c (mono_class_from_gen_param): Renamed to
12071         mono_class_from_generic_parameter() and moved most of the
12072         functionality from mono_reflection_define_generic_parameter()
12073         here; ie. we create a "real" class here.
12074         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
12075         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
12076         previously been called.
12077
12078         * class.h (MonoGenericParam): Moved the declaration of this struct
12079         here from metadata.h and added `MonoMethod *method'.
12080
12081         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
12082         interncall.
12083
12084         * loader.c (mono_get_method_from_token): If we have any generic
12085         parameters, call mono_metadata_load_generic_params() to read them
12086         from the MONO_TABLE_GENERICPAR.
12087
12088         * metadata.c (mono_metadata_load_generic_params): Added
12089         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
12090
12091         * metadata.h (MonoMethodSignature): Replaced
12092         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
12093         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
12094
12095         * reflection.c (mono_reflection_define_generic_parameter): Moved
12096         most of the functionality into the new
12097         mono_class_from_generic_parameter(); set the `method' field if
12098         we're a method parameter.       
12099
12100 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
12101
12102         * marshal.c (emit_struct_conv): if native size is 0
12103         emit no code.
12104
12105 2003-10-14  Martin Baulig  <martin@ximian.com>
12106
12107         * icall.c: The generics API has changed in the spec since it was
12108         added to System.Type; these modifications make it match the spec
12109         again.
12110         (ves_icall_Type_GetGenericParameters): Renamed to
12111         `ves_icall_Type_GetGenericArguments'.
12112         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
12113         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
12114         `ves_icall_MonoType_get_HasGenericArguments'.
12115         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
12116         `ves_icall_MonoType_get_IsGenericParameter'.
12117         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
12118         this is no interncall anymore.
12119         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
12120         `ves_icall_TypeBuilder_get_IsGenericParameter'.
12121
12122 2003-10-14  Martin Baulig  <martin@ximian.com>
12123
12124         * reflection.c (mono_reflection_bind_generic_parameters): Also
12125         inflate generic methods if we're reading the class from IL.
12126
12127 2003-10-13  Martin Baulig  <martin@ximian.com>
12128
12129         * reflection.c (mono_reflection_define_generic_parameter): This
12130         method isn't called directly from the icall anymore; take a
12131         `MonoReflectionAssemblyBuilder *' so we can use this for type and
12132         method generic parameters.
12133         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
12134         (method_builder_encode_signature): Encode generic parameters.
12135         (mono_image_get_method_info): Write generic params to the
12136         MONO_TABLE_GENERICPARAM table.
12137
12138         * reflection.h (MonoReflectionMethodBuilder): Added
12139         `MonoArray *generic_params'.
12140
12141         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
12142
12143         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
12144         wrapper for mono_reflection_define_generic_parameter().
12145         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
12146
12147 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
12148
12149         * marshal.h: Add missing function to fix build.
12150
12151         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
12152         the SetLastError pinvoke attribute.
12153
12154         * marshal.c (mono_marshal_set_last_error): New helper function called
12155         by the generated code.
12156         
12157         * marshal.c (mono_mb_emit_branch): New helper function.
12158
12159         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
12160
12161         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12162         classes as parameters and return values of delegates. Fixes #29256. 
12163
12164 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
12165
12166         * locales.c: use gint32 in non HAVE_ICU case
12167
12168 2003-10-11  Martin Baulig  <martin@ximian.com>
12169
12170         * mono-debug.c (mono_debug_add_method): Added a workaround for
12171         bug #48591.
12172
12173 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
12174
12175         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
12176         delegates passed to native code must use the STDCALL calling 
12177         convention. Fixes #35987.
12178
12179 2003-10-10  Martin Baulig  <martin@ximian.com>
12180
12181         * class.c (inflate_generic_type): If we're inflating for a generic
12182         type instance (and not for a generic method), return
12183         MONO_TYPE_MVAR unchanged.
12184
12185 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12186
12187         * string-icalls.c: Join ignores null strings in the source array.
12188         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
12189         * threads.c: GetAvailableTheads is slightly more accurate.
12190
12191 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
12192
12193         * threads.h threads.c : add mono_threads_set_default_stacksize
12194         and pass default to CreateThread calls.
12195
12196 2003-10-09  Dick Porter  <dick@ximian.com>
12197
12198         * icall.c:
12199         * locales.h:
12200         * locales.c: Internal calls for constructing CultureInfo and
12201         related objects from libicu (if its available.)
12202
12203 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
12204
12205         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
12206
12207 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12208
12209         * threadpool.c: added an argument to async_invoke_thread that is the
12210         item to process, pass the MonoAsyncResult to the thread start function
12211         when creating a new thread. This way we don't need to acquire any lock
12212         when we're creating a new thread. Readded a semaphore for faster
12213         response times (instead of that Sleep i added).
12214
12215 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
12216
12217         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
12218         get daylight change dates better on Windows, fix handling
12219         of platforms without tm_gmtoff.
12220
12221 2003-10-06  Martin Baulig  <martin@ximian.com>
12222
12223         * class.c (inflate_generic_method): Renamed to
12224         mono_class_inflate_generic_method() and made public.
12225         (mono_class_init): Don't inflate the generic methods here.
12226         (mono_class_from_generic): Added `gboolean inflate_methods'
12227         argument.  Inflate the methods here.
12228
12229         * loader.c (mono_method_get_param_names): Ignore instances of
12230         generic types for the moment.
12231
12232         * reflection.c (fixup_method): Added support for inflated methods.
12233         (mono_image_create_token): Use mono_image_get_methodref_token()
12234         for inflated methods.
12235         (mono_custom_attrs_from_param): Ignore instances of generic types
12236         for the moment.
12237         (mono_reflection_bind_generic_parameters): New public function.
12238         Moved all the functionality from
12239         ves_icall_Type_BindGenericParameters() here and added support for
12240         dynamic types.
12241         (mono_reflection_define_generic_parameter): Initialize
12242         `klass->methods' here.
12243
12244         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
12245         functionality into mono_reflection_define_generic_parameter().
12246         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
12247         TypeBuilder, return that TypeBuilder.
12248
12249 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12250
12251         * appdomain.c: removed mono_delegate_semaphore.
12252
12253         * threadpool.c:
12254         (mono_thread_pool_add): moved hash table creation inside and the thread 
12255         creation outside of the critical region.
12256         (mono_thread_pool_finish): removed obsolete code.
12257         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
12258         continue or exit the thread depending on the queue.
12259
12260 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
12261
12262         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
12263         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
12264         handle more bool marshalling options
12265
12266 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
12267
12268         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
12269         arrays of structs. Also add a more descriptive error message when
12270         a structure member is marshalled as LPArray.
12271
12272 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
12273
12274         * marshal.c (mono_marshal_get_native_wrapper): Add support for
12275         marshalling arrays of complex types. Fixes #29098. Also remove an
12276         usused and incomplete function.
12277
12278 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
12279
12280         * gc.c: report heap_size - free_bytes as total memory allocated
12281         (bug#49362).
12282
12283 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
12284
12285         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
12286         fix timezone handling problems on Windows.
12287         
12288         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
12289         asserts when the year is outside the range handled by ms the functions.
12290
12291         * class.c (setup_interface_offsets): If the class is an interface,
12292         fill out its interface_offsets slot.
12293
12294 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12295
12296         * threadpool.c: mark threadpool threads as background.
12297
12298 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
12299
12300         * decimal.c - define DECINLINE to nothing if not using GCC
12301
12302 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
12303
12304         * assembly.c: More refcount fixes.
12305
12306 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12307
12308         * string-icalls.c: if we're not trimming, return the same string.
12309         When not splitting, don't create a new string.
12310
12311 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12312
12313         * image.c:
12314         (mono_image_open): increment the ref_count inside the critical section.
12315
12316 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
12317
12318         * image.c (mono_image_open): Fix reference counting bug.
12319
12320 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
12321
12322         * marshal.c (mono_marshal_type_size) struct alignment changed for 
12323         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
12324         64bits. Avoid leak in mono_marshal_get_native_wrapper when
12325         mono_lookup_pinvoke_call throws.        
12326
12327 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
12328
12329         * reflection.c (mono_reflection_parse_type): Fix #49114.
12330
12331         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
12332         temporary workaround for cygwin header problem.
12333
12334         * object.c (mono_object_isinst): Synchronize this with the code
12335         generated by the JIT for casts.
12336
12337 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
12338
12339         * reflection.c (encode_type): Fix #38332.
12340
12341 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
12342
12343         * marshal.c (mono_marshal_method_from_wrapper): New function to return
12344         the original method from the wrapper method.
12345
12346 2003-09-25  Martin Baulig  <martin@ximian.com>
12347
12348         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
12349         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
12350         (ves_icall_Type_get_IsGenericInstance): New interncall.
12351
12352 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
12353
12354         * object.c: fix cast warning in big endian code.
12355
12356 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
12357
12358         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
12359         
12360 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12361
12362         * assembly.c: don't call check_env from mono_assembly_load. It's
12363         already done once in mono_assemblies_init and may cause headaches when
12364         multiple threads are loading assemblies.
12365
12366 2003-09-19  Martin Baulig  <martin@ximian.com>
12367
12368         * reflection.c (mono_reflection_define_generic_parameter): Don't
12369         allocate `klass->methods', set `klass->flags' to
12370         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
12371
12372 2003-09-18  Martin Baulig  <martin@ximian.com>
12373
12374         * class.c (mono_class_init): Don't create `class->methods' if it's
12375         already initialized.
12376
12377         * metadata.c (mono_metadata_load_generic_params): Make this
12378         actually work.
12379
12380         * reflection.c (mono_reflection_define_generic_parameter): Set
12381         parent class and interfaces from the constraints.
12382
12383         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
12384         to keep this struct in sync with the declaration in TypeBuilder.cs.
12385
12386 2003-09-17  Martin Baulig  <martin@ximian.com>
12387
12388         * metadata.h (MonoType): Replaced the data's `int type_param'
12389         field with `MonoGenericParam *generic_param'.
12390         (MonoGenericParam): Added `MonoClass *klass'.
12391
12392         * class.c (mono_class_from_gen_param): Removed the
12393         `MonoImage *image' and `int type_num' arguments.
12394
12395         * metadata.c (mono_metadata_parse_generic_param): New static
12396         method; creates a MonoGenericParam which just contains the index.
12397         (do_mono_metadata_parse_type): Call
12398         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
12399         MONO_TYPE_MVAR.
12400
12401         * reflection.c (mono_image_typedef_or_ref): Generic type
12402         parameters may be in the same assembly, but never use a typedef
12403         for them.
12404         (mono_reflection_define_generic_parameter): We're now creating a
12405         "real" class for the type parameter; it's now safe to call
12406         mono_class_from_mono_type() on the class'es type, it'll do the
12407         right thing.
12408
12409 2003-09-16  Martin Baulig  <martin@ximian.com>
12410
12411         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
12412         `symfile->range_entry_size' and `symfile->class_entry_size' here;
12413         the `symfile' data structure must be fully initialized before it
12414         gets added to the table.
12415
12416 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
12417
12418         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
12419
12420         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
12421         class init trampolines.
12422
12423 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
12424
12425         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
12426         to the built-in profiler to turn off time and allocation profiling
12427         respectively.
12428
12429 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
12430
12431         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
12432         g_direct_equal.
12433
12434         * debug-helpers.c (mono_method_full_name): Print the wrapper type
12435         in human readable form.
12436
12437 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
12438
12439         * reflection.c icall.c: Fixed warnings.
12440
12441         * image.c (load_class_names): Use a temporary hash table to hold the
12442         namespaces in order to avoid doing many string comparisons.
12443
12444         * image.h: Fix typo.
12445
12446         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
12447         Pass NULL instead of g_direct_equal to the GHashTable constructor 
12448         since the NULL case is short-circuited inside g_hash_table_lookup, 
12449         leading to better performance.  
12450
12451         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
12452         obtain the first custom attribute for a given index. Depends on the
12453         CustomAttribute table being sorted by the parent field.
12454
12455         * reflection.c (mono_custom_attrs_from_index): Use the new function 
12456         for better performance.
12457
12458 2003-09-07  Martin Baulig  <martin@ximian.com>
12459
12460         * class.c (mono_class_init): If we're a generic instance, inflate
12461         all our methods instead of loading them from the image.
12462         (mono_class_from_generic): Set `class->methods = gklass->methods'.
12463
12464 2003-09-07  Martin Baulig  <martin@ximian.com>
12465
12466         * mono-debug-debugger.c: Added support for constructors.
12467
12468 2003-09-06  Martin Baulig  <martin@ximian.com>
12469
12470         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
12471         New interncall.
12472
12473         * reflection.c (mono_reflection_setup_generic_class): Call
12474         ensure_runtime_vtable() to create the vtable.
12475
12476 2003-09-05  Martin Baulig  <martin@ximian.com>
12477
12478         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
12479         MONO_TYPE_MVAR.
12480
12481 2003-09-04  Martin Baulig  <martin@ximian.com>
12482
12483         * reflection.c (mono_reflection_define_generic_parameter): Generic
12484         parameters start with zero.
12485
12486 2003-09-04  Martin Baulig  <martin@ximian.com>
12487
12488         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12489
12490         * reflection.h (MonoReflectionGenericParam): New typedef.
12491         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
12492         the generic parameters from the managed TypeBuilder.
12493
12494         * reflection.c (mono_reflection_define_generic_parameter): New function.
12495         (mono_reflection_create_runtime_class): Encode generic parameters.
12496         (mono_reflection_setup_generic_class): New function; this is
12497         called after adding adding all generic params to the TypeBuilder.
12498         (encode_type): Added MONO_TYPE_VAR.
12499
12500 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
12501
12502         * class.h class.c (mono_class_needs_cctor_run): Moved this method
12503         here from the JIT.
12504
12505         * assembly.h assembly.c: Moved the AOT loading code into an assembly
12506         load hook.
12507
12508 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
12509
12510         * reflection.h reflection.c class.h class.c: Delete duplicate 
12511         definition of mono_type_get_name () from reflection.c and export the
12512         one in class.c.
12513
12514         * class.c: Class loading fixes from Bernie Solomon 
12515         (bernard@ugsolutions.com).
12516
12517         * reflection.c: Endianness fixes from Bernie Solomon 
12518         (bernard@ugsolutions.com).
12519         
12520 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
12521
12522         * assembly.h assembly.c: Define a file format version for AOT
12523         libraries.
12524         
12525         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
12526
12527         * appdomain.h (MonoJitInfo): New field to determine whenever the
12528         code is domain neutral.
12529         
12530 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
12531
12532         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
12533
12534 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
12535
12536         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
12537         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
12538         Avoid caching the result since strings must be domain specific. Fixes
12539         #48050.
12540
12541 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
12542
12543         * marshal.c (mono_marshal_init): Make this callable multiple times
12544         since it is hard to find a correct place to call it.
12545
12546         * object.c (mono_runtime_class_init): Execute static constructors in
12547         the correct appdomain.
12548
12549         * image.c (build_guid_table): Handle the case when multiple images have
12550         the same GUID.
12551
12552 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12553
12554         * icall.c: added a couple of icalls for System.Web.
12555
12556 2003-08-28  Martin Baulig  <martin@ximian.com>
12557
12558         * icall.c (ves_icall_Type_BindGenericParameters): Use
12559         `klass->generic_inst' instead of `&klass->byval_arg' in the
12560         mono_type_get_object() call.  The returned type must be
12561         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
12562
12563 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
12564
12565         * NOTES: New file.
12566
12567         * object.c (mono_class_proxy_vtable): Make it thread safe.
12568
12569         * pedump.c: Fix warning.
12570
12571         * object.c appdomain.h: Get rid of metadata_section. 
12572         It is no longer needed and it was causing deadlocks with domain->lock.
12573
12574         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
12575
12576 2003-08-26  Martin Baulig  <martin@ximian.com>
12577
12578         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
12579
12580 2003-08-26  Martin Baulig  <martin@ximian.com>
12581
12582         * pedump.c (main): Call mono_metadata_init(),
12583         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
12584         and mono_loader_init().
12585
12586 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
12587
12588         * loader.h: Add missing include to fix build.
12589
12590         * image.h: mono_image_load_references is no more.
12591
12592         * assembly.c: Reworked assembly loading to make it really thread safe.
12593         After these changes, the assembly returned by mono_assembly_open is
12594         fully initialized, i.e. all its references assemblies are loaded.
12595
12596         * assembly.c (mono_image_load_references): Renamed to 
12597         mono_assembly_load_references, and made private, since clients no
12598         longer need to call it.
12599
12600         * class.c: Removed calls to mono_assembly_load_references, since it was
12601         a source of deadlocks.
12602
12603         * loader.h loader.c class.h class.c: Protect data structures using a 
12604         new lock, the loader lock.
12605
12606         * class.c (mono_class_setup_vtable): Create temporary hash tables and
12607         GPtrArrays only when needed.
12608
12609         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
12610         into empty structures by mcs. Fixes pinvoke7.cs.
12611         
12612         * domain.c (mono_init): Call a new initialization function.
12613
12614         * appdomain.c (mono_runtime_init): Call the new initializer function
12615         of the marshal module.
12616
12617         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
12618         inserted into empty structures by mcs. Fixes pinvoke7.cs.
12619
12620         * marshal.h marshal.c: Added locks around the wrapper caches to make
12621         this module thread safe.
12622
12623         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
12624         this argument. Fixes pinvoke1.exe.
12625
12626 2003-08-25  Lluis Sanchez <lluis@ximian.com>
12627
12628         * object.h: Added call_type field to MonoMethodMessage and the corresponding
12629         enumeration of values. Removed fields to store remote call output values in
12630         MonoAsyncResult. Not needed any more.
12631         * object.c: Initialize call_type and async_result fields in mono_message_init.
12632         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
12633         dispatching the message.
12634         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
12635         async call to finish. To do it use a message with EndInvoke call type.
12636
12637 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
12638
12639         * loader.h loader.c (mono_method_hash_marhal_info): New function which
12640         determines whenever a method has marshalling info.
12641
12642 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12643
12644         * assembly.c: fix the build on windows.
12645
12646 2003-08-22 Lluis Sanchez <lluis@ximian.com>
12647
12648         * object.cs: Fixed bug #47785.
12649
12650 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
12651
12652         * string-icalls.c (StringReplace): If their are no occurances of
12653         the old string found return a reference to the supplied
12654         string. This saves some memory and matches MS behavoir.
12655         
12656 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12657
12658         * socket-io.c: fixed compilation for systems that define AF_INET6
12659         and don't define SOL_IP/SOL_IPV6.
12660
12661 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
12662
12663         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
12664         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
12665
12666         * rawbuffer.c rawbuffer.h: Make this module thread safe.
12667
12668         * domain.c: Make this module thread safe.
12669
12670         * domain.c (mono_init): Call new initialization function.
12671
12672         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
12673         reference types too. Fixes #38812.
12674
12675         * image.c (mono_image_init): Fixed warnings.
12676
12677         * class.c (mono_class_from_typeref): Handle assembly load failure
12678         correctly.
12679
12680         * appdomain.c (add_assemblies_to_domain): Handle the case when
12681         the references of an assembly are not yet loaded.
12682
12683         * metadata.c image.c assembly.c: Moved initialization of global
12684         variables to a separate function called at startup since lazy 
12685         initialization of these variables is not thread safe.
12686         
12687         * image.c assembly.c: Made this module thread safe by adding locks in 
12688         the appropriate places.
12689
12690         * domain.c (mono_init): Call the new initialization functions of the
12691         three modules.
12692
12693 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
12694
12695         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
12696           make a direct call. It is proxy's work to make the call asynchronous.
12697           mono_delegate_end_invoke(): If the targe is a proxy, just collect
12698           the return values.
12699         * object.cs: mono_method_call_message_new(): read AsyncResult and
12700           state object from parameters list, if this info is requested.
12701         * object.h: Added fields to store remote call output values in
12702           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
12703
12704 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
12705
12706         * object.h: add needed fields to MonoThread.
12707         * threads.c, threads.h: allow registering a function to cleanup data
12708         allocated per thread by the JIT.
12709
12710 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12711
12712         * loader.h: portability fix by Bernie Solomon
12713         * <bernard@ugsolutions.com>.
12714
12715 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
12716
12717         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
12718         return a MonoArray. This simplifies the code and also ensures that
12719         the cache allways contains an object reference as a value.
12720
12721         * icall.c (ves_icall_get_parameter_info): Simplified using the new
12722         function.
12723
12724 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12725
12726         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
12727         fixes a problem with byte ordering when getting the address family for
12728         a socket.
12729
12730 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
12731
12732         * .cvsignore: Added monosn.
12733
12734         * reflection.h reflection.c loader.c: Added support for parameter
12735         marshalling to dynamically created types. Fixes #47295.
12736
12737 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
12738
12739         * rand.c: remove useless warnings.
12740
12741 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12742
12743         * class.c: implemented ldtoken for methods and fieldrefs.
12744
12745 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12746
12747         * threadpool.c: when mono_async_invoke was called, no one took care of
12748         monitoring the queue. So if the method invoked took some time and we
12749         got new async invoke requests after 500 ms (the thread created waited
12750         that long in WaitForSingleObject), the new async invoke was not called
12751         until the previous one finished.
12752
12753         This is fixed now. Thanks to Totte for helping with it.
12754
12755 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12756
12757         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
12758
12759 2003-08-11  Martin Baulig  <martin@ximian.com>
12760
12761         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
12762
12763 2003-08-06  Martin Baulig  <martin@ximian.com>
12764
12765         * mono-debug-debugger.c: Added support for static fields,
12766         properties and methods.
12767
12768 2003-08-06  Martin Baulig  <martin@ximian.com>
12769
12770         * mono-debug-debugger.c: Don't store the MonoString's vtable to
12771         make this work for applications with multiple application domains.
12772
12773 2003-08-04  Martin Baulig  <martin@ximian.com>
12774
12775         * mono-debug-debugger.c: Completely reworked the type support; the
12776         most important thing is that we're now just using one single
12777         `MonoType' instance per type.
12778
12779 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
12780
12781         * mono-endian.h, mono-endian.c, icall.c: Added icall
12782         ves_icall_System_Double_AssertEndianity to assert double word endianity
12783         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
12784
12785 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12786
12787         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
12788         support, icalls and fixes.
12789
12790 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
12791
12792         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
12793         classes that are a punctuation character in .NET is not the same a
12794         g_unichar_ispunct.
12795
12796 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12797
12798         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
12799
12800 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
12801
12802         * icall.c: Add new MemCopy internalcall.
12803         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
12804         Simplified code; It is not necessary to handle all the cases here,
12805         as the C# code takes care of it.  Only handle the case of the name
12806         resource embedded into the assembly.
12807
12808         Changed signature to return the data pointer and the size of the
12809         data. 
12810
12811 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
12812
12813         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
12814         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
12815
12816 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
12817
12818         * socket-io.c: ignore EINTR error in select.
12819
12820 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
12821
12822         * class.h, class.c: removed unused subclasses field in MonoClass.
12823
12824 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
12825
12826         * icall.c: improve fix of get_base_definition(). If the parent class
12827           doesn't have the mehod, look at the parent of the parent.
12828         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
12829           to check if a parameter is an in or out parameter
12830           (PARAM_ATTRIBUTE_IN is not set by default).
12831           mono_method_return_message_restore(): Use mono_class_value_size to
12832           get the size of a value type. mono_type_stack_size (parameterType)
12833           does not return the correct value if parameterType is byRef.
12834           mono_load_remote_field(), mono_load_remote_field_new(),
12835           mono_store_remote_field(), mono_store_remote_field_new():
12836           raise exception if the remote call returns an exception.
12837
12838 2003-07-28  Martin Baulig  <martin@ximian.com>
12839
12840         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
12841         method.  This is a wrapper around mono_runtime_invoke() which
12842         boxes the instance object if neccessary.
12843
12844 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12845
12846         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
12847         metadata.h, row-indexes.h, verify.c: first cut of generics support.
12848
12849 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12850
12851         * icall.c: disable mcs bug workaround.
12852
12853 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
12854
12855         * object.c (mono_runtime_class_init): Take the metadata_section
12856         mutex before obtaining the domain mutex.
12857
12858         * appdomain.h: Added definition of metadata_section mutex here. 
12859
12860         * object.c: define metadata_mutex here.
12861
12862 2003-07-24  Ravi Pratap  <ravi@ximian.com>
12863
12864         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
12865         fixed.
12866
12867 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
12868
12869         * reflection.c: Fix bug #46669
12870
12871 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12872
12873         * exception.c:
12874         * exception.h:
12875         * icall.c:
12876         * object.h: fill in the type name for TypeLoadException.
12877
12878 2003-07-23  Ravi Pratap  <ravi@ximian.com>
12879
12880         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
12881         relationship between TypeBuilders while compiling corlib) and bug
12882         45993 (Array types returned from the runtime while compiling
12883         corlib were from the loaded corlib).
12884
12885 2003-07-22  Martin Baulig  <martin@ximian.com>
12886
12887         * mono-debug-debugger.c: Reworked the type support a bit more;
12888         distinguish between types and classes.
12889
12890 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
12891
12892         * icall.c: add IsArrayImpl icall.
12893
12894 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
12895
12896         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
12897         initializing real_size only once. Also fix bug #46602.
12898
12899 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
12900
12901         * object.c: Renamed mono_metadata_section to metadata_section.
12902
12903 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
12904
12905         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
12906           empty array if the type is an array. Fixed.
12907           ves_icall_MonoMethod_get_base_definition: if the base method
12908           is abstract, get the MethodInfo from the list of methods of
12909           the class.
12910         * reflection.c: ParameterInfo.PositionImpl should be zero-based
12911           and it was 1-based. Fixed in mono_param_get_objects.
12912
12913 2003-07-20  Martin Baulig  <martin@ximian.com>
12914
12915         * mono-debug.h: Set version number to 31.
12916         (mono_debug_init): Added `MonoDomain *' argument.
12917
12918         * mono-debug-debugger.c: Reworked the type support; explicitly
12919         tell the debugger about builtin types; pass the `klass' address to
12920         the debugger.
12921
12922 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
12923
12924         * image.c: Allow new metadata tables to be loaded without a
12925         warning. Also update the warning message to give the new constant value.
12926                 
12927 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
12928
12929         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
12930         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
12931         array type representation changes.
12932
12933 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
12934
12935         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
12936         on Environment.Exit () call.
12937
12938 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12939
12940         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
12941         requires a matching corlib.
12942
12943 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
12944
12945         * Changelog: My editor decided to add a CR to each line. Sorry about that.
12946           Committed again without the CRs.
12947         
12948 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
12949
12950         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
12951           getting it from the "this" socket instance. Did not work
12952           if the socket is a subclass of Socket.
12953           Also fixed bug #35371.
12954
12955 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
12956
12957         * metadata.c: fixed size for TypedByRef.
12958         * loader.c: when searching for a method, consider the vararg amrker.
12959         * unicode.c, decimal.c: constify some arrays.
12960
12961 2003-07-15  Dick Porter  <dick@ximian.com>
12962
12963         * socket-io.c: Fixed compilation for gcc < 3.2.
12964
12965         Fixed compilation for machines that don't have AF_INET6 (thanks to
12966         Bernie Solomon <bernard@ugsolutions.com> for that part.)
12967
12968         Fixed compile warnings.
12969         
12970         Fixed formatting and line endings.
12971
12972 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
12973
12974         * socket-io.h:
12975         * socket-io.c: Added IPv6 support.
12976
12977 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
12978
12979         * class.c (mono_class_is_assignable_from): New function to implement
12980         the is_assignable_from logic. Used by mono_object_isinst, 
12981         Type::IsAssignableFrom () and the interpreter.
12982
12983         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
12984         Object, even interfaces.
12985         
12986         * object.c (mono_object_isinst): Implement in terms of 
12987         is_assignable_from.
12988
12989         * icall.c (ves_icall_type_is_assignable_from): New icall.
12990
12991 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
12992
12993         * domain.c (foreach_domain): fix compiler warning.
12994
12995 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
12996
12997         * image.c (load_metadata_ptrs): use g_strndup because strndup is
12998         not available on all plattforms
12999
13000 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
13001
13002         * image.h image.c: Store the metadata version string in MonoImage.
13003         * icall.c: New icall to retrieve the image version.
13004         * reflection.c (create_dynamic_image): Fill in the image version field
13005         * reflection.c (build_compressed_metadata): Use the image version
13006         from the image structure.
13007
13008 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13009
13010         * appdomain.c: modified comment.
13011         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
13012         That will be its last iteration when mono_gc_cleanup is called from
13013         mono_runtime_cleanup and before the domain is unloaded.
13014
13015         Fixes bug #45962.
13016
13017 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
13018
13019         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
13020         attributes.
13021
13022 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13023
13024         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
13025         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
13026         Bernie Solomon <bernard@ugsolutions.com>.
13027
13028 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13029
13030         * object.c, object.h: provide mono_object_new_fast() for faster
13031         allocation in some special cases.
13032
13033 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13034
13035         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
13036         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
13037
13038 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13039
13040         * threadpool.c: fix leaks.
13041
13042 2003-07-01  Dick Porter  <dick@ximian.com>
13043
13044         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
13045         using MonoGHashTables.  Fixes threadpool bug posted to list.
13046
13047 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13048
13049         * image.h, image.c: added support to load an assembly from a byte array.
13050         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
13051         assembly bundle support.
13052
13053 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
13054
13055         * threadpool.c (mono_thread_pool_add): keep a reference to the
13056         AsyncResult to prevent GC
13057
13058 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13059
13060         * class.c: leak fix.
13061
13062 2003-06-25  Dick Porter  <dick@ximian.com>
13063
13064         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
13065         for the async object, the WaitHandle object will close the handle.
13066         Fixes bug 45321.
13067
13068 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13069
13070         * class.c: in mono_array_class_get (), lookup from the hash with the
13071         same type we insert: this works around a bug in
13072         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
13073         lluis. The real fix will have to wait for after the release.
13074
13075 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13076
13077         * icall.c: fix memory leak when getting type members.
13078
13079 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13080
13081         * reflection.c: added more pubtoken special cases.
13082
13083 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13084
13085         * class.c: handle field offset correctly when class size
13086         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
13087
13088 2003-06-20  Martin Baulig  <martin@ximian.com>
13089
13090         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
13091         *image' field.
13092
13093 2003-06-20  Martin Baulig  <martin@ximian.com>
13094
13095         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
13096
13097 2003-06-20  Martin Baulig  <martin@ximian.com>
13098
13099         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
13100         just distinguish between variables in registers and variables at
13101         an offset relative to a register.
13102
13103 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13104
13105         * icall.c: #ifdef out latest changes until mcs is fixed.
13106
13107 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13108
13109         * icall.c: return members in metadata order.
13110
13111 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13112
13113         * icall.c: avoid infinite loop in GetTimeZoneData.
13114
13115 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13116
13117         * icall.c: added Marshal.Prelink/All icalls.
13118
13119 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13120
13121         * object.c, object.h: fix warnings and do some overflow checking
13122         when creating arrays.
13123
13124 2003-06-17  Dick Porter  <dick@ximian.com>
13125
13126         * file-io.h:
13127         * file-io.c: File attributes need to be tweaked slightly when
13128         passed from the managed to the w32 world.
13129
13130 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13131         * profiler.h profiler-private.h profiler.c: Rework last patch
13132         based on suggestion by Paolo.
13133         
13134 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13135
13136         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
13137         instruction level coverage data collection.
13138         * profiler.h profiler.c (: Added new callback function which can be
13139         used by the profiler to limit which functions should have coverage
13140         instrumentation.
13141         * profiler.c (mono_profiler_load): Call g_module_build_path to
13142         generate the file name of the profiler library.
13143
13144 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13145
13146         * profiler.c, profiler.h, profiler-private.h: added basic block 
13147         coverage profiling API.
13148
13149 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
13150
13151         * reflection.c (mono_reflection_create_runtime_class): Add support
13152         for events in dynamically generated code.
13153
13154         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
13155         not allocated.
13156
13157 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13158
13159         * icall.c: when getting timezone info, return reasonable values if we
13160         can't get the actual data.
13161
13162 2003-06-14  Dick Porter  <dick@ximian.com>
13163
13164         * threads.c (start_wrapper): Remove the reference to the thread
13165         object in the TLS data, so the thread object can be finalized.
13166         This won't be reached if the thread threw an uncaught exception,
13167         so those thread handles will stay referenced :-( (This is due to
13168         missing support for scanning thread-specific data in the Boehm GC
13169         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
13170
13171 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
13172
13173         * reflection.c: ensure streams and tables are first allocated with
13174         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
13175
13176 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13177
13178         * icall.c: fixed GetElementType for byrefs (bug# 44792).
13179
13180 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
13181
13182         * reflection.c (mono_reflection_create_runtime_class): Add support for
13183         properties to dynamically created classes.
13184         * reflection.c: Fix a few places where non-MonoObjects were inserted
13185         into the tokens hashtable.
13186
13187 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13188
13189         * object.c: some support to handle out of memory exceptions.
13190
13191 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
13192
13193         * marshal.c (mono_marshal_get_native_wrapper): support reference
13194         return types
13195
13196 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13197
13198         * object.h, object.c: more portability stuff from Bernie Solomon.
13199         Unexport mono_object_allocate(). Added mono_object_unbox ().
13200         Set exitcode when an unhandled exception is thrown.
13201
13202 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
13203
13204         * marshal.c (mono_marshal_get_native_wrapper): use custom
13205         marshaler for return types.
13206
13207 2003-06-10  Dick Porter  <dick@ximian.com>
13208
13209         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
13210         ip_mreq is available
13211
13212 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13213
13214         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
13215         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
13216         by Bernie Solomon <bernard@ugsolutions.com>.
13217
13218 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
13219
13220         * gc.c (mono_gc_init): Avoid error message on shutdown when
13221         GC_DONT_GC=1 is used.
13222
13223         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
13224         New icall to return the GUID of a module.
13225
13226 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13227
13228         * class.c: ensure instance size always includes the parent's size
13229         even whem class size is set explicitly (fixes bug#44294).
13230
13231 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13232
13233         * profiler.h, profiler.c: made the simple profiler thread-safe,
13234         get more accurate timing info. Allow the loading of an
13235         externally-developed profiler module.
13236
13237 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
13238
13239         * marshal.c (mono_marshal_get_native_wrapper): improved
13240         class/byref arguments.
13241         (mono_marshal_get_native_wrapper): better string marshaling support.
13242
13243 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13244
13245         * class.c: ensure .pack and .size are handled correctly and
13246         simplified layout of static fields.
13247
13248 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13249
13250         * appdomain.c
13251         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
13252
13253         * loader.c (mono_lookup_pinvoke_call): look for modules in the
13254         current directory (fix bug 44008)
13255
13256 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
13257
13258         * marshal.c (mono_marshal_get_native_wrapper): started support for
13259         custom marshalers.
13260         (mono_delegate_to_ftnptr): consider marshalling specifications
13261
13262 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13263
13264         * reflection.c, reflection.h: emit custom marshal info.
13265
13266 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13267
13268         * object.c: free the GError.
13269         * icall.c: added CloseEvent_internal.
13270         * threads.[ch]:
13271         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
13272         call.
13273
13274 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
13275
13276         * loader.c (mono_method_get_signature): Add support for dynamic
13277         assemblies.
13278
13279 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13280
13281         * reflection.c: fixed bug #43905.
13282
13283 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13284
13285         * class.c, domain.c, icall.c, metadata.h, object.h: support for
13286         handling TypedReference and ArgIterator.
13287         * loader.c, loader.h: added function to get signature at call site.
13288
13289 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13290
13291         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
13292         data readonly. Buglets and warning fixes. Some MethodSpec support.
13293
13294 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13295
13296         * class.h, class.c, object.c: remove relative numbering support.
13297
13298 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
13299
13300         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
13301         free the string, until we get a chance to fix Gtk#
13302
13303 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13304
13305         * marshal.c: revert last patch.
13306
13307 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13308
13309         * icall.c: updates for new mono_class_vtable() not calling
13310         the type constructor anymore.
13311
13312 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13313
13314         * object.h, object.c: separate vtable creation from type
13315         initialization. Make running the .cctor thread safe.
13316
13317 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
13318
13319         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
13320
13321 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
13322
13323         * loader.c (mono_get_method): consider calling convention
13324
13325 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
13326
13327         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
13328         to return the invisible global type for a module.
13329
13330         * reflection.c (mono_image_build_metadata): Emit global fields too.
13331
13332 2003-05-20  Peter Williams  <peterw@ximian.com>
13333
13334         * loader.c (mono_lookup_internal_call): Add a few newlines.
13335
13336 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
13337
13338         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
13339         literal strings.
13340
13341         * appdomain.c (set_domain_search_path): Recalculate search path when
13342         AppDomainSetup.PrivateBinPath changes.
13343
13344         * object.c (mono_class_compute_gc_descriptor): It turns out some
13345         parts of the class libs (like System.Thread) holds pointers to
13346         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
13347         to treat native int a pointer type here.
13348         
13349 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
13350
13351         * appdomain.h, domain.c: add hashtable for jump target resolution.
13352
13353 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
13354
13355         * reflection.h reflection.c icall.c: Added new icalls 
13356         GetManifestResourceInfoInternal, GetModulesInternal and support
13357         infrastructure.
13358
13359 2003-05-16  Dick Porter  <dick@ximian.com>
13360
13361         * icall.c:
13362         * file-io.h:
13363         * file-io.c: Implement System.IO.MonoIO::GetTempPath
13364
13365 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
13366
13367         * object.c: mono_store_remote_field: little fix to previous patch.
13368
13369 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13370
13371         * class.c: add constructors to array classes.
13372         * icall.c: special case array construction for InternalInvoke (),
13373
13374 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
13375
13376         * class.h class.c reflection.c object.c: Added support for field
13377         defaults in dynamically generated classes.
13378
13379 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13380
13381         * reflection.c: properly encode charset for ddlimport.
13382
13383 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13384
13385         * threads.c: allow compiling without GC.
13386
13387 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13388
13389         * appdomain.h, object.c, object.h, threads.c, threads.h: added
13390         handling of thread static data.
13391
13392 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13393
13394         * reflection.h, reflection.c: added mono_custom_attrs_free ().
13395
13396 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
13397
13398         * class.c (mono_array_class_get): always set the serializable flags
13399         (mono_array_class_get): always set the SEALED attribute for array types
13400
13401 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
13402
13403         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
13404         attributes (fix for bug 42021).
13405
13406 2003-05-12  Dick Porter  <dick@ximian.com>
13407
13408         * gc.c: Don't run finalizers when the finalizer thread is
13409         finishing up, because the default domain has already been
13410         destroyed.
13411
13412 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
13413
13414         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
13415         value is null, we should throw an exception.   This is slightly
13416         different than the other conventions used for the constructor.
13417
13418 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13419
13420         * socket-io.c: fixed windows build.
13421
13422 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13423
13424         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
13425
13426 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
13427
13428         * object.c (mono_string_new_wrapper): Compatibility fix for MS
13429         compilers.
13430
13431 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
13432
13433         * class.c (mono_class_layout_fields): Add experimental GC aware
13434         auto layout facility. Requires class library changes to work correctly.
13435
13436         (mono_class_setup_vtable): Avoid overriding explicit interface
13437         method implementations. Fixes iface3.exe test.
13438
13439         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
13440         object reference.
13441         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
13442         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
13443
13444         * metadata.h: Add new type classification macro which determines
13445         whenever the type holds an object reference.
13446
13447 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
13448
13449         * marshal.c (mono_marshal_get_native_wrapper): cleanups
13450
13451 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
13452
13453         * gc.c (finalizer_thread): Work around a GC bug.
13454
13455 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
13456
13457         * marshal.c (emit_struct_conv): allow unions
13458
13459         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
13460
13461 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
13462
13463         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
13464
13465 2003-05-06  Martin Baulig  <martin@ximian.com>
13466
13467         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
13468
13469 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13470
13471         * socket-io.c:
13472         (Select_internal): allow NULLs, don't create arrays if not needed.
13473         Coupled with Socket.cs changes.
13474
13475         * threadpool.c:
13476         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
13477         register a finalizer for it that will close the semaphore handle. This
13478         fixes the leak and make Lupus' test run with > 4080 loops.
13479
13480 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
13481
13482         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
13483         Jerome Laban (bug #42287)
13484
13485 2003-05-02  Martin Baulig  <martin@ximian.com>
13486
13487         * debug-mono-symfile.h
13488         (MonoSymbolFile): Moved declaration into mono-debug.h.
13489         (MonoDebugMethodJitInfo): Likewise.
13490         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
13491         argument.
13492         (_mono_debug_address_from_il_offset): Take a
13493         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
13494
13495         * mono-debug.h
13496         (MonoDebugDomainData): New struct.
13497         (mono_debug_get_domain_data): New function.
13498         (mono_debug_add_method): Take an additional `MonoDomain *'
13499         argument.
13500         (mono_debug_source_location_from_address): Likewise.
13501         (mono_debug_il_offset_from_address): Likewise.
13502         (mono_debug_address_from_il_offset): Likewise.
13503
13504 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
13505
13506         * reflection.c: one more check for null type in custom attrs.
13507
13508 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13509
13510         * reflection.c: avoid warning (comparison is always false due to limited
13511         range of data type).
13512
13513 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13514
13515         * icall.c: throw an exception in Type.GetField if the argument 'name'
13516         is NULL.
13517
13518 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
13519
13520         * reflection.c: fixed handling of enums in named arguments to custom
13521         attributes (bug #42123).
13522
13523 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13524
13525         * reflection.c: use the right array element type and handle
13526         a null for a Type argument, too.
13527
13528 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
13529
13530         * reflection.c: handle arrays as arguments to custom attributes.
13531
13532 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
13533
13534         * reflection.c: handle a string value in a custom attr
13535         ctor that takes an object.
13536
13537 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
13538
13539         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
13540         (fix bug #42063)
13541
13542 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
13543
13544         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
13545
13546 2003-04-27  Martin Baulig  <martin@ximian.com>
13547
13548         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
13549         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
13550         MONO_DEBUGGER_EVENT_BREAKPOINT.
13551         (mono_breakpoint_trampoline_code): Removed.
13552         (mono_debugger_event_handler): The last argument is now a
13553         `guint32'.
13554         (mono_debugger_insert_breakpoint_full): Removed the
13555         `use_trampoline' argument.
13556         (mono_debugger_method_has_breakpoint): Likewise.
13557         (mono_debugger_trampoline_breakpoint_callback): Renamed to
13558         mono_debugger_breakpoint_callback(); take the method and
13559         breakpoint number as arguments.
13560
13561 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13562
13563         * metadata.c: fix off by one when loading parameters attributes.
13564
13565 2003-04-24  Martin Baulig  <martin@ximian.com>
13566
13567         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
13568
13569 2003-04-24  Martin Baulig  <martin@ximian.com>
13570
13571         * mono-debug-debugger.c: Moved all code which interacts with the
13572         Mono Debugger here.
13573
13574         * debug-mono-symfile.c: This code now just deals with the symbol
13575         file itself, the debugger code is now in mono-debug-debugger.c.
13576
13577 2003-04-23  Martin Baulig  <martin@ximian.com>
13578
13579         * mono-debug.c (mono_debug_source_location_from_il_offset):
13580         New method; like mono_debug_source_location_from_address(), but
13581         takes an IL offset instead of a machine address.
13582
13583 2003-04-23  Martin Baulig  <martin@ximian.com>
13584
13585         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
13586         `line' field; this is now computed by the debugger.
13587
13588 2003-04-23  Martin Baulig  <martin@ximian.com>
13589
13590         * mono-debug.[ch]: New files.  This is the new debugging interface.
13591
13592         * mono-debug-debugger.[ch]: New files.  Moved all code which
13593         interacts with the Mono Debugger here.
13594
13595 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
13596
13597         * domain.c (mono_init): initialize mono_defaults.monitor_class
13598
13599 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
13600
13601         * reflection.c (method_encode_code): Add a spicy exception to help
13602         future compiler authors.
13603
13604 2003-04-21  Martin Baulig  <martin@ximian.com>
13605
13606         * icall.c
13607         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
13608         Make this work with relative pathnames; g_filename_to_uri() needs
13609         an absolute filename.
13610
13611 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
13612
13613         * icall.c: Track name changes in Object and ValueType.
13614
13615 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
13616
13617         * metadata.c (mono_type_stack_size): size should be a multiple of
13618         sizeof (gpointer)
13619
13620 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13621
13622         * gc.c:
13623         (internal_domain_finalize): moved into mono_domain_finalize. No need
13624         to create another thread because the finalizers will be run in the
13625         finalizer thread.
13626         
13627         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
13628         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
13629         to be run (MS does this too).
13630
13631 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
13632
13633         * object.c (mono_class_compute_gc_descriptor): Update comment.
13634
13635         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
13636
13637         * image.h: Add synchronized wrapper cache.
13638
13639         * image.c (do_mono_image_open): Initialize cache.
13640
13641         * reflection.c (create_dynamic_mono_image): Initialize cache.
13642
13643 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13644
13645         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
13646         ves_icall_System_Buffer_ByteLengthInternal.
13647
13648 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13649
13650         * reflection.c: setup klass->nested_in earlier. Allow
13651         a dash in the assembly name.
13652
13653 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
13654
13655         * metadata.c (mono_type_to_unmanaged): dont access
13656         type->data.klass for MONO_TYPE_OBJECT
13657         (mono_type_to_unmanaged): consider System.Delegate class
13658
13659 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
13660
13661         * class.c: just setup supertypes in the proper place instead of
13662         initializing the full element class for arrays.
13663
13664 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13665
13666         * class.c: ensure the element class of arrays is initialized.
13667         Setup the supertype info for array classes, too.
13668
13669 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
13670
13671         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
13672
13673 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13674
13675         * Makefile.am: re-added -m option when running cygpath. This way,
13676         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
13677         separator.
13678         * mono-config.c: same codepath for locating mono config file for WIN32
13679         and the rest.
13680         * assembly.c: if mono_assembly_setrootdir is called, don't override
13681         the value set.
13682
13683 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13684
13685         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
13686         MONO_ASSEMBLIES variable.
13687
13688 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13689
13690         * icall.c: added Assembly::GetNamespaces() icall.
13691
13692 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13693
13694         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
13695
13696 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
13697
13698         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
13699         * object.c: fixed bug in the construction of vtable for proxies
13700
13701 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
13702
13703         * object.c (mono_array_new): Mark mono_array_new as an icall.
13704
13705 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13706
13707         * class.c: fixed test for public method when overriding interfaces.
13708         Closes bug #40970.
13709
13710 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13711
13712         * appdomain.h, domain.c: added mono_domain_foreach() to
13713         be able to access the currently loaded appdomains.
13714         * object.c: make string interning work across sppdomains.
13715         Mark some functions for use as icalls.
13716
13717 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
13718
13719         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
13720
13721         * reflection.h reflection.c: Allocate long living data using 
13722         GC_MALLOC_ATOMIC so the collector does not need to scan it.
13723
13724         * reflection.c: Double the allocation size in streams instead of
13725         increasing it, to prevent unneccesary copying on large assemblies.
13726         
13727         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
13728         creation if the assembly does not have the Run flag set.
13729
13730 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13731
13732         * class.h: avoid the C++ keywords in header files (Jerome Laban
13733         spotted and fixed this).
13734
13735 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13736
13737         * object.c:
13738         (mono_unhandled_exception): fill in the arguments for the
13739         UnhandledException event. Only trigger that event for the default
13740         domain (as MS does).
13741
13742 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
13743
13744         * object.c: Improve typed allocation stuff based on suggestions from
13745         Paolo. Also turn it on if the GC library supports it.
13746
13747 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
13748
13749         * object.c object.h class.h: Added experimental typed allocation
13750         facility using the interfaces in gc_gcj.h.
13751
13752         * os/gc_wrapper.h: Added new include files.
13753         
13754 2003-04-03  Martin Baulig  <martin@ximian.com>
13755
13756         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
13757         which is not yet enabled by default.
13758
13759         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
13760         functions.
13761         (mono_gc_lock, mono_gc_unlock): New static functions.
13762
13763         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
13764         functions; stop/start the world for the garbage collector.  This
13765         is using the windows API; we need to complete the SuspendThread()/
13766         ResumeThread() implementation in the io-layer to make this work on Unix.
13767         (mono_gc_push_all_stacks): New public function; tells the garbage
13768         collector about the stack pointers from all managed threads.
13769
13770 2003-04-03  Martin Baulig  <martin@ximian.com>
13771
13772         * object.h (MonoThread): Added `gpointer stack_ptr'.
13773
13774         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
13775
13776 2003-04-03  Martin Baulig  <martin@ximian.com>
13777
13778         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
13779
13780 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
13781
13782         * reflection.c (typebuilder_setup_fields): Initialize field.first and
13783         field.last.
13784
13785 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
13786
13787         * loader.c (mono_lookup_internal_call): Report the corlib that is
13788         out of sync.
13789
13790 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
13791
13792         * icall.c (ves_icall_type_GetTypeCode): fixed check for
13793         System.DBNull (it's class not valuetype).
13794
13795 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13796
13797         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
13798         if the array method was already assigned a token (fixes bug#40646).
13799
13800 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
13801
13802         * reflection.c (mono_reflection_get_type): Attempt type resolve even
13803         if no assembly is given.
13804
13805 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
13806
13807         * metadata.h: Added the new tables.
13808
13809         * row-indexes.h: Added definitions for new tables.
13810
13811         * metadata.c: Add schemas for new tables, and add support for
13812         computing the sizes of them.
13813
13814         * class.c: Update for handling the new type cases.
13815
13816 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
13817
13818         * metadata.h (MONO_TYPE_IS_VOID): new macro
13819
13820 2003-03-31  Martin Baulig  <martin@ximian.com>
13821
13822         * threads.h (MonoThreadCallbacks): Added `thread_created'.
13823
13824         * threads.c (mono_thread_new_init): Call `thread_created' in the
13825         mono_thread_callbacks.
13826
13827 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
13828
13829         * loader.h: added marshalbyrefobject_class to mono_defaults
13830         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
13831         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
13832           generation of output parameters.
13833           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
13834         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
13835           contextbound and the target object belongs to the context of the caller.
13836         * object.h: added context and unwrapped_server variables in MonoRealProxy.
13837         * object.c: Implemented support for interfaces and abstract classes
13838           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
13839           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
13840
13841 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
13842
13843         * class.h class.c (mono_class_is_subclass_of): New function.
13844         
13845         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
13846         routines for most common case (calls from ArrayList::ToArray).
13847
13848         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
13849         routine so programs which call Environment::Exit() can be profiled.
13850
13851         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
13852         Added MONO_ARCH_SAVE_REGS.
13853
13854         * icall.c (ves_icall_type_is_subtype_of): Use new function.
13855
13856 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
13857
13858         * blob.h: Add a couple of new MonoType types definitions.
13859
13860         * tabledefs.h: Add a couple of new call convs.
13861
13862 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
13863
13864         * reflection.h (MonoReflectionDynamicAssembly): track changes in
13865         the layout of the class.
13866
13867         * reflection.c (alloc_table): double the size on overflow to avoid
13868         unnecessary copying.
13869
13870         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
13871         avoid filling out metadata tables and blobs. Also set mb->ilgen to
13872         null so it can be garbage collected.
13873         
13874 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
13875
13876         * reflection.c (mono_reflection_get_type): Return the resolved type
13877         only if it is in the assembly we searched.
13878
13879         * reflection.c (ensure_runtime_vtable): Initialize method slots.
13880
13881         * class.c (mono_class_setup_vtable): Set the slot of the overriding
13882         method.
13883
13884 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13885
13886         * appdomain.c:
13887         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
13888         the right one is 'file:///blah', but MS allows it.
13889         * assembly.c:
13890         (mono_assembly_open): allow 'file://blah'
13891
13892         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
13893
13894 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
13895
13896         * socket-io.c: fixes bug #40310.
13897
13898 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
13899
13900         * reflection.c (mono_reflection_parse_type): handle deeply nested
13901         types correctly.
13902
13903         * reflection.c (mono_image_create_token): Use unique token values
13904         since they will be put into a hash table.
13905
13906         * class.c (mono_class_setup_vtable): If a method occurs in more than
13907         one place in the vtable, and it gets overriden, then change the
13908         other occurances too.
13909
13910         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
13911         object as return type.
13912
13913 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
13914
13915         * icall.c: Deleted "ToString" implementation for double and float
13916         because they are full implemented in managed code.
13917
13918 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13919
13920         * reflection.c, reflection.h: implemented and exported functions
13921         to retrieve info about custom attributes.
13922
13923 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13924
13925         * appdomain.c: moved Uri handling to assembly.c
13926         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
13927         work when using a file Uri in *nix and windows.
13928
13929         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
13930         GetReferencedAssemblies.
13931
13932 2003-03-18  Dick Porter  <dick@ximian.com>
13933
13934         * icall.c: Rename a couple of internal calls
13935
13936         * threads.c: Set the thread state to Stopped when a thread exits.
13937         Fixes bug 39377.
13938
13939 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
13940
13941         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
13942         New icall.
13943
13944         * object.c (mono_class_vtable): fix warning.
13945
13946 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
13947
13948         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
13949
13950         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
13951         memory.
13952         (method_encode_clauses): Create exception info structures in the right
13953         order.
13954         (mono_reflection_setup_internal_class): Initialize supertypes field.
13955
13956         * class.c object.c: Handle interfaces which implement other interfaces 
13957         correctly.
13958
13959         * class.h class.c: Move the supertypes array initialization code into 
13960         a separate function so it can be used for dynamic types too. Also call
13961         it earlier, in mono_class_init(), since it can be used before the
13962         type is initialized.
13963
13964 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13965
13966         * Makefile.am:
13967         * assembly.c:
13968         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
13969
13970         * appdomain.c:
13971         * appdomain.h:
13972         * marshal.c:
13973         * object.c: remove warnings.
13974
13975 2003-03-13  Martin Baulig  <martin@ximian.com>
13976
13977         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
13978         (MonoDebugLexicalBlockEntry): New types.
13979
13980         * debug-mono-symfile.c
13981         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
13982
13983 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13984
13985         * process.c: ret can be any non-zero value accroding to MS doc.
13986
13987 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
13988
13989         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
13990         fixing a warning for a miss-used prototype, would have cause
13991         random memory corruption.
13992
13993 2003-03-07  Martin Baulig  <martin@ximian.com>
13994
13995         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
13996         getting really annoying ....
13997
13998 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
13999
14000         * reflection.c (fixup_method): added support for array methods.
14001
14002 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14003
14004         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
14005         (pointed out by Michael Adams).
14006
14007 2003-03-04  Dick Porter  <dick@ximian.com>
14008
14009         * icall.c: Temporarily reverted the Double and Single ToString()
14010         change, because it broke nunit.
14011
14012 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
14013
14014         * object.h, threads.h: make include files compatible with C++
14015         (patch by Jerome Laban <jlaban@wanadoo.fr>).
14016
14017 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14018
14019         * icall.c: Erased ToString helper functions for Double and Single.
14020         Now, that implementations ar all in managed code (Double and Single
14021         Formatters).
14022
14023 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
14024
14025         * appdomain.c: Added method for initializing the default context of
14026         a domain. Added internal call for getting the default context.
14027         * appdomain.h: Added context variable in MonoDomain struct.
14028         * domain.c: mono_domain_set also sets the default context of the domain
14029         * icall.c: Mapped internal method InternalGetDefaultContext.
14030         * object.c: mono_object_get_virtual_method returns always a remoting
14031         wrapper if the object is a transparent proxy.
14032         mono_runtime_invoke_array: when creating an object by calling the
14033         constructor, if the created object is a proxy, then the constructor should
14034         be called using the a remoting wrapper.
14035
14036 2003-03-03  Dick Porter  <dick@ximian.com>
14037
14038         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
14039         variable so it compiles on solaris.  Problem spotted by
14040         Christopher Taylor <ct@cs.clemson.edu>
14041
14042 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14043
14044         * appdomain.c:
14045         (get_info_from_assembly_name): don't leak value.
14046
14047         * icall.c:
14048         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
14049         result.
14050
14051 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14052
14053         * assembly.c: export mono_image_load_references ().
14054         * class.c: handle function pointers. mono_class_from_name() now
14055         supports nested type names directly.
14056
14057 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
14058
14059         * reflection.h reflection.c: Encode already created dynamic methods 
14060         and fields correctly as a DEF instead of a REF.
14061
14062         * reflection.c: Get rid of the force_ref argument to 
14063         mono_image_typedef_or_ref since it was wrong in the first place.
14064
14065         * string-icalls.c: add error checking to string constructors according
14066         to the MSDN docs.
14067
14068         * reflection.c: Emit types in the order their TypeBuilders were 
14069         created. Previously, a new table index was assigned to each type before
14070         the tables were emitted. This was wrong because the signature blob
14071         might already refer to a type by its original table index.
14072
14073 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
14074
14075         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
14076         change.
14077         
14078 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14079
14080         * Makefile.am: make assemblies dir have \ instead of / on windows.
14081
14082 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
14083
14084         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
14085         iterate over the NESTEDCLASS table using a linear search since the
14086         table is not guaranteed to be sorted by the secondary key.
14087
14088         * class.c (mono_class_create_from_typedef): fixed up call to
14089         mono_metadata_nesting_typedef.
14090         
14091 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
14092
14093         * marshal.c (mono_string_to_byvalstr): clear the memory as
14094         suggested by Jerome Laban <jlaban@wanadoo.fr>
14095
14096 2003-02-26  Dick Porter  <dick@ximian.com>
14097
14098         * process.c: Cope with padding in .rsrc blocks
14099
14100 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
14101
14102         * metadata.h: reverted the filter_len change, it breaks reflection
14103         
14104 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
14105
14106         * metadata.h: added a new field to store the filter_len
14107         
14108
14109 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14110
14111         * reflection.c: handle custom attributes for types and members
14112         created with Reflection.Emit (bug#38422).
14113
14114 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
14115
14116         * reflection.c: define RTSpecialName automatically for constructors for
14117         compatibility with MS.NET.
14118
14119         * reflection.c (mono_reflection_create_runtime_class): initialize
14120         nested_in field of dynamically created classes.
14121
14122 2003-02-22  Martin Baulig  <martin@ximian.com>
14123
14124         * debug-mono-symfile.h: Incremented version number.
14125
14126 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
14127
14128         * object.h icall.c process.c: fix warnings.
14129
14130 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
14131
14132         * appdomain.h appdomain.c:
14133         (mono_domain_try_type_resolve): split the 
14134         name_or_tb argument into a name and a tb argument.
14135         (mono_domain_has_type_resolve): new function to check whenever the
14136         application has registered a TypeResolve event handler.
14137         
14138         * icall.c reflection.h reflection.c: move the type resolve logic into
14139         mono_reflection_get_type () so it will be invoked when 
14140         Assembly::GetType () is called.
14141
14142         * reflection.c:
14143         (mono_reflection_get_type): renamed to get_type_internal.
14144         (mono_reflection_get_type): fixed type name generation so it works 
14145         for nested types too.
14146         (mono_reflection_get_type): call has_type_resolve () to avoid the 
14147         costly type name generation if there is no resolve event handler.
14148
14149 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14150
14151         * class.c, image.c: load exported types from file references.
14152
14153 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
14154
14155         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
14156           used to cache the managed methods used to create proxies and make 
14157           remote invocation of methods.
14158         * class.h: Added in MonoVTable a flag to indicate that a class needs 
14159           to be remotely created.
14160         * object.c: Modified the method mono_class_vtable(). It now initializes 
14161           the remote flag of the vtable. Modified mono_object_new_specific(), 
14162           so now it checks the remote flag.
14163         * icall.c: Added a couple of internal methods, one for enabling instance 
14164           creation interception for a type, and one for creating objects bypassing
14165           the remote check.
14166
14167 2003-02-18  Martin Baulig  <martin@ximian.com>
14168
14169         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
14170         New interncall to get a method's metadata token.
14171
14172         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
14173         New interncall for the debugger.
14174
14175 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
14176
14177         * class.c (mono_class_setup_vtable): allocate supertype array
14178
14179 2003-02-18  Martin Baulig  <martin@ximian.com>
14180
14181         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
14182
14183 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14184
14185         * reflection.c:
14186         (assembly_name_to_aname): jump over unknown properties (i've found
14187         something like: 'type, assembly, version=xxx, custom=null, public...',
14188         so now will ignore custom=null and still get the rest of the values).
14189
14190 2003-02-17  Dick Porter  <dick@ximian.com>
14191
14192         * threads.c: Have Thread.Start() wait for a semaphore to signal
14193         that the thread has set up all its local data.  This fixes bug
14194         34323, where Abort() raced the new thread's TLS data.
14195
14196         Also removes the handle_store() call from start_wrapper, because
14197         threads are now always created suspended and there is no longer a
14198         race between the parent and child threads to store the info.
14199
14200 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
14201
14202         * image.c: explain the #- heap issue in a message, hopefully
14203         avoiding FAQs on mono-list.
14204
14205 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14206
14207         * icall.c:
14208         (GetEntryAssembly): if the domain has not invoked
14209         AppDomain.ExecuteAssembly yet, return the assembly of the default
14210         AppDomain.
14211
14212 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
14213
14214         * class.c (mono_ldtoken): make it work in dynamic assemblies.
14215
14216 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14217
14218         * metadata.c, reflection.c: simple speedup to type hash
14219         and equals code.
14220
14221 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
14222
14223         * image.c, image.h, class.c, assembly.c: move module loading
14224         to MonoImage. When loading metadata, consider alignemnet from
14225         the start of metadata, not from the metadata address in memory.
14226
14227 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
14228
14229         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
14230         AssemblyBuilder objects. Factored out custom attribute creation into
14231         a separate function.
14232         (create_custom_attr): new function to create custom attributes.
14233
14234 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
14235
14236         * Makefile.am: Got tired of typing the full pathname to pedump.
14237         Until there is another option, am installing this.
14238
14239 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
14240
14241         * class.c (class_compute_field_layout): always set field->parent 
14242         (mono_ldtoken): use mono_defaults.fieldhandle_class;
14243
14244 2003-02-11  Dick Porter  <dick@ximian.com>
14245
14246         * threads-types.h:
14247         * monitor.c: Rewrote Monitor, making lock much faster and
14248         Pulse/Wait work as specified.  Also uses much fewer handles, and only
14249         creates them as needed.
14250
14251         * exception.c: Added SynchronizationLockException
14252
14253         * threads.c: Deleted old Monitor implementation.  The new one is
14254         in a new file.
14255
14256 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14257
14258         * class.c: handled TypedReference type code. Set the correct size for
14259         class data. Setup interface_offsets for interface classes, too.
14260
14261 2003-02-09  Martin Baulig  <martin@ximian.com>
14262
14263         * debug-mono-symfile.h: Reflect latest symbol writer changes.
14264
14265 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
14266
14267         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
14268         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
14269         * object.c: fixed mono_object_get_virtual_method () for interfaces.
14270         * verify.c: check for code that runs after the end of the method.
14271
14272 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14273
14274         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
14275         "System.Math::Round2".
14276         * sysmath.h: Added Floor, Round and Round2 definitions.
14277         * sysmath.c: Modified certain functions that were not 100% compliant
14278         with MS.NET (math precision) and added the implementation of Floor,
14279         Round and Round2.
14280
14281 2003-02-07  Martin Baulig  <martin@ximian.com>
14282
14283         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
14284
14285 2003-02-07  Martin Baulig  <martin@ximian.com>
14286
14287         * debug-mono-symfile.c: Reflected latest symwriter changes.
14288         (mono_debug_create_mono_symbol_file): Removed.
14289         (mono_debug_open_mono_symbol_file): Take an argument which
14290         specifies whether to create a dynamic symbol file.
14291
14292 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
14293
14294         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
14295
14296 2003-02-05  Martin Baulig  <martin@ximian.com>
14297
14298         * reflection.c (mono_image_build_metadata): Make this public,
14299         protect it against being called multiple times, don't create
14300         resources and don't build the compressed metadata here.
14301         (mono_image_create_pefile): Do this here.
14302
14303         * icall.c
14304         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
14305
14306 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14307
14308         * socket-io.c: fixed bug #36322.
14309
14310 2003-02-06  Piers Haken <piersh@friskit.com>
14311
14312         * appdomain.[ch]:
14313         * class.h:
14314         * debug-mono-symfile.c:
14315         * icall.c:
14316         * loader.c:
14317         * mono-config.c:
14318         * monosn.c:
14319         * reflection.c:
14320         * socket-io.c: warning cleanups
14321
14322 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
14323
14324         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
14325         function. works like remoting invoke, but does a check for the Proxy first.
14326
14327 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
14328
14329         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
14330
14331 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
14332
14333         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
14334         array of pointers.
14335         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
14336         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
14337
14338         * object.c (mono_store_remote_field_new): used by the new jit
14339         instead of mono_store_remote_field
14340         (mono_load_remote_field_new): used by the new jit
14341         instead of mono_load_remote_field
14342
14343 2003-02-05  Patrik Torstensson
14344
14345         * appdomain.c: changed unload to take the domain id instead
14346         of domain
14347         
14348         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
14349
14350
14351 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14352
14353         * appdomain.c: don't look for assemblies in ApplicationBase if
14354         PrivateBinPathProbe is set.
14355
14356 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14357
14358         * object.c: make the first argument in main_args contain the absolute
14359         path to the assembly. Fixes bug #37511.
14360
14361 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14362
14363         * icall.c: get correct UTC offset for countries not using daylight
14364         time saving. Fixes bug #30030.
14365
14366 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14367
14368         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
14369         and 1 are the family).
14370
14371 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
14372
14373         * icall.c (ves_icall_InternalExecute): removed wrong assertion
14374
14375         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
14376
14377 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
14378
14379         * reflection.c: added support for SignatureHelper tokens, which is
14380         needed by the Calli opcode.
14381
14382         * reflection.h: track changes to SignatureHelper class.
14383
14384         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
14385
14386 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14387
14388         * appdomain.c: fixed loading assemblies from PrivateBinPath.
14389
14390 2003-02-03  Patrik Torstensson
14391         * appdomain.[c|h], domain.c : 
14392          - Added support for getting a domain via domain id
14393          - Support for setting and getting domain from System.AppDomain 
14394            (used in cross appdomain channel)
14395          - Added support for get/set for a MonoAppContext on a thread 
14396            (Context class in System.Runtime.Remoting.Contexts),
14397          - Removed hack in Get/SetData and ExecuteAssembly.
14398         
14399         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
14400         the managed world to get control when a proxy is created.
14401
14402         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
14403         
14404 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
14405
14406         * icall.c
14407         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14408         Populate the codebase field as well.
14409
14410 2003-02-02  Martin Baulig  <martin@ximian.com>
14411
14412         * debug-mono-symfile.c
14413         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
14414         (mono_debug_symfile_add_method): Allow interncalls.
14415
14416 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14417
14418         * icall.c: throw parse exception if strtod fails or the string is empty.
14419
14420 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
14421
14422         * marshal.c: handle object type separately from defined
14423         class types.
14424
14425 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
14426
14427         * marshal.c: handle NATIVE_LPSTR for strings when it's
14428         explicitly specified.
14429
14430 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
14431
14432         * reflection.c, reflection.h, icall.c: setup the reflection
14433         handle cache for ModuleBuilders and AssemblyBuilders.
14434
14435 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
14436
14437         * reflection.c (reflection_methodbuilder_to_mono_method): set
14438         pinvoke flag
14439
14440 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14441
14442         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
14443
14444 2003-01-29  Dick Porter  <dick@ximian.com>
14445
14446         * threads.c: No need for the fake_thread kludge now that Thread
14447         doesn't run a class constructor
14448         
14449 2003-01-29  Dick Porter  <dick@ximian.com>
14450
14451         * threads.c: Use g_direct_hash instead of the rather bogus
14452         g_int_hash
14453
14454 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
14455
14456         * marshal.c (mono_marshal_get_native_wrapper): add check for null
14457         (fix pinvoke12.exe)
14458         (mono_marshal_get_struct_to_ptr): generate valid IL code
14459         (mono_marshal_get_ptr_to_struct): generate valid IL code
14460         (*): correctly set sig->pinvoke, we need to memdup the signature
14461         to do that
14462
14463 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14464
14465         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
14466         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
14467
14468 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
14469
14470         * profiler.c: provide more callers information.
14471
14472 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
14473
14474         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
14475
14476         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
14477
14478         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
14479
14480 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
14481
14482         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
14483         exception instead of going into an infinite loop on dates which it 
14484         can't yet handle.
14485
14486         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
14487         out-of-range exception if needed.
14488
14489         * class.c (mono_class_setup_vtable): allow a virtual method to provide
14490         an implementation for an interface method and to override an inherited
14491         method at the same time. 
14492         Imagine a scenario when a virtual method is used to override a
14493         virtual abstract method in a parent class, and this same method 
14494         provides an implementation for an method inherited from an interface. 
14495         In this case, the interface resolution code will set im->slot, which 
14496         means that the virtual method override pass will skip this method 
14497         which means a pointer to the abstract method inherited from the parent
14498         will remain in the vtable of this non-abstract class.
14499
14500         * class.c: (mono_class_setup_vtable): continue search for a real 
14501         method if only an abstract method is found.     
14502
14503 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
14504
14505         * reflection.c: add size to encoding for ByValStr and ByValArray
14506         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
14507
14508 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
14509
14510         * class.c (mono_class_setup_vtable): pass the override info as an
14511         argument.
14512
14513         * class.c (mono_class_setup_vtable): set the slot of overriding methods
14514         correctly.
14515         
14516         * reflection.c (ensure_runtime_vtable); add support for method 
14517         overrides.
14518         
14519 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
14520
14521         * reflection.c (resolution_scope_from_image): Hack to work to work with
14522         dynamic assemblies.
14523
14524         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
14525         added a 'force_ref' argument to force this function to allways return 
14526         a TypeRef. This is needed by mono_image_get_memberref_token ().
14527         
14528 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
14529
14530         * reflection.c (mono_image_get_type_info): interfaces really don't have
14531         a parent.
14532
14533         * reflection.c (mono_image_basic_init): fill out missing fields of
14534         image structure.
14535
14536         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
14537         dynamic assemblies. This is required so dynamic assemblies show up in
14538         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
14539         Type::GetType() etc. This is consistent with MS behaviour.
14540
14541         * image.c image.h reflection.c: add newly created classes to the name 
14542         cache so mono_class_get () will find them.      
14543
14544 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
14545
14546         First part of changes to get IKVM.NET running under mono.
14547         
14548         * appdomain.h, appdomain.c: added new function 
14549         mono_domain_try_type_resolve() which will emit TypeResolve events. 
14550         This function will call AppDomain::DoTypeResolve to do the actual work.
14551
14552         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
14553         moved existing code dealing with dynamic tokens to a new function 
14554         called mono_reflection_lookup_dynamic_token (). This function will 
14555         raise TypeResolve events when appropriate. Since reflection.c is not 
14556         part of libmetadata, a new hook function called 
14557         mono_lookup_dynamic_token() is added to class.c which will call this.
14558
14559         * assembly.h assembly.c: make the invoke_load_hook function public,
14560         so it can be called for dynamic assemblies.
14561
14562         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
14563
14564         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
14565         type isn't found.
14566
14567         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
14568         MonoGHashTable, since it contains pointers to objects which the GC 
14569         needs to track.
14570
14571         * assembly.c (search_loaded): remove unused variable.
14572         
14573 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
14574
14575         * object.c: fixed issue exposed by gcc-generated IL programs
14576         that use RVA data for pointers.
14577
14578 2003-01-25  Martin Baulig  <martin@ximian.com>
14579
14580         * threads.c (start_wrapper): Moved the initialization of
14581         `start_func' above the mono_new_thread_init() call to which we
14582         pass it as argument.
14583
14584 2003-01-24  Martin Baulig  <martin@ximian.com>
14585
14586         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
14587         the MonoThread pointer.
14588
14589 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
14590
14591         * icall.c: Rename `PowImpl' to Pow.
14592
14593 2003-01-23  Dick Porter  <dick@ximian.com>
14594
14595         * threads.c (start_wrapper): Create a Thread object if needed, so
14596         the Main() thread can do the class initialisation in a subthread
14597         that has been set up to allow managed code execution.
14598
14599         Pass the thread ID instead of the MonoThread pointer to the thread
14600         start and attach callbacks.  This change is required, because the
14601         jit thread start callback must be called _before_ the Thread
14602         object can be created.
14603         
14604         (mono_thread_init): Removed much object creation code that is no
14605         longer needed.  No managed code is called from here now.
14606
14607         * object.c (mono_runtime_exec_managed_code): Create a subthread
14608         for Main, and call back to the runtime to use it.
14609         Set the exit code when Main exits.
14610
14611         * gc.c: Make sure domain finalisation happens in a subthread.
14612         Re-enable threaded GC, fixing bug 31333 (again).
14613
14614         * environment.c: System.Environment internall calls (so far just
14615         ExitCode is here, the others are still in icall.c)
14616
14617         * appdomain.c (mono_runtime_cleanup): All threads running managed
14618         code should have finished before mono_runtime_cleanup() is
14619         reached, so no need to clean up threads.
14620
14621 2003-01-22  Martin Baulig  <martin@ximian.com>
14622
14623         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
14624         `gpointer func' arguments.      
14625         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
14626         but added `MonoThread *thread' argument.
14627         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
14628
14629         * threads.c (mono_new_thread_init): Added `gpointer func' argument
14630         and pass it to the mono_thread_start_cb callback.
14631         (mono_install_thread_callbacks): New public function to install a
14632         set of callbacks which are set by the debugger.
14633         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
14634
14635 2003-01-22  Martin Baulig  <martin@ximian.com>
14636
14637         * Makefile.am: Install debug-mono-symfile.h.
14638
14639 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
14640
14641         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
14642
14643 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
14644
14645         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
14646         * class.c (mono_ptr_class_get): correctly set access levels of pointers
14647         (mono_array_class_get): correctly set access levels of arrays
14648
14649 2003-01-20      Patrik Torstensson
14650         * image.h (MonoAssemblyName): changed major, minor, build, revision
14651         from signed to unsigned.
14652
14653 2003-01-20  sean kasun <skasun@azstarnet.com>
14654
14655         * reflection.c (load_cattr_value): Now this handles
14656         MONO_TYPE_SZARRAY.  Fixes bug #35629
14657
14658 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
14659
14660         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
14661         integer value
14662
14663 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14664
14665         * decimal.c: fixed bug #26056.
14666
14667 2003-01-17  Martin Baulig  <martin@ximian.com>
14668
14669         * gc.c: Raise an ExecutionEngineException instead of using g_error().
14670
14671 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14672
14673         * exception.[ch]:
14674         (mono_get_exception_type_initialization): new function.
14675
14676         * object.c: throw a TypeInitializationException when an exception is
14677         thrown invoking the class constructor.
14678
14679 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14680
14681         * reflection.c: fixed attribute reading.
14682
14683 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14684
14685         * icall.c:
14686         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
14687         provided, look for the type in the calling assembly and then in
14688         mscorlib; if the assembly name is provided, only try that one.
14689
14690 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14691
14692         * object.c: register the vtable before there is a chance it's
14693         queried again recursively.
14694
14695 2003-01-13  Duncan Mak  <duncan@ximian.com>
14696
14697         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
14698         gc-internal.h. 
14699         
14700 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
14701
14702         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
14703
14704 2003-01-11  Martin Baulig  <martin@ximian.com>
14705
14706         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
14707         this to 20 for the release.
14708
14709 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
14710
14711         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
14712
14713         * loader.c (mono_method_get_marshal_info): bug fix
14714
14715         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
14716         structures with explicit layout
14717
14718 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14719
14720         * profiler.c: made the output more readable (and sorted). 
14721         Added caller information for the allocation profiler.
14722
14723 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
14724
14725         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
14726
14727 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14728
14729         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
14730         to get value types.
14731         
14732 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
14733
14734         * object.c, profiler.h, profiler.c, profiler-private.h:
14735         Added object allocation profiler.
14736
14737 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
14738
14739         * reflection.h, reflection.c: handle global methods.
14740         Compress blob entries.
14741
14742 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
14743
14744         * marshal.c: fix compilation.
14745
14746 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
14747
14748         * loader.c (mono_method_get_marshal_info): impl.
14749
14750         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
14751
14752 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14753
14754         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
14755         for reference types.
14756
14757 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
14758
14759         * loader.c: fixed off by one error in loaded parameter names.
14760
14761 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
14762
14763         * marshal.c (mono_marshal_get_icall_wrapper): like
14764         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
14765         instead of a MonoMethod.
14766
14767 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14768
14769         * decimal.c: fixed bug #36537.
14770
14771 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
14772
14773         * marshal.c: throw a missing method exception if a
14774         P/Invoke method is not found.
14775
14776 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14777
14778         * icall.c: allow a null this for constructors.
14779
14780 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14781
14782         * icall.c: raise the proper exceptions if the arguments to the
14783         internal Invoke are incorrect.
14784
14785 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
14786
14787         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
14788
14789 2003-01-03  Martin Baulig  <martin@ximian.com>
14790
14791         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
14792
14793 2002-12-31  Martin Baulig  <martin@ximian.com>
14794
14795         * debug-mono-symfile.c: Completely rewrote the type section.
14796         Instead of using individual malloc()ed fields, we use one big
14797         continuous memory area and offsets into this area.
14798         See the comments in the source code for details.
14799
14800 2002-12-30  Martin Baulig  <martin@ximian.com>
14801
14802         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
14803
14804 2002-12-30  Martin Baulig  <martin@ximian.com>
14805
14806         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
14807         line number table in this data blob instead of using an external
14808         pointer.
14809
14810 2002-12-28  Martin Baulig  <martin@ximian.com>
14811
14812         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
14813
14814 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
14815
14816         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
14817         as a boxed return type.
14818
14819 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
14820
14821         * appdomain.c
14822         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
14823         g_build_filename to properly get separators on the filename created.
14824
14825         * object.h: Small change, introduce MonoMarshalByRefObject to
14826         track the layout of that structure in the C# universe as we make
14827         changes there.
14828
14829 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
14830
14831         * object.c: removed assert to allow static fields on interfaces.
14832         * loader.c: a TypeSpec may be used for any type, not just arrays.
14833
14834 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
14835
14836         * class.c, class.h: added mono_class_array_element_size ().
14837         Ignore static methods in interfaces.
14838
14839 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14840
14841         * threads.c: fixed the build under cygwin.
14842
14843 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
14844
14845         * reflection.c: handle nullref constants. Allocate keys for
14846         reflection handles with the GC.
14847
14848 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14849
14850         * threads.c, threads.h: added mono_thread_get_abort_signal()
14851         to get a suitable signal for thread abort.
14852
14853 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14854
14855         * metadata.c: fix handling of ExportedType table.
14856
14857 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14858
14859         * icall.c: added WriteWindowsDebugString internal call.
14860
14861 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14862
14863         * reflection.h: added fields to match C# implementation.
14864
14865 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14866
14867         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
14868
14869 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
14870
14871         * gc.h, gc-internal.h: Rename header for GC internal calls to
14872         gc-internal.h from gc.h as to not clash with Boehm GC having its
14873         header installed as <gc.h> in outside include paths.
14874         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
14875         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
14876
14877 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14878
14879         * icall.c: assign minor, build and revision in FillName.
14880
14881 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
14882
14883         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
14884         Added support for running code generated by Reflection.Emit.
14885
14886 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14887
14888         * appdomain.c: check for NULL argument in LoadFrom.
14889
14890 2002-12-10  Dick Porter  <dick@ximian.com>
14891
14892         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
14893
14894 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14895
14896         * appdomain.c: fix buglet when building exe file name.  Handle full
14897         assembly name (needed after latest changes to AssemblyName).
14898         * image.c:
14899         (mono_image_close): free some hashtables.
14900
14901 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
14902
14903         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
14904         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
14905         on some systems (redhat 7.3) 
14906
14907 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
14908
14909         * threads.c: delete the critical section of a sync block,
14910         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
14911
14912 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
14913
14914         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
14915
14916 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14917
14918         * appdomain.[ch]: handle the assembly preload event to try loading the
14919         assemblies using the paths we have in the current domain.
14920
14921         * assembly.[ch]: created an assembly preload hook that is called to try
14922         loading the assembly by other means that the ones provided here.
14923
14924         * domain.c: initialize the domain search path.
14925
14926         From now on, assemblies (TODO: except corlib and System) are loaded
14927         according to these rules when using mono_assembly_load ():
14928
14929                 1. It tries to load the assembly from the ApplicationBase
14930                 of the current domain appending .dll and .exe (TODO: have to
14931                 try loading from name/name.dll and name/name.exe).
14932
14933                 2. It tries the search path specified in PrivateBinPath for the
14934                 current domain (if any).
14935
14936                 3. Previous behavior.
14937
14938 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
14939
14940         * icall.c: implemented GetInterfaceMap() related icall.
14941         * domain.c, loader.h: load MethodInfo in mono_defaults.
14942
14943 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
14944
14945         * gc.c: disable the finalizer thread for now, untill all the issues
14946         with it are resolved.
14947
14948 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
14949
14950         * string-icalls.c: handle embedded nulls in string ctor when the
14951         length is specified.
14952
14953 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
14954
14955         * class.c: look for explicit interface implementation in parent
14956         classes, too.
14957
14958 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
14959
14960         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
14961
14962 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
14963
14964         * gc.c: protect handles with a critical section.
14965
14966 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14967
14968         * icall.c:
14969         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
14970         parameters. If no assembly specified, try getting the type from all
14971         the assemblies in the current domain, else, load the assembly and get
14972         the type from it.
14973
14974 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14975
14976         * marshal.c: applied patch from Aleksey Demakov that fixes
14977         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
14978
14979 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14980
14981         * icall.c: fixed get_location.
14982
14983 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
14984
14985         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
14986         declarations to make it work with older gcc. 
14987
14988         * loader.c (mono_get_method): set signature->pinvoke for native calls
14989
14990 2002-11-20  Dick Porter  <dick@ximian.com>
14991
14992         * threads.c (mono_thread_init): Set the main thread's handle
14993
14994 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
14995
14996         * gc.c: allow compilation without GC support. Changed to match the
14997         mono coding style.
14998
14999 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15000
15001         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
15002
15003 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
15004
15005         * reflection.c: set a public key token on the core assemblies.
15006
15007 2002-11-18  Dick Porter  <dick@ximian.com>
15008
15009         * threads.c: Split out some thread initialisation so that other
15010         files can set the start callback function.
15011
15012         * gc.c: Run finalisers in a separate thread, to avoid stack
15013         overflow.  Fixes bug 31333.
15014
15015         * appdomain.c: Set up GC finalisation thread.
15016
15017         * reflection.c: 
15018         * object.c: 
15019         * domain.c: Use gc.h macros for GC_malloc
15020         
15021 2002-11-15  Dick Porter  <dick@ximian.com>
15022
15023         * threadpool.c: 
15024         * threads.c:
15025         * appdomain.c: Removed mono_runtime_init_with_attach(),
15026         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
15027         merging the extra parameter with the existing function.  Removed
15028         unneeded code in mono_thread_attach().
15029
15030 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
15031
15032         * image.c (mono_image_loaded_by_guid): a method to get loaded
15033         images by guid. 
15034         (load_metadata_ptrs): we store the guid as string.
15035
15036 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
15037
15038         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
15039
15040         * metadata.c (mono_guid_to_string): imported method form Zoltan
15041         Varga (slightly modified)
15042
15043         * assembly.c (mono_assembly_open): load precompiled code
15044
15045         * loader.h (MonoMethod): we store the method token for use in the
15046         aot compiler. 
15047
15048 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15049
15050         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
15051         the hook function called when an assembly is loaded.
15052         
15053         * domain.c: Modified file.
15054         (mono_domain_assembly_load): removed hash table insertion of assemblies.
15055
15056         Fixes bug #33196.
15057
15058 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
15059
15060         * reflection.c: Map PEFileKind to the value expected by the WinNT
15061         image loader. 
15062
15063 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15064
15065         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
15066         Read until the buffer is filled completely.
15067
15068 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15069
15070         * icall.c: implemented MonoType.InternalGetEvent ().
15071
15072 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15073
15074         * appdomain.c: implemented InitAppDomainSetup. Delayed
15075         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
15076         the entry_assembly.
15077
15078         * assembly.c: base_dir is now an absolute path ending with
15079         G_DIR_SEPARATOR.
15080
15081         * icall.c: modified get_location according to the above changes.
15082
15083         * object.c: init AppDomain.SetupInformation for the default domain after
15084         we have the entry assembly.
15085
15086         * domain.c: when unloading a domain, setup = NULL.
15087
15088 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
15089
15090         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
15091
15092 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
15093
15094         * object.h, object.c: introduced mono_object_get_virtual_method ()
15095         to lookup the method invoked on an object when a callvirt is done on
15096         a method.
15097         * icall.c: make MethodInfo::Invoke() always do a virtual call.
15098
15099 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15100
15101         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
15102         current domain when loaded an assembly and failed to load it.
15103
15104         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
15105
15106 2002-10-31  Dick Porter  <dick@ximian.com>
15107
15108         * icall.c: 
15109         * file-io.h: 
15110         * file-io.c: Return the error status in a parameter, as the
15111         GetLastError() value has long since been blown away if we try and
15112         look it up in a subsequent internal call invocation.  Delete the
15113         GetLastError() internal call, because it's useless.
15114
15115 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
15116
15117         * class.[ch]: added cast_class to fix bug 29517
15118
15119 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
15120
15121         * marshal.c: create valid IL code in the filter clause:
15122         the new JIT is less forgiving:-)
15123
15124 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15125
15126         * icall.c: removed get_property internal call.
15127
15128 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
15129
15130         * appdomain.h domain.c: Added an ID to appdomains.
15131         
15132         * threads.c threads.h icall.c: Implement icall
15133         Thread:GetDomainID(), and remove unused icall 
15134         CurrentThreadDomain_internal.
15135
15136 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15137
15138         * icall.c: Don't recurse through the base types in GetConstructor.
15139         Fixes bug #32063. 
15140
15141 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15142
15143         * mempool.h, mempool.c: added mono_mempool_empty() and
15144         mono_mempool_stats().
15145
15146 2002-10-23  Dick Porter  <dick@ximian.com>
15147
15148         * file-io.c: 
15149         * file-io.h: 
15150         * icall.c: Added MonoIO.GetFileType internal call
15151
15152 2002-10-17  Dick Porter  <dick@ximian.com>
15153
15154         * appdomain.c (mono_runtime_cleanup): Don't signal the async
15155         delegate semaphore before waiting for all threads to finish,
15156         because new threads can also call async delegates.  Fixes bug
15157         32004.
15158
15159         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
15160         of 3 seconds, in case another async job is queued.  (This part is
15161         needed because the bug fix reintroduced the 3s exit lag.)  This
15162         makes the mono_runtime_shutdown flag superfluous.
15163
15164 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15165
15166         * reflection.c: include ehader size in method section headers.
15167         Really check for suplicated modules entries.
15168
15169 2002-10-17  Martin Baulig  <martin@gnome.org>
15170
15171         * debug-mono-symfile.c: Added back support for locals.
15172
15173 2002-10-14  Martin Baulig  <martin@gnome.org>
15174
15175         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
15176         MONO_TYPE_VOID.
15177
15178 2002-10-14  Martin Baulig  <martin@gnome.org>
15179
15180         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
15181         mono_class_get() instead of looking in the class cache. 
15182
15183 2002-10-13  Martin Baulig  <martin@gnome.org>
15184
15185         * debug-mono-symfile.c: Set version number to 28, include the
15186         signature in method names.
15187
15188 2002-10-13  Martin Baulig  <martin@gnome.org>
15189
15190         * debug-mono-symfile.h: Set version number to 27.
15191
15192 2002-10-11  Martin Baulig  <martin@gnome.org>
15193
15194         * gc.c: Don't register/unregister NULL pointers as disappearing links.
15195
15196 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15197
15198         * metadata.c, metadata.h: added helper function to allocate signatures.
15199
15200 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15201
15202         * icall.c: added internal call to get the location of machine.config.
15203
15204 2002-10-08  Martin Baulig  <martin@gnome.org>
15205
15206         * debug-mono-symfile.c: Ignore classes with a pending init for the
15207         moment.
15208
15209 2002-10-03  Dick Porter  <dick@ximian.com>
15210
15211         * threads.c: Freebsd pthread_t is a pointer
15212
15213 2002-10-03  Dick Porter  <dick@ximian.com>
15214
15215         * socket-io.c: Implemented GetHostName_internal
15216
15217 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15218
15219         * mono-config.c:
15220         (mono_config_parse_file): don't leak the text.
15221
15222 2002-10-02  Martin Baulig  <martin@gnome.org>
15223
15224         * debug-mono-symfile.c: Added support for methods.
15225
15226 2002-10-01  Martin Baulig  <martin@gnome.org>
15227
15228         * debug-mono-symfile.c: Don't emit methods and line numbers for
15229         the dynamic symbol file, just write the type table.  We can easily
15230         have an external helper program which creates a symbol file for an
15231         IL file.        
15232
15233 2002-10-01  Dick Porter  <dick@ximian.com>
15234
15235         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
15236         Only add the handle to the cleanup array when we're about to
15237         launch the thread.  Bug 31425 deadlocked when the test was run on
15238         mono under w32.
15239
15240 2002-10-01  Martin Baulig  <martin@gnome.org>
15241
15242         * debug-mono-symfile.c: Added support for properties.
15243
15244 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15245
15246         * reflection.c: unaligned store fix from Mark Crichton
15247         <crichton@gimp.org>.
15248
15249 2002-09-27  Martin Baulig  <martin@gnome.org>
15250
15251         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
15252         New interncall.
15253
15254 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
15255
15256         * assembly.h, assembly.c: use a sane API to hook into the assembly
15257         loading process instead of a useless special-purpouse hack
15258         (ngen needs a hook, too, for example).
15259
15260 2002-09-27  Dick Porter  <dick@ximian.com>
15261
15262         * threads.c (mono_thread_init): Call GetCurrentProcess() so
15263         io-layer can set up some process handle info.  Not needed on w32,
15264         but doesn't hurt either.
15265
15266         * process.c: Pass the program name in the second parameter to
15267         CreateProcess, so the path is searched.  Include the working
15268         directory. Implemented process name, process enumeration, and some
15269         process detail internal calls.
15270         
15271         * icall.c: Added internal calls for process lookup, and some
15272         process details
15273
15274 2002-09-26  Martin Baulig  <martin@gnome.org>
15275
15276         * assembly.c (mono_install_open_assembly_hook): New global
15277         function to install a function to be invoked each time a new
15278         assembly is loaded.
15279         (mono_assembly_open): Run this callback function if set.
15280
15281         * debug-mono-symfile.c: Put back line numbers for the dynamic
15282         symbol file and also record the .il file as source file.  This
15283         allows us to install the temporary symbol file as `file.dbg' just
15284         like a compiler-generated one.
15285
15286 2002-09-26  Nick Zigarovich <nick@chemlab.org>
15287
15288         * Corrected typo in gc.c (BOHEM vs BOEHM).
15289
15290 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15291
15292         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
15293         GetProperties. Also avoid calling g_slist_length in GetProperties and
15294         GetMethods.
15295
15296 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15297
15298         * reflection.c: avoid unaligned stores (bug spotted by
15299         Mark Crichton  <crichton@gimp.org>).
15300
15301 2002-09-25  Martin Baulig  <martin@gnome.org>
15302
15303         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
15304         instead of guint64 for addresses and added prologue/epilogue info.
15305
15306 2002-09-25  Martin Baulig  <martin@gnome.org>
15307
15308         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
15309         store line number info.  For the dynamic symbol file, we only need
15310         to provide the JIT generated dynamic line number info for the dynamic
15311         symbol file.
15312
15313 2002-09-25  Martin Baulig  <martin@gnome.org>
15314
15315         * debug-mono-symfile.h: Incremented version number.
15316
15317 2002-09-24  Martin Baulig  <martin@gnome.org>
15318
15319         * class.c (mono_debugger_class_init_func): New global function
15320         pointer variable.
15321         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
15322         call it.
15323
15324         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
15325         function.  This is called via the mono_debugger_class_init_func
15326         hook to add all types to the dynamic type table.
15327         (ves_icall_MonoDebugger_GetType): New interncall to get a class
15328         from its metadata token.
15329
15330         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
15331         New interncall for the debugger.
15332
15333 2002-09-24  Nick Drochak <ndrochak@gol.com>
15334
15335         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
15336         before using it in case it is null.
15337         
15338 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15339
15340         * metadata.c: allow custom modifiers in local var signatures
15341         (bug spotted by Zoltan Varga).
15342
15343 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15344
15345         * class.c: deal with the <Module> class that may have a NULL vtable.
15346         Eliminate warnings.
15347
15348 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15349
15350         * image.c, image.h: more strong name helpers.
15351         * monosn.c: more work: convert pem keys to cryptoapi format.
15352
15353 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15354
15355         * string-icalls.c: speedup IndexOf.
15356
15357 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15358
15359         * icall.c: updates from Zoltan.2.Varga@nokia.com.
15360
15361 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15362
15363         * icall.c: cleanup: use mono_object_domain ().
15364
15365 2002-09-23  Martin Baulig  <martin@gnome.org>
15366
15367         * debug-mono-symfile.c: Improved type support.
15368
15369 2002-09-22  Martin Baulig  <martin@gnome.org>
15370
15371         * debug-mono-symfile.c: Added support for reference types and strings.
15372
15373 2002-09-22  Martin Baulig  <martin@gnome.org>
15374
15375         * debug-mono-symfile.c: Started to work on the type table.
15376
15377 2002-09-21  Martin Baulig  <martin@gnome.org>
15378
15379         * debug-mono-symfile.c: Largely reworked the symbol table format.
15380         The symbol table is now incrementally updated each time a new
15381         method is added.  We're now also using our own magic and version
15382         so that you don't need to recompile all your classes if the
15383         dynamic table changes.
15384         (mono_debug_update_mono_symbol_file): Removed.
15385         (mono_debug_symfile_add_method): New function to add a method.
15386
15387 2002-09-21  Martin Baulig  <martin@gnome.org>
15388
15389         * icall.c
15390         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
15391         New interncall.
15392
15393         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
15394         New interncall to get a method from its metadata token.
15395
15396 2002-09-21  Martin Baulig  <martin@gnome.org>
15397
15398         * debug-mono-symfile.c: Create type table.
15399
15400 2002-09-20  Martin Baulig  <martin@gnome.org>
15401
15402         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
15403
15404 2002-09-20  Martin Baulig  <martin@gnome.org>
15405
15406         * debug-mono-symfile.c: Provide information about params and locals.
15407
15408 2002-09-20  Martin Baulig  <martin@gnome.org>
15409
15410         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
15411         New interncall.
15412
15413         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
15414         interncall to get a method from its metadata token.
15415
15416 2002-09-20  Martin Baulig  <martin@gnome.org>
15417
15418         * debug-mono-symfile.c: Added a few checks for method->header
15419         being non-NULL.  This should never happen, but for the moment
15420         let's use a g_warning() rather than a g_assert().
15421
15422 2002-09-19  Mark Crichton  <crichton@gimp.org>
15423
15424         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
15425         even if support for it isn't present.  Added an #ifdef to fix this.
15426
15427         * socket-io.c: Added checks back for Solaris support.
15428
15429 2002-09-19  Martin Baulig  <martin@gnome.org>
15430
15431         * debug-mono-symfile.c (read_string, write_string): Reflect latest
15432         changes in the symbol file format.
15433
15434 2002-09-18  Martin Baulig  <martin@gnome.org>
15435
15436         * debug-mono-symfile.c: Set version number to 21.
15437
15438 2002-09-18  Dick Porter  <dick@ximian.com>
15439
15440         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
15441         on netbsd.  Fixes bug 30051.
15442
15443 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15444
15445         * reflection.c:
15446         (set_version_from_string): little fix.
15447
15448 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15449
15450         * monosn.c, Makefile.am: added strong name utility.
15451         * reflection.h, reflection.c: implemented delayed signing,
15452         locale, version and hash id assembly attributes.
15453
15454 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
15455
15456         * loader.c, metadata.c: load param attributes in signatures.
15457
15458 2002-09-16  Martin Baulig  <martin@gnome.org>
15459
15460         * debug-mono-symfile.c: Added string table with all method names.
15461
15462 2002-09-14  Martin Baulig  <martin@gnome.org>
15463
15464         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
15465         fast method lookup.
15466
15467 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
15468
15469         * reflection.c: record the public key token of referenced assemblies.
15470
15471 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15472
15473         * image.c, image.h: added functions to get the strong name and the
15474         public key of an assembly.
15475         * pedump.c: use them.
15476
15477 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
15478
15479         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
15480
15481 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
15482
15483         * marshal.c (mono_marshal_get_managed_wrapper): Added
15484         MONO_TYPE_BOOLEAN 
15485
15486 2002-09-11  Martin Baulig  <martin@gnome.org>
15487
15488         * gc.c: Call GC_unregister_disappearing_link() on all links when
15489         finalizing them, this is necessary to aviod a crash in boehm's
15490         finalize handler.
15491
15492 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15493
15494         * gc.c: handle GetTarget for finalized objects spotted and fixed by
15495         nick@chemlab.org.
15496
15497 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
15498
15499         * icall.c: implemented MonoType::Module.
15500         * reflection.c, reflection.h: mono_module_get_object () from
15501         Tomi Pakarinen <tomi.pakarinen@welho.com>.
15502
15503 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
15504
15505         * icall.c: ignore overridden methods in GetMethods ().
15506         Fix for FieldInfo::SetValue().
15507         * object.c: handle float/double in runtime invoke.
15508
15509 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
15510
15511         * object.c: allow a constructor to be called again on an object.
15512
15513 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15514
15515         * class.h, class.c: move field layout code to it's own function and
15516         export it. Get an interface id earlier. Move fields in MonoClass
15517         so they are more cache friendly and align the bitfields.
15518         * loader.c: temporary handle get_param_names() for a runtime method.
15519         * reflection.c, reflection.h: more code to handle runtime creation of
15520         types.
15521
15522 2002-09-09  Martin Baulig  <martin@gnome.org>
15523
15524         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
15525         signature with the pinvoke field being set for the actual call.
15526
15527 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15528
15529         * icall.c: removed some unused icalls. Start of map of glib charsets
15530         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
15531
15532 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15533
15534         * debug-helpers.c: break infinite loop (found and fixed by
15535         Holger Arnold <harnold@gmx.de>).
15536
15537 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
15538
15539         * icall.c: target may be null in create_delegate.
15540
15541 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15542
15543         * marshal.c: handle a boolean return type.
15544
15545 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15546
15547         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
15548
15549 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15550
15551         * gc.c: fix weakreferences.
15552
15553 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
15554
15555         * icall.c: added icall to get default codepage.
15556
15557 2002-09-03  Dick Porter  <dick@ximian.com>
15558
15559         * threads.h: 
15560         * threads.c: Use MonoThread instead of MonoObject where
15561         apropriate.
15562
15563         Store running thread objects in a hash table, so that we have all
15564         the info to hand when waiting for them to finish
15565         (means we don't need OpenThread() any more, so mingw builds should
15566         be fully functional again.)
15567
15568         * verify.c:
15569         * object.h: Added thread ID to MonoThread
15570
15571 2002-09-03  Martin Baulig  <martin@gnome.org>
15572
15573         * icall.c (System.Reflection.Assembly::get_location): New interncall.
15574
15575 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15576
15577         * icall.c: fixed leak in get_temp_path. Thanks lupus.
15578
15579 2002-09-03  Martin Baulig  <martin@gnome.org>
15580
15581         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
15582         argument to store the end address of the disassembled instruction.
15583
15584         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
15585         here from debug-symfile.h.
15586         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
15587         JIT into this struct.
15588         (MonoSymbolFile): Added `char *image_file' field.
15589         (MonoDebugGetMethodFunc): Removed.
15590         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
15591         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
15592         (mono_debug_find_method): New method.
15593
15594         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
15595         create a full symbol file.
15596         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
15597         and static symbol files.
15598         (mono_debug_find_method): The symbol file keeps an internal method hash,
15599         call this to get a MonoDebugMethodInfo from a MonoMethod.
15600
15601         * debug-symfile.[ch]: Removed.
15602
15603 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
15604
15605         * image.c (do_mono_image_open): Remove linker version check.
15606
15607 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
15608
15609         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
15610         wrappers for instance methods.
15611         
15612 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15613
15614         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
15615
15616 2002-08-28  Dick Porter  <dick@ximian.com>
15617
15618         * Makefile.am: Export HOST_CC for w32 builds
15619
15620 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15621
15622         * file-io.c process.c: MonoString are null terminated, no
15623         need for mono_string_to_utf16() anymore.
15624
15625 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15626
15627         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
15628
15629 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
15630
15631         * icall.c, reflection.h: speedup System.MonoType.
15632
15633 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15634
15635         * reflection.c: allow null as the value of a string argument in
15636         custom attributes constructors.
15637
15638 2002-08-27  Martin Baulig  <martin@gnome.org>
15639
15640         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
15641         `trampoline_address' field.
15642
15643 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
15644
15645         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
15646         check (fixes bug #29486) 
15647
15648 2002-08-27  Martin Baulig  <martin@gnome.org>
15649
15650         * debug-mono-symfile.c: Changed the file format in a way that allows us
15651         open it read-only and to use a specially malloced area for all the
15652         dynamic data.  We can now also generate a symbol file on-the-fly if we're
15653         debugging IL code and there is no MCS generated symbol file for it.
15654
15655 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
15656
15657         * object.c: added a define for a good string and array
15658         creation speedup (not enabled by default because we need to deal with
15659         the synch stuff).
15660
15661 2002-08-26  Martin Baulig  <martin@gnome.org>
15662
15663         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
15664         function to create a dynamic symbol file.  This is used by the
15665         debugger to create a symbol file for IL code on-the-fly.
15666
15667 2002-08-26  Martin Baulig  <martin@gnome.org>
15668
15669         * loader.c (mono_lookup_pinvoke_call): Include the error message
15670         from g_module_error() in the error message.
15671
15672 2002-08-24  Martin Baulig  <martin@gnome.org>
15673
15674         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
15675         function to update the symbol file.  The symbol file is mmap()ed
15676         writable, but private.  This allows us to install the symbol file
15677         together with the assembly.
15678
15679 2002-08-24  Martin Baulig  <martin@gnome.org>
15680
15681         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
15682         but they can read the new symbol file format which mcs is now creating.
15683
15684         * debug-symfile.c (mono_debug_find_source_location): Moved to
15685         debug-mono-symfile.c; this is now operating on the new symbol file.
15686
15687 2002-08-23  Martin Baulig  <martin@gnome.org>
15688
15689         * debug-helpers.c (mono_method_desc_from_method): New function to get
15690         a MonoMethodDesc from a MonoMethod.
15691
15692 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15693
15694         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
15695         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
15696
15697 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
15698
15699         * string-icalls.[ch]: make helper methods static.
15700
15701 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15702
15703         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
15704         types to it and to SetValueInternal.
15705
15706         * object.c: Moved handle_enum label to its proper place. This was the
15707         f... bug! ;-)
15708
15709         This time i compiled mcs and gtk-sharp and they both work.
15710
15711 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15712
15713         * icall.c: reverted partially my previous patch until 
15714         object.c:set_value handles enums correcly.
15715
15716 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15717
15718         * icall.c:
15719         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
15720         (ves_icall_System_Environment_get_MachineName): removed warning when
15721         compiling under cygwin.
15722
15723 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15724
15725         * object.c: fixed field_get_value() for reference types.
15726
15727 2002-08-22  Dick Porter  <dick@ximian.com>
15728
15729         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
15730         Don't free a buffer while it's still needed.  Patch from Jonathan
15731         Liger <Jonathan.liger@wanadoo.fr>
15732
15733 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
15734
15735         * icall.c (ves_icall_System_Environment_get_Platform): Add new
15736         internal call.
15737
15738 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
15739
15740         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
15741         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
15742
15743         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
15744         we call unmanaged code which throws exceptions.
15745
15746 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15747
15748         * appdomain.h: added per-domain entry_assembly.
15749         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
15750         arguments.
15751         * icall.c: Assembly::GetEntryAssembly icall.
15752         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
15753         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
15754
15755 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15756
15757         * appdomain.h, gc.c: added mono_domain_finalize ().
15758
15759 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15760
15761         * object.c:
15762         (mono_print_unhandled_exception): changed g_warning by g_printerr
15763         because g_log has a 1024 characters limit (yeah, i got a big stack
15764         trace). Don't print exception name, that should be in ToString 
15765         returned string.
15766
15767 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15768
15769         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
15770         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
15771
15772 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15773
15774         * object.c:
15775         (mono_print_unhandled_exception): after previous commit, i realized
15776         that MS calls ToString on the exception. I changed this function to
15777         do that. This way we get stack_trace for free.
15778
15779 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15780
15781         * object.c:
15782         (mono_print_unhandled_exception): invoke Message property instead of
15783         getting 'message' field from Exception. Don't allocate memory for
15784         'trace' and 'message' if not needed.
15785
15786 2002-08-18  Dick Porter  <dick@ximian.com>
15787
15788         * unicode.c: Fix asserts to match Encoder.cs checks
15789
15790 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15791
15792         * marshal.c: fix unaligned store issue and a few wrong
15793         opcode argument types.
15794
15795 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15796
15797         * icall.c: added GetUninitializedObjectInternal internal call.
15798
15799 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
15800
15801         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
15802         to the right domain.
15803
15804 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
15805
15806         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
15807
15808         * class.c (class_compute_field_layout): set blittable to false for Strings
15809
15810         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
15811
15812 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15813
15814         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
15815         first chunk of code to create types at runtime. Code to
15816         handle ReflectedType/DeclaringType. Make reflection handles
15817         domain specific.
15818
15819 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
15820
15821         * class.c: set correct name in arrays.
15822
15823 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
15824
15825         * appdomain.c (mono_domain_transfer_object): make it work with
15826         valuetypes. bug fixes.
15827
15828 2002-08-12  Dick Porter  <dick@ximian.com>
15829
15830         * object.h: Rename some parameters to avoid c++ keywords (Patch
15831         from Joseph Wenninger <kde@jowenn.at>)
15832
15833 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
15834
15835         * icall.c: added icall to implement Assembly.GetFile*.
15836
15837 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15838
15839         * reflection.h, reflection.c: code to embed managed resources.
15840
15841 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15842
15843         * class.c: move all the type size stuff into
15844         class_compute_field_layout().
15845
15846 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15847
15848         * class.c: ensure enums have always the correct instance size.
15849         * unicode.c: remove wrong assert.
15850
15851 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
15852
15853         * assembly.c: fix mem corruption issue.
15854         * image.h, image.c: added mono_image_get_resource () to access
15855         managed resources.
15856         * icall.c: implemented Assembly.EntryPoint property and some
15857         Managed Resources related internalcalls.
15858
15859
15860 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15861
15862         * image.c, image.h: impemented mono_image_get_entry_point ().
15863         * appdomain.c: use mono_image_get_entry_point.
15864
15865 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15866
15867         * reflection.c: support the object type argument when loading
15868         custom attributes.
15869
15870 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
15871
15872         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
15873         String as return type.
15874
15875 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
15876
15877         * reflection.c: fix encoding of named args for custom attrs to match
15878         the ms implementation. Read them back when instantiating custom
15879         attributes.
15880
15881 2002-08-02  Radek Doulik  <rodo@ximian.com>
15882
15883         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
15884         by Dietmar as quick fix
15885         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
15886         16 as stack size, used on more places as quick fix before Dietmar
15887         will fix it properly
15888
15889 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15890
15891         * object.h, object.c: added accessors for fields and properties.
15892
15893 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15894
15895         * class.c, class.h: made mono_class_get_field_from_name ()
15896         loop on parent types.
15897         Added mono_class_get_property_from_name ().
15898
15899 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15900
15901         * class.c, class.h: move the code to setup the type vtable in its own
15902         function so that it can be reused also for types created at runtime.
15903         Eliminate the "class" identifier from the header file.
15904         * reflection.c: setup the vtable for enums so that we can create
15905         objects for use in SetConstant ().
15906
15907 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
15908
15909         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
15910         instead of the delegate itself as this pointer (bug #28383)
15911
15912 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
15913
15914         * marshal.c (mono_marshal_get_managed_wrapper): added return type
15915         conversions.
15916
15917 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15918
15919         * loader.c: don't set the pinvoke bit on icalls.
15920
15921 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
15922
15923         * debug-helpers.c (mono_method_full_name): only print a number to
15924         indicate wrapper type (so that the output is more readable in traces).
15925
15926 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
15927
15928         * class.c (mono_class_init): include method override patch from Paolo
15929
15930 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
15931
15932         * icall.c: fixed GetTypeCode().
15933
15934 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
15935
15936         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
15937         use real delegate invoke function to make it work with multicast
15938         delegates (fix bug# 28291).
15939
15940 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
15941
15942         * object.c: load constant strings.
15943
15944 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15945
15946         * reflection.c: no magic numbers.
15947         * tabledefs.h: security action enum.
15948
15949 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15950
15951         * assembly.c: fix possible memory corruption.
15952
15953 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15954
15955         * reflection.h, reflection.c: added support for linking resources.
15956         * verify.c: check we have an updated corlib.
15957
15958 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
15959
15960         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
15961         string arrays.
15962         (mono_marshal_string_array): null terminate unmanaged string arrays.
15963         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
15964
15965 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15966
15967         * icall.c: Type.GetType () can now return also types from the
15968         calling assembly.
15969
15970 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
15971
15972         * loader.h, loader.c: stack walking support.
15973         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
15974         GetCallingAssembly.
15975
15976 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
15977
15978         * marshal.c: added optimisations for blittable types 
15979
15980         * class.c (mono_array_class_get): do not set blittable attribute on arrays
15981         (mono_class_setup_mono_type): set blittable attribute for single
15982         and double.
15983
15984         * marshal.c (mono_string_utf8_to_builder): impl.
15985         (mono_string_builder_to_utf8): impl.
15986         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
15987
15988 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
15989
15990         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
15991         (mono_marshal_get_managed_wrapper): impl. byref types
15992
15993 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15994
15995         * icall.c:
15996         (search_method): don't display debug message. 
15997
15998 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
15999
16000         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
16001
16002 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16003
16004         * appdomain.c: set the missing filename when throwing exception.
16005
16006 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
16007
16008         * metadata.c (mono_type_size): code cleanup
16009         (mono_type_stack_size): removed some test code
16010
16011 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
16012
16013         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
16014         mono_get_exception_file_not_found now.
16015
16016         * exception.c (mono_exception_from_name_two_strings): New version
16017         that will call a constructor with two string arguments. 
16018         (mono_get_exception_file_not_found): New helper routine, used to
16019         report file-not-found errors.
16020
16021 2002-07-20  Dick Porter  <dick@ximian.com>
16022
16023         * process.h:
16024         * process.c: Pass file handles to CreateProcess
16025         
16026         * icall.c:
16027         * file-io.h:
16028         * file-io.c: Implemented CreatePipe
16029
16030 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
16031
16032         * metadata.c (mono_get_param_info): set alignment for value types
16033
16034 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16035
16036         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
16037         Constify mono_domain_assembly_open().
16038         * loader.c: handle null namespace in icalls.
16039
16040 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
16041
16042         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
16043         (emit_str_to_ptr_conv): marshal object as structs
16044
16045         * metadata.c (mono_type_to_unmanaged): marshal object as structs
16046
16047         * marshal.c (mono_marshal_get_runtime_invoke): support value types
16048
16049 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
16050
16051         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
16052         (mono_marshal_get_native_wrapper): we an now return value types
16053
16054 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16055
16056         * verify.c: more checks implemented.
16057
16058 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
16059
16060         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
16061         (fix bug #27695)
16062         (mono_marshal_get_native_wrapper): allow byref arguments
16063         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
16064         impl. PtrToStringXXX methods
16065         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
16066         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
16067         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
16068         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
16069         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
16070
16071 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16072
16073         * reflection.c: fix buglet in parsing an assembly name.
16074
16075 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
16076
16077         * marshal.c (emit_ptr_to_str_conv): first impl.
16078
16079 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16080
16081         * object.c, class.h: cache the vtable in the class as suggested by
16082         vargaz@freemail.hu (Zoltan Varga).
16083
16084 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16085
16086         * class.h, loader.c: added mono_field_from_token().
16087         * verify.c: first cut of type checking code.
16088
16089 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
16090
16091         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
16092
16093 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
16094
16095         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
16096         (fix bug #27782)
16097         (mono_marshal_get_remoting_invoke): impl.
16098         (mono_delegate_begin_invoke): impl.
16099         (mono_mb_emit_save_args): impl.
16100         (mono_delegate_end_invoke): impl.
16101         (mono_marshal_get_delegate_begin_invoke):
16102         (mono_marshal_get_delegate_end_invoke):
16103         (mono_marshal_get_delegate_invoke): generate a special name for
16104         those methods (including the signature) and associate them whith
16105         the delegate class. 
16106
16107 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
16108
16109         * reflection.[ch]: 
16110         (mono_reflection_type_from_name): now it has a MonoImage parameter
16111         which is used as the default image to search the type in. If the image
16112         is NULL or getting the type from it fails, it defaults to corlib.
16113
16114         * icall.c: changed 1 call to mono_reflection_type_from_name to match
16115         new parameter.
16116
16117 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16118
16119         * reflection.c: update the parameter table index.
16120
16121 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16122
16123         * domain.c: don't include the mark byte in the string hash.
16124
16125 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16126
16127         * icall.cs: icall for Type.GetTypeCode ().
16128         * verify: a couple of fixes and disabled local initialization checks.
16129
16130 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
16131
16132         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
16133
16134         * debug-helpers.c (mono_method_full_name): print the type of the
16135         runtime wrapper
16136
16137         * metadata.c (mono_signature_hash): a hash function for signatures
16138         (mono_signature_hash): better hash algorithm
16139
16140         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
16141
16142         * debug-helpers.c (mono_method_full_name): this can now generate
16143         method names with signatures
16144
16145         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
16146         method dont have this pointers.
16147
16148 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16149
16150         * reflection.c: fixup typebuilder tokens.
16151         * image.c: fix buglet.
16152         * marshal.h: remove whitespace.
16153         * metadata.h, metadata.c: reinstate code that was removed.
16154         * verify.c: handle catch directives and fix another couple of bugs.
16155
16156 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
16157
16158         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
16159         (mono_marshal_get_native_wrapper): make it comp. with the old code
16160         (mono_marshal_get_native_wrapper): support boolean
16161         (mono_marshal_get_managed_wrapper): support more types
16162
16163 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
16164
16165         * class.c (class_compute_field_layout): compute class->blittable attribute.
16166
16167 2002-07-09  Dick Porter  <dick@ximian.com>
16168
16169         * threads.c: Make the thread cleaning up cope with threads that
16170         call ExitThread()
16171
16172 2002-07-08  Radek Doulik  <rodo@ximian.com>
16173
16174         * reflection.c (method_encode_code): use non-translated values to
16175         compute finally_start, this fixes exception handling on ppc, yay!
16176
16177         * decimal.h (struct signscale): fix endianess
16178
16179 2002-07-07  Radek Doulik  <rodo@ximian.com>
16180
16181         * reflection.c: swap box_val and not val
16182
16183 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16184
16185         * reflection.c, reflection.h: handle full assembly info in type name.
16186         Handle Type arguments when loading custom attributes.
16187         * icall.c: updated to use new mono_reflection_type_from_name () method.
16188
16189 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16190
16191         * loader.c:
16192         (method_from_memberref): also print assembly name when method not found.
16193
16194 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16195
16196         * icall.c:
16197         (ves_icall_TypeGetProperties): fixed bug #27473. 
16198
16199 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16200
16201         * reflection.c: display image name and token when cannot find the
16202         .ctor for an attribute.
16203
16204 2002-07-05  Martin Baulig  <martin@gnome.org>
16205
16206         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16207
16208 2002-07-04  Dick Porter  <dick@ximian.com>
16209
16210         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
16211         compile on mingw.  This will cause mingw builds to not wait for
16212         subthreads to terminate after the main thread does.  I've lodged a
16213         bug with the mingw developers for them to wrap OpenThread().
16214
16215 2002-07-03  Dick Porter  <dick@ximian.com>
16216
16217         * threads.c: Store thread IDs instead of handles, because
16218         GetCurrentThread() returns a pseudohandle and therefore stores
16219         useless values.  mono_thread_cleanup() continues checking the
16220         array of threads until it is empty, to cope with subthreads
16221         spawning new threads after the main thread has finished.
16222
16223         * profiler.h:
16224         * profiler.c:
16225         * profiler-private.h: Pass the thread ID to thread profiler
16226         functions, instead of a handle
16227
16228 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16229
16230         * verify.c: fixes to make it more usable.
16231         * pedump.c: added --verify code to verify IL code in an assembly.
16232
16233 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16234
16235         * reflection.c: turn errors into warnings to allow compiling corlib.
16236
16237 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16238
16239         * reflection.c: add special cases to compile corlib.
16240
16241 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16242
16243         * reflection.c: handle properties with only a set method.
16244
16245 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16246
16247         * opcodes.h: add enum with opcodes in opval order.
16248
16249 2002-07-01  Dick Porter  <dick@ximian.com>
16250         
16251         * object.h:
16252         * object.c (mono_runtime_run_main): Removed unneeded argument
16253
16254 2002-06-28  Martin Baulig  <martin@gnome.org>
16255
16256         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16257
16258 2002-06-27  Dick Porter  <dick@ximian.com>
16259
16260         * threads.c: Store the handle in both the parent thread and in the
16261         subthread, to minimise the time between starting a new thread and
16262         storing its ID.
16263
16264 2002-06-26  Dick Porter  <dick@ximian.com>
16265
16266         * appdomain.c (mono_runtime_cleanup): Close the socket library
16267         after all the threads have finished, not before
16268
16269 2002-06-26  Martin Baulig  <martin@gnome.org>
16270
16271         * debug-symfile.c (mono_debug_find_source_location): Added
16272         `guint32 *line_number' argument.  If it's not NULL, store the line number
16273         there and return the file name without the line number.
16274
16275 2002-06-25  Dick Porter  <dick@ximian.com>
16276
16277         * icall.c:
16278         * process.h:
16279         * process.c: Process forking and other support functions
16280
16281 2002-06-25  Dick Porter  <dick@ximian.com>
16282
16283         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
16284         things dont happen when the image is closed.
16285         (mono_image_lookup_resource): Walk the resource section looking
16286         for a particular entry
16287
16288         * cil-coff.h: PE resource section decoding
16289
16290 2002-06-25  Dick Porter  <dick@ximian.com>
16291         
16292         * assembly.h:
16293         * assembly.c: 
16294         (mono_assembly_foreach): Accessor functions to walk the list of
16295         loaded assemblies
16296         (mono_assembly_set_main):
16297         (mono_assembly_get_main): Process methods need to know which
16298         assembly is the "main" one
16299
16300         * object.c (mono_runtime_run_main): Record the main assembly
16301
16302         * debug-helpers.c: Fix typo
16303
16304 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
16305
16306         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
16307         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
16308
16309 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16310
16311         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
16312
16313 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
16314
16315         * image.c (do_mono_image_open): Initialize reference count,
16316         otherwise we leak the MonoImage.
16317
16318 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16319
16320         * reflection.c: small tweak to handle self-hosting.
16321
16322 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16323
16324         * reflection.c: fix type name parse code.
16325
16326 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16327
16328         * reflection.c: break out of the loop.
16329         * image.c: special case corlib.
16330
16331 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16332
16333         * reflection.c: add all the custom attrs at the end to ensure the
16334         ctors have been properly initialized when the attributes are defined
16335         in the current assembly.
16336
16337 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16338
16339         * reflection.c: handle correctly multiple-nested types.
16340
16341 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
16342
16343         * row-indexes.h: fix typos.
16344         * reflection.c: adjust for typos and fix method_def_or_ref
16345         encoding in MethodImpl table.
16346
16347 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16348
16349         * reflection.c: fix entry point patching (thanks Serge!).
16350
16351 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
16352
16353         * verify.c: add check for System.Exception
16354
16355 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16356
16357         * image.c, class.c: minifix for code just c&p'ed.
16358         * reflection.c: warning fix.
16359         * object.h, loader.h, domain.c: load also StringBuilder.
16360
16361 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16362
16363         * marshal.h, marshal.c: some support code to handle complex marshaling.
16364
16365 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16366
16367         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
16368         Better signatures with vtable error dump.
16369
16370 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
16371
16372         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
16373
16374 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
16375
16376         * icall.c (ves_icall_Type_GetField): impl.
16377
16378 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16379
16380         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
16381         to retrieve a marshal description blob for a field or param.
16382
16383 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16384
16385         * reflection.h, reflection.c: change order of nested type emission
16386         to avoid table corruption. The NestedTypes table is sorted.
16387         * icall.c: change order of GetConstructor results to workaround mcs bug.
16388
16389 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16390
16391         * reflection.h, reflection.c: handle field and param marshal
16392         information.
16393
16394 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16395
16396         * icall.c, marshal.c marshal.h: more Marshal class implementation.
16397
16398 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16399
16400         * reflection.c: fix call convention.
16401
16402 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16403
16404         * reflection.h, reflection.c: mono_image_get_memberref_token()
16405         takes a type instead of a class, now. Added
16406         mono_image_get_array_token() to create tokens for the special
16407         multi-dim array methods.
16408
16409 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16410
16411         * assembly.c: handle modules (no assembly table). Split
16412         loading references in its own function.
16413         * class.c: handle moduleref resolution scope.
16414         * image.c, image.h: cache module name in image.
16415
16416 2002-06-07  Martin Baulig  <martin@gnome.org>
16417
16418         * reflection.c (mono_image_get_type_info): Only add a class layout entry
16419         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
16420
16421 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16422
16423         * icall.c: more signature fixes that used uint instead of int.
16424
16425 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16426
16427         * reflection.c: fixed signature of field refs.
16428
16429 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16430
16431         * class.c, reflection.c: handle typerefs of nested types
16432         (both on read and when writing files).
16433
16434 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
16435
16436         * icall.c: fix method signatures that tried to workaround the previous
16437         typo, d'oh!
16438
16439 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16440
16441         * debug-helpers.c: fix typo.
16442
16443 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16444
16445         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
16446         rewrote the PE/COFF writing code (our programs are understood by the
16447         ms runtime, now).
16448
16449 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16450
16451         * gc.c, gc.h, icall.c: weakreference support.
16452
16453 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16454
16455         * Makefile.am, mono-config.c: use $(sysconfdir).
16456
16457 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16458
16459         * icall.c: changed default precision of Double.ToString() to 15.
16460         Fixed memory leak. Unified with Single.ToString.
16461
16462 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
16463
16464         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
16465
16466 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16467
16468         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
16469         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
16470         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
16471         and myself.
16472
16473 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16474
16475         * debug-symfile.c, sysmath.c: yet more compilation fixes.
16476
16477 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16478
16479         * reflection.c, socket-io.c: more compilation fixes.
16480
16481 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16482
16483         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
16484         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
16485         unicode.c: warning and compiler compatibility fixes.
16486
16487 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16488
16489         * class.h, metadata.c: fixed warnings/compilation errors.
16490
16491 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16492
16493         * Makefile.am, mono-config.c, mono-config.h: configuration file
16494         support routines.
16495         * loader.c, loader.h: make Dll mapping configurable at runtime in the
16496         config file. Export methods to insert and lookup mappings.
16497
16498 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16499
16500         * reflection.c: handle types and boxed objects in custom attr
16501         constructors.
16502
16503 2002-05-30  Martin Baulig  <martin@gnome.org>
16504
16505         * debug-symfile.c
16506         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
16507
16508 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
16509
16510         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
16511         to lookup the implmap row for a P/Invoke method.
16512         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
16513         P/Invoke method from the runtime on an as needed basis.
16514
16515 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
16516
16517         * metadata.c (mono_metadata_parse_signature): impl.
16518
16519 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16520
16521         * class.c: handle .pack directive.
16522
16523 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16524
16525         * object.c: initialize static fields with RVA data.
16526
16527 2002-05-25  Martin Baulig  <martin@gnome.org>
16528
16529         * debug-symfile.c
16530         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
16531
16532 2002-05-24  Martin Baulig  <martin@gnome.org>
16533
16534         * debug-symfile.c
16535         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
16536         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
16537         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
16538
16539 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16540
16541         * object.c: special case string ctros in invoke.
16542         * gc.c: silly whitespace changes.
16543
16544 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
16545
16546         * threadpool.[ch]: impl. a threadpool that can
16547         be used by mint and mono.
16548
16549 2002-05-22  Martin Baulig  <martin@gnome.org>
16550
16551         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
16552         The first argument is now a `MonoReflectionModuleBuilder *', the return
16553         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
16554         `methods' field to get the method builder.  The `token' argument is the
16555         unfixed token.
16556
16557         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
16558         invalid characters instead of g_assert_not_reached()ing.  This seems
16559         to be the behaviour of mscorlib.
16560
16561 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
16562
16563         * object.c (mono_runtime_invoke_array): applied patch from Rachel
16564         Hestilow to fix bug #25104
16565
16566 2002-05-21  Martin Baulig  <martin@gnome.org>
16567
16568         * debug-symfile.c (mono_debug_find_source_location): New function.
16569         Looks up an IL offset in the line number table and returns the source
16570         location as a string.
16571
16572 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16573
16574         * icall.c:
16575         (mono_double_ToStringImpl): changed %f by %g until we have something
16576         better.
16577
16578 2002-05-21  Nick Drochak  <ndrochak@gol.com>
16579
16580         * icall.c : Use different name for Math.Pow's icall.  Needed to check
16581         parameters first in C#.
16582
16583 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16584
16585         * icall.c, reflection.h: added icall to get info about an event.
16586
16587 2002-05-20  Radek Doulik  <rodo@ximian.com>
16588
16589         * object.c (mono_value_box): don't use memcpy for boxing on BIG
16590         endian
16591         (mono_value_box): don't use memcpy for small sizes on
16592         architectures with unaligned access
16593
16594 2002-05-20  Martin Baulig  <martin@gnome.org>
16595
16596         * reflection.c (mono_reflection_setup_internal_class): Don't crash
16597         if `tb->parent == NULL'.
16598         (mono_reflection_create_internal_class): New function.  This is
16599         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
16600         for enum types.
16601
16602         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
16603         New interncall.
16604
16605 2002-05-19  Martin Baulig  <martin@gnome.org>
16606
16607         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
16608         argument to get the length, don't default to the array length.
16609
16610 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
16611
16612         * assembly.c (mono_assembly_setrootdir): New function used to
16613         override the MONO_ASSEMBLIES directory.
16614
16615 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16616
16617         * icall.c: ValueType_GetHashCode() initialize local var.
16618
16619 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16620
16621         * reflection.c: sort custom attributes table.
16622
16623 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16624
16625         * reflection.c: support named args in custom attributes (write support).
16626
16627 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16628
16629         * reflection.c: fix finally position calculation.
16630
16631 2002-05-15  Radek Doulik  <rodo@ximian.com>
16632
16633         * reflection.c: fixed endianess at many places
16634
16635         * icall.c (ves_icall_InitializeArray): comment out debug msg
16636
16637 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
16638
16639         * object.c (mono_unhandled_exception): new function to handle
16640         unhandled exceptions.
16641         (mono_unhandled_exception): call the UnhandledException event.
16642         (mono_runtime_delegate_invoke): impl.
16643
16644 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
16645
16646         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
16647         returns the RVA, not the direct pointer to the data. Handle the case
16648         when the class size is fixed.
16649
16650 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16651
16652         * reflection.c: fix some endianess issues.
16653
16654 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
16655
16656         * object.c (mono_runtime_invoke): is now able to catch exceptions.
16657
16658         * threads.c (mono_thread_init): added a callback which is invoked
16659         at thread start.
16660
16661 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
16662         
16663         * icall.c: make GetHashCode return non-negative values.
16664
16665 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
16666
16667         * object.c, icall.c, gc.c: revert to address-based hashcode.
16668
16669 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
16670
16671         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
16672
16673 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16674
16675         * icall.c, class.c: special case <Module>.
16676
16677 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
16678
16679         * icall.c: fix bug in GetNow().
16680
16681 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
16682
16683         * object.c (mono_runtime_class_init): make sure that we call all
16684         static class constructors.
16685
16686 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16687
16688         * reflection.c: sort methodsemantics table.
16689
16690 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16691
16692         * reflection.h, reflection.c: honour init locals setting.
16693
16694 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
16695
16696         * icall.c: copied Double ToStringImpl for Single ToStringImpl
16697
16698 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16699
16700         * reflection.c: support ContructorBuilders in attribute blob creation.
16701
16702 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16703
16704         * reflection.c: some changes to build a binary that can be run
16705         directly in windows.
16706
16707 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
16708
16709         * loader.c: print a big message when an icall can't be found.
16710
16711 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16712
16713         * string-icalls.c: fix bug 24248.
16714
16715 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16716
16717         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
16718         icall.c, reflection.h: separate assembly loading by pathname and by
16719         assembly name. Use the MONO_PATH env var to search for assemblies.
16720
16721 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16722
16723         * assembly.c, image.h: add some support for assemblies
16724         with multiple modules.
16725         * class.c, class.h: export mono_class_from_typeref().
16726         * loader.c: remove duplicated code and use mono_class_from_typeref(),
16727         instead.
16728
16729 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16730
16731         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
16732         documentation says (the ECMA one is correct).
16733
16734 2002-05-02  Dick Porter  <dick@ximian.com>
16735
16736         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
16737         Don't name the synchronisation mutex.
16738
16739 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
16740
16741         * rand.c
16742         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
16743         Make the prototypes match.
16744         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
16745         Same.
16746
16747         * icall.c
16748         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
16749         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
16750         all systems have tm.tm_zone, so use strftime() with %Z to print
16751         the timezone abreviation into a temp string.
16752
16753         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
16754         rather than mono_array_addr() on a MonoString on Big Endian
16755         machines.
16756
16757 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
16758
16759         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
16760         fix bug 24041
16761
16762 2002-04-30  Dick Porter  <dick@ximian.com>
16763
16764         * socket-io.c: Cope with SOCKET being an integer rather than a
16765         pointer now.
16766
16767         * threads.c: Added Thread_free_internal, to deal with thread
16768         handle cleanup.  Moved calls to handle_store() and handle_remove()
16769         to start_wrapper(), so each can only be called once.  Allocate
16770         synchronisation blocks with GC_malloc(), and use GC finalisation
16771         to close the handles.
16772
16773         * icall.c: added System.Threading.Thread::Thread_free_internal
16774
16775 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16776
16777         * icall.c: support Environment.Exit, CommandLineArgs().
16778
16779 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16780
16781         * object.c, object.h: added mono_runtime_run_main () and
16782         mono_runtime_get_main_args () for use in System.Environment.
16783
16784 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16785
16786         * gc.c: fix thinko, enable actual finalization since the jit is now
16787         fixed.
16788
16789 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16790
16791         * gc.c, object.c: take into account that an object may be offset wrt the address
16792         returned by GC_malloc().
16793
16794 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
16795
16796         * image.c: handle files without entries in the assembly table (modules).
16797
16798 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
16799
16800         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
16801         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
16802         allowed to be null when it's System.Object class setup.
16803
16804 2002-04-27  Martin Baulig  <martin@gnome.org>
16805
16806         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
16807         if `tb->parent == NULL' rather than crashing.
16808
16809 2002-04-28  Nick Drochak  <ndrochak@gol.com>
16810
16811         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
16812         calling acos() where asin() should have been called.
16813
16814 2002-04-26  Martin Baulig  <martin@gnome.org>
16815
16816         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
16817         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
16818         there's a subdirectory called `System', but we don't want to read that
16819         subdirectory as an assembly.
16820
16821 2002-04-25  Martin Baulig  <martin@gnome.org>
16822
16823         * debug-symfile.c: Reflect latest MonoString changes.
16824
16825 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16826
16827         * rand.c, rand.h: instance method icalls need to have an explicit
16828         this pointer as first argument in the C implementation.
16829
16830 2002-04-25  Nick Drochak <ndrochak@gol.com>
16831
16832         * icall.c: Fix typo in map for GetNonZeroBytes
16833
16834 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
16835
16836         * string-icalls.c : String does now passes unit tests without any 
16837         errors, the following changes has been made:
16838         
16839         Implemented replace methods.
16840         Renaming of methods to (try) follow the standard.
16841         Fixed compare ordinal
16842         Made all memory allocated directly to function instead of via icall function.
16843         Small performance fix in is_in_array function
16844                         
16845  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
16846
16847         c (mono_string_Internal_ctor_charp_int_int):
16848         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
16849         sindex < 0, throw ArgumentOutOfRangeException instead of
16850         ArgumentNullException.
16851
16852         Added new check for length == 0, however
16853         I need to make it return String.Empty from the C code.
16854         
16855         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
16856         that calculate the length for us here.
16857         
16858         (mono_string_Internal_ctor_sbytep_int_int): Replaced
16859         mono_string_new_utf16 with mono_string_new, since value is utf8.
16860
16861 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16862
16863         * object.c: register the object for finalization if needed.
16864         Allocate one more char in the string for the terminating 0 char.
16865
16866 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16867
16868         * class.c, class.h, image.c: check if a type implemenst a destructor.
16869         Use the proper key for array class lookups.
16870         * icall.c: register the icalls in the System.GC class.
16871         * gc.c, gc.h: GC-related functions and icalls.
16872
16873 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16874
16875         * icall.c:
16876         * socket-io.c:
16877         * unicode.c: free some strings gotten from mono_string_to_utf8 and
16878         changed a couple of free () by g_free ().
16879
16880         * decimal.c: one-liner in the comments for decimal2string ().
16881
16882 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
16883
16884         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
16885
16886 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
16887
16888         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
16889         * object.c (mono_runtime_invoke_array) : handle null in params
16890
16891 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
16892
16893         * string-icalls.c: fixed bug in split (one off bug)
16894
16895 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
16896
16897         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
16898         * icalls.c: added String::Equals as internal method
16899
16900 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
16901
16902         * threads.c: fixed bug in the double interlocked functions
16903
16904 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
16905
16906         * threads.c: implemented all of the new interlocked icalls.
16907         * string-icalls.c: fix a bug in insert.
16908         * icalls.c: added the icalls for interlocked, removed old string functions.
16909         
16910 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
16911
16912         * loader.c: fix off-by-one error when reading argument names.
16913
16914 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16915
16916         * profiler.c: win32 counter implementation (untested).
16917         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
16918         (the latter needs testing and more complete impl. from win32 folks).
16919
16920 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
16921
16922         * object.c: mono_array_new_full workaround mono_array_class_get
16923         problem.
16924
16925 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
16926
16927         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
16928         * object.h (mono_string_chars): Changed casting type.
16929
16930 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
16931
16932         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
16933                            method signatures to use gunichar2 instead of gint16.
16934
16935 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
16936
16937         * object.h, object.c: domain-specific versions of mono_object_new and
16938         mono_array_new.
16939
16940 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
16941
16942         * object.c: changed String layout
16943
16944         * string-icalls.c (mono_string_Internal_ctor_chara): added
16945         internal string constructors.
16946
16947 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
16948
16949         * threads.c: pass 'this' to the thread start routine.
16950
16951 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16952
16953         * string-icalls.c: fix IndexOf and LastIndexOf. Now
16954         InternalCompareStr don't call twice mono_string_cmp_char for the last
16955         character. Improved performance in mono_string_cmp_char.
16956
16957 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16958
16959         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
16960         code into its own library: libmonoruntime.
16961
16962 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
16963
16964         * object.h, object.c: changed array format so that szarrays do not
16965         require a bounds structure.
16966         * icall.c, appdomain.c: support for new szarray format.
16967
16968 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
16969
16970         * metadata.c: compare also the retuns type when comparing signatures:
16971         we didn't do this as an optimization since really overloaded methods
16972         must differ also in the arguments, but this doesn't work with
16973         low-level IL code (or when using explicit conversion operators: see
16974         bug#23498 for an example).
16975
16976 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16977
16978         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
16979
16980 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16981
16982         * icall.c: make MonoType::GetElementType its own icall.
16983
16984 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16985
16986         * icall.c: remove MonoMethod_get_Name().
16987         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
16988         object.
16989
16990 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
16991
16992         * string-icalls.c: optimized a few methods.
16993
16994 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
16995
16996         * icall.c: added all new string internal calls
16997         * string-icalls.c: added, new string internal call implementation.
16998         * object.c: added mono_string_new_size for allocating a string a size
16999
17000 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
17001
17002         * object.c (mono_object_isinst): use the same code as in the
17003         optimized x86 version.
17004
17005 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17006
17007         * profiler.c: TSC-based timer code (faster and more accurate).
17008         Not hooked up in configure, yet (set USE_X86TSC to 1).
17009
17010 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
17011
17012         * profiler.c, profiler.h: track time spent compiling methods.
17013         * threads.c: track thread creation/destruction.
17014
17015 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
17016
17017         * profiler.c, profiler.h, profiler-private.h: profiling interface
17018         and sample implementation. Moved here so that it can be used also by
17019         the jit.
17020
17021 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
17022
17023         * reflection.c, reflection.h: keep types and other handles separate in
17024         the hash tables for referred tokens. Add guid for modules.
17025
17026 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17027
17028         * assembly.c: fix bugs found with valgrind.
17029         * metadata.h, metadata.c: added mono_metadata_guid_heap().
17030
17031 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
17032
17033         * threads: added icall support for getting current domain for
17034                    the thread.
17035  
17036 2002-04-13  Martin Baulig  <martin@gnome.org>
17037
17038         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
17039         (MonoDebugVarInfo): Added `index' field for register based addresses.
17040         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
17041         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
17042         `MonoDebugVarInfo *params' and `guint32 this_offset' with
17043         `MonoDebugVarInfo *this_var'.
17044
17045         * debug-symfile.c (relocate_variable): New static function to write
17046         a location description for a local variable or method parameter.
17047
17048 2002-04-12  Martin Baulig  <martin@gnome.org>
17049
17050         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
17051         stack offset and begin/end scope address of a local variable.
17052         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
17053         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
17054         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
17055
17056         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
17057         Added new relocation types for start/end scope of a local variable.
17058
17059 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17060
17061         * object.h: add mono_object_domain() macro.
17062         * reflection.c: handle typespecs.
17063         * icall.c: MonoMethod::get_Name() implementation.
17064
17065 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17066
17067         * icall.c: String::GetHashCode() icall implementation.
17068
17069 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17070
17071         * icall.c: String::IndexOfAny icall.
17072         * object.c, object.h: make array->max_length more useful.
17073         Intrduced mono_object_class() and mono_string_length() macros.
17074
17075 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17076
17077         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
17078         instead of g_unichar_isdigit.
17079
17080 2002-04-11  Nick Drochak  <ndrochak@gol.com>
17081
17082         * icall.c: Implement a simple Double.ToString().
17083
17084 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17085
17086         * appdomain.h: only io-layer.h is supposed to be included.
17087         * icall.c: explicitly import environ. Fix warning.
17088
17089 2002-04-10  Nick Drochak  <ndrochak@gol.com>
17090
17091         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
17092                 return true even if it's not Daylight Savings time.
17093                 Only return false for the case where the function isn't
17094                 implemented for a plaform (read Windows).
17095
17096 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17097
17098         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
17099         data with a mutex.
17100
17101 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
17102
17103         * mempool.c (mono_mempool_alloc): only use g_malloc when
17104         absolutely necessary.
17105
17106 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
17107
17108         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
17109
17110         * class.c (mono_class_vtable): use domain mempool to allocate vtable
17111         (mono_class_proxy_vtable): use domain mempool
17112
17113 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17114
17115         * appdomain.h, appdomain.c: split initialization that requires the
17116         execution engine support into mono_runtime_init().
17117
17118 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
17119
17120         * class.c (mono_class_init): don't include vtable inside MonoClass
17121         to save some memory, gather some statistics.
17122         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
17123
17124 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17125
17126         * icall.c: internalcall implementation for ValueType.Equals().
17127
17128 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
17129
17130         * object.c (mono_message_init): moved 
17131         (mono_runtime_exec_main): new arch. independent impl.
17132         (mono_runtime_invoke_array): new method - like
17133         mono_runtime_invoke, but you can pass an array of objects.
17134         (mono_remoting_invoke): new arch. independent impl.
17135         (mono_message_invoke): new arch. independent impl.
17136         (mono_runtime_class_init): new arch. independent impl.
17137         (mono_runtime_object_init): new arch. independent impl.
17138
17139 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17140
17141         * metadata.c, object.c, reflection.c: documented the exported
17142         functions.
17143
17144 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17145
17146         * icall.c: simpler code to pass the assembly builder data to corlib.
17147         Implement GetNestedTypes() internalcall.
17148
17149 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17150
17151         * class.c: warn if a type can't be loaded.
17152
17153 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
17154
17155         * image.h: typedef MonoImageOpenStatus
17156         * types.h: removed unused file
17157         
17158 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
17159
17160         * icall.c: Enum_ToObject accepts enum value arguments.
17161
17162 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17163
17164         * class.c: move initialization of properties, events and nested
17165         classes, so that they happen for interfaces, too.
17166
17167 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17168
17169         * icall.c: cleanup some ugly casts in Array_SetValue*.
17170
17171 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17172
17173         * icall.c: the values array fro enums is of the correct type, now.
17174         Implement (correctly) getFullName instead of assQualifiedName for
17175         MonoType.
17176         * reflection.h, reflection.c: added mono_type_get_name ().
17177
17178 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17179
17180         * assembly.c, image.h: for each MonoImage, record from wich assembly
17181         it was loaded.
17182         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
17183         Make Type.Assembly work.
17184
17185 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
17186
17187         * debug-symfile.h: use char* instead of gpointer to avoid
17188         unnecessary casts.
17189
17190         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
17191
17192         * icall.c (ves_icall_InternalExecute): impl. FielSetter
17193         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
17194
17195 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
17196
17197         * icall.c (mono_message_init): impl. (code cleanup)
17198         (ves_icall_InternalExecute): impl. FieldGetter
17199
17200         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
17201         defined we call all (non-static)methods through the vtable. 
17202
17203 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
17204
17205         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
17206         finalizer even though the memory is still referenced (and the chunk of
17207         memory is not freed).
17208
17209 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
17210
17211         * assembly.c: fix brokeness.
17212
17213 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
17214
17215         * class.c: kill some warnings. Check explicit interface method
17216         implementation also without considering the namespace.
17217         Load also literal strings in static class data.
17218
17219 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
17220
17221         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
17222         (default_assembly_name_resolver): Make the resolver take the
17223         "base" directory where the assembly was originally defined, so we
17224         can load DLLs that are in the same directory as the assembly that
17225         is being referenced.
17226
17227 2002-03-28  Dick Porter  <dick@ximian.com>
17228
17229         * file-io.h: 
17230         * file-io.c:
17231         * socket-io.c: 
17232         * unicode.h: 
17233         * unicode.c: Warning cleanups
17234
17235 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
17236
17237         * object.h, reflection.h: use the correct type instead of MonoObject.
17238
17239 2002-03-28  Martin Baulig  <martin@gnome.org>
17240
17241         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
17242         (mono_debug_update_symbol_file): Initialize classes if necessary.
17243
17244 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17245
17246         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
17247         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
17248
17249 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
17250
17251         * assembly.h: fix function prototype.
17252         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
17253         * mono-endian.h: use const cast.
17254
17255 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
17256
17257         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
17258
17259 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17260
17261         * loader.c: don't assert when a typeref can't be loaded, give
17262         a chance to the runtime to trow an exception instead.
17263         * loader.h: fix warning.
17264
17265 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
17266
17267         * class.c (mono_class_proxy_vtable): added proxy support
17268
17269 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
17270
17271         * icall.c: removed last of PAL calls, added System.Environment
17272         * file-io.h, file-io.c: MonoIO implementation
17273         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
17274
17275 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17276
17277         * appdomain.c: do not use the byte marker in ldstr table lookup.
17278         * debug-helpers.c: allow two ':' to separate class and method name.
17279         * object.c: allocate arrays bounds with the GC, too.
17280         * verify: add a few more checks.
17281
17282 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
17283
17284         * reflection.c: output also literal strings. Allocate parameter data
17285         with GC_malloc() (thanks, Martin, for catching this!).
17286
17287 2002-03-26  Martin Baulig  <martin@gnome.org>
17288
17289         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
17290         include the `this' offset in the `param_offsets'.
17291
17292 2002-03-25  Martin Baulig  <martin@gnome.org>
17293
17294         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
17295         mono_debug_get_class() function to get the classes. Added new
17296         relocation types for arrays and strings.
17297         (mono_debug_get_class): New static function to search in all
17298         referenced assemblies for a metadata token.
17299
17300         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
17301
17302 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17303
17304         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
17305         hold gc-allocated objects. Make the string heap a stream like the
17306         others. Removed duplicated code when writing stream info.
17307         Added asserts to catch possible buffer overflows. Set the sorted map
17308         for tables that need sorting. Added some documentation.
17309
17310 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
17311
17312         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
17313         for interned strings and vtables.
17314
17315 2002-03-24  Martin Baulig  <martin@gnome.org>
17316
17317         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
17318         it in the array since it was created with g_slist_prepend().
17319
17320 2002-03-24  Martin Baulig  <martin@gnome.org>
17321
17322         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
17323         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
17324         (mono_debug_method_from_token): Renamed to
17325         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
17326         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
17327
17328         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
17329         relocation types.
17330
17331         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
17332
17333 2002-03-24  Martin Baulig  <martin@gnome.org>
17334
17335         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
17336         (mono_debug_method_from_token): New func.
17337
17338         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
17339         New interncall, calls mono_debug_local_type_from_signature().
17340         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
17341         calls mono_debug_method_from_token().
17342
17343 2002-03-23  Martin Baulig  <martin@gnome.org>
17344
17345         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
17346         specifies the number of bytes to be converted, not the array size.
17347         Return the number of chars, not the number of bytes.
17348         (ves_icall_iconv_get_chars): The `byteCount' argument
17349         specifies the number of bytes to be converted, not the array size.
17350
17351 2002-03-23  Martin Baulig  <martin@gnome.org>
17352
17353         * reflection.h (MonoReflectionSigHelper): New type.
17354
17355         * reflection.c (mono_reflection_sighelper_get_signature_local),
17356         (mono_reflection_sighelper_get_signature_local): New functions.
17357
17358         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
17359         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
17360         interncalls.
17361
17362 2002-03-23  Martin Baulig  <martin@gnome.org>
17363
17364         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
17365         is_writeable is set.
17366         (mono_raw_buffer_update): New function to write the modified map
17367         back to disk.
17368
17369         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
17370
17371         * debug-symfile.c (mono_debug_update_symbol_file): Call
17372         mono_raw_buffer_update() when done writing.
17373
17374 2002-03-23  Martin Baulig  <martin@gnome.org>
17375
17376         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
17377
17378         * debug-symfile.c: Added support for arguments and local variables.
17379
17380 2002-03-23  Dick Porter  <dick@ximian.com>
17381
17382         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
17383         protected by ifdefs, hence breaking the w32 build.
17384
17385 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17386
17387         * object.c: implement is_interned() the right way.
17388
17389 2002-03-21  Martin Baulig  <martin@gnome.org>
17390
17391         * debug-symfile.[ch]: New files to handle debugging information
17392         files. There's also support to dynamically update these symbol
17393         files to include machine dependent information.
17394
17395 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
17396
17397         * threads.c (mono_thread_create): new function to create thread
17398         from C
17399
17400 2002-03-20  Martin Baulig  <martin@gnome.org>
17401
17402         * icall.c (ves_icall_InternalInvoke): Create a new object if the
17403         method is a constructor.
17404         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
17405         points to ves_icall_InternalInvoke().
17406
17407 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
17408
17409         * file-io.c: Flush shouldn't throw exceptions.
17410
17411 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
17412
17413         * file-io.c: FileStream flush support; FileSetLength now
17414         restores file pointer.
17415
17416 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
17417
17418         * class.c: set image for pointer classes.
17419
17420 2002/03/19  Nick Drochak <ndrochak@gol.com>
17421
17422         * sysmath.c: Forgot one.
17423
17424 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
17425
17426         * sysmath.c: Avoid redefining existing names.
17427
17428 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
17429
17430         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
17431         handled by runtime as icall rather than dllimport from libm.so
17432         * file-io.c, file-io.h: fixed handle argument type.
17433
17434 2002-03-18  Dick Porter  <dick@ximian.com>
17435
17436         * reflection.c (mono_image_get_type_info): rename interface to
17437         iface, because of "#define interface struct" on windows.
17438
17439 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
17440
17441         * class.c, class.h: rename and export mono_ptr_class_get().
17442         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
17443         * reflection.c, reflection.h, icall.c: better/saner type name
17444         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
17445         method signatures.
17446
17447 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
17448
17449         * class.c (mono_class_init): removed hardcoded GHC_SLOT
17450
17451         * icall.c (ves_icall_InternalInvoke): impl.
17452
17453 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17454
17455         * reflection.c: output the interface map table, too.
17456
17457 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
17458
17459         * class.c (class_compute_field_layout): separate computation of 
17460         static field layout
17461
17462 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
17463
17464         * icall.c: added System.Buffer support.
17465         * file-io.c: moved file icalls from PAL to FileStream.
17466
17467 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
17468
17469         * icall.c (ves_icall_System_Object_GetHashCode): impl.
17470
17471 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
17472
17473         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
17474
17475 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17476
17477         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
17478
17479 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
17480
17481         * debug-helpers.{c,h}: moved here from monograph some useful functions
17482         to locate a method by name/signature in a class or image. Included
17483         also a small and flexible IL disassembler.
17484
17485 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17486
17487         * reflection.c: fixup tokens in methods with small header size, too.
17488
17489 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
17490
17491         * object.c (mono_string_to_utf8): remove assert(!error), instead
17492         print a warning. 
17493
17494 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
17495
17496         * icall.c: update to the new mono_Array_class_get interface.
17497
17498 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
17499
17500         * appdomain.c, object.c: Boehm-GC enable.
17501         * icall.c: make get_data_chunk() support split data requests.
17502         Ensure a class is initialized in more cases. Return only the first
17503         property found in GetProperties() or the compiler gets confused. 
17504         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
17505         * reflection.h, reflection.c: add fixup mechanism for field and method
17506         tokens. Initialize assembly->typeref in a single place. Output
17507         properties after events. Support custom attributes for events, too.
17508         Typo fix for paramter custom attrs.
17509
17510 2002-03-07  Martin Baulig  <martin@gnome.org>
17511
17512         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
17513
17514 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
17515
17516         * class.c (mono_array_class_get): fix. for multi. dim. arrays
17517
17518 2002-03-06  Martin Baulig  <martin@gnome.org>
17519
17520         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
17521         non-zero lower bounds. See testcases #F10-#F13.
17522
17523 2002-03-05  Martin Baulig  <martin@gnome.org>
17524
17525         * exception.c (mono_get_exception_argument_out_of_range): New exception.
17526
17527         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
17528         ves_icall_System_Array_GetValue(), only calculate the absolute array position
17529         here.
17530         (ves_icall_System_Array_SetValue): Likewise.
17531         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
17532         as argument and does the actual work. This function is used when copying a
17533         multi-dimensional array.
17534         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
17535         now do all the widening conversions of value types.
17536         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
17537
17538 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17539
17540         * class.c: remove some magic numbers and use the smbolic names,
17541         instead. Added init_events() to load event info at class init time.
17542         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
17543         and mono_metadata_methods_from_event().
17544         * reflection.h, reflection.c: added support for writing out the evnets
17545         related information.
17546
17547 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17548
17549         * reflection.h, icall.c: use a different method (GetInterfaces)
17550         to gather interface info and add isbyref, isprimitive and
17551         ispointer to the ves_icall_get_type_info() return value.
17552
17553 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
17554
17555         * class.h: stared adding support for events.
17556         * icall.c: split find_members implementation. Added debug icall to get
17557         the address of an object.
17558         * reflection.c: handle TypeBuilders in mono_type_get_object().
17559
17560 2002-03-01  Martin Baulig  <martin@gnome.org>
17561
17562         * icall.c (ves_icall_System_Array_GetLength): This must throw an
17563         ArgumentOutOfRangeException(), not an ArgumentException().
17564         (ves_icall_System_Array_GetLowerBound): Likewise.
17565         (ves_icall_System_Array_GetValue): Improved argument checking.
17566         (ves_icall_System_Array_SetValue): Improved argument checking.
17567
17568 2002-03-01  Martin Baulig  <martin@gnome.org>
17569
17570         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
17571         called with invalid arguments rather than just dying with g_assert().
17572         (ves_icall_System_Array_SetValue): Likewise.
17573         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
17574         raise a NotImplementedException instead.
17575         (ves_icall_System_Array_GetLength): Added argument checking.
17576         (ves_icall_System_Array_GetLowerBound): Added argument checking.
17577
17578 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
17579
17580         * object.h (mono_assert): new macros mono_assert and
17581         mono_assert_not_reached
17582
17583 2002-02-28  Martin Baulig  <martin@gnome.org>
17584
17585         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
17586         and "System::String::IsInterned" to "System::String::_IsInterned".
17587
17588 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
17589
17590         * icall.c: remove hacks for typebuilder. Added icall to create a
17591         modified type from a tybebuilder.
17592         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
17593         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
17594         to create a backing MonoClass for a TypeBuilder.
17595
17596 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17597
17598         * class.c, class.h: more refactoring of class init.
17599         Export mono_class_setup_mono_type() and mono_class_setup_parent().
17600
17601 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
17602
17603         * marshal.c, marshal.h: start of marshaling interface.
17604
17605 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
17606
17607         * icall.c: fix order in assembly qualified name icall.
17608
17609 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
17610
17611         * class.c: do not free str, since we store it in the hash table.
17612         * reflection.h: add label field to MonoILExceptionInfo.
17613         * reflection.c: handle references to more than one assembly. Handle
17614         case when there isn't a module created in the assembly.
17615
17616 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17617
17618         * class.c: Fix typo. Start refactoring of class init code.
17619
17620 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17621
17622         * appdomain.c: exit with 1 on error.
17623         * class.c: we already have the name in MonoClassField.
17624         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
17625         MonoStreamHeader instead of an offset of image->raw_metadata.
17626
17627 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
17628
17629         * appdomain.c (mono_init): Be even more descriptive about the error.
17630
17631 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
17632
17633         * appdomain.c: give the user an informative message when corlib can't
17634         be loaded.
17635
17636 2002-02-26  Martin Baulig  <martin@gnome.org>
17637
17638         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
17639         New icall to get the time zone data.
17640
17641 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17642
17643         * reflection.c: set virtual and raw size of section correctly.
17644         * threads.c: transfer domain information to newly created threads.
17645
17646 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
17647
17648         * class.c: when instancing a class in a domain, load the default
17649         vaules for static fields from the constant table. Fix System.Enum to
17650         not be an enum.
17651         * icall.c: implement Object::GetType() internalcall. Implemented
17652         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
17653         Fixed checking of binding flags in find_members().
17654         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
17655         * reflection.c: handle enumerations when writing to the constant
17656         table. Use a different object cache for types.
17657
17658
17659 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
17660
17661         * object.c (mono_object_isinst): fix for arrays
17662
17663         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
17664
17665 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
17666
17667         * object.c: don't use mprotect ()  and fix intern pool hash table
17668         lookup for big endian systems.
17669
17670 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17671
17672         * icall.c: change type_is_subtype_of () signature.
17673
17674 2002-02-21  Mark Crichton  <crichton@gimp.org>
17675
17676         * rand.c, rand.h: Added random number generator for
17677         System.Security.Cryptography classes.
17678
17679         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
17680
17681         * icall.c: Added System.Security.Cryptography calls.
17682
17683 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
17684
17685         * class.c, icall.c, metadata.c: better support for pointer types.
17686         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
17687         * reflection.c: Add support for getting custom attrs for properties
17688         and simplify some code.
17689
17690 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17691
17692         * icall.c: change getToken () and add custom attribute GetBlob()helper
17693         method.
17694         * reflection.h: add custom attrs array to the reflection builder structures.
17695         * reflection.c: encode and emit custom attributes for all the relevant
17696         reflection objects. Cache fieldref and methodref tokens. Change
17697         mono_image_create_token() interface to take a MonoDynamicAssembly.
17698         More complete custom attributes decoder. Load custom attributes for
17699         Assembly, Field, Method and Constructor objects, too. Make the
17700         returned array an Attribute[] one, not object[]. Added
17701         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
17702         custom attribute constructor.
17703
17704 2002-02-20  Dick Porter  <dick@ximian.com>
17705
17706         * icall.c:
17707         * rawbuffer.c:
17708         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
17709         problem code out for now).
17710
17711 2002-02-19  Radek Doulik  <rodo@ximian.com>
17712
17713         * object.c (mono_ldstr): use hash table to avoid multiple swapping
17714
17715 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
17716
17717         * icall.c: register the GetCustomAttributes method.
17718         * object.c, object.h: add mono_string_new_len ().
17719         * reflection.h, reflection.c: added mono_runtime_invoke(),
17720         mono_install_runtime_invoke(). Added
17721         mono_reflection_get_custom_attrs () to load custom attributes and
17722         create the attribute objects.
17723
17724 2002-02-19  Dick Porter  <dick@ximian.com>
17725         * threads-dummy-types.c:
17726         * threads-dummy-types.h:
17727         * threads-dummy.c:
17728         * threads-dummy.h:
17729         * threads-pthread-types.c:
17730         * threads-pthread-types.h:
17731         * threads-pthread.c:
17732         * threads-pthread.h:  Deleted obsolete files
17733
17734 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
17735
17736         * class.c (mono_class_vtable): runtime init the class when we
17737         allocate static class data.
17738
17739         * icall.c (ves_icall_System_Array_SetValue): check for null values.
17740
17741         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
17742         and String - but we will need generic marshalling support in the
17743         future. 
17744         (mono_init): set the domain name in a ms compatible way
17745
17746         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
17747         String[].
17748
17749 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
17750
17751         * object.c (mono_array_clone): use alloca() instead of g_malloc  
17752         for sizes
17753
17754         * appdomain.c (mono_domain_unload): impl.
17755
17756 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17757
17758         * appdomain.c, object.c: fix intern pool implementation.
17759         * class.c: fix alignment code.
17760
17761 2002-02-16  Radek Doulik  <rodo@ximian.com>
17762
17763         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
17764         and s2 > s1, just copy lower bytes to be compatible with little
17765         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
17766         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
17767
17768         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
17769         force big_endian to be 1 for big endian machines 
17770         (ves_icall_iconv_new_decoder): ditto
17771
17772 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
17773
17774         * socket-io.c (convert_sockopt_level_and_name): If the system
17775         doesn't define SOL_IP or SOL_TCP, get them by hand using
17776         getprotobyname() and caching the values (because this could be a
17777         slow operation).
17778         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
17779         Use the appropriate struct when the system does support it. Ie,
17780         not all systems have struct ip_mreqn so use struct ip_mreq when
17781         appropriate.
17782
17783 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
17784
17785         * reflection.c: handle finally clauses.
17786
17787 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
17788
17789         * socket-io.c: use g_snprintf() instead of snprintf.
17790
17791 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
17792
17793         * reflection.c (mono_param_get_objects): Cast second argument to
17794         mono_method_get_param_names to a const char** to silence the
17795         compiler warning.
17796
17797         * appdomain.c (mono_domain_assembly_open): Put parens around the
17798         truth statement in the for-loop.
17799
17800         * unicode.c (iconv_convert): Got rid of a compiler warning about
17801         int i being unused when the system has a new iconv.
17802         (iconv_get_length): Same.
17803
17804         * image.c (load_class_names): Cast the second argument to
17805         g_hash_table_insert() to char* to hush compiler warnings about the
17806         arg being a const.
17807         (mono_image_open): Same here.
17808
17809         * socket-io.c: Don't conditionally include sys/filio.h or
17810         sys/sockio.h here anymore since we now get them from
17811         io-layer/io-layer.h
17812         (inet_pton): If the system doesn't support inet_aton, implement
17813         using inet_addr and also #define INADDR_NONE if it isn't defined
17814         by the system.
17815
17816 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
17817
17818         * metadata.c, metadata.h: added function to get packing and size info
17819         of a typedef.
17820         * reflection.h, reflection.c: handle field RVA data. Save info about
17821         the table layout if needed. Assign typedef indexes to all the types
17822         before dumping the info about them to avoid forward reference problems.
17823
17824 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
17825
17826         * socket-io.c (convert_sockopt_level_and_name): ifdef
17827         SO_ACCEPTCONN because it is not defined on my system (old debian)
17828
17829 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17830
17831         * opcode.c: use stddef.h to get NULL.
17832
17833 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
17834
17835         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
17836         for FIONBIO, FIONREAD and SIOCATMARK.
17837         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
17838         define INADDR_NONE and besides, inet_addr() is deprecated and
17839         should not be used. Use inet_pton() instead - it also has the
17840         added bonus that it can easily handle IPv6 addresses as well.
17841         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
17842
17843 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
17844
17845         * decimal.c: remove _MSC_VER conditional.
17846
17847 2002-02-13  Dick Porter  <dick@ximian.com>
17848
17849         * socket-io.c: 
17850         * icall.c: Internal calls for Blocking, Select, Shutdown,
17851         GetSocketOption and SetSocketOption
17852
17853 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17854
17855         * assembly.cs: better resolver: use it instead of some kludgy
17856         code.
17857
17858 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
17859
17860         * reflection.c: the best way to speed-up the compiler is to avoid
17861         infinite loops.
17862
17863 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
17864
17865         * class.c (mono_class_vtable): changed the object layout
17866         (obj->vtable->class). 
17867         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
17868
17869 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17870
17871         * assembly.c: look for assemblies in the assembly dir, too.
17872
17873 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17874
17875         * class.c: fix thinko in mono_class_from_type().
17876
17877 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17878
17879         * exception.h, exception.c: added TypeLoadException.
17880         * object.h, object.c: added mono_array_clone ().
17881         * icall.c: handle throwOnError in AssemblyGetType().
17882         Added Array.Clone().
17883         * opcode.h, opcode.c: use a single value for the opcode val.
17884         Compile fix for non-gcc compilers.
17885
17886 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
17887
17888         * opcodes.c, opcodes.h: export interesting info about opcodes.
17889
17890 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
17891
17892         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
17893         icalls. 
17894
17895         * class.c (class_compute_field_layout): set element_class for enums
17896         (mono_class_create_from_typedef): set element_class for normal classes
17897
17898         * icall.c (ves_icall_System_Enum_get_value): impl.
17899
17900         * class.c (mono_class_create_from_typedef): do not set valuetype
17901         flag for System.ValueType and System.Enum
17902
17903 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
17904
17905         * unicode.c (iconv_convert): fix big endian problem.
17906
17907 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17908
17909         * class.c: add asserts if we are ever going to scribble over memory.
17910         * socket-io.c: not all systems have AF_IRDA defined.
17911
17912 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
17913
17914         * class.c (class_compute_field_layout): do not consider static
17915         fields to compute alignment
17916
17917 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
17918
17919         * appdomain.c (mono_appdomain_get): impl.
17920         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
17921
17922 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
17923
17924         * icall.c: ignore "file://" prefix when loading an assembly.
17925
17926 2002-01-23  Dick Porter  <dick@ximian.com>
17927
17928         * socket-io.c:
17929         * icall.c:
17930         * Makefile.am: Added socket support
17931
17932 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
17933
17934         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
17935         code back.  This should return the assemblies that are loaded by
17936         the runtime on behalf of an application domain. 
17937
17938         The current implementation is still broken, it just returns every
17939         assembly loaded, but until we get real applications domain this
17940         will do.
17941
17942 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
17943
17944         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
17945         AppDomain object.
17946
17947 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
17948
17949         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
17950         the mono_class_from_name lookup.
17951         (ves_icall_get_parameter_info): ditto.
17952         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
17953         method.
17954         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
17955
17956 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
17957
17958         * class.c: load also nested classes on class init.
17959         System.ValueType instance methods gets passed boxed
17960         values, unless methods in derived classed that get a pointer to the
17961         data.
17962         * icall.c: use better name parsing code in GetType().
17963         * image.c, image.h: add mono_image_loaded ().
17964         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
17965         * reflection.c, reflection.h: added mono_reflection_parse_type().
17966
17967 2002-01-22  Veronica De Santis <veron78@interfree.it>
17968
17969         * icall.c : Added mapping of internal calls for Manual and Auto reset events
17970         * threads.c : Added the implementation of internal calls for events
17971         * threads.h : Added prototypes of internal calls for events
17972         
17973 2002-01-21  Radek Doulik  <rodo@ximian.com>
17974
17975         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
17976
17977 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
17978
17979         * class.c (mono_class_init): set min_align to 1 (instead of 0)
17980         (mono_class_value_size): use min_align
17981
17982 2002-01-20  Dick Porter  <dick@ximian.com>
17983
17984         * threads.h:
17985         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
17986         so it compiles on w32.
17987
17988 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
17989
17990         * metadata.c (mono_type_stack_size): impl.
17991
17992         * class.c (mono_class_get_field): impl. memberref token
17993
17994 2002-01-16 Veronica De Santis <veron78@@interfree.it>
17995
17996         * icall.h : Added the internal calls mapping for CreateMutex_internal
17997                     and ReleaseMutex_internal.
17998         * threads.h : Added the prototype of mutexes internal calls.
17999         * threads.c : Added the implementations of mutexes internal calls.
18000
18001 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18002
18003         * metaparse.h: removed unused file.
18004         * reflection.c, reflection.h: added stream_data_align () function 
18005         to align data in streams and keep stream aligned. Add support for
18006         exception support in method headers.
18007
18008 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
18009
18010         * unicode.c: make iconv_convert () return the number of bytess written
18011         in the output buffer.
18012
18013 2002-01-15  Dick Porter  <dick@ximian.com>
18014         * threads.c: Make the runtime's idea of infinite timeouts coincide
18015         with the class library's
18016
18017         Fix a particularly egregious bug in mono_thread_cleanup(). That
18018         code was so utterly bogus it must have been written on a Monday.
18019
18020 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18021
18022         * reflection.h: add subtypes field to TypeBuilder.
18023         * reflection.c: encode constants for literal fields.
18024         Handle subtypes. Fix user string token (and add a zero byte)
18025         at the end.
18026         
18027 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
18028
18029         * class.c (mono_class_init): bug fix: assign slot numbers for
18030         abstract methods.
18031
18032 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18033
18034         * reflection.c: don't try to output a code RVA for abstract methods.
18035         Small fixes for method header format. Output parameter info to the
18036         ParamDef table. Save method overriding info to MethodImpl table.
18037         Fix property support. Allow typedef.extends to be a type in the
18038         building assembly.
18039         * verify.c: fix off-by-one error.
18040
18041 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
18042
18043         * class.c: fix mono_class_from_mono_type () for szarray types.
18044         Remove unused cache check in mono_class_from_type_spec().
18045         * icall.c: *type_from_name () functions handle simple arrays and byref.
18046         * reflection.c: handle byref and szarray types. Handle methods without
18047         body (gets P/Invoke compilation working). Handle types and fields in
18048         get_token ().
18049         * reflection.h: add rank to MonoTypeInfo.
18050
18051 2002-01-10  Dick Porter  <dick@ximian.com>
18052
18053         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
18054         internal calls
18055
18056 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18057
18058         * icall.c: initialize class in type_from_handle ().
18059         Loop also in parent classes for get_method ().
18060         * reflection.c: properly encode class and valuetype types.
18061         Start on encoding TypeBuilder types. Handle fieldrefs.
18062         Use correct length when registering a user string.
18063         Handle ConstructorBuilder and MonoMethod in get_token ().
18064         Make mono_type_get_object () aware of cached types.
18065         * object.c: back out change to mono_string_new ().
18066
18067 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
18068         * object.c: mono_string_new should return a NULL when the string 
18069         passed in is NULL -- not try to deference it.
18070         
18071 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18072
18073         * icall.c: hack to make IsSubType work for TypeBuilders.
18074         * reflection.c: emit constructors before methods.
18075         Retrieve param names in mono_param_get_objects().
18076
18077 2002/01/05  Nick Drochak  <ndrochak@gol.com>
18078
18079         * Makefile.am: fix list of headers and sources so automake 1.5
18080         doesn't complain. Removed \# at end of list.
18081
18082 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18083
18084         * reflection.c: get token for a method ref. Set return type of
18085         constructor to void.
18086         * loader.c: debug message.
18087         * class.c: typo fix.
18088
18089 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
18090
18091         * icall.c: fix array init with rank > 1. FindMembers
18092         loops in parent class as well.
18093         * image.c: do not insert nested types in name cache.
18094         * reflection.c: warning fix.
18095         * reflection.h: add override method (for interface impl).
18096
18097 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
18098
18099         * metadata.c: fix customattr decoding.
18100
18101 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
18102
18103         * rawbuffer.cs: Added native Win32 implementation, avoids using
18104         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
18105
18106 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
18107
18108         * class.c: make the low-level routines handle the cache.
18109
18110 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
18111
18112         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
18113
18114 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
18115
18116         * class.c: fix mono_array_element_size() for objects.
18117         * class.h, class.c: add properties to MonoClass and load them
18118         at init time.
18119         * icall.c: check with isinst() when assigning a value to an array
18120         instead of requiring the classes to match exactly.
18121         Implemented icall for System.Type::GetType().
18122         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
18123         enums. Handle bindingflags when looking for methods and fields.
18124         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
18125         and mono_metadata_methods_from_property().
18126         * reflection.h, reflection.c: added structures for propreties,
18127         parameters and enums. Implemented mono_property_get_object() and
18128         mono_param_get_objects().
18129
18130 2001-12-18  Dick Porter  <dick@ximian.com>
18131
18132         * file-io.c: Use mono_string_to_utf16() instead of
18133         mono_string_chars()
18134
18135         * object.c: Added mono_string_to_utf16(), which copies the non
18136         NULL-terminated MonoString into a new double-null-terminated
18137         buffer.
18138
18139 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
18140
18141         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
18142
18143 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
18144
18145         * file-io.c: raise exceptions if handle is invalid.
18146
18147 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
18148
18149         * assembly.c: yet another check for mscorlib.
18150         * class.c, class.h: load nesting info for classes.
18151         * icall.c: many new functions to support the Reflection classes.
18152         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
18153         * reflection.h, reflection.c: mono_image_create_token(),
18154         mono_assembly_get_object(), mono_type_get_object(),
18155         mono_method_get_object(), mono_field_get_object(): methods to return
18156         objects that parallel the C representation of assemblies, types,
18157         methods, fields.
18158
18159 2001-12-11  Dick Porter  <dick@ximian.com>
18160
18161         * icall.c:
18162         * file-io.c: Internal calls for file IO.
18163
18164 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
18165
18166         * tabledefs.h: missing FileAttributes.
18167         * verify.h, verify.c: use is_valid_string () to simplify and check for
18168         valid strings more correctly. Fix warnings and speeling.
18169         Check more tables: Filed, File, ModuleRef, StandAloneSig.
18170         Check code: branches, maxstack, method calls.
18171
18172 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
18173
18174         * object.c (mono_object_allocate): removed static, so that the jit
18175         can allocate value types.
18176
18177         * icall.c (ves_icall_System_DateTime_GetNow): impl.
18178
18179 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18180
18181         * class.c: init enum types right away and register the
18182         token->MonoClass map in mono_class_create_from_typedef ().
18183         * verify.h, verify.c: first cut of the verifier.
18184         * pedump.c: add --verify switch to verify metadata tables.
18185         * tabledefs.h: add some missing enums.
18186
18187 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
18188
18189         * class.c (mono_install_runtime_class_init): impl.
18190         (mono_class_init): renamed mono_class_metadata_init to
18191         mono_class_init, also removed the metadata_inited flag
18192
18193         * object.c (mono_object_isinst): use faster algorithm
18194
18195 2001-11-30  Radek Doulik  <rodo@ximian.com>
18196
18197         * mono-endian.h: reverted last change
18198         added function prototypes
18199
18200         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
18201         add mono-endian.c back
18202
18203         * mono-endian.c: returned back, as Paolo pointed out, it's needed
18204         for unaligned access, I've mistaked it with endianess. I am
18205         sorry.
18206         (mono_read16): fix reverted endianess
18207         (mono_read64): ditto
18208         (mono_read32): ditto
18209
18210 2001-11-30  Dick Porter  <dick@ximian.com>
18211
18212         * exception.c: Implement mono_exception_from_name()
18213
18214 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18215
18216         * metadata.h, metadata.c: remove params_size and locals_size and their
18217         calculation from the metadata code: they are only usefult to the
18218         interp.
18219
18220 2001-11-29  Radek Doulik  <rodo@ximian.com>
18221
18222         * object.c (mono_ldstr): swap bytes here, it's probably not the
18223         best place, but works for me now, I'll redo it once I know mono
18224         better, also note that I add PROT_WRITE and don't reset back, also
18225         note that it's only affects big endians, so x86 should be OK
18226
18227         * mono-endian.h (read16): use just glib macros for both endians
18228
18229         * mono-endian.c: removed as glib macros are used in in
18230         mono-endian.h so we don't need to care about endianess for read
18231         macros as glib does that for us already
18232
18233 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
18234
18235         * class.h, class.h: take minimum alignment into consideration so
18236         that the fields of a class remain aligned also when in an array.
18237
18238 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18239
18240         * loader.h, loader.c: add mono_method_get_param_names().
18241         * class.c: 0-init class fields.
18242
18243 2001-11-26  Dick Porter  <dick@ximian.com>
18244
18245         * icall.c:
18246         * threads-types.h:
18247         * threads.c: New file that handles System.Threading on all platforms
18248
18249         * object.c: 
18250         * object.h: Remove the synchronisation struct from MonoObject,
18251         replace it with a pointer that gets initialised on demand
18252
18253         * Makefile.am: Replace all the system-specific threading code with
18254         a single file that uses the new wrapper library
18255
18256 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
18257
18258         * class.c, class.h: add mono_install_trampoline() so that the runtime
18259         can register a function to create a trampoline: removes the ugly
18260         requirement that a runtime needed to export arch_create_jit_trampoline.
18261         * object.h, object.c: added mono_install_handler() so that the runtime
18262         can install an handler for exceptions generated in C code (with
18263         mono_raise_exception()). Added C struct for System.Delegate.
18264         * pedump.c: removed arch_create_jit_trampoline.
18265         * reflection.c: some cleanups to allow registering user strings and
18266         later getting a token for methodrefs and fieldrefs before the assembly
18267         is built.
18268         * row-indexes.h: updates and fixes from the new ECMA specs.
18269
18270 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
18271
18272         * class.h, class.c: add enum_basetype field to MonoClass.
18273         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
18274         to get index in the constant table reated to a field, param or
18275         property.
18276         * reflection.h, reflection.c: handle constructors. Set public-key and
18277         version number of the built assembly to 0.
18278         * row-indexes.h: update from new ECMA spec.
18279
18280 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18281
18282         * class.h, class.c: add a max_interface_id to MonoClass.
18283         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
18284         since it's used to do that. Added mono_type_type_from_obj().
18285         Make GetType() return NULL instead of segfaulting if the type was not
18286         found. Handle simple arrays in assQualifiedName.
18287         * object.h: add a struct to represent an Exception.
18288         * reflection.c: output call convention in method signature.
18289         Add code to support P/Invoke methods and fixed offsets for fields.
18290
18291 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
18292
18293         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
18294         the value.
18295         * icall.c: use mono_array_addr instead of array->vector: fixes the
18296         reflection image writing.
18297         * reflection.c: init call convention byte to 0 in method signature.
18298         Encode the property signature. Don't output property-related methods
18299         twice. Really process the properties for a type (don't cast a field to
18300         a property, my mom always told me that).
18301         Fix 64 bit issues in pointer alignment in a different and more
18302         readable way.
18303
18304 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
18305
18306         * loader.h: Removed type class from MonoDefaults, added monotype
18307
18308         * loader.c: Loaded MonoType, removed loading of Type
18309
18310         * icall.c (my_mono_new_object): Now returns a System.MonoType,
18311         and fills in System.Type._impl with a RuntimeTypeHandle rather
18312         than the actual MonoClass *
18313
18314         (ves_icall_type_from_handle): change from type_class to
18315         monotype_class
18316
18317         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
18318         implemented
18319
18320         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
18321         implemented
18322
18323         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
18324
18325         (ves_icall_System_Reflection_Assembly_GetType): implemented
18326
18327         (ves_icall_System_MonoType_assQualifiedName): implemented
18328
18329         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
18330
18331 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
18332
18333         * assembly.c (mono_assembly_open): Implement a cache for the
18334         assemblies. 
18335
18336         (mono_assembly_close): only destroy the assembly when the last
18337         reference is gone.
18338         
18339 2001-11-09  Dick Porter  <dick@ximian.com>
18340
18341         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
18342
18343 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
18344
18345         * class.c (mono_class_metadata_init): bug fix: compute the right slot
18346
18347 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18348
18349         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
18350         from Martin Weindel.
18351         * object.h: add mono_string_chars ().
18352
18353 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
18354
18355         * reflection.c (build_compressed_metadata): Eliminates warnings
18356         and uses 64-bit clean code.
18357
18358         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
18359         (mono_type_equal): Change signature to eliminate warnings.
18360
18361 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18362
18363         * icall.c, loader.c: remove the internalcall array constructors.
18364         Changes to match the new MonoArray structure.
18365         * object.h, object.c: an array object doesn't allocate an extra
18366         vector. Add mono_array_new_full () to create jagged arrays easily.
18367
18368 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18369
18370         * metadata.h, metadata.c: add mono_metadata_field_info () to
18371         retreive all the info about a field from vairous tables.
18372         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
18373         * class.h, class.c: augment MonoClassField with more info.
18374         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
18375         policy and load a field's RVA if needed.
18376
18377 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
18378
18379         * class.c (mono_class_metadata_init): create a trampoline for all
18380         virtual functions instead of actually compiling them.
18381
18382 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
18383
18384         * class.h, class.c: include name in MonoClassField.
18385         * class.c: fix fundamental type of System.Object and System.String.
18386         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
18387         tokens in ldtoken.
18388         * icall.c: remove internalcalls for the Reflection stuff that is now
18389         done in C# code.
18390         * loader.c: mono_field_from_memberref () implementation.
18391         * mono-endian.c: thinko (s/struct/union/g).
18392         * object.c, object.h: make the mono_string_* prototypes actually use
18393         MonoString instead of MonoObject.
18394         * reflection.c, reflection.h: updates for changes in the reflection
18395         code in corlib: we use C structures that map to the actual C# classes.
18396         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
18397         fat method header if needed and use the info from the ILGenerator for
18398         methods. Handle fields in types. Misc fixes.
18399
18400 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
18401
18402         * class.c (mono_class_metadata_init): bug fix: always allocate
18403         space for static class data
18404
18405 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
18406
18407         * class.c (mono_compute_relative_numbering): use relative
18408         numbering to support fast runtime type checks.
18409
18410 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
18411
18412         * class.c (mono_class_create_from_typeref): added debugging output
18413         to print class name when MonoDummy is returned instead of real class
18414
18415 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
18416
18417         * class.c (mono_class_metadata_init): interface offset table now
18418         contains pointers into the vtable - this is more efficient for the jit
18419
18420 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
18421
18422         * class.c (mono_class_metadata_init): use a temporary vtable (the
18423         old algorithm only worked for the interpreter, but not for the jit)
18424
18425 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
18426
18427         * loader.c (method_from_memberref): use mono_class_get to get the
18428         class of an array instead of using System.Array directly.
18429         (mono_get_method): also add MEMBERREF methods to the method cache
18430         which usefull for arrays.
18431
18432 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
18433
18434         * pedump.c (arch_compile_method): added to compute vtable entry
18435
18436         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
18437         number of interfaces.
18438         
18439         * class.h: merged MonoArrayClass into MonoClass
18440
18441         * class.c (mono_class_create_from_typedef): compute the vtable size and
18442         allocate space to include the vtable inside MonoClass
18443         (mono_class_metadata_init): initialize the vtable
18444
18445 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
18446
18447         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
18448         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
18449         * image.c: endian fixes by Laurent Rioux.
18450         * object.h, object.c: rename MonoStringObject to MonoString and
18451         MonoArrayObject to MonoArray. Change some function names to conform to
18452         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
18453         guint16* as first argument, so don't use char*.
18454         Provide macros to do the interesting things on arrays in a portable way.
18455         * threads-pthread.c: updates for the API changes and #include <sched.h>
18456         (required for sched_yield()).
18457         * icall.c: updates for the API changes above.
18458         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
18459         platforms that need them.
18460
18461 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
18462
18463         * class.c: set the correct type for all the fundamental
18464         type when loading the class.
18465
18466 2001-10-05  Dick Porter  <dick@ximian.com>
18467
18468         * threads-pthread.c (pthread_mutex_timedlock): Simple
18469         compatibility version for C libraries that lack this call.
18470
18471 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18472
18473         * class.c: MonoTypes stored in MonoClass are stored as
18474         fundamental MonoTypes when the class represents a
18475         fundamental type (System.Int32, ...).
18476         The TypeHandle return by ldtoken is a MonoType*.
18477         * icall.c: ves_icall_get_data_chunk () write out all the
18478         PE/COFF stuff. Implement ves_icall_define_method (),
18479         ves_icall_set_method_body (), ves_icall_type_from_handle ().
18480         * image.c: properly skip unknown streams.
18481         * loader.h, loader.c: add type_class to mono_defaults.
18482         * metadata.c, metadata.h: export compute_size () as
18483         mono_metadata_compute_size () with a better interface.
18484         Typo and C&P fixes.
18485         * pedump.c: don't try to print the entry point RVA if there is no entry point.
18486         * reflection.c, reflection.h: many cleanups, fixes, output method
18487         signatures and headers, typedef and typeref info, compress the metadata
18488         tables, output all the heap streams, cli header etc.
18489         * row-indexes.h: typo fixes.
18490
18491 2001-10-04  Dick Porter  <dick@ximian.com>
18492
18493         * object.h: Add a synchronisation mutex struct to MonoObject
18494
18495         * object.c (mono_new_object): Initialise the object
18496         synchronisation mutexes
18497
18498         * icall.c: System.Threading.Monitor internal calls
18499         
18500         * threads-pthread.h:
18501         * threads-pthread.c: System.Threading.Monitor internal calls
18502
18503         * threads-types.h: New file, includes the system-specific thread
18504         structures
18505         
18506         * threads-pthread-types.h:
18507         * threads-pthread-types.c: New files, handle pthread-specific
18508         synchronisation types
18509
18510         * threads-dummy-types.h: 
18511         * threads-dummy-types.c: New files of dummy support for
18512         thread-specific types
18513
18514         * metadata.c:
18515         * image.c:
18516         * pedump.c: include mono-endian.h not endian.h
18517         
18518         * Makefile.am: More threads files.
18519         Name mono-endian.h not endian.h
18520
18521 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
18522
18523         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
18524         stuff and implement a few more bits.
18525         * icall.c: a field needs to be dereferenced twice. Do not use the same
18526         name for two variables in the same scope.
18527         * image.c, image.h: cleanups.
18528
18529 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
18530
18531         * class.c (mono_class_metadata_init): bug fix: compute the right size
18532
18533 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
18534
18535         * icall.c: implemented some of the Reflection internalcalls.
18536         * image.c, image.h: start writing out the PE/COFF image.
18537         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
18538         that does the reverse than decode_blob_size ().
18539         * object.c: use mono_metadata_encode_value (). Move here
18540         temporary implementation of mono_string_to_utf8 ().
18541         * rawbuffer.c: make malloc_map static.
18542
18543 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18544
18545         * metadata.c: fix type comparison for arrays.
18546         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
18547         Added a couple of new classes to monodefaults.
18548         * icall.c: added a couple of Reflection-related internalcalls.
18549         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
18550         Added a byval_arg MonoType to MonoClass.
18551
18552 2001-09-28  Dick Porter  <dick@ximian.com>
18553
18554         * icall.c:
18555         * threads-pthread.h: 
18556         * threads-pthread.c: Implemented internal calls for
18557         LocalDataStoreSlot operations.  Applied mutexes around all shared
18558         data.  Reworked the thread creation and Start() operations to
18559         avoid a race condition.
18560         
18561         * threads-dummy.h:
18562         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
18563
18564 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
18565
18566         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
18567
18568 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
18569
18570         * class.c, loader.c: warn and return NULL instead of erroring out.
18571         * icall.c: added System.AppDomain::getCurDomain().
18572         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
18573
18574 2001-09-25  Dick Porter  <dick@ximian.com>
18575
18576         * threads-pthread.h:
18577         * threads-pthread.c: Implemented timed thread joining and added
18578         System.Threading.Thread::Join_internal internal call
18579
18580         * icall.c: Added System.Threading.Thread::Join_internal internal call
18581
18582         * threads-dummy.h:
18583         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
18584
18585 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
18586
18587         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
18588         mono_string_intern () to implement the semantics of the ldstr opcode
18589         and the interning of System.Strings.
18590         * icall.c: provide hooks to make String::IsIntern and String::Intern
18591         internalcalls.
18592
18593 2001-09-23  Dick Porter  <dick@ximian.com>
18594
18595         * threads-dummy.c: 
18596         * threads-dummy.h: New files of dummy threading routines
18597
18598         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
18599         support code based on system specifics
18600
18601         Rename PTHREAD_LIBS to THREAD_LIBS
18602         
18603 2001-09-23  Dick Porter  <dick@ximian.com>
18604
18605         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
18606         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
18607         internal calls.
18608         (mono_thread_init): Set up a Thread object instance to return when
18609         the main thread calls Thread.CurrentThread
18610         (mono_thread_cleanup): Wait for all subthreads to exit
18611
18612         * icall.c: New internal calls for System.Threading.Thread::Sleep
18613         (including Schedule) and CurrentThread
18614
18615         * threads.h: New file, to insulate thread-specific stuff from the
18616         rest of the code
18617
18618 2001-09-21  Dick Porter  <dick@ximian.com>
18619
18620         * threads-pthread.h: 
18621         * threads-pthread.c: New file, for handling pthreads-style
18622         threading support.  Start() now starts a new thread and executes
18623         the ThreadStart delegate instance.
18624
18625         * icall.c: Added the internalcall for
18626         System.Threading.Thread::Start_internal
18627
18628         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
18629
18630 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
18631
18632         * loader.c: work around the different signatures for delegates
18633         constructors csc generates in compiled code vs the ones compiled in mscorlib.
18634
18635 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
18636
18637         * class.h, class.c: add mono_class_get_field_from_name ().
18638         * *: Fix C comments and other ANSI C issues.
18639
18640 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
18641
18642         * endian.h, assembly.c: fix some endianness issues.
18643
18644 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
18645
18646         * loader.h, load.c: add delegate_class to mono_defaults.
18647         Handle runtime provided methods in mono_get_method ().
18648
18649 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
18650
18651         * loader.c (mono_get_method): use pinvoke for internal call
18652
18653         * icall.c: use pinvoke for internal call
18654
18655         * loader.c (method_from_memberref): set the method name
18656
18657 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
18658
18659         * metadata.c: help the compiler generate better code for
18660         mono_class_from_mono_type ().
18661
18662 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
18663
18664         * class.c (mono_class_metadata_init): delayed computing of the
18665         class size to mono_class_metadata_init ()
18666
18667 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
18668
18669         * class.c, class.h: add an interfaces member to MonoClass.
18670         * image.c, image.h: add assembly_name field to MonoImage
18671         from the assembly table.
18672         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
18673
18674 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
18675
18676         * class.c: Handle Array in mono_class_from_mono_type ().
18677         * metadata.c, pedump.c: some endian fixes.
18678
18679 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
18680
18681         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
18682         * metadata.c: fix small problem introduced with the latest commit.
18683
18684 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
18685
18686         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
18687         We don't need a MonoMetadata pointer anymore to compare signatures in
18688         mono_metadata_signature_equal (), update callers.
18689         Reduced memory usage an number of allocations for MonoMethodHeader and
18690         MonoMethodSignature.
18691
18692 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
18693
18694         * metadata.c: added compare for szarray.
18695
18696 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
18697
18698         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
18699         and add a couple more types to it and mono_defaults. Give an hint on
18700         classes that need implementing in our corlib and are referenced
18701         in mscorlib.
18702
18703 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
18704
18705         * class.h, class.c: keep track if a class is also an Enum.
18706         * loader.c: Implement a couple more types for use in libffi
18707         marshalling. Gives better diagnostics when failing to dlopen
18708         a library. Set method->klass for P/Invoke methods, too.
18709
18710 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
18711
18712         * class.c, class.h: add a MonoType this_arg to MonoClass that
18713         represents a pointer to an object of the class' type that
18714         can be used by the interpreter and later the type cache.
18715         Add best guess alignment info for valuetype objects.
18716
18717 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
18718
18719         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
18720         into MonoType: one less level of indirection and allocation and
18721         simplifies quite a bit of code. Added cache for MonoTypes that are
18722         used frequently, so that we don't need to allocate them all the time.
18723
18724 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
18725
18726         * class.c (mono_class_create_from_typedef): System.Enum is also a
18727         value type, although it does not derive from System.ValueType
18728         (maybe a bug in the ms compiler?)
18729
18730         * metadata.c (mono_type_size): return the right size for value types
18731
18732         * loader.c (mono_get_method): only initialize method header if not abstract
18733
18734         * class.c (mono_class_from_mono_type): use mono_default values. 
18735
18736 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
18737
18738         * *: use MonoClass pointers instead of <type_tokens>
18739         
18740         * class.h: new flag: metadata_inited.
18741
18742         * class.c (mono_class_metadata_init): impl.
18743         (mono_class_instance_size): impl.
18744         (mono_class_data_size): impl.
18745
18746 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18747
18748         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
18749         MonoClass now has the name and name_space fields. 
18750         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
18751         mono_get_method () takes and optional MonoClass as argument.
18752         Removed mono_typedef_from_name() and added mono_class_token_from_name()
18753         instead that takes advantage of a map from class names to typedef
18754         tokens in MonoImage.
18755
18756 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
18757
18758         * metadata.c: zero is not a valid alignment boundary.
18759         Merge MONO_TYPE_VOID in default decoding code.
18760
18761 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
18762
18763         * image.h: merged MonoMetadata into MonoImage
18764
18765         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
18766         identify the type of elements.
18767
18768 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
18769
18770         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
18771         * cil-coff.h: split MonoMSDOSHeader and add size info.
18772         * image.c: add some consistency checks.
18773         * metadata.c: fix row size computation: one programmer
18774         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
18775         add explanation for the locator routine.
18776         Fix decoding of size in method header.
18777         
18778 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
18779
18780         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
18781         (g_concat_dir_and_file): Bring g_concat_dir_and_file
18782         function from gnome-libs.  This uses the right path separator
18783         based on the OS, and also works around a bug in some systems where
18784         a double slash is not allowed. 
18785         (default_assembly_name_resolver): Use g_concat_dir_and_file
18786         (mono_assembly_open): ditto.
18787
18788 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
18789
18790         * metadata.c (mono_metadata_signature_equal): impl.
18791
18792         * *: void is now a realy MonoType (instead of using NULL)
18793         
18794         * metadata.c (do_mono_metadata_parse_type): use
18795         mono_metadata_parse_type to parse void value.
18796
18797 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
18798
18799         * metadata.c, metadata.h: in the signature and method header store
18800         only the space required for holding the loca vars and incoming arguments.
18801
18802 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
18803
18804         * metadata.c (do_mono_metadata_parse_type): treat void like any
18805         other type (instead of assigning NULL);
18806
18807 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
18808
18809         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
18810
18811 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
18812
18813         * image.c (do_mono_image_open): added a cache for arrays.
18814
18815 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
18816
18817         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
18818         decode a single column from a row in a metadata table and changes
18819         to take advantage of it in the typedef locator (gives a nice speed up).
18820         Store offset info for function params.
18821
18822 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
18823
18824         * image.h (MONO_IMAGE_IS_CORLIB): removed 
18825
18826 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
18827
18828         * assembly.c: how could mono_assembly_close () had ever worked?
18829         * metadata.c, metadata.h: provide offset info for local vars.
18830         Implement mono_type_size () to take care of alignment as well
18831         as size (it was mono_field_type_size in cli/class.c before).
18832
18833 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
18834
18835         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
18836
18837         * assembly.h (CORLIB_NAME): set to corlib.dll
18838
18839         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
18840
18841 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
18842
18843         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
18844         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
18845         tokentype.h: massive namespace cleanup.
18846
18847 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
18848
18849         * metadata.h, metadata.c: decode exception clauses when parsing method header.
18850
18851 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
18852
18853         * metadata.c (mono_metadata_free_type): added check for type !=
18854         NULL (void) before calling mono_metadata_free_type()
18855
18856 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
18857
18858         * metadata.h, row_indexes.h: added header with enumerations to use
18859         to index in the columns from tables in metadata and to decode coded
18860         tokens: we should start using this instead of embedding magic numbers
18861         all over the code.
18862
18863 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
18864
18865         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
18866         Move metadata_t info from cli_image_info_t to MonoImage, where
18867         it's easily accessible. Changed all the uses accordingly.
18868         Added the method and class caches to MonoImage.
18869         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
18870         and mono_metadata_decode_value () signature to be more consistent
18871         with the other parse functions (and simplify code). Taken advantage
18872         of zero-length array allocation with GCC. Removed reduntant (and
18873         wrong) MonoFieldType struct and use MonoParam instead. Changed
18874         mono_metadata_parse_field_type () to use common code for parsing.
18875         Added mono_metadata_typedef_from_field () and
18876         mono_metadata_typedef_from_method () to lookup a typedef index from a
18877         field or method token.
18878         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
18879
18880 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
18881
18882         * metadata.c (mono_metadata_parse_field_type): Implement. 
18883         (do_mono_metadata_parse_type): Split engine from
18884         mono_metadata_parse_type, so that we can create smaller structures
18885         for things that just have one pointer to the MonoType (look at
18886         the MonoFieldType)
18887
18888 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
18889
18890         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
18891         as Jan Gray found out, it is incorrect. 
18892
18893 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
18894
18895         * assembly.c: Implement asssembly loading.  This loads an image
18896         and loads all the referenced assemblies.  Come to think of it, we
18897         could always do lazy loading of the assemblies. 
18898
18899         * image.c (mono_image_open): Keep loaded images in a hashtable.
18900
18901         * image.h (MonoImage): Add reference count.
18902
18903 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
18904
18905         * assembly.c (mono_assembly_open): Keep track of the file name in
18906         case the assembly has no ASSEMBLY table.
18907
18908         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
18909         from get.c here.
18910
18911 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
18912
18913         * metadata.c, metadata.h: decode local vars in method header
18914         parse function. Change callers accordingly.
18915
18916 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
18917
18918         * metadata.h, cil-coff.h: protect against multiple inclusion.
18919         Added some new structures to hold information decoded from metadata:
18920         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
18921         and relevant decoding/free functions.
18922         * metadata.c: implement decoding functions. Add warning for out of bounds
18923         index in mono_metadata_locate(). Implement mono_get_method () to retreive
18924         all the info about a method signature and invocation. Remove check on
18925         uninitialized local var in parse_mh() and fix memory leak.
18926
18927 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
18928
18929         * metadata.h: More macros.
18930
18931         * tokentype.h: New file.
18932
18933 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
18934
18935         * assembly.c: added a consistency check and initialize
18936         some structures with g_new0().
18937         * metadata.c: fixed a couple more bugs in table size computation
18938         and add other checks for out-of bound access to metadata.
18939
18940 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
18941
18942         * metatada.c: fix bugs computing table sizes. Spew a
18943         warning when index in string heap is out of bounds.
18944
18945 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
18946
18947         * metadata.h: Add a couple of macros to manipulate tokens. 
18948
18949 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
18950
18951         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
18952         cli_section_tables).
18953
18954 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
18955
18956         * metadata.c (mono_metadata_user_string): New function, provides
18957         access to the UserString heap. 
18958
18959 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
18960
18961         * metadata.c: Add inline documentation.
18962
18963 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
18964
18965         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
18966         files. 
18967
18968 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
18969
18970         * typeattr.h: New file, TypeAttribute flags. 
18971
18972 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
18973
18974         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
18975         mono_assembly_ensure_section): Section loading code.
18976         (load_section_tables): Load the sections.
18977
18978         * mono/metadata/metadata.c (mono_metadata_locate_token,
18979         mono_metadata_locate): Functions to locate the information
18980         definition given a token or a table and an index.
18981         (mono_metadata_compute_table_bases): New.
18982         (compute_size): New function to compute the sizes of the various
18983         tables.
18984
18985         * mono/metadata/metadata.h: Finish listing the different index
18986         types. 
18987
18988         * mono/metadata/pedump.c: Improve to dump new information.
18989
18990 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
18991
18992         * mono/metadata/metadata.c: Entered all the tables matching
18993         Beta2. 
18994
18995         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
18996
18997
18998