2009-04-08 Sebastien Pouliot <sebastien@ximian.com>
[mono-project.git] / mono / metadata / ChangeLog
blobce5f62a2fcc6a6883b8b03296386f26eeceb2125
1 2009-04-08  Sebastien Pouliot  <sebastien@ximian.com>
3         * security-core-clr.c: Simplify get_reflection_caller not to call
4         mono_method_get_last_managed (another stack walk) and adjust the
5         callers to handle a (should not happen) NULL return value.
7 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
9         Add accessors to some MonoGenericParam fields
10         * class-internals.h (mono_generic_param_owner): New accessor.
11         (mono_generic_param_num): Likewise.
12         (mono_type_get_generic_param_owner): New helper.
13         (mono_type_get_generic_param_num): New helper.
14         * class.c, icall.c, metadata.c, reflection.c, verify.c: Use them.
16 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
18         * class-internals.h (mono_generic_container_get_param): New wrapper.
19         * class.c, icall.c, metadata.c, verify.c: Use it.
21 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
23         Fix gtest-252.cs
24         * verify.c (mono_type_is_valid_type_in_context): Rewrite to use
25         the standard case/loop.  In particular, don't complain about
26         references to generic type definitions.
28 2009-04-07  Zoltan Varga  <vargaz@gmail.com>
30         * debug-helpers.c (dis_one): Decode string arguments.
32 2009-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
34         * pedump.c (dump_verify_info): Dump type name correctly.
36 2009-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
38         * verify.c (mono_method_verify): Don't init code slots for exception boundaries if they
39         are larger than code size.
41         This can happen in valid code if the try/catch block is not followed by any instruction
42         and do a backward branch on the leave instruction.
44         Fixes #492494.
46 2009-04-06  Sebastien Pouliot  <sebastien@ximian.com>
48         * security-core-clr.c: Fix typo while comparing second method names
49         in can_avoid_corlib_reflection_delegate_optimization
51 2009-04-06 Rodrigo Kumpera  <rkumpera@novell.com>
53         * verify.c (do_throw): Don't allow an unboxed generic param ar argument.
55         Fixes #487738.
57 2009-04-06 Rodrigo Kumpera  <rkumpera@novell.com>
59         * metadata.c (do_mono_metadata_parse_type): Fail if we are decoding
60         a MVAR using a class context.
62         Fixes #490335.
64 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
66         * object.c (mono_class_compute_gc_descriptor): Make this non-static.
68         * domain-internals.h (struct _MonoJitInfo): Add a 'gc_info' field.
70         * gc-internal.h (MonoGCCallbacks): New stucture containing the callback
71         functions supplied by the JIT for the SGEN GC.
73         * sgen-gc.c: Call the callbacks supplied by the JIT to do stack marking.
74         
75 2009-04-06  Massimiliano Mantione  <massi@ximian.com>
77         monitor.c (mono_monitor_try_enter_internal):
78         Added calls to profile monitor contentions.
79         Also duplicated a small piece of code (the "get the monitor" logic)
80         from the fast path to the slow path, and changed the relevant goto
81         statements, so that monitor acquisition events can be emitted from the
82         slow path (this is by Paolo Molaro).
84 2009-04-06  Massimiliano Mantione  <massi@ximian.com>
86         * profiler.c, profiler.h, profiler-private.h:
87         Added support for profiling monitor contentions.
89 2009-04-03 Rodrigo Kumpera  <rkumpera@novell.com>
91         * metadata-verify.c: Verify the modules table.
93 2009-04-02 Rodrigo Kumpera  <rkumpera@novell.com>
95         * verify.c (mono_generic_param_is_constraint_compatible): Inflate the candidate
96         using the context of the method been verifier and not of the method been called.
98         * verify.c: Add verifier_inflate_type and mono_type_is_valid_type_in_context to
99         safely inflate generic types. 
101 2009-04-02  Sebastien Pouliot  <sebastien@ximian.com>
103         * security-core-clr.c: Change the strategy for checking the 
104         "reflection using delegates optimization" to avoid unneeded 
105         attributes in multiple class libraries.
107 2009-04-02  Mark Probst  <mark.probst@gmail.com>
109         * sgen-gc.c: Remove object element in the disappearing link struct
110         by storing the object pointer in the link.
112 2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
114         * pedump.c (dump_verify_info): Don't crash if signature decoding fails.
116 2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
118         * verify.c (verifier_load_field): Fail if the field parent could not be loaded.
120         * verify.c (mono_method_verify): Do proper bounds checking of exception
121         clause ranges.
123 2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
125         * loader.c (mono_field_from_token): Don't crash if the field parent could
126         not be decoded.
128 2009-03-31  Mark Probst  <mark.probst@gmail.com>
130         * sgen-gc.c: Execute critical finalizers after ordinary
131         finalizers.
133         * class-internals.h, domain.c: Add CriticalFinalizerObject to
134         mono_defaults.
136 2009-03-31 Jb Evain <jbevain@novell.com>
138         * verify.c (do_ldstr): don't check if a string is in the user strings
139         heap if the current image is dynamic.
141 2009-03-31  Mark Probst  <mark.probst@gmail.com>
143         * sgen-gc.c: Wait until the last finalizer has executed when
144         returning from WaitForPendingFinalizers.
146 2009-03-31  Martin Baulig  <martin@ximian.com>
148         * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 2.
150 2009-03-31  Martin Baulig  <martin@ximian.com>
152         * mono-debug-debugger.h (MonoDebuggerEvent): Add
153         `MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
154         `MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
155         (mono_debugger_event_create_appdomain): New function.
156         (mono_debugger_event_unload_appdomain): New function.
158         * appdomain.c (mono_domain_create_appdomain_internal): Call
159         mono_debugger_event_create_appdomain().
161 2009-03-31  Martin Baulig  <martin@ximian.com>
163         * mono-debug-debugger.c
164         (mono_debugger_register_class_init_callback): Also register the
165         class init callback if the class is already initialized to make
166         things work with shadow copied assemblies.
168 2009-03-31  Sebastien Pouliot  <sebastien@ximian.com>
170         * security-core-clr.c
171         (mono_security_core_clr_ensure_reflection_access_field): Let 
172         critical code access the field (just like we do for methods). Use
173         check_field_access helper.
174         (mono_security_core_clr_ensure_reflection_access_method): Use 
175         check_field_access helper.
177 2009-03-31  Mark Probst  <mark.probst@gmail.com>
179         * sgen-gc.c: Remove data (callback) element from FinalizeEntry and
180         call the run-finalize function directly.
182         * gc.c, gc-internal.h: Make run_finalize() non-static.
184 2009-03-31  Mark Probst  <mark.probst@gmail.com>
186         * sgen-gc.c: Use a separate struct for disappearing links.
188 2009-03-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
190         * socket-io.c: don't fail if the SocketOptionsFlag has Partial or
191         * MaxIOVectorLength enabled, just ignore them.
192         Fixes bug #349688.
194 2009-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
196         * metadata-verify.c: Fix eglib build.
198 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
200         * threads-types.h: Fix the win32 build.
202 2009-03-28  Sebastien Pouliot  <sebastien@ximian.com>
204         * class.c: move coreclr inheritance/override checks to 
205         security-core.clr.c
206         * security-core.clr.c|h: add code from class.c with additional
207         documentation. Fix override check when the method is not critical.
209 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
211         * debug-helpers.c (mono_method_desc_match): Make '*' match anything.
212         (match_class): Ditto.
214 2009-03-27 Rodrigo Kumpera  <rkumpera@novell.com>
216         * metadata-verify.c: Rename bounds_check_offset to bounds_check_datadir.
218         * metadata-verify.c: Implement table layout row size calculation. Verify
219         the total size of the tables.
221 2009-03-27 Rodrigo Kumpera  <rkumpera@novell.com>
223         * metadata-verify.c: Verify heap sizes and size to decode row counts. 
225 2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
227         * appdomain.c:
228         * console-io.[ch]: added new mono_console_init() to make sure that
229         file descriptors 0, 1 and 2 are opened.
230         Bug #489019 fixed.
232 2009-03-27  Sebastien Pouliot  <sebastien@ximian.com> 
234         * appdomain.h: Export a new callback type and a new function to
235         set this callback. This allow a mono host to provide it's own
236         definition for "platform code".
237         * metadata-internals.h: Add a core_clr_platform_code flag on 
238         _MonoImage to (cache and) know if it is representing platform 
239         code.
240         * image.c (do_mono_image_open): Set core_clr_platform_code flag 
241         on platform code images.
242         * security-core-clr.c|h 
243         (mono_security_set_core_clr_platform_callback): Allow the host
244         to provide it's own platform check definition.
245         (mono_security_core_clr_determine_platform_image): Detect if an 
246         image is platform code (using the specified callback).
247         (mono_security_core_clr_is_platform_image): Return cached value 
248         for platform code.
250 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
252         * threads.c (mono_create_thread): New helper function to wrap CreateThread
253         which has different parameter types for the 'tid' argument in windows and
254         the io-layer.
256         * appdomain.c attach.c threads.c: Use the new helper.
258 2009-03-26 Rodrigo Kumpera  <rkumpera@novell.com>
260         * metadata-verify.c: Verify valid table bits.
262 2009-03-26 Rodrigo Kumpera  <rkumpera@novell.com>
264         * metadata-verify.c (verify_metadata_header): Store size in the size field.
266         * metadata-verify.c: Add initial table schema verification.
268 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
270         * icall.c (ves_icall_get_parameter_info): Add a 'member' argument, used to
271         obtain the refclass argument needed by mono_param_get_objects (). Fixes
272         #488383.
274         * reflection.c (mono_param_get_objects_internal): Add a 'refclass' argument.
276         * appdomain.c (MONO_CORLIB_VERSION): Bump this.
278 2009-03-26  Sebastien Pouliot  <sebastien@ximian.com>
280         * security-core-clr.c: Add/update documentation
282 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
284         * marshal.c (emit_marshal_object): Generate code to throw an exception
285         instead of throwing it. Fixes #488670.
287 2009-03-25  Sebastien Pouliot  <sebastien@ximian.com>
289         * appdomain.c: Bump MONO_CORLIB_VERSION to 73.
290         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Add
291         an extra 'throwOnBindFailure' parameter to the icall. Remove FIXME
292         and add a call to mono_security_core_clr_ensure_delegate_creation
293         to do the extra checks required by CoreCLR.
294         * security-core-clr.c|h: Add function to check delegate creation,
295         both in the binding and accessibility, under CoreCLR.
297 2009-03-25  Sebastien Pouliot  <sebastien@ximian.com> 
299         * reflection.c (mono_reflection_create_dynamic_method): when 
300         coreclr is enabled make sure that every resolved object are
301         checked (e.g. field and method access).
302         * security-core-clr.c|h: Add function to check objects resolved
303         when a dynamic method is created.
305 2009-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
307         * metadata-verify.c: Cache directory rva translations.
309         * metadata-verify.c: Add cli-header and streams verification.
311 2009-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
313         * image.c (load_metadata_ptrs): We decode MonoImage::md_version_minor at
314         the wrong offset (8 instead of 6).
316 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
318         * marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
319         methods, return the native function address itself. Fixes
320         #487758.
322 2009-03-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
324         * console-io.c: some of the values for control characters might not be
325         present.
327 2009-03-21  Sebastien Pouliot  <sebastien@ximian.com>
329         * exception.c|h: Add helpers to create [Field|Method]AccessException
330         * icall.c: Add required coreclr check calls for field reflection.
331         Move the existing (method) check logic into security-core-clr.c
332         * security-core-clr.c: Add functions to check if the access of a
333         field or method is allowed when reflecting under coreclr. This is
334         mostly done using a stack walk to find the "real" caller: i.e. the
335         code that is calling the reflection
337 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
339         * gc-internal.h: Change location of gc_wrapper.h
341 2009-03-20  Sebastien Pouliot  <sebastien@ximian.com> 
343         * class.c: Simplification to coreclr checks for overrides that
344         makes it easier to set breakpoints.
346 2009-03-20  Sebastien Pouliot  <sebastien@ximian.com>
348         * security-core-clr.c|h: (mono_security_core_clr_class_level, 
349         mono_security_core_clr_method_level): Avoid potential 
350         MonoCustomAttrInfo allocation for transparent assemblies (e.g. 
351         user/application code) and make it easier to set breakpoints
353 2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
355         * metadata-verify.c: Reject cli header tables that mono don't handle.
357 2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
359         * pedump.c: Fix CLI header dumping.
361 2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
363         * metadata-verify.c: More CLI header verification.
365 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
367         * locales.c (get_current_locale_name): Use g_malloc instead of malloc.
369 2009-03-18 Rodrigo Kumpera  <rkumpera@novell.com>
371         * metadata-verify.c: Initial verification of the CLI header.
373 2009-03-18 Rodrigo Kumpera  <rkumpera@novell.com>
375         * metadata-verify.c (verify_resources_table): Fix verification of zero
376         sized resource section and id entries count.
378 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
380         * icall.c: Handle user types in many Type icalls. Fixes #486303.
382 2009-03-17  Jb Evain  <jbevain@novell.com>
384         * profiler.c: call mono_gc_base_init from mono_profiler_load.
386 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
388         * sgen-gc.c (mono_gc_make_descr_for_object): Fix 64 bit support.
389         (mono_gc_make_descr_for_array): Ditto.
391 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
393         * verify.c (mono_verifier_is_class_full_trust): Add support for
394         CoreCLR security mode where trusted assemblies are defined as
395         "platform code".
397 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
399         * metadata-verify.c: Add minimal PECOFF resource verification.
401 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
403         * metadata-verify.c: Be less restrictive with some coff fields.
405 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
407         * verify.c (init_stack_with_value_at_exception_boundary): Init generic
408         params as boxed values on stack. Fixes #485706.
410 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
412         * console-io.c: the termios values may vary in different flavors of unix.
414 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
416         * console-io.[ch]: return the entire set of control characters when
417         initializing the terminal.
418         * appdomain.c: bump corlib version.
420 Mon Mar 16 11:11:26 CET 2009 Paolo Molaro <lupus@ximian.com>
422         * mono-perfcounters.c: added support for in-process custom
423         performance counters.
425 2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>
427         * metadata-verify.c: Small cleanup and add comment for IAT directory entry. 
429 2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>
431         * metadata-verify.c: Verify the data pointed by the import table. 
433 2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>
435         * metadata-verify.c (load_data_directories): Store data
436         directory contents.
438         * metadata-verify.c: Verify the import table. 
440 2009-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
442         * metadata-verify.c: Verify data directories.
444 2009-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
446         * metadata-verify.c: Check section header flags.
448 2009-03-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
450         * appdomain.c: if the assembly name is a shadow-copied file, return
451         TRUE from mono_is_shadow_copy_enabled but don't actually do anything
452         in mono_make_shadow_copy.
453         * icall.c: if the assembly name is a shadow-copied file, replace it
454         with the original assembly path.
456         Bug #484244 fixed. NUnit tests for corlib can be run without
457         --noshadow now.
459 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
461         * sgen-gc.c (add_to_global_remset): Fix the handling of root global remset
462         entries when the table is reallocated.
464         * icall.c: Allocate the memory used by the mono_ptr_array macros using
465         mono_gc_alloc_fixed () since it contains GC refs.
467 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
469         * reflection.c (ensure_complete_type): New helper function to call
470         type resolve handlers for unfinished dynamic types.
471         (resolve_object): Call it for MonoClassFields. Fixes #483852.
473 2009-03-09  Zoltan Varga  <vargaz@gmail.com>
475         * reflection.c (mono_custom_attrs_has_attr): Handle interfaces. Fixes
476         #483247.
478 2009-03-08 Rodrigo Kumpera  <rkumpera@novell.com>
480         * appdomain.c (get_shadow_assembly_location): Fix memleak.
482 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
484         * domain-internals.h (struct _MonoDomain): Add new hash tables mapping
485         between GCHandles of type WeakTrackResurrection and the objects they
486         point to.
488         * gc.c: Partly implement the sematics of GCHandles of type 
489         WeakTrackResurrection: these handles should only be cleared after the
490         finalizer of the object they are pointing to has ran.
492 2009-03-06  Mark Probst  <mark.probst@gmail.com>
494         * icall.c: Partially revert r126631 because using the jump
495         trampolines for generic shared methods makes it superfluous.
497 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
499         * threads.c (handle_store): Create the 'threads' hash table with the proper
500         MONO_HASH_VALUE_GC type.
502 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
504         * domain-internals.h (struct _MonoDomain): Move 'typeof_void' before
505         FIRST_GC_TRACKED.
507         * domain.c (mono_domain_create): Register the fields between FIRST_GC_TRACKED
508         and LAST_GC_TRACKED as a GC root.
510         * gc-internal.h: Fix the comment of mono_gc_alloc_fixed.
512         * object.c (mono_class_create_runtime_vtable): Create a GC descriptor for
513         the static data even if it consists of 1 reference.
515         * boehm-gc.c (mono_gc_alloc_fixed): Allocate using GC_MALLOC_EXPLICITLY_TYPED
516         if there is a GC descriptor.
518         * reflection.c (ALLOC_REFENTRY): Allocate ReflectedEntry-es using malloc
519         instead of through the GC since they contain no object references.
521 2009-03-05  Mark Probst  <mark.probst@gmail.com>
523         * generic-sharing.c (instantiate_other_info): Always return a jump
524         trampoline for method code.
526 2009-03-05  Marek Habersack  <mhabersack@novell.com>
528         * culture-info-tables.h: generated to include the en-tt culture.
530 2009-03-04 Rodrigo Kumpera  <rkumpera@novell.com>
532         * domain-internals.h (MonoDomain): Add two fields to cache invoke wrappers to
533         capture the thread context.
535         * object.c (mono_async_result_new): Cache the invoke wrappers to
536         ExecutionContext::Capture.
538 2009-03-04 Rodrigo Kumpera  <rkumpera@novell.com>
540         * marshal.h: Add a prototype for what mono_compile_method returns
541         for invoke wrappers.
543         * gc.c: Use the new prototype declaration.
545 2009-03-04  Geoff Norton  <gnorton@novell.com>
547         * boehm-gc.c: Add some MONO_LOG tracing for the GC
548         * gc-internal.h:
549         * mono-gc.h: Expose mono_gc_invoke_finalizers in the embedding api.
551 2009-03-04  Martin Baulig  <martin@ximian.com>
553         * mono-debug.h
554         (mono_debugger_runtime_invoke): Removed.
556         * mono-debug-debugger.c
557         (mono_runtime_invoke): Moved into ../mini/debug-mini.c.
559 2009-03-02  Martin Baulig  <martin@ximian.com>
561         * mono-debug.h
562         (mono_debugger_unhandled_exception): Removed.
563         (mono_debugger_handle_exception): Removed.
564         (mono_debugger_throw_exception): Removed.
566         * mono-debug.c
567         (mono_debug_debugger_version): Bump to 5.
569         * mono-debug-debugger.c: Moved the exception handling code to
570         ../mini/debug-mini.c
572 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
574         * domain-internals.h (struct _MonoDomain): Add a separate lock for the
575         finalize_objects_hash.
577         * gc.c: Use the separate lock to access the finalize_objects_hash field.
578         
579         * domain-internals.h (struct _MonoDomain): Add finalize_runtime_invoke
580         field.
582         * metadata-internals.h (struct _MonoImage): Add runtime_invoke_vcall_cache
583         cache.
585         * image.c (mono_image_close): Free it.
586         
587         * marshal.c (mono_marshal_get_runtime_invoke): Add a 'virtual' argument
588         allowing a creation of a wrapper which invokes its method using a CALLVIRT
589         on the this argument.
591         * gc.c (run_finalize): Optimize the calling of the finalizers.
593 2009-03-03  Martin Baulig  <martin@ximian.com>
595         * mono-debug.h (MONO_DEBUGGER_MAJOR_VERSION): Bump to 81 because
596         of the `MonoGenericInst' changes.
598 2009-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
600         * icall.c (ves_icall_MonoType_GetGenericArguments): Use
601         mono_array_class_get_cached to reduce locking contention. Extract
602         a domain var.
604         * icall.c (ves_icall_Type_GetFields_internal): Avoid allocating
605         intermediary managed arrays. Use caching version of mono_array_new
606         to allocate the result array.
608         * icall.c (ves_icall_Type_GetEvents_internal): Same.    
610         * icall.c (ves_icall_Type_GetNestedTypes): Same.        
612         * locales.c (create_names_array_idx):  Use mono_array_new_cached
613         to reduce locking contention.
615 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
616                 
617         * object.c (mono_method_add_generic_virtual_invocation): Put back the
618         thunk builder code for the non-interface case.
620 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
622         * object.c (get_generic_virtual_entries): New helper function to collect
623         the virtual generic method instances which need to be added to an IMT
624         thunk.
625         (mono_method_add_generic_virtual_invocation): Add a 'vtable' argument.
626         Instead of creating a new IMT thunk, reset the vtable slot to the
627         trampoline, the thunk will be created the next time the trampoline is called.
628         (build_imt_slots): Add support for virtual generic methods in interfaces by
629         adding to the IMT thunk all the methods registered using 
630         mono_method_add_generic_virtual_invocation ().
632         * object-internals.h (_MonoImtBuilderEntry): Add a 'has_target_code' field.
633         (struct _MonoIMTCheckItem): Ditto.
635         * object.c (mono_method_add_generic_virtual_invocation): Take a
636         MonoMethod argument instead of a MonoGenericInst. Fix the construction of
637         the IMT thunk to include all items.
638         
639         * object.c (mono_class_create_runtime_vtable): Add a missing
640         mono_loader_unlock ().
642 2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>
644         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
646         * object-internals.h (MonoReflectionEvent): Add cached_add_event.
648 2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>
650         * object-internals.h: Rename _MonoReflectionEvent to
651         MonoReflectionMonoEvent so it reflects the right managed type.
652         Add a MonoReflectionEvent that correctly represents System.EventInfo.
654         * icall.c:
655         * reflection.c: Adjust code to use the new MonoReflectionMonoEvent
656         type.
658 2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>
660         * icall.c (ves_icall_Type_GetMethodsByName): Avoid allocating
661         intermediary managed arrays. Use caching version of mono_array_new
662         to allocate the result array.
664 2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>
666         * reflection.c: Use cached version of mono_array_new alongside
667         the mono_reflection_get_custom_attrs_by_type call path.
669 2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>
671         * icall.c (ves_icall_Type_GetInterfaces): Avoid allocating
672         intermediary managed arrays. Use caching version of mono_array_new
673         to allocate the result array.
675         * icall.c (ves_icall_Type_GetConstructors_internal): Same.
677 2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>
679         * icall.c: Add small implementation of a growable stack bound array.
681         * icall.c (ves_icall_System_Enum_get_hashcode): Fix warning.
683         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid allocating
684         intermediary managed arrays. Use caching version of mono_array_new
685         to allocate the result array.
687 2009-02-27 Rodrigo Kumpera  <rkumpera@novell.com>
689         * icall.c: New icall ves_icall_System_Enum_compare_value_to that
690         helps Enum::CompareTo to be implemented without reboxing all enums
691         to their underlying type.
692 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
694         * domain.c (SET_APPDOMAIN): Avoid calling TlsSetValue () on some platforms,
695         since it acquires a global lock leading to scalability problems.
697         * profiler.c: Make the stat profiler work with multiple appdomains, this
698         currently only works when no appdomains are unloaded.
700 2009-02-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
702         * appdomain.c: make the check to avoid copying when the assembly is
703         already shadow copied actually work.
705 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
707         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
709         * object-internals.h (struct _MonoReflectionGenericClass): Sync with
710         changes to the managed side.
712 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
714         * metadata-internals.h (struct _MonoImage): Add a new cache for szarray
715         classes + a separate lock for it, as it is used frequently at runtime, not
716         just during metadata loading/JIT compilation.
718         * class.c (mono_bounded_array_class_get): Use the separate cache + lock
719         for szarrays.
720         
721         * object-internals.h (mono_class_from_name_cached): New macro to cache
722         the results of the lookup locally without having to declare a static
723         variable to hold it.
724         (mono_class_get_field_from_name_cached): Ditto.
725         (mono_array_class_get_cached): Ditto.
727         * threadpool.c threads.c locales.c icall.c reflection.c socket-io.c: Use
728         the new macros.
729         
730         * object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
731         slower search in metadata.
733         * pedump.c: Fix a warning.
735 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
737         * reflection.c (encode_locals): Add checks for user types.
738         (method_encode_clauses): Ditto.
739         (method_encode_code): Ditto.
740         (mono_image_create_token): Ditto.
742         * object-internals.h: Change the type of more fields from MonoReflectionType*
743         to MonoObject*.
745 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
747         * threads.c (mono_thread_suspend_all_other_threads): Handle the case when
748         the a thread does not suspend within 100ms.
750         * monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
751         in addition to StopRequested as well.
753         * mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.
755         * debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
756         search the method_hash before inserting a new entry, to avoid crashes when
757         the same method is inserted multiple times, causing the old 
758         MonoDebugMethodInfo structure to be freed by the value dtor function.
760 2009-02-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
762         * socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
763         SO_EXLUSIVEADDRUSE where available.
765 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
767         * marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
768         runtime invoke wrappers, this time it is string ctor wrappers, which
769         pass a dummy string as 'this' instead of their obj argument. Fixes
770         #478473.
772 2009-02-21  Jb Evain  <jbevain@novell.com>
774         * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
775         only get create_culture once.
777 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
779         * reflection.c (mono_reflection_setup_internal_class): Move the user type
780         check before the locking.
781         
782         * reflection.c (mono_reflection_setup_internal_class): Check for user types.
783         (mono_reflection_create_runtime_class): Ditto.
784         (mono_reflection_sighelper_get_signature_local): Ditto.
785         (mono_reflection_sighelper_get_signature_field): Ditto.
787         * object-internals.h (CHECK_MONOTYPE): New macro to check that a Type object
788         is a System.MonoType object or similar.
789         (monotype_cast): New helper function to cast a MonoObject to a 
790         MonoReflectionType object.
792         * object-internals.h: Change MonoReflectionType* members in structures to
793         MonoObject* members to force the usage of the monotype_cast () function.
795         * reflection.c icall.c: Use monotype_cast () for accessing Type members of
796         structures/arrays. This causes us to assert instead of crashing when 
797         instances of user defined subclasses of System.Type are encountered.
799 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
801         * cil-coff.h:
802         * icall-def.h:
803         * icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
804         win32 resource loaded from a PE file.
806         * image.c: fix mono_image_lookup_resource.
808 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
810         * icall-def.h:
811         * threads-types.h:
812         * threads.c: added internal call for WaitHandle.SignalAndWait.
814 2009-02-19  Bill Holmes  <billholmes54@gmail.com>
816         * cominterop.c : Adding cominterop_type_from_handle and 
817           registering it as an icall.  Replacing all references
818           to type_from_handle.
820         Code is contributed under MIT/X11 license.
822 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
824         * Makefile.am: Add lock-tracer.h and lock-trace.c.
826         * appdomain.c: Call the tracer init function.
828         * domain-internals.h: Enable the tracer for the domain locks.
830         * image.c: Enable the tracer for image locks.
832         * loader.c: Enable the trace for the loader lock.
834         * lock-tracer.h:
835         * lock-tracer.c: Initial implementation of the lock trace utility.
836         The tracer requires a compile time define to be enabled and a env var
837         to be enabled at runtime.
839 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
841         * domain.c (mono_domain_code_foreach): Improve documentation.
843 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
845         * appdomain.c:
846         * generic-sharing.c:
847         * object.c:
848         * reflection.c:  Adjust locking order to the new semantics where the loader lock
849         comes first.
851 2009-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
853         * domain.c: Add mono_domain_code_* functions that perform locking
854         around the domain codeman.
856         * domain-internals.h: Export those functions.
858         * object.c: Use new functions instead of acquiring the domain lock.
860 2009-02-19  Zoltan Varga  <vargaz@gmail.com>
862         * marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
863         delegate. Fixes #477396.
865 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
867         * reflection.c (create_custom_attr): Get rid of alloca.
869 2009-02-18  Bill Holmes  <billholmes54@gmail.com>
871         * cominterop.c (cominterop_get_managed_wrapper_adjusted) :
872           Adding exception handling for all CCW calls.
874         Code is contributed under MIT/X11 license.
876 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
878         * reflection.c (mono_reflection_init): Remove the unused reflection mutex.
880         * marshal.c (emit_marshal_boolean): Add null checks to the new 
881         native->managed marshalling code. Fixes #476247.
883 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
885         * class.c (mono_class_get_vtable_entry): Move the addition of
886         static rgctx invoke wrappers for vtable methods here, this simplifies
887         a lot of code and causes fewer rgctx wrappers to be created.
889         * marshal.c (mono_marshal_get_static_rgctx_invoke): Change the
890         name of the statistics to begin with an uppercase.
892 2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>
894         * reflection.c: Revert previous change as it breaks the build.
895         
896 2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>
898         * verify.c: Properly handle SZARRAY element type.
900         Fixes #474271.
902 2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>
904         * reflection.c (mono_image_create_method_token): Correctly encode
905         MethodDef MemberRefParent token.
907         Fixes #472845.
909 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
911         * image.c (mono_image_close): Delete the critical section before
912         freeing the memory holding it.
914 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
916         * verify.c (mono_method_verify): rethrow opcode doesn not fall through.
917         Fixes #476257.
919 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
921         * pedump.c (main): Call mono_marshal_init so pedump
922         doesn't crash.
924 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
926         * loader.c (method_from_memberref): Properly fix #474271 and
927         don't break the runtime bad.
929 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
931         * domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
932         (mono_domain_alloc0): Ditto.
934 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
936         * loader.c (method_from_memberref): Don't abort if the array
937         method is not found. A regular loader failure is more informative
938         and correct.
940         Fixes #474271.
942 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
944         *loader.c: Guard MonoImage::method_cache/methodref_cache
945         using the image lock instead of the loader lock.
947         * metadata.h: Add comments about which fields are protected by
948         the image lock.
950 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
952         * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
954         * generic-sharing.c (mono_method_construct_object_context): Remove the
955         wrapper_type == NONE assert, it is not needed.
957 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
959         * reflection.c (clear_cached_object): New helper function.
960         (mono_method_clear_object): New function to clear the cached reflection
961         objects for a dynamic method.
963         * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
964         Partly fixes # 463323.
965         
966 2009-02-14 Rodrigo Kumpera  <rkumpera@novell.com>
968         * class.c:
969         * loader.c:
970         * reflection.c: Remove all explicit uses of MonoImage::property_hash.
972 2009-02-14 Rodrigo Kumpera  <rkumpera@novell.com>
974         * image.c: Add mono_image_property_(lookup,insert,remove) functions that
975         take the image lock instead of the loader lock.
977         * metadata-internals.h: Export new functions.
979 2009-02-12  Miguel de Icaza  <miguel@novell.com>
981         * domain.c (app_config_parse): Remove another use of stat that is
982         not necessary as g_file_get_contents already does the presence
983         check. 
985 2009-02-13  Zoltan Varga  <vargaz@gmail.com>
987         * cominterop.c icall-def.h: Fix the DISABLE_COM build.
989         * marshal.c: Move the bstr handling code to cominterop.c.
991         * marshal.c: Remove some COM interop code missed previously.
993 2009-02-12  Miguel de Icaza  <miguel@novell.com>
995         More Paolo patches from the Wii port:
996         
997         * security.c: Remove ves_icall_System_Environment_get_UserName
998         from here.
1000         * icall.c: And put ves_icall_System_Environment_get_UserName
1001         here. 
1003         * appdomain.c (mono_set_private_bin_path_from_config): Remove
1004         redundant call to stat that was only used to test for the file
1005         existence.   Patch from Paolo.
1007         * gc.c (run_finalize): If COM is disabled, do not link in
1008         mono_marshal_free_ccw.
1010         * generic-sharing.c: Use alloca.h here as well.
1012 2009-02-13 Rodrigo Kumpera  <rkumpera@novell.com>
1014         * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
1016 2009-02-13  Zoltan Varga  <vargaz@gmail.com>
1018         * cominterop.c cominterop.h: New files.
1020         * marshal.c: Move the COM interop related code to cominterop.c. Make a few
1021         function/typedefs which are needed by cominterop.c global.
1023 2009-02-12  Mark Probst  <mark.probst@gmail.com>
1025         * generic-sharing.c: Don't take the loader lock to guard image
1026         mempool allocs.
1028 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
1030         * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
1031         called without the loader lock which is required to guard MonoImage:tokens.
1033 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
1035         * class.c:
1036         * metadata.c:
1037         * method-builder.c:
1038         * marshal.c:
1039         * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
1041 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
1043         * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
1044         Rework the code to use regular mono_image_alloc/0.
1046         * loader.c: Rework the code to use regular mono_image_alloc/0.
1048         * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
1050 2009-02-12  Bill Holmes  <billholmes54@gmail.com>
1052         * object-internals.h : Fixing a typo in the 
1053           MonoReflectionComVisibleAttribute struct.
1055         * marshal.c (cominterop_com_visible): Check the implemented 
1056           interfaces for ComImport.
1058         * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls 
1059           assume that bools should be treated as VARIANTBOOLs.
1061         * marshal.c (emit_marshal_boolean): Adding cases for 
1062           MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
1064         * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to 
1065           emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
1067         * marshal.c (cominterop_get_ccw): For COM calls assume that bools
1068           should be treated as VARIANTBOOLs.    
1070         Code is contributed under MIT/X11 license.
1072 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
1074         * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
1075         allocation with the image lock.
1077 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
1079         This patch is the last of a series to remove explicit reference of MonoImage::mempool
1080         and use mono_image_alloc set of functions instead. This time we finish with reflection.c
1082         * object.c: Add mono_string_to_utf8_image.
1084         * object-internals.h: Export mono_string_to_utf8_image.
1086         * reflection.c: Rework all explicit references to the the image mempool to go thought
1087         the mono_image_alloc set of functions.
1089 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
1091         This patch is the third of a series to remove explicit reference of MonoImage::mempool
1092         and use mono_image_alloc set of functions instead. This time we finish with marshal.c
1093         and generics-sharing.c.
1095         * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
1096         as first argument. Note that this function remains broken as it doesn't perform locking around the
1097         mempool allocation.
1099         * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
1101         * image.c: Add g_slist_append_image.
1103         * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
1104         the supplied image for allocation. Move code into mono_metadata_field_info_full.
1106         * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
1107         Fix all related code to do the same.
1109         * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
1111         * metadata-internals.h: Fix the signatures.
1113 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
1115         This patch is the second of a series to remove explicit reference of MonoImage::mempool
1116         and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
1117         and similar to work using MonoImage.
1119         * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
1120         MonoMemPool.
1122         * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
1124         * class.c (mono_metadata_signature_deep_dup): Same.
1126         * class.c (inflate_generic_type): Same.
1128         * class.c (mono_class_inflate_generic_type_with_mempool): Same.
1130         * metadata.c (mono_metadata_signature_dup_full): Same.
1132         * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from 
1133         mono_metadata_signature_dup_full.
1135         * metadata.c (mono_metadata_type_dup): Same.
1137         * marshal.c: Pass the image to calls to mono_metadata_type_dup.
1139         * reflection.c: Same.
1141         * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
1143         * metadata-internals.h: Fix the signatures.
1145         * class-internals.h: Same.
1147 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
1149         This patch is the first of a series to remove explicit reference of MonoImage::mempool
1150         and use mono_image_alloc set of functions instead. 
1152         * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
1153         Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
1154         of a MonoMemPool.
1156         * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
1158         * class.c (g_list_prepend_mempool): Removed.
1160         * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
1162         * image.c: Add g_list_prepend_image.
1164         * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
1166         * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
1169 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
1171         * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
1172         mono_image_unlock.
1174         * image.c (mono_image_init): Init the lock field.
1176         * image.c (mono_image_init): Cleanup the lock field.
1178         * image.c: Add mono_image_(un)lock functions.
1180 2009-02-11  Mark Probst  <mark.probst@gmail.com>
1182         * class.c, class-internals.h: mono_method_get_context_general()
1183         combines the functionality of mono_method_get_context() and
1184         mini_method_get_context().
1186         * generic-sharing.c, domain-internals.h:
1187         mono_method_construct_object_context() and
1188         mono_domain_lookup_shared_generic() moved from mini.
1190         * icall.c (ves_icall_InternalInvoke): Handle the case where the
1191         method doesn't have the correct instantiation because it's shared
1192         generic code.  Fixes #473999.
1194 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
1196         * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
1198         * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
1199         
1200 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
1202         * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
1204         * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
1206         * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
1207         and recheck the cache for dups after it.
1209         * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
1211         Fixes one of the deadlocks found in #473150.
1213 2009-02-11  Bill Holmes  <billholmes54@gmail.com>
1215         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
1216           For Win32, add additional break conditions for accept.
1218         Code is contributed under MIT/X11 license.
1220 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
1222         * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
1223         lazily initialize the native wrapper cache.
1224         (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
1225         cache, since they are different from the normal wrappers.
1227         * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
1229         * metadata-internals.h (struct _MonoImage): Add a new wrapper for
1230         AOT compiled native wrappers.
1232 2009-02-09  Geoff Norton  <gnorton@novell.com>
1234         * appdomain.h:
1235         * security-core-clr.c: Allow enabling core-clr from the embedding
1236         API.
1238 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
1240         * socket-io.c: when requesting all the local ips, if there are no
1241         interfaces up and running, MS returns 127.0.0.1.
1243 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
1245         * mono-perfcounters-def.h: processor time is an inverse time.
1246         Fixes bug #468625.
1248 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
1250         * socket-io.c: an empty host name returns the list of local IPs.
1251         Fixes bug #386637 part 1/2.
1253 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
1255         * verify.c (mono_class_interface_implements_interface): Call
1256         mono_class_setup_interfaces ().
1257         (merge_stacks): Ditto.
1259 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
1261         * class.c (mono_class_setup_interfaces): New function to lazily initalize
1262         klass->interfaces.
1263         (mono_generic_class_get_class): Don't initalize klass->interfaces.
1264         (mono_generic_class_get_class): Ditto.
1266 2009-02-06  U-QUACK\miguel  <miguel@quack>
1268         * icall-defs.h: Include also the Encrypt/Decrypt string methods as
1269         they live in security.c
1271         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
1272         another bit from Paolo's code.
1274 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
1276         * object.c (build_imt_slots): Add a small optimization to avoid inflating
1277         methods which will be discarded by add_imt_builder_entry ().
1279         * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
1280         need to be boxed.
1282         * loader.c: Add a statistics for the size of the memberref signature cache.
1283         
1284         * loader.c (find_cached_memberref_sig): New helper function.
1285         (cache_memberref_sig): Ditto.
1287         * loader.c: Cache the result of parsing memberref signatures, since otherwise
1288         they will be parsed again for every generic instantiation, leading to unbounded
1289         memory growth.
1291 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
1293         * loader.c (mono_get_method_from_token): Avoid creating class for the generic
1294         parameters of generic methods.
1296         * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
1297         after the original method is copied to the inflated method.
1298         (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
1300         * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
1301         field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
1303         * class.c metadata.c: Update after the changes above.
1305 2009-02-05 Rodrigo Kumpera  <rkumpera@novell.com>
1307         * metadata-verify.c: Simplified error handling and added
1308         section table validation.
1310 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
1312         * class-internals.h (MonoClassExt): New structure containing rarely used
1313         fields of MonoClass.
1314         (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
1315         through a new 'ext' field.
1317         * class.c (mono_class_alloc_ext): New helper function to allocate 
1318         class->ext.
1320         * class.c metadata.c reflection.c: Update after MonoClass structure changes.
1322 2009-02-05  Mark Probst  <mark.probst@gmail.com>
1324         * object.c (mono_object_get_virtual_method): Properly inflate
1325         generic methods.  Fixes #472692.
1327 2009-02-05 Rodrigo Kumpera  <rkumpera@novell.com>
1329         * class.c (mono_class_create_from_typedef): The CLR supports SystemF
1330         recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
1331         for the parent type, the created type must be ready to be used on a generic
1332         instantiation.
1333         We fill this_arg/byval_arg if the parent is a generic instance to make sure
1334         we won't have duplicated entries in generic_inst_cache.
1336         Fixes #469553.
1338 2009-02-05  Miguel De Icaza  <miguel@novell.com>
1340         * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
1341         replace with plain BSD per the comments on the bug MONO77637.
1343 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
1345         * class.c (mono_class_get_generic_class): New accessor function.
1346         (mono_class_get_generic_container): Ditto.
1348         * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
1349         fields, similar to the ones in MonoMethod.
1351         * class.c (mono_generic_class_get_class): Set klass->is_inflated.
1352         (mono_class_create_from_typedef): Set klass->is_generic if needed.
1354         * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
1355         
1356         * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
1357         the same information as element_class->byval_arg.
1359         * class.c reflection.c: Remove references to class->byval_arg.
1361         * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing 
1362         klass->enum_basetype directly.
1364         * verify.c metadata.c object.c icall.c reflection.c: Use 
1365         mono_class_enum_basetype () instead of accessing klass->enum_basetype 
1366         directly.
1368 2009-02-04  Miguel de Icaza  <miguel@novell.com>
1370         * icall-def.h: Remove internal calls for sockets when
1371         DISABLE_SOCKET is defined, file system writing features when the
1372         OS only support reading and not writing data and Policy support if
1373         the Policy is disabled.
1374         
1375         * image.c (do_mono_image_open): Apply Paolo's patches for using
1376         mono_file_map_ APIs here.
1378         * assembly.c: Add support for platforms to avoid prefix
1379         auto-detection. 
1381 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
1383         * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
1384         warning.
1386         * class.c (mono_class_inflate_generic_class): New helper function.
1388         * class.c: Use mono_class_inflate_generic_class in a few places. Add
1389         statistics for inflated methods/classes.
1391         * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
1393         * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
1394         the call is made from Delegate.CreateDelegate () for the invoke method of
1395         a delegate.
1397         * loader.c: Add a statistics for the memory occupied by inflated signatures.
1399         * metadata.c (mono_metadata_signature_size): New helper function.
1401         * class.c (mono_class_get_method_from_name_flags): Add an optimization for
1402         generic instances.
1404         * metadata.c (inflated_method_in_image): Avoid calling 
1405         mono_method_signature () if the method does not already have a signature.
1407 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
1409         * verify.c (is_compatible_boxed_valuetype): When checking if the boxed 
1410         valuetype is compatible with target type, check by inheritance as a
1411         VT is not really compatible with System.ValueType, for example.
1413         * verify.c (do_invoke_method): Improve error message.
1415         * verify.c (do_box_value): If boxing a nullable, use the type argument
1416         on stack instead.
1418         * verify.c (do_newobj): Improve error message.  
1420         Fixes #469549.
1422 2009-02-03  Miguel de Icaza  <miguel@novell.com>
1424         * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
1426 2009-02-03  Mark Probst  <mark.probst@gmail.com>
1428         * generic-sharing.c: Don't hold domain lock when calling
1429         instantiate_other_info().  Fixes #471958.
1431         * domain-internals.h, loader.c: Describe locking policy of domain
1432         lock vs loader lock.
1434 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
1436         * verify.c (mono_delegate_signature_equal): Make it possible to check
1437         first-arg-bound delegates to static method.
1439         * verify.c (verify_delegate_compatibility): Correctly verify delegates to
1440         static methods with the first arg bound.
1442         Fixes #469529.
1444 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
1446         * verify.c: Added stack_slot_full_name to provide decent and more meanfull
1447         errors.
1449         * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
1450         under strict mode. Any type, when boxed can be seen as a reference type.
1452         Fixes #469528.
1454 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
1456         * object.h: The lower bound of an array is a signed integer value.
1457         Introduce mono_array_lower_bound_t typedef. It should be used instead of
1458         gint32 as under MONO_BIG_ARRAYS it will be a gint64.
1460         * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
1461         calculate the upper bound.
1462         
1463         Fixes #471252.
1465 2009-02-02  Miguel de Icaza  <miguel@novell.com>
1467         From Paolo's work, refactored, cleared up:
1468         
1469         * threadpool.c, icall.c: ifdef code that requires a working socket
1470         stack.
1472         * metadata.c (mono_metadata_field_info): Do not attempt to return
1473         a value from a function declared as void.
1475         * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
1476         from the console stack.
1478         * assembly.c: use strrchr instead of rindex.
1480         * class.c, object.c, marshal.c, icall.c, reflection.c: include
1481         alloca.h on systems that have it.
1483         * environment.c: Avoid code that uses stuff from
1484         HAVE_SYS_UTSNAME_H
1485         
1486         * appdomain.c: Include sys/time.h.
1488         * console-io.c: include sys/ioctl.h if it is available.
1490 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
1492         * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
1494         * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
1495         the method builder.
1497         * marshal.c: Set mb->skip_visibility instead of setting it on the method
1498         after it was created and cached, as the later is not thread safe.
1499         
1500 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
1502         * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
1503         called while the debugging module is not initialized. Fixes #471669.
1505 2009-02-02 Rodrigo Kumpera  <rkumpera@novell.com>
1507         * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
1509         Fixes #471255.
1511 2009-02-02  Mark Probst  <mark.probst@gmail.com>
1513         * generic-sharing.c (lookup_or_register_other_info): Make sure the
1514         loader lock is not taken while the templates lock is held.  Fixes
1515         #471089.
1517 2009-02-02  Mark Probst  <mark.probst@gmail.com>
1519         * metadata.c (type_in_image): Added a check to fix a monodis
1520         crash.
1522 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
1524         * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
1525         nullable arguments.
1527         * object.c (mono_runtime_invoke_array): Ditto.
1528         
1529         * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
1530         freeing wrappers of dynamic methods.
1532         * loader.c (mono_free_method): Call it. Fixes #463323.
1533         
1534         * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
1535         methods taking vtype/byref arguments, to fix yet another bug caused by
1536         the sharing of runtime invoke wrappers. Partly fixes #471259.
1538 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
1540         * debug-mono-symfile.c (check_line): Return NULL instead of returning
1541         <first file in file table>:1 when the IL offset does not have an associated
1542         line number.
1544 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
1546         * mono-debug.c (mono_debug_lookup_locals): New function to return local
1547         variable info for a method.
1549         * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
1550         
1551 2009-01-30  Jb Evain  <jbevain@novell.com>
1553         * pedump.c: reuse code from monodis to make sure pedump honors
1554         MONO_PATH, which is needed to verify net_2_1 assemblies.
1556 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
1558         * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
1559         there is no line number info.
1561 2009-01-29  Raja R Harinath  <harinath@hurrynot.org>
1563         Avoid some MonoType allocations
1564         * reflection.c (mono_reflection_initialize_generic_parameter):
1565         Reuse MonoType from param->pklass rather than allocating one.
1566         (mono_dynamic_image_free): Update to changes.
1568 2009-01-28  Raja R Harinath  <harinath@hurrynot.org>
1570         Rearrange some code to improve consistency
1571         * reflection.c (mono_reflection_setup_generic_class): Move body ...
1572         (mono_reflection_initialize_generic_parameter): ... here.
1574 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
1576         * generic-sharing.c (has_constraints): Enable gshared for methods/classes
1577         with type constraints as an experiment.
1579         * boehm-gc.c (on_gc_notification): Update mono_stats.
1581 2009-01-28  Raja R Harinath  <harinath@hurrynot.org>
1583         Avoid some allocations
1584         * class-internals.h (_MonoGenericInst::type_argv): Convert from
1585         pointer to tail array to avoid extra allocation.
1586         * metadata.c (free_generic_inst): Update to changes.
1587         (mono_metadata_get_generic_inst): Likewise.  Use alloca instead of
1588         on-stack struct.
1590 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
1592         * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
1593         return TRUE if the two type objects are the same.
1595 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
1597         * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
1598         (mono_class_native_size): Use klass->marshal_info->min_align instead of
1599         klass->min_align, since klass->min_align contains the managed alignment,
1600         while the native alignment can be different, like for longs on x86.
1601         Fixes #469135.
1603         * class-internals.h (MonoMarshalType): Add a min_align field.
1605 2009-01-26 Rodrigo Kumpera  <rkumpera@novell.com>
1607         * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
1608         the 1.0 format.
1610 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
1612         * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
1613         some comments about the usage of the used_regs field.
1615         * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
1616         Fixes #469217.
1618 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
1620         * appdomain.c: return NULL instead of throwing FileNotFoundException
1621         when LoadAssembly() fails.
1623 2009-01-23  Mark Probst  <mark.probst@gmail.com>
1625         * metadata.c (mono_metadata_generic_param_equal): Only compare the
1626         image if the owner is NULL.  Fixes the AOT failures.
1628 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
1630         * metadata.c (mono_metadata_load_generic_params): Initialize the 
1631         MonoGenericParam structure using memset so the image field is initialized
1632         as well.
1634 2009-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
1636         * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
1637         a plain store.
1639 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
1641         * class.c (mono_class_setup_vtable_general): In the generic instance
1642         optimization, set method->slot for abstract virtual methods. Fixes part of
1643         #467834.
1645 2009-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
1647         * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
1648         which signals that the unloading has started but all appdomain services must
1649         remain operational.
1651         * appdomain.c (mono_domain_unload): The initial state for unloading now
1652         is unloading_start and we switch to unloading after the managed call to
1653         AppDomain::DomainUnload has finished.
1655         The new unloading state has to be created because managed code in the
1656         DomainUnload event can depend on things like the threadpool still working.
1657         The domain must remain fully functional while the event executes.
1659         This shown as an issue due to Process::WaitForExit, which waits for
1660         async reads of stdout and stderr to complete. Since those are processed
1661         in the threadpool the code deadlocks because the DomainUnload callback 
1662         waits for the async read finished event, which should have been set by a
1663         threadpool job but has been discarded due to the domain been in unload
1664         state.
1666 2009-01-21  Mark Probst  <mark.probst@gmail.com>
1668         * metadata.c (mono_metadata_generic_param_equal): Owner as well as
1669         image must match.
1671 2009-01-21  Mark Probst  <mark.probst@gmail.com>
1673         * reflection.c (resolve_object): For fields, inflate the class and
1674         then get the field in the inflated class.
1676 2009-01-20  Mark Probst  <mark.probst@gmail.com>
1678         * object-internals.h (struct _MonoException): Added a comment
1679         explaining the new use of trace_ips.
1681 2009-01-20  Mark Probst  <mark.probst@gmail.com>
1683         * generic-sharing.c (inflate_other_data): Inflate array methods
1684         correctly.
1686         * loader.c, class-internals.h: Rename search_in_array_class() to
1687         mono_method_search_in_array_class() and make it non-static.
1689 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
1691         * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
1692         Hopefully fixes #458168.
1694 2009-01-19  Christian Hergert  <christian.hergert@gmail.com>
1696         * object.c (mono_raise_exception): Remove call to InterlockedIncrement
1697         as it is performed elsewhere.
1699         Code is contributed under MIT/X11 license
1701 2009-01-19  Christian Hergert  <christian.hergert@gmail.com>
1703         * mono-perfcounters-def.h: Add counters for asp.net requests total and
1704         requests queued.
1705         * object.c (mono_raise_exception): Increment the exceptions total
1706         counter when an exception is thrown.
1707         * class-internals.h: Add a location for storing the total number of
1708         asp.net requests served.
1709         * mono-perfcounters.c: Implement update support for asp.net counters
1710         from the class libraries. Implement read support for asp.net counters
1711         and exceptions total counter.
1713 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
1715         * loader.c (search_in_array_class): Call mono_class_setup_methods () before
1716         accessing klass->methods. Fixes #467385.
1718 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
1720         * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
1721         for byval arguments without an [Out] attribute. Fixes #467212.
1723         * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com). 
1724         Fix compilation under android.
1725         
1726         * sgen-gc.c: Instead of scanning gray objects after all roots have been 
1727         processed, scan them directly after they are copied, to achieve better locality
1728         and cache usage.
1730         * socket-io.c: Applied patch from Koushik Dutta
1731         (koush@koushikdutta.com). Disable IPV6 when running under android.
1733 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
1735         * icall.c (ves_icall_InternalExecute): Add write barriers.
1737         * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
1738         the GC code.
1740         * sgen-gc.c: Implement write barriers in IL code.
1742 2009-01-17  Geoff Norton  <gnorton@novell.com>
1744         * image.c: Avoid trying to walk the reference table of dynamic assemblies.
1746 2009-01-17  Geoff Norton  <gnorton@novell.com>
1748         * image.c: When unloading the image->references table, there can be gaps
1749         in it.  Ensure that we iterate every entry to avoid leaking assembly references
1750         when unloading an appdomain.
1752 2009-01-16  Zoltan Varga  <vargaz@gmail.com>
1754         * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
1755         speed up ptr-in-nursery checks.
1757         * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
1758         threads_lock () to prevent deadlocks.
1760         * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
1761         does not need to be scanned during minor collections, since writes to it
1762         must use write barriers.
1764 2009-01-15 Rodrigo Kumpera  <rkumpera@novell.com>
1766         * metadata-verify.c: Add pe nt header verification.
1767         
1768 2009-01-15  Zoltan Varga  <vargaz@gmail.com>
1770         * gc.c: Fix a few warnings when using SGEN.
1772 2009-01-14 Rodrigo Kumpera  <rkumpera@novell.com>
1774         * metadata-verify.c: Add pe optional header verification.
1776 2009-01-15  Zoltan Varga  <vargaz@gmail.com>
1778         * sgen-gc.c: Add support for user defined marker functions, used by
1779         MonoGHashTable to avoid registering a GC root for every hash node.
1781 2009-01-14  Zoltan Varga  <vargaz@gmail.com>
1783         * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
1784         non-pinned roots into separate hashes to avoid having to traverse them
1785         in functions which are only interested in one kind.
1787 2009-01-13 Rodrigo Kumpera  <rkumpera@novell.com>
1789         * metadata-verify.c: Add pe header machine field verification.
1790         
1791 2009-01-13 Rodrigo Kumpera  <rkumpera@novell.com>
1793         * metadata-verify.c: Add pe header size verification.
1795 2009-01-14  Zoltan Varga  <vargaz@gmail.com>
1797         * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
1798         using the GC, they don't contain references.
1800         * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
1802 2009-01-13  Geoff Norton  <gnorton@novell.com>
1804         * appdomain.c|h: Expose mono_domain_unload to the embedding api so that 
1805         AppDomains created on the native side can be cleaned up on the native side.
1807 2009-01-13  Geoff Norton  <gnorton@novell.com>
1809         * appdomain.c: Ensure that we call mono_context_init for the embedding api
1810         as well as the managed api.
1812 2009-01-13  Geoff Norton  <gnorton@novell.com>
1814         * appdomain.h|c: New API for creating a MonoDomain in the embedding api
1815         with a MonoAppDomain initialized against it.
1817 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
1819         * reflection.c (MOVING_GC_REGISTER): Fix a warning.
1820         
1821         * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
1823         * marshal.c: Avoid setting the exception clauses after a method has been entered 
1824         into the wrapper caches. Fixes #465700.
1826         * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
1827         method builder.
1828         (mono_mb_create_method): Set the clauses from the method builder.
1830 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
1832         * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
1833         Patch from Makoto Kishimoto.
1835 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
1837         * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by 
1838         encoding them as ROOT_DESC_COMPLEX.
1839         (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
1841 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
1843         * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
1844         no longer point to the nursery.
1846         * sgen-gc.c: Add a few comments/FIXMEs.
1847         
1848         * sgen-gc.c: Implement scanning of the alloc_pinned objects.
1850         * marshal.c (mono_marshal_get_synchronized_wrapper): Make the 
1851         initialization of the various _method variables thread safe. Fixes
1852         #465377.
1854 2009-01-12  Mark Probst  <mark.probst@gmail.com>
1856         * domain.c, domain-internals.h: Remove the shared_generics_hash
1857         and its lookup functions.
1859 2009-01-12  Bill Holmes  <billholmes54@gmail.com>
1861         * socket-io.c:  Fixing the MSVC build. 
1863         Code is contributed under MIT/X11 license.
1865 2009-01-12 Rodrigo Kumpera  <rkumpera@novell.com>
1867         * metadata-verify.c: Add pe header watermark verification.
1869 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
1871         * metadata-verify.c: Add lfanew verification.
1873 2009-01-12  Jb Evain  <jbevain@novell.com>
1875         * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
1876         METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
1878 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
1880         * socket-io.c: Fix the build.
1882         * environment.c: Fix an #ifdef.
1884 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
1886         * threadpool.c (async_invoke_thread): Handle the wait function returning
1887         WAIT_IO_COMPLETION as well.
1888         (async_invoke_io_thread): Ditto.
1890 2009-01-09  Bill Holmes  <billholmes54@gmail.com>
1892         * threads.c: Fixing the Windows build.
1894         Code is contributed under MIT/X11 license.
1896 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
1898         * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
1899         interrupt a wait.
1900         (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
1901         the thread to wait again.
1903 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
1905         * metadata-verify.c: Initial skeleton of the metadata verifier.
1907         * pedump.c: Add support for the metadata verifier.
1909         * verify-internal.h: Export the whole assembly metadata verifier function.
1911 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
1913         * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
1915 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
1917         * Makefile.am: Upgrade dtrace-prelink.sh location.
1919 2009-01-08 Rodrigo Kumpera  <rkumpera@novell.com>
1921         * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
1922         well. Otherwise the shutdown deadlock that happens on unix will can happen
1923         as well.
1924         If the main thread code finishes too fast it's possible that the finalizer
1925         thread won't have executed yet, won't record itself as the finalizer thread
1926         and the shutdown sequence will wait on it forever.
1928 2009-01-08 Rodrigo Kumpera  <rkumpera@novell.com>
1930         * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
1931         with MSVC.
1933 2009-01-08  Miguel de Icaza  <miguel@novell.com>
1935         * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
1936         Robert Jordan for pointing this out.
1938 2009-01-08  Christian Prochnow  <cproch@seculogix.de>
1940         * icall.c
1941         * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
1942         ves_icall_System_IO_DriveInfo_GetDriveType.
1944 2009-01-07  Miguel de Icaza  <miguel@novell.com>
1946         * icall.c: Wrap calls to mono_strtod in CriticalSection
1947         invocations when using eglib, to work around #464316.
1949 2009-01-07 Rodrigo Kumpera  <rkumpera@novell.com>
1951         * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
1952         return value of GetCurrentDirectory to never access unitialized memory.
1954 2009-01-07 Rodrigo Kumpera  <rkumpera@novell.com>
1956         * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
1957         return value of GetCurrentDirectory and expand the buffer if needed.
1959         Fixes #459094.
1961 2009-10-07 Tom Hindle  <tom_hindle@sil.org>
1963         * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) : 
1964           Adding a call to mono_init_com_types.
1966         Code is contributed under MIT/X11 license.
1968 2009-01-07  Geoff Norton  <gnorton@novell.com>
1970         * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on 
1971         darwin.  Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
1972         ai_canonname can be null in some cases on darwin, where the runtime assumes it will 
1973         be the value of the ip buffer.
1975 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
1977         * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
1978         interfaces_packed here.
1980         Fixes part of #463294.
1982 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
1984         * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
1986         Fixes part of #463294.
1988 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
1990         * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
1991         is a boxed complex as well.
1993         Fixes part of #463294.
1995 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
1997         * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
1998         control if a methodspec should be created for the generic method definition from external assemblies.
1999         Caching of methodspec is done using the handleref hash table.
2001         Fixes #462592.
2003 2009-01-05 Rodrigo Kumpera  <rkumpera@novell.com>
2005         * loader.c (find_method): When searching the interfaces of a class
2006         check the transitive closure of implemented interfaces.
2008         Fixes #463303.
2010 2009-01-03 Rodrigo Kumpera  <rkumpera@novell.com>
2012         * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
2013         
2014 2009-01-03 Rodrigo Kumpera  <rkumpera@novell.com>
2016         * class.c (get_implicit_generic_array_interfaces): Extract valuetype
2017         interfaces calculation to fill_valuetype_array_derived_types.
2019         * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
2020         ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
2021         for example.
2023         * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
2024         interfaces for valuetypes if needed.    
2026         * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
2027         for their basetype as well. Types are array expanded if rank is > 0.
2029         Fixes #400716.
2031 2008-12-30  Bill Holmes  <billholmes54@gmail.com>
2033         * socket-io.h : Changing the signature of
2034           ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
2035           the blocking state.
2037         * icall-def.h :  Changing the signature of
2038           System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
2040         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
2041           For Windows only.  Avoid blocking when calling accept by
2042           querying for a connection via select.  The loop also queries
2043           the thread state every 1000 micro seconds for the thread
2044           stop state.  This will avoid the process hanging on shutdown
2045           when using a TcpChannel that is never connected to.
2047         Code is contributed under MIT/X11 license.
2049 2008-12-30  Marek Safar  <marek.safar@gmail.com>
2051         * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
2053 2008-12-26 Rodrigo Kumpera  <rkumpera@novell.com>
2055         * class.c (get_implicit_generic_array_interfaces): Extract common
2056         code to a helper function making it a lot easier on the eyes.
2058 2008-12-26 Rodrigo Kumpera  <rkumpera@novell.com>
2060         * class.c (get_implicit_generic_array_interfaces): If the internal
2061         enumerator is an interface inflate System.Object instead of itself.
2063         Fixes #461261.
2065 2008-12-24 Rodrigo Kumpera  <rkumpera@novell.com>
2067         * object.c (mono_runtime_invoke_array): Don't assert with
2068         byref nullable types.
2070         * marshal.c (mono_marshal_get_runtime_invoke): To handle
2071         byref nullables we unbox the object and store it on the
2072         stack. 
2073         We can't use the boxed object since it is the T of Nullable<T>
2074         and the boxed representation of a nullable it's underlying type
2075         or null.
2076         We could cheat and create a boxed nullable and use the same
2077         machinery of other byref VTs but this feels like a hack and
2078         using the stack has the bonus of reducing heap pressure.
2080         Fixes #461941.
2082 2008-12-23 Rodrigo Kumpera  <rkumpera@novell.com>
2084         * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
2085         return value.
2087         Fixes #461867.
2089 2008-12-19  Bill Holmes  <billholmes54@gmail.com>
2091         * icall-def.h : Adding an internal call definition for 
2092           System.Environment.internalBroadcastSettingChange.
2094         * icall.c : Adding a Windows only implementation to broadcast a 
2095           WM_SETTINGCHANGE when an environment variable has changed.
2097         Code is contributed under MIT/X11 license.
2099 2008-12-19  Mark Probst  <mark.probst@gmail.com>
2101         * class.c, class-internals.h: Made
2102         mono_class_has_parent_and_ignore_generics() non-static.
2104 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
2106         * image.c: deal with the mmap failing when loading an image.
2108 2008-12-17  Geoff Norton  <gnorton@novell.com>
2110         * threadpool.c: Ensure that the io_queue_lock is initialized
2111         in all circumstances, as we always attempt to cleanup against it.
2113 2008-12-17  Miguel de Icaza  <miguel@novell.com>
2115         * icall.c (ves_icall_System_Environment_get_Platform): For
2116         compatibility reasons for existing client code we will keep
2117         returning 4 for a while.   
2119         For how long will depend on the documentation being updated, and
2120         for us to give client code a chance to be updated.
2122         This reverts the original decison on #433108 since we did not
2123         catch roughly 33 instances of the broken code in our own source
2124         code base, we did not catch failures on the buildbots, and QA did
2125         not bring this as a problem.
2127         Only today I found some customer's code breaking due to our own
2128         class libraries not being fully updated and tracked it down to
2129         this change.  I am reverting it because if we could not even get
2130         our story straight in our own code base, how can we hope that our
2131         end user code be fixed?
2133         As of this morning, our Wiki page that documents how to detect
2134         Unix had not been fixed.    
2136 2008-12-16  Zoltan Varga  <vargaz@gmail.com>
2138         * metadata.c (inflated_method_in_image): Add a workaround for #458168.
2140         * class.c (mono_class_get_fields): Handle loading errors.
2142 2008-12-12 Mark Mason <mmason@upwardaccess.com>
2144         * metadata.c (mono_type_stack_size_internal): If SIZEOF_REGISTER > SIZEOF_VOID_P then use SIZEOF_REGISTER as the size and alignment of the stack slots.
2145         
2146 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
2148         * mono-perfcounters.c: avoid warning.
2150 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
2152         * reflection.c (ensure_runtime_vtable): Work on generic instances and
2153         make sure all interfaces have MonoClass::interface_id set.
2155         * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
2156         method table is property set.
2158 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
2160         * class.c: New function mono_class_setup_interface_id that setup
2161         MonoClass::interface_id if needed.
2163         * class-internals.h: Export new function.
2165 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
2167         * class.c: Add code to sanity check the vtable after setup_vtable_general
2168         has done it's work.
2170 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
2172         * icall.c: make Assembly.GetExecutingAssembly work properly when
2173         reflection is used to invoke the method.
2174         Bug #321781 fixed.
2176 2008-12-11  Mark Probst  <mark.probst@gmail.com>
2178         * metadata/generic-sharing.c: Look for constraints in all type
2179         arguments, not just the first one.
2181 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
2183         * appdomain.c: return the correct CodeBase for an Assembly instance
2184         that was loaded from the shadow-copy directories.
2185         Bug #458190 fixed.
2187 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
2189         * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
2191         * sgen-gc.c (check_object): New debugging helper function.
2193         * object.c: Fix calls to mono_value_copy_array ().
2195 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
2197         * class.c (mono_class_setup_fields): If working on an inflated class
2198         first check if the generic definition did init with success.
2200         Fixes #445361.
2202 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
2204         pedump.c (main): Fix a warning.
2206 2008-12-10  Bill Holmes  <billholmes54@gmail.com>
2208         * object-internals.h : Adding a definition for 
2209           MonoReflectionComVisibleAttribute.
2211         * marshal.c (cominterop_com_visible) :  Method added to check the 
2212           ComVisible attribute of a class.
2214         * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :  
2215           cominterop_raise_hr_exception added to consolidate common code 
2216           to raise hr exceptions.
2218         * marshal.c (cominterop_can_support_dispatch) :  Method added to determine 
2219           if a managed class should support IDispatch.
2221         * marshal.c 
2222           (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :  
2223           Added additional checks for managed object when getting 
2224           an IDispatch interface.
2226         Code is contributed under MIT/X11 license.
2228 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
2230         pedump.c (main): Handle mono_get_method () returning NULL. 
2232 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
2234         * marshal.h: Fix a warning.
2236 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
2238         * marshal.c : Adding cominterop_release_all_rcws to release all
2239           runtime callable wrappers held by the runtime.
2241         * marshal.h : Adding declaration for cominterop_release_all_rcws.
2242           
2243         Code is contributed under MIT/X11 license.
2245 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
2247         * metadata.c (mono_image_alloc_lock): New helper function.
2248         (mono_image_alloc0_lock): Ditto.
2250         * metadata.c: Use the alloc_lock () helper functions for allocating
2251         memory from the image mempool.
2253 2008-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
2255         * class.c (mono_class_from_generic_parameter): Document it's
2256         locking behavior. Fix double checked locking here, we stored in
2257         param->pklass a partially initialized MonoClass and no membar was used.
2259 2008-12-05  Marek Habersack  <mhabersack@novell.com>
2261         * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
2262         (3) functions are present in the C library use them to do the
2263         job. If they are absent, make sure that the sum of int_part and
2264         dec_part is rounded before returning. This is necessary due to the
2265         division of dec_part by the power of 10 before the final addition
2266         is performed - if the result is not rounded in some cases it will
2267         yield invalid results.
2269 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
2271         * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
2272         wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR 
2273         instruction instead of a pointer constant.
2275 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
2277         * loader.c (mono_method_get_header): Do most of the work outside the
2278         loader lock, to avoid assembly load hook deadlocks.
2280         * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
2281         (mono_metadata_parse_type_full): Ditto.
2283 2008-12-02 Rodrigo Kumpera  <rkumpera@novell.com>
2285         * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
2286         Make the stack depth fixed. Ensure proper argument passing to the backtrace
2287         funtions. Finally, use a lock to produce well ordered output.
2289         The lock looks silly, as all calls to the corlib mempool should be guarded
2290         with the loader lock, but for some reason this fact doesn't help. 
2292         * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
2294 2008-12-02  Mark Probst  <mark.probst@gmail.com>
2296         * socket-io.c: 64 bit big-endian fixes.
2298 2008-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
2300         * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
2301         targets that require strict compatibility between the types.
2303         * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
2304         to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
2305         Kill the strict argument and create a new one valuetype_must_be_boxed.
2307         * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
2308         state that all valuetypes must be boxed.
2310         Fixes #448560.
2312 2008-11-29  Kornél Pál  <kornelpal@gmail.com>
2314         * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
2315         IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
2317         Contributed under MIT/X11 license.
2319 2008-11-28 Rodrigo Kumpera  <rkumpera@novell.com>
2321         * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
2322         the inflate_generic_type machinery should handle it.
2324         This avoids a crash when the field's flags is zero and it's type is
2325         a primitive.
2326         What happens is that mono_metadata_parse_type_full will see that opt_attrs
2327         is zero and will return one of the cached built-in primitive types. Since
2328         those types live in read-only memory, the code that copies it crashes.  
2330 2008-11-28  Mark Probst  <mark.probst@gmail.com>
2332         * object.c: Don't put function descriptors into generalized IMT
2333         thunks.
2335 2008-11-28  Mark Probst  <mark.probst@gmail.com>
2337         * class.c: Enable generic code sharing on PPC64.
2339 2008-11-27  Mark Probst  <mark.probst@gmail.com>
2341         * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
2342         from mini/mini.c.
2344         * generic-sharing.c: Allocate the method template slists from the
2345         image mempool so it doesn't leak.
2347 2008-11-27 Rodrigo Kumpera  <rkumpera@novell.com>
2349         * class.c (generic_array_methods): Release the linked list.
2351 2008-11-27  Mark Probst  <mark.probst@gmail.com>
2353         * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
2354         invocation to g_utf16_to_utf8().
2356 2008-11-26  Mark Probst  <mark.probst@gmail.com>
2358         * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
2359         arguments on big endian archs.
2361 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
2363         * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
2364         the type name (test added in corlib).
2366 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
2368         * pedump.c: initialize perf. counters. Fixes a segv.
2370 2008-11-25  Martin Baulig  <martin@ximian.com>
2372         * mono-debug-debugger.c
2373         (mono_debugger_runtime_invoke): Return the exception object if an
2374         exception was thrown.  Visual Studio displays the exception object
2375         in the locals window.
2377 2008-11-24  Mark Probst  <mark.probst@gmail.com>
2379         * mini-trampolines.c (mono_delegate_trampoline): Don't return a
2380         ftnptr.
2382 2008-11-24  Mark Probst  <mark.probst@gmail.com>
2384         * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
2385         MONO_TYPE_U are sizeof (gpointer), too.
2387 2008-11-24  Mark Probst  <mark.probst@gmail.com>
2389         * marshal.c (mono_type_native_stack_size): Fixed size and
2390         alignment for reference types.
2392 2008-11-23  Mark Probst  <mark.probst@gmail.com>
2394         * class.c (mono_class_generic_sharing_enabled): Disable generic
2395         code sharing for PPC64.
2397 2008-11-21 Rodrigo Kumpera  <rkumpera@novell.com>
2399         * icall.c (mono_method_get_equivalent_method): Make sure
2400         method->klass->methods is inited before looping over it.
2402 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
2404         * object.c: when calling ExecuteAssembly in a newly created domain,
2405         the configuration file and application base are already set up.
2406         Bug #446353 take 2 fixed.
2408 2008-11-20  Zoltan Varga  <vargaz@gmail.com>
2410         * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
2411         Fixes #444715. Fix a warning.
2413 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
2415         * appdomain.c: write the full path of the assembly to the .ini file
2416         created when "shadow-copying"
2417         Bug #446353 fixed.
2419 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
2421         * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
2422         if signature==FALSE.
2424 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
2426         * marshal.h : Fix the cygwin build.
2427            marshal.c:12442: undefined reference to `_IID_IMarshal'
2428           
2429         Code is contributed under MIT/X11 license.
2431 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
2433         * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
2434           free threaded marshaler when QueryInterface is called on a COM callable
2435           wrapper requesting the IMarshal interface.
2436           
2437         Code is contributed under MIT/X11 license.
2439 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
2441         * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
2443         * reflection.c (mono_type_get_object): Special case the very common
2444         void type.
2446         * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
2447         hold typeof(void).
2449 2008-11-13  Bill Holmes  <billholmes54@gmail.com>
2451         * process.h : Adding method declaration for
2452           ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
2453           
2454         * process.c : Adding implementation for
2455           ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
2456           
2457         * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
2458           to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
2460         Code is contributed under MIT/X11 license.
2462 2008-11-10  Rodrigo Kumpera  <rkumpera@novell.com>
2464         * appdomain.c (unload_thread_main): Clean up threadpool by
2465         calling mono_thread_pool_remove_domain_jobs.
2467         * domain-internals.h (struct _MonoDomain): Add new fields to
2468         help coordinate the cleanup of the threadpool.
2470         * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
2471         that cleans up the threadpool of all jobs associated with an appdomain.
2472         It does that by cleaning up the queues and making sure all active
2473         threads are accounted.
2475         * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
2476         unloaded or in the process of. Take this is such way that there is
2477         no race condition between another thread starting the unload and the
2478         current thread acknowledging it.
2480         * threadpool.c (async_invoke_thread): Same.
2482         * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
2483         firing the new thread.
2485         * threadpool.c (start_tpthread): Same.
2487         * theadpool.c (append_job): Increment threadpool_jobs before queueing.
2489         * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
2491 2008-11-06  Jonathan Chambers  <joncham@gmail.com>
2493         * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle): 
2494         Add support for DuplicateHandle.
2495         
2496         * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle): 
2497         Add support for DuplicateHandle.
2498         
2499         * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle): 
2500         Add support for DuplicateHandle.
2502         Code is contributed under MIT/X11 license.
2504 2008-11-06  Mark Probst  <mark.probst@gmail.com>
2506         * class-internals.h: Make min_align into a whole byte.
2508         * class.c: Set min_align for SIMD types to 16.
2510 2008-11-05  Geoff Norton  <gnorton@novell.com>
2512         * attach.c: Default the attacher to enabled for all cases including
2513         embedded.
2515 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
2517         * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
2518         change r117650.
2520 2008-11-04  Mark Probst  <mark.probst@gmail.com>
2522         * monitor.c, monitor.h: New function for querying offsets of
2523         members of MonoThreadsSync.
2525 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2527         * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
2528         to speed up this function and to avoid the boundless memory growth caused by
2529         the signature_dup () calls.
2531 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
2533         * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
2534         wrapper.
2536         * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
2537         by 1 bit.
2539         * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
2541 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
2543         * appdomain.c:
2544         * domain-internals.h: made mono_set_private_bin_path_from_config()
2545         "internal".
2546         * object.c: call the above function after setting the configuration
2547         file path for the root domain.
2548         Fixes bug #314478.
2550 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
2552         * assembly.c: when the assembly is loaded from an absolute path, end
2553         basedir with a directory separator.
2554         Bug #440781 fixed.
2556 2008-10-30  Mark Probst  <mark.probst@gmail.com>
2558         * monitor.c (mono_monitor_get_fast_enter_method): If
2559         CompareExchange is not available, don't create the fastpath
2560         instead of asserting.  (The method is missing in the 1.1 profile.)
2562 2008-10-30  Mark Probst  <mark.probst@gmail.com>
2564         * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
2566         * monitor.c, monitor.h: Code for generating Monitor.Enter and
2567         Monitor.Exit IL fastpaths.
2569 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2571         * class.c (mono_class_create_from_typedef): Added Vector2ul.
2573 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2575         * class.c (mono_class_create_from_typedef): Added Vector2l.
2577 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2579         * class.c (mono_class_create_from_typedef): Added Vector2d.
2581 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
2583         * appdomain.c: translate \ into / for cache_path.
2584         * domain-internals.h: new mono_is_shadow_copy_enabled().
2585         * icall.c: (fill_reflection_assembly_name) do the same path
2586         manipulations that get_code_base does.
2587         (get_code_base) use mono_is_shadow_copy_enabled.
2589 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
2591         * appdomain.c: shadow-copied assemblies go to CachePath +
2592         ApplicationName when both are set. DynamicBase has nothing to do with
2593         shadow copies.
2594         Bug #406877 fixed.
2596 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
2598         * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
2599         STANDALONESIG table.
2601         * metadata-internals.h (struct _MonoDynamicImage): Add cache for
2602         standalone signatures.
2604         * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature 
2605         comparison code: instead of comparing the signatures using a custom
2606         equals function, transform them to a common signature and compare that. This
2607         works better with AOT.
2609 2008-10-25  Zoltan Varga  <vargaz@gmail.com>
2611         * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
2613         * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
2614         call for generic instances.
2615         (mono_class_setup_properties): Call setup_properties () before accessing
2616         gklass->properties.
2618         * class.c (mono_class_get_virtual_methods): New helper function to iterate
2619         over the virtual methods of a class using metadata if possible, avoiding the
2620         creation of MonoMethod's for non-virtual methods.
2621         
2622         * class.c (mono_class_setup_vtable_general): Rewrite this to use 
2623         get_virtual_methods () to iterate over the virtual methods of classes.
2625 2008-10-25  Martin Baulig  <martin@ximian.com>
2627         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
2629 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2631         * class.c (mono_class_create_from_typedef): Added Vector4i.
2633 2008-10-24  Mark Probst  <mark.probst@gmail.com>
2635         * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
2636         ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
2637         special-casing applies to eliminate the call completely.
2639 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2641         * class.c (mono_class_create_from_typedef): Added Vector8s.
2643 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
2645         * class.c (mono_class_create_from_typedef): Added Vector16sb.
2647 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
2649         * icall.c: get rid of annoying warning.
2651 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
2653         * threadpool.c: in 1.x, if you change the background status of the
2654         threadpool thread, it's not reset.
2655         Remove unnecessary calls to SetState.
2657 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
2659         * threadpool.c: asynchronously create a set of idle threads upon first
2660         use of the threadpool. SetMinThreads will now start the appropriate
2661         number of idle threads if they are not already running. The default is
2662         1 threadpool thread per CPU. Increased the maximum number of threads
2663         per CPU to 10.
2665 2008-10-22  Martin Baulig  <martin@ximian.com>
2667         Revert r116521 from Zoltan, it breaks the debugger:
2669         * class.c (mono_class_get_virtual_methods): New helper function to iterate
2670         over the virtual methods of a class using metadata if possible, avoiding the
2671         creation of MonoMethod's for non-virtual methods.
2672         
2673         * class.c (mono_class_setup_vtable_general): Rewrite this to use 
2674         get_virtual_methods () to iterate over the virtual methods of classes.
2676 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
2678         * threads.c: when creating a threadpool thread, set its state to
2679         'background'.
2680         * threadpool.c: reset the background state of a threadpool thread
2681         after finishing each work item
2682         Bug #437888 fixed.
2684 2008-10-22  Zoltan Varga  <vargaz@gmail.com>
2686         * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
2687         
2688         * class.c (mono_class_setup_vtable_general): Add an optimized version for
2689         generic instances which works by inflating the methods in the container
2690         class's vtable.
2692         * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
2693         variant which doesn't make a copy if no inflation was done.
2694         (mono_class_setup_fields): Use it.
2696         * metadata.c (mono_metadata_get_shared_type): New helper function to
2697         return a shared instance of a given MonoType.
2699         * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
2700         a copy of most non-generic types.
2702 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
2704         * threadpool.c: remove one more GetSystemInfo () call.
2706 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
2708         * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
2709         use the code in mono-proclib.h to get processor information.
2711 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
2713         * appdomain.c: fixed the logic that determines whether assemblies in a
2714         directory are "shadow-copied" or not. Bug #433483 fixed.
2716 2008-10-22  Zoltan Varga  <vargaz@gmail.com>
2718         * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
2719         warning.
2721 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2723         * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
2724         returning a vtype.
2726         * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
2727         reflection.c: Use mono_field_get_name () for accessing a field's name.
2729         * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
2730         class.c
2732         * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
2733         field.
2735         * loader.c (find_method_in_class): Reenable the metadata optimization by
2736         not using it for generic instances.
2738         * class-internals.h (MonoFieldDefaultValue): Extract the rarely used 
2739         data/def_type fields from MonoClassField into a separate structure.
2740         (struct MonoClassField): Remove data/def_type fields.
2741         (struct _MonoClass): Add a 'field_def_values' array to store the default
2742         values/RVA for fields.
2744         * class.c reflection.c: Update after the changes.
2745         
2746         * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
2747         for accessing field->data.
2749         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
2751         * loader.c (find_method_in_class): Revert the last change for now as
2752         it breaks Mono.C5 unit tests.
2754         * class-internals.h (struct _MonoDynamicGenericClass): Add fields
2755         'field_generic_types' and 'field_objects' which contain the information
2756         previously stored in MonoInflatedField.
2757         (MonoInflatedField): Delete.
2758         (struct _MonoClassField): Delete 'generic_info' field.
2760         * reflection.c: Store the information which was previously in 
2761         field->generic_info in MonoDynamicGenericClass instead.
2763         * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
2764         MonoClassField changes.
2766 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
2768         * marshal.c, method-builder.c: get rid of wrapper_hash and instead
2769         store the value inside the data array of the MonoMethodWrapper.
2770         This saves memory, is faster and fixes the lifetime issues (methods
2771         were never removed from the hash previously). May also fix bug#436996.
2773 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2775         * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic 
2776         generic instances, compute the type from the generic definition instead of
2777         looking in field->generic_info.
2779         * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
2780         for inflated fields, the only user was get_fieldref_token () which no
2781         longer needs it.
2783         * class.c (mono_class_init): Revert the last change as it seems to cause
2784         crashes.
2786         * class-internals.h (struct _MonoClassField): Reorder fields to save 4
2787         bytes on 64 bit platforms.
2789         * object.c (mono_class_create_runtime_vtable): Fix a warning.
2790         
2791         * object.c (mono_class_create_runtime_vtable): Don't initalize
2792         field->data/field->def_type here, it is done lazily by 
2793         mono_class_get_field_default_value ().
2795         * icall.c (ves_icall_get_enum_info): Call 
2796         mono_class_get_field_default_value () instead of directly accessing
2797         field->data and field->def_type.
2799         * object.c (get_default_field_value): Ditto.
2801         * class.c (mono_field_get_data): Ditto.
2802         
2803         * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
2804         call for generic instances.
2806         * loader.c (find_method_in_class): If klass != from_class, then inflate
2807         the method with the context of from_class, since the caller assumes this.
2809 2008-10-20  Zoltan Varga  <vargaz@gmail.com>
2811         * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
2812         for accessing method->slot.
2814 2008-10-20  Cedric Vivier  <cedricv@neonux.com>
2816         * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
2818 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
2820         * class.c (mono_method_get_vtable_index): Use
2821         mono_method_get_vtable_slot () for accessing method->slot.
2823         * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
2824         accessing klass->methods.
2826         * class.c (mono_method_get_vtable_slot): New helper function.
2827         (mono_class_get_vtable_entry): Ditto.
2828         (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
2829         accessing method->slot.
2831         * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
2832         method to get_inflated_method ().
2834         * class.c (mono_class_get_inflated_method): New helper method to obtain
2835         a method of an inflated class without calling setup_methods ().
2836         (mono_class_get_cctor): Use get_inflated_method.
2838         * generic-sharing.c (mono_class_get_method_generic): Ditto.
2839         
2840         * marshal.c image.c: Lazily create all the marshal caches.
2842         * image.c (mono_image_init): Move initialization of runtime_invoke
2843         caches to marshal.c.
2845         * marshal.c (get_cache): New helper function to lazily initialize a 
2846         wrapper cache.
2847         (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
2849         * debug-helpers.c (mono_method_full_name): Include generic arguments.
2851 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
2853         * loader.c: fixed check for interface type.
2855 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
2857         * appdomain.c: check for NULL setup before it's referenced.
2860 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
2862         * class.c: remove the unused old vtable setup code.
2864 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
2866         * class.c: don't depend on interface order in
2867         setup_interface_offsets (bug #435777).
2868         * reflection.c: sort the InterfaceImpl table (patch from
2869         Jb Evain  <jbevain@novell.com>).
2871 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
2873         * assembly.c (mono_assembly_open_full): Avoid loading images while holding
2874         the low level assemblies lock.
2876 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
2878         * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
2879         object.c, reflection.c, socket-io.c, threads.c: introduced
2880         mono_framework_version () to return the major framewrok version,
2881         changed the code that was using more complex patterns to use it.
2882         Return the correct value for PlatformID for OSX.
2884 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
2886         * icall-def.h, process.h, process.c: added an icall to get info about
2887         processes using mono-proclib.
2889 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
2891         * mono-perfcounters.c: use the mono-proclib functions to
2892         access process information.
2894 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
2896         * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
2897         monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
2898         reflection.c: remove rawbuffer usage: mmap support is more sanely
2899         provided by utils/mono-mmap.
2901 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
2903         * gc.c: use posix semaphores when possible so that
2904         mono_gc_finalize_notify() is signal safe.
2906 2008-10-11  Zoltan Varga  <vargaz@gmail.com>
2908         * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
2909         #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
2910         be #ifdef-ed out, the linker will remove the rest.
2912         * marshal.c: Implement DISABLE_COM.
2914         * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
2916 2008-10-11  Miguel de Icaza  <miguel@novell.com>
2918         * locales.c (string_invariant_compare_char): Optimization: do not
2919         call g_unichar_type unless we actually need the information.
2921 2008-10-10  Mark Probst  <mark.probst@gmail.com>
2923         * object.c, class-internals.h: Also create remoting trampolines
2924         for generic methods.  Pass the domain to the remoting trampoline
2925         creation function, too.
2927 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
2929         * class.c (mono_class_init): Fix+re-enable the finalize optimization.
2931 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2933         * class.c (mono_class_create_from_typedef): Vector4u was renamed to
2934         Vector4ui.
2936 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
2938         * assembly.c:
2939         * locales.c: remove the use of g_strdown. Fixes bug #322313.
2941 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
2943         * assembly.c: in mono_assembly_load_friends() take the assemblies lock
2944         for the least possible amount of time (extending the fix in r113458).
2946 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2948         * class.c (mono_class_create_from_typedef): Retrofit to new type names.
2950 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
2952         * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
2953         as possible simd intrinsic types.
2954         Optimized the test to check for the common prefix first.
2956 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
2958         * class.c: back out part of a broken optimization committed on
2959         May 23th (bug #433908).
2961 2008-10-09  Mark Probst  <mark.probst@gmail.com>
2963         * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
2964         Win32.  Should fix #432388 for most cases until we have the new
2965         profiler on Win32.
2967 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
2969         * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
2970         instead of using inst->id so the hash is stable for AOT.
2972 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
2974         * appdomain.c:
2975         * icall.c: create a .ini file for shadow-copied assemblies that
2976         contains the location of the original assembly. Use this to return the
2977         proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
2978         Also fix the number of '/' for windows when returning the CodeBase.
2979         Fixes bug #430920.
2981 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
2983         * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
2985         Code is contributed under MIT/X11 license.
2987 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
2989         * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
2990           if if the class vtable needs initialized.
2992         Code is contributed under MIT/X11 license.
2994 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
2996         * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) : 
2997           Adding default MonoMarshalSpecs for COM methods.  OBJECT->STRUCT,
2998           STRING->BSTR, and CLASS->INTERFACE.
3000         Code is contributed under MIT/X11 license.
3002 2008-10-07  Marek Habersack  <mhabersack@novell.com>
3004         * sysmath.h: changed the declaration of the
3005         ves_icall_System_Math_Round2 icall by adding an extra
3006         away_from_zero parameter.
3008         * sysmath.c (ves_icall_System_Math_Round2): added support for
3009         away from zero rounding. The icall now takes an extra boolean
3010         parameter to signal that away from zero operation is requested.
3012 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
3014         * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
3015         the delegate klass so it can work with full-aot.
3016         (mono_marshal_get_delegate_end_invoke): Ditto.
3017         (mono_marshal_get_delegate_invoke): Ditto.
3019 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
3021         * gc.c, attach.h, attach.c: remove a bad pattern:
3022         add_finalizer_callback () is not implemented correctly, it can't
3023         without adding more overhead to the finalizer loop and it's not
3024         even needed, since we know exactly what we need to call, so there is
3025         no need to do so through an expensive function pointer.
3027 2008-10-04  Zoltan Varga  <vargaz@gmail.com>
3029         * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
3030         for the no-gc case.
3031         * attach.c (mono_attach_init): Remove the #ifdef.
3033 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
3035         * attach.c (mono_attach_init): Don't use
3036         mono_gc_add_finalizer_thread_callback when compiling without GC.
3037         Fixes #432306.
3038         
3039         Code is contributed under MIT/X11 license.
3041 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
3043         * class.c (mono_class_create_from_typedef): Remove the 
3044         #ifndef DISABLE_SIMD stuff.
3046 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
3048         * class-internals.h (MonoClass): Added simd_type bit field.
3050         * class.c (mono_class_create_from_typedef): Check if type is a simd
3051         intrinsic.
3053 2008-10-03  Mark Probst  <mark.probst@gmail.com>
3055         * object.c (mono_method_add_generic_virtual_invocation): Only add
3056         instantiations to the thunk whose count is at least as large as
3057         the threshold.
3059 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
3061         * icall.c: changed the Type of the exception thrown when trying to
3062         invoke a constructor on an abstract class. Part of the fix for bug
3063         #324185.
3065 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3067         * class.c, class-internals.h (mono_method_get_vtable_index): New
3068         function which returns the index into the vtable and properly
3069         handles inflated virtual generic methods.
3071 2008-10-01  Mark Probst  <mark.probst@gmail.com>
3073         * object.c, domain.c, object-internals.h, domain-internals.h:
3074         Generalize IMT thunk machinery to also handle thunks for virtual
3075         generic method invokes.  When a virtual generic method is invoked
3076         more than a number of times we insert it into the thunk so that it
3077         can be called without lookup in unmanaged code.
3079         * generic-sharing.c, class-internals.h: Fetching a
3080         MonoGenericInst* for a method from an (M)RGCTX.
3082 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
3084         * marshal.c (emit_marshal_string): Applied a variant of a patch by
3085         tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
3086         marshalling. Fixes #431304.
3088 2008-10-01  Bill Holmes  <billholmes54@gmail.com>
3090         * marshal.c (emit_marshal_variant) : Change the attribute checks to 
3091           handle when ref is specified without In or Out.
3093         Code is contributed under MIT/X11 license.
3095 2008-09-30  Mark Probst  <mark.probst@gmail.com>
3097         * loader.c (mono_get_method_constrained): Don't expand method with
3098         the class's context, because it's already a method of that class.
3100 2008-09-30  Atsushi Enomoto  <atsushi@ximian.com>
3102         * attach.c : should be correct build fix.
3104 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
3106         * attach.c: Fix the previous change.
3108 2008-09-29  Atsushi Enomoto  <atsushi@ximian.com>
3110         * attach.c : quick w32 build fix.
3112 2008-09-27  Miguel de Icaza  <miguel@novell.com>
3114         * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
3115         crashes MonoDevelop: #430455.
3117 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
3119         * domain-internals.h (struct _MonoDomain): Move most fields used only by
3120         the JIT do MonoJitDomainInfo in ../mini/mini.h.
3122         * domain.c: Remove initialization/cleanup of the removed fields.
3124 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3126         * class.c (mono_class_generic_sharing_enabled): Enable generic
3127         code sharing for PPC.
3129 2008-09-26  Bill Holmes  <billholmes54@gmail.com>
3131         * attach.c : Fixing the Windows builds.
3133         Code is contributed under MIT/X11 license.
3135 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
3137         * class.c (mono_class_generic_sharing_enabled): Experimentally change 
3138         the default generic sharing mode to 'all'.
3140 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3142         * generic-sharing.c, class-internals.h: New function for checking
3143         whether a method needs a static RGCTX invoke wrapper.  A few
3144         funtions moved from mini/generic-sharing.c.
3146         * icall.c: New function used.
3148 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3150         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
3151         Static RGCTX invoke wrapping applies to value type methods, too.
3153         * class.c (mono_class_setup_vtable_general): In generic-shared
3154         value types, wrap methods with a static RGCTX invoke wrapper.
3156 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
3158         * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
3159         osx build.
3161 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
3163         * gc.c (mono_gc_add_finalizer_thread_callback): New function to
3164         register a callback which is called when the finalizer thread is woken
3165         up.
3166         (finalizer_thread): Call the callback if it exists.
3168         * attach.h attach.c: New files, implementing the attach mechanism.
3170         * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
3171         
3172         * object.c (mono_object_get_virtual_method): Fix an assertion introduced
3173         by the previous change.
3175 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
3177         * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
3178         loader.c, marshal.c, metadata-internals.h, metadata.c,
3179         method-builder.c, object.c, reflection.c: introduced specific functions
3180         to allocate from the domain and image mempools and cleaned up most of
3181         the code to use them (still missing a few in reflection.c).
3182         Keep the loader bytes counter updated.
3184 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
3186         * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
3187         loader-related counters.
3189 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
3191         * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
3192         added more MS-compatible counters.
3194 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
3196         * class.c (mono_class_setup_fields): Call setup_fields before accessing
3197         class->blittable. Fixes #428217.
3199 2008-09-21  Zoltan Varga  <vargaz@gmail.com>
3201         * reflection.c (mono_image_get_field_on_inst_token): Call 
3202         field_encode_signature () since that handles custom modifiers too.
3203         Fixes #424663.
3205 2008-09-20  Zoltan Varga  <vargaz@gmail.com>
3207         * reflection.c (add_custom_modifiers): New helper function to merge custom
3208         modifiers stored in objects to a MonoType.
3209         (fieldref_encode_signature): Encode custom modifiers.
3210         (mono_image_get_generic_field_token): Call add_custom_modifiers ().
3211         (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
3213 2008-09-19  Kornél Pál  <kornelpal@gmail.com>
3215         * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
3216         calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
3217         64-bit IL only images because imports are not resolved for IL only images.
3218         Special thanks to Bill Holmes for finding this bug and testing the patch.
3219         Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
3221         Contributed under MIT/X11 license.
3223 2008-09-19  Miguel de Icaza  <miguel@novell.com>
3225         * mono-config.c (dllmap_start): Add support for the bits keyword
3226         on dllentry and dllmap to easily detect 32 vs 64 bit systems.
3228 2008-09-19  Mark Probst  <mark.probst@gmail.com>
3230         * reflection.c (inflate_mono_method): When the class the method is
3231         to be inflated for is itself not inflated, just return the method.
3233 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
3235         * mono-perfcounters.c: use more user friendly process instance names.
3237 2008-09-18  Bill Holmes  <billholmes54@gmail.com>
3239         * marshal.c (emit_marshal_variant) : Change the attribute checks to 
3240           handle "[in] ref" and "[in][out] ref" cases.
3242         * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
3243           to mono_mb_create_method.  This was causing problems calling native to
3244           managed passing Variants by value.
3246         Code is contributed under MIT/X11 license.
3248 2008-09-18  Zoltan Varga  <vargaz@gmail.com>
3250         * class.c (can_access_internals): Call mono_assembly_load_friends ()
3251         before accessing the friend_assembly_names field.
3253         * assembly.c (mono_assembly_load_friends): Make this callable multiple
3254         times.
3255         (mono_assembly_load_from_full): Avoid calling load_friends (), it is
3256         called lazily when it is needed.
3258         * metadata-internals.h (struct _MonoAssembly): Add 
3259         'friend_assembly_names_inited' flag.
3261 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
3263         * mono-perfcounters-def.h: fix the types of a few counters.
3264         * mono-perfcounters.c: implemented the instance names getter
3265         and a few bugfixes.
3267 2008-09-18  Atsushi Enomoot  <atsushi@ximian.com>
3269         * culture-info-table.h : regenerated.
3271 2008-09-17  Robert Jordan  <robertj@gmx.net>
3273         * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
3274         context bound objects. Fixes #415577.
3276         Code is contributed under MIT/X11 license.
3278 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
3280         * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
3281         implementation (bug #423582).
3283 2008-09-16  Zoltan Varga  <vargaz@gmail.com>
3285         * object.c (mono_object_get_virtual_method): Handle the case method->slot
3286         is not set. Fixes #426309.
3288 2008-09-16  Jb Evain  <jbevain@novell.com>
3290         * class.c (mono_class_from_name): fix the exported type look up
3291         when the type is defined in a referenced assembly.
3293 2008-09-16  Jb Evain  <jbevain@novell.com>
3295         * reflection.c (mono_image_fill_export_table_from_type_forwarders):
3296         increment the next index counter on each iteration to make that work
3297         for more than one type forwarder. Unmanaged part to fix #422929.
3299 2008-09-15  Mark Probst  <mark.probst@gmail.com>
3301         * object-internals.h: enum ComInterfaceType in
3302         MonoInterfaceTypeAttribute is guint32, not guint16.
3304 2008-09-12  Mark Probst  <mark.probst@gmail.com>
3306         * cil-coff.h, image.c, reflection.c: Endianness fixes in image
3307         writing code.
3309 2008-09-11  Mark Probst  <mark.probst@gmail.com>
3311         * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
3312         not gboolean.
3314 2008-09-11  Mark Probst  <mark.probst@gmail.com>
3316         * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
3317         Endianness fixes for MonoSymbolFileOffsetTable.
3319 2008-09-10  Bill Holmes  <billholmes54@gmail.com>
3321         * process.c (complete_path) : Removing quotes from the 
3322           input path.  The glib file routines do not handle file paths
3323           that have quotes around them.
3325         Code is contributed under MIT/X11 license.
3327 2008-09-10  Bill Holmes  <billholmes54@gmail.com>
3329         * socket-io.h : Adding a comment to provide locations where 
3330           changes to MonoSocketAsyncResult need to be synced.
3332         Code is contributed under MIT/X11 license.
3334 2008-09-10  Zoltan Varga  <vargaz@gmail.com>
3336         * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out 
3337         parameters as well. Fixes #425001.
3339 2008-09-08  Miguel de Icaza  <miguel@novell.com>
3341         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
3342         windows build.
3344 2008-09-07  Miguel de Icaza  <miguel@novell.com>
3346         * console-io.c: Add support for tracking the window size if it
3347         changes.
3349         The setup is very simple: the TtySetup function will now return a
3350         pointer to a location in memory that tracks the current console
3351         size.  The managed code checks its current value every time its
3352         queried against the last value set, and updates accordingly.
3354         With this setup we can work with multiple consoles, and we do not
3355         require to poke into managed code from a signal handler.
3357         Additionally, the environment for COLUMNS and LINES is now handled
3358         in unmanaged code.
3360         (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
3362 2008-09-07  Mark Probst  <mark.probst@gmail.com>
3364         * marshal.c (mono_type_native_stack_size): Treat
3365         MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
3367 2008-09-04  Jb Evain  <jbevain@novell.com>
3369         * class.c (mono_class_is_assignable_from): fix assignability of nullables
3370         to nullables.
3372 2008-09-03 Rodrigo Kumpera  <rkumpera@novell.com>
3374         * verify.c (verify_type_compatibility_full): Revert change
3375         to allow converting a native int to unmanaged pointer be verifiable
3376         under non-strict mode.
3377         It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
3379         * verify.c: Added some TODOs.
3381 2008-09-02  Bill Holmes  <billholmes54@gmail.com>
3383         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
3384           ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
3385           Changed to use GlobalAlloc for the memory returned on Windows platforms.
3387         Code is contributed under MIT/X11 license.
3389 2008-09-02  Jb Evain  <jbevain@novell.com>
3391         * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
3393 2008-09-02 Rodrigo Kumpera  <rkumpera@novell.com>
3395         reflection.c (typebuilder_setup_fields): Handle classes with
3396         explicit size.
3398 2008-09-01 Rodrigo Kumpera  <rkumpera@novell.com>
3400         class.c (mono_class_setup_events): Add memory barrier due to
3401         double checked locking.
3402         
3403         class.c (mono_class_setup_properties): Same.
3405 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
3407         * class.c (mono_class_is_assignable_from): Fix the build.
3408         
3409         * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
3410         before accessing klass->interface_bitmap. Fixes #421744.
3412 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
3414         * appdomain.c (mono_runtime_set_no_exec): New internal function setting
3415         the runtime into no-exec mode, useful when running the AOT compiler.
3417         * appdomain.c gc.c object.c: Avoid executing managed code when running
3418         in no-exec mode.
3419         
3420         * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
3422         * reflection.c (_mono_reflection_get_type_from_info): Handle the 
3423         special case when the mono_assembly_loaded () returns NULL because the 
3424         search hook is not installed.
3426 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
3428         * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
3429         crashes in bstr marshalling on linux.
3431 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
3433         * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
3434         with more than one parameter.
3436 2008-08-24  Miguel de Icaza  <miguel@novell.com>
3438         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
3439         start/stop flow control as well when turning off ICANON (allows
3440         C-s and C-q to be read by Console.ReadKey).
3442 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
3444         * class.c (mono_class_init): Move the initialization of nested classes
3445         into mono_class_get_nested_types (). Fixes #418433.
3447         * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
3448         flag.
3450         * class.c reflection.c icall.c: Use mono_class_get_nested_types () for 
3451         iterating tough the nested classes of a class.
3453 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
3455         * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
3456         on arm.
3458 2008-08-22  Miguel de Icaza  <miguel@novell.com>
3460         * console-io.c (sigcont_handler): Support signal chaining for
3461         SIGCONT.
3463         (console_set_signal_handlers): Use best practices with sigaction,
3464         clear the structure before using it. 
3466 2008-08-22  Robert Jordan  <robertj@gmx.net>
3468         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
3469         Fix the Windows build.
3471 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
3473         * class.c (mono_class_generic_sharing_enabled): Make the default
3474         sharing mode 'corlib'.
3476 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
3478         * console-io.c (console_set_signal_handlers): Fix a warning.
3480         * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
3481         method normally, the JIT will take care of avoiding recursion.
3483 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
3485         * console-io.c : Fixing builds for platforms that do not have <termios.h>.
3487         Code is contributed under MIT/X11 license.
3489 2008-08-20  Miguel de Icaza  <miguel@novell.com>
3491         * console-io.c (sigcont_handler): We need to restore the entire
3492         termios state, not only the original settings, as things like echo
3493         can be controlled after this (Booish exposes this issue with its
3494         own ReadLine implementation).
3496         Additionally, we need to set the terminal back into keypad_xmit
3497         mode.
3498         
3499         (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
3500         string as a paramter as well.   Otherwise we get different
3501         keyboard sequences.
3503 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
3505         * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
3506         delegates with byref out parameter passing. Fixes #351520.
3508         * debug-helpers.c (mono_context_get_desc): New helper function to stringify
3509         a generic context.
3510         (mono_type_get_desc): Add the type arguments for GENERICINST.
3511         (mono_method_full_name): Stringify the class name using mono_type_full_name
3512         so it picks up generic arguments.
3514 2008-08-19  Gert Driesen  <drieseng@users.sourceforge.net>
3516         * console-io.c: Removed debug output.
3518 2008-08-19 Rodrigo Kumpera  <rkumpera@novell.com>
3520         reflection.c (mono_reflection_create_runtime_class): Alloc
3521         the nested classes linked list using the dynamic image mempool.
3522         Fixes leak in corlib compilation.
3524 2008-08-19  Miguel de Icaza  <miguel@novell.com>
3526         * console-io.c: Fix incredibly annoying behavior on the console
3527         after resuming execution after control-z.   This affected every
3528         console application.
3530 2008-08-18 Rodrigo Kumpera  <rkumpera@novell.com>
3532         * mempool-internals.h: Header for mono private mempool functions. The first
3533         two function are for allocating glib linked lists using pools.
3535         * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
3537         * Makefile.am: Added mempool-internals.h.
3539 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
3541         * domain.c (mono_domain_create): Call the JIT domain hook if installed.
3542         (mono_domain_free): Ditto.
3544         * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
3545         be used by the JIT to store its domain-specific information, instead of putting
3546         it directly into MonoDomain.
3548         * domain.c (mono_install_create_domain_hook): New helper function to install
3549         a hook which initializes domain->runtime_info.
3551         * domain.c (mono_install_free_domain_hook): Ditto.
3552         
3553 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
3555         * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
3556         asserting if the ares parameter is null.
3558         * mono-perfcounters.c: Fix warnings.
3560         * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
3561         is not needed, don't check for interruptions either.
3562         (mono_marshal_get_delegate_end_invoke): Ditto.
3564 2008-08-15  Marek Habersack  <mhabersack@novell.com>
3566         * mono-perfcounters.c (predef_readonly_counter): added support for
3567         reading the ASP.NET Requests Queued counter from another process.
3569 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
3571         * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
3572         MonoImage to simplify the AOT code.
3574 2008-08-10  Zoltan Varga  <vargaz@gmail.com>
3576         * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
3577         marshalling. Fixes #416078.
3579 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
3580         
3581         * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
3582         it is set, looking up the icall address is deferred to the JIT, since 
3583         in embedded scenarios, the icall might not be registered in the runtime
3584         doing the AOT compilation. Backported from the 2.0 branch.
3586 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
3588         * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
3589         Fixes #415621.
3591 2008-08-05  Marek Habersack  <mhabersack@novell.com>
3593         * Makefile.am: added support for cross-compilation.
3595 2008-08-04  Zoltan Varga  <vargaz@gmail.com>
3597         * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
3599 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
3601         * mono-perfcounters.c: jitted methods and jitted bytes counters.
3603 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
3605         * class-internals.h, icall-def.h, mono-perfcounters-def.h,
3606         mono-perfcounters.c: performance counters implementation.
3608 2008-07-31  Zoltan Varga  <vargaz@gmail.com>
3610         * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
3611         to gpointer, letting the AOT code decide what to store in it.
3613 2008-07-31  Bill Holmes  <billholmes54@gmail.com>
3615         * marshal.c (cominterop_get_native_wrapper) : Adding a call to 
3616           mono_class_setup_methods if the methods are not initialized.
3618         Code is contributed under MIT/X11 license.
3620 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
3622         * verify.c: Remove some debug code I commited by accident.
3624         * verify.c (mono_method_is_valid_in_context): Change the return value
3625         to make possible to distinguish between invalid and unverifiable.
3627         * verify.c (verifier_load_method): Don't return NULL for unverifiable
3628         methods.
3630 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
3632         * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
3633         constraints. Fixes regression in gtest-253.
3635 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
3637         * verify.c (mono_verifier_verify_class): Don't allow generic types
3638         with explicit layout.
3640         * verify.c (mono_method_verify): Check locals and argument types.
3642 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
3644         * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
3645         wait if the thread is in StopRequested state.
3647         * class.c (mono_class_from_name): Refactor the module searching code into
3648         a separate function so it can be reused in the AOT case too.
3650 2008-07-28 Rodrigo Kumpera  <rkumpera@novell.com>
3652         * verify.c (mono_type_is_valid_in_context): Improve the error message.
3653         Check both the type and it's generic type definition for loader errors.
3654         
3655         * verify.c (mono_method_is_valid_in_context): Don't generate another
3656         error when a type errors occur, this leads to the wrong exception been
3657         thrown.
3659 2008-07-28  Dick Porter  <dick@ximian.com>
3661         * icall-def.h
3662         * process.c
3663         (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
3664         New internal calls to duplicate and close a process handle.
3666 2008-07-27  Andreas Färber  <andreas.faerber@web.de>
3668         * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
3670 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
3672         * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
3674 2008-07-27  Robert Jordan  <robertj@gmx.net>
3676         * class.c (mono_class_init): Don't compute class.has_finalize for
3677         valuetypes. Fixes #412477.
3679 2008-07-25 Rodrigo Kumpera  <rkumpera@novell.com>
3681         * verify.c: Implement constraint equivalence checking.
3682         This is required when a generic parameter is used as
3683         argument to a constrained one.
3685         Fixes #410637.
3687 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
3689         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3691         * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
3693         * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
3694         synch with managed object layout.
3696 2008-07-24 Rodrigo Kumpera  <rkumpera@novell.com>
3698         * verify.c (do_branch_op): Handle valuetypes and generic
3699         arguments properly.
3701         * verify.c (do_cmp_op): Same.
3703         Fixes #410383.
3705 2008-07-24  Mark Probst  <mark.probst@gmail.com>
3707         * generic-sharing.c: Fix memory leaks.
3709         * class.c, class-internals.h: Make
3710         mono_class_inflate_generic_type_with_mempool() non-static.
3712 2008-07-24 Rodrigo Kumpera  <rkumpera@novell.com>
3714         * pedump.c (dump_verify_info): Dump full class name.
3716 2008-07-24  Mark Probst  <mark.probst@gmail.com>
3718         * generic-sharing.c: Removed some old code that didn't do anything.
3720 2008-07-24  Massimiliano Mantione  <massi@ximian.com>
3721         * profiler.c: Added runtime_initialized_event,
3722         mono_profiler_install_runtime_initialized and
3723         mono_profiler_runtime_initialized. This new hook tells the profiler
3724         when the runtime is sufficiently initialized to be able to call
3725         mono_thread_attach on the root appdomain.
3726         * profiler.h, profiler-private.h: Likewise.
3728 2008-07-23 Rodrigo Kumpera  <rkumpera@novell.com>
3730         * verify.c (do_cast): Do boxing for generic arguments as well.
3732         * class.c (is_nesting_type): Drop generic instantiations before
3733         checking for nesting.
3735         * class.c (can_access_instantiation): Allow access to generic
3736         arguments.
3738 2008-07-23 Rodrigo Kumpera  <rkumpera@novell.com>
3740         * verify.c (verify_class_for_overlapping_reference_fields):
3741         On some cases, the field size might be zero, guard against that.
3742         Fix the explicit layout check to work as expected.
3744 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
3746         * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling 
3747         mono_thread_resume () during shutdown, since the thread we want to abort
3748         might be suspended.
3750 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
3752         * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a 
3753         warning.
3755         * debug-mono-symfile.c: Fix a warning.
3757         * mono-perfcounters.c (get_cpu_times): Fix a warning.
3759         * object.c (mono_class_vtable): Check if exception_type is set, and return
3760         NULL as defined by the function comments.
3762 2008-07-22  Mark Probst  <mark.probst@gmail.com>
3764         * mempool.c: Use malloc for every single mempool allocation if the
3765         configure option is set.  This makes it easier to track mempool
3766         allocations with tools like Valgrind.
3768 2008-07-22  Jb Evain  <jbevain@novell.com>
3770         * reflection.c (create_dynamic_mono_image): emit the same
3771         metadata version that SL2 does when creating a SL2 image.
3773 2008-07-21 Rodrigo Kumpera  <rkumpera@novell.com>
3775         * icall-def.h:
3776         * icall.c: New icall System.Enum:get_hashcode. This function
3777         avoids the overhead of boxing the enum to the underlying type.
3779 2008-07-21  Mark Probst  <mark.probst@gmail.com>
3781         * reflection.c (mono_method_get_object): Don't let static RGCTX
3782         invoke wrappers get into MonoReflectionMethods.
3784 2008-07-17 Rodrigo Kumpera  <rkumpera@novell.com>
3786         * object-internals.h:
3787         * object.c: New mono_runtime_class_init_full function
3788         that makes throwing the exception optinal.
3790         * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
3791         for the case where the exception object is supplied.
3793 2008-07-16  Kornél Pál  <kornelpal@gmail.com>
3795         * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
3796         old ld versions.
3798         Contributed under MIT/X11 license.
3800 2008-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
3802         * string-icalls.c (ves_icall_System_String_InternalSplit):
3803         Optimize array allocation by caching the MonoClass of the
3804         array type.
3806         * icall.c (ves_icall_Type_GetMethodsByName): Same.
3808         * reflection.c (mono_param_get_objects): Same.
3810 2008-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
3812         * icall-def.h:
3813         * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
3814         It inflates the given type using the class context.
3816 2008-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
3818         * object.c (mono_class_try_get_vtable): New function. Tries to fetch
3819         the vtable if it already exists.
3821         * object-internals.h: Add mono_class_try_get_vtable as part of the
3822         internal API.
3824         * reflection.c (mono_type_get_object): Use the MonoObject from the
3825         vtable when possible. Reduces locking contention on reflection heavy
3826         code.
3828 2008-07-15  Zoltan Varga  <vargaz@gmail.com>
3830         * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
3831         g_bit_nth_msf () since that macro is not implemented in eglib.
3833 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
3835         * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
3836         on platforms which do not support it.
3838 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
3840         * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
3842 2008-07-11  Martin Baulig  <martin@ximian.com>
3844         * mono-debug-debugger.h
3845         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
3847         * mono-debug-debugger.c
3848         (_mono_debugger_interruption_request): New global volatile variable.
3849         (mono_debugger_check_interruption): New public function.
3851         * threads.c
3852         (mono_thread_current_check_pending_interrupt): Call
3853         mono_debugger_check_interruption().
3854         (mono_thread_interruption_checkpoint_request): Likewise.
3856 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
3858         * verify.c: Add more type checks for loaded types. Verify the result
3859         handle from ldtoken.
3861 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
3863         * loader.c (field_from_memberref): Don't crash if the field
3864         wasn't found.
3866 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
3868         * verify.c: Verify if type and method instantiations
3869         don't have invalid VAR or MVAR arguments.
3871 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
3873         * verify.c: Fix double free of function pointer list.
3875 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
3877         * object.c (mono_string_to_utf8): Comment the new code as it
3878         breaks under eglib.
3880 2008-07-08 Rodrigo Kumpera  <rkumpera@novell.com>
3882         * object.c (mono_string_to_utf8): Avoid allocating a temp array.
3884 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
3886         * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
3887           is not throw too many times.
3889         Code is contributed under MIT/X11 license.
3891 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
3893         * mono-debug.c (mono_debug_find_method): Allow this to be called even when
3894         debugging is turned off.
3896 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
3898         * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
3900 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3902         * class-internals.h, class.c: Added new generic sharing option:
3903         Share only stuff in System.Collections.Generic, which is now the
3904         default.
3906 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3908         * generic-sharing.c, class-internals.h: New function for getting a
3909         generic method in a generic class given the corresponding method
3910         for a different instantiation of the class.  Partly refactored
3911         from mini-trampolines.c.
3913         * class.c: Make sure generic methods have a class_inst if they are
3914         part of a generic class.
3916         * metadata.c (mono_type_stack_size_internal): Handle type
3917         variables.
3919 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3921         * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
3922         Signifies whether information on the this/vtable/mrgctx variable
3923         is available.
3925 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3927         * object.c, object-internals.h, icall.c: New function
3928         mono_delegate_ctor_with_method(), which does the same as
3929         mono_delegate_ctor(), but takes an explicit method argument
3930         instead of taking the method from the jit info.
3932         * marshal.c: When creating a delegate with an inflated method take
3933         the "this" argument as the target class for the castclass.
3935 2008-07-03  Mark Probst  <mark.probst@gmail.com>
3937         * domain.c (mono_jit_info_table_find): Fixed a bug that caused
3938         mono_jit_info_table_find() to perform very badly in some cases.
3940 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
3942         * icall.c (type_from_typename): Handle 'string'.
3944         * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
3945         wrappers into the wrapper_hash, since the key is not a MonoMethod.
3947 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
3949         * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
3951         * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
3952         number of available managed allocator types.
3954         * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
3955         (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
3957 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
3959         * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
3960         which is a low level lock protecting just the 'jit_code_hash' hash table.
3962         * domain.c: Initialize+cleanup jit_code_hash_lock.
3963         
3964 2008-06-30  Kornél Pál  <kornelpal@gmail.com>
3966         * coree.c (mono_load_coree): Set coree_module_handle global variable only
3967         after initialization.
3969         * coree.h: Make MonoFixupExe internal.
3971         Contributed under MIT/X11 license.
3973 2008-06-30  Kornél Pál  <kornelpal@gmail.com>
3975         * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
3976         because that is platform independent. Check NumberOfRvaAndSizes in PE32
3977         as well.
3978         (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
3979         image being loaded is a CLI image and _CorValidateImage gets called.
3981         * coree.h: Add MonoLoadImage.
3983         * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
3984         instead of LoadLibrary.
3986         Contributed under MIT/X11 license.
3988 2008-06-29 Rodrigo Kumpera  <rkumpera@novell.com>
3990         * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
3991         for any primitive type.
3993 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
3995         * object.c (mono_array_new_specific): Optimize this and the other allocation
3996         functions a bit.
3997         
3998         * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
3999         domains too if mono_dont_free_domains is set.
4001         * domain-internals.h (mono_dont_free_domains): New internal option controlling
4002         whenever to free appdomain data after it has been unloaded.
4004         * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
4005         
4006 2008-06-28  Zoltan Varga  <vargaz@gmail.com>
4008         * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
4009         (mono_method_get_equivalent_method): Fix a warning.
4011         * object.c (mono_message_init): Avoid looking up array types for each call.
4013 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
4015         * object.c (mono_message_invoke): Avoid looking up the object[] type for each
4016         call.
4018         * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
4019         even more.
4021         * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
4022         each iteration.
4024         * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
4025         fields of an enum.
4027 2008-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
4029         * object.c (mono_value_box): Fix boxing of nullables.
4031 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
4033         * assembly.c (mono_set_rootdir): Use __ImageBase instead of
4034         mono_module_handle that is defined by the linker; no initialization required.
4035         * coree.h: Remove mono_module_handle, add __ImageBase, update
4036         mono_image_open_from_module_handle.
4037         * coree.c (_CorValidateImage): Convert platform independent PE32 images to
4038         PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
4039         (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
4040         memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
4041         to 4 GB away from image base address. IA64 version is not tested but was very
4042         easy to implement and should work if we ever need it.
4043         * domain.c (mono_init_internal): Avoid system error message boxes.
4044         * image.c (mono_image_open_from_module_handle): Replace ref_count argument
4045         with has_entry_point. Handle do_mono_image_load fauilre correctly.
4046         (mono_image_open_full, mono_image_close): Use has_entry_point instead of
4047         coff_attributes that is a more reliable way to detect if _CorDllMain was called.
4048         * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
4050         Contributed under MIT/X11 license.
4052 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
4054         * class.c, class-internals.h: Export mono_class_get_generic_type_definition
4055         as part of the private mono API.
4056         
4057         * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
4058         Do proper argument checking for methods that belong to generic classes.
4059         Do proper type resolution for GMFH/2.
4060         Fixes #377324.
4061         
4062 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
4064         * verify.c (do_switch): Fix a memory corruption bug with
4065         the jump index is out of bound.
4067 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
4069         * verify.c: Disable debug code.
4071 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
4073         * reflection.c (mono_image_get_methodbuilder_token): Use
4074         mono_image_get_methodspec_token_for_generic_method_definition
4075         instead of mono_image_get_memberref_token. We cache more memberef
4076         entries now.
4078 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
4080         * verify.c: Inflate exception clause types.
4081         Fixes #402606.
4082         
4083 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
4085         * reflection.c (mono_image_get_methodbuilder_token): Don't leak
4086         name.
4088         * reflection.c (mono_image_get_ctorbuilder_token): Same.
4090         * reflection.c (mono_image_create_method_token): Same.
4092 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
4094         * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
4095         It does the same as mono_image_get_methodref_token but works on
4096         MethodBuilder.
4098         * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
4099         and always generate a methodspec. This follows the old behavior and fixes
4100         the regressions in System.Core. 
4102 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
4104         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where 
4105         don't event mono_class_get () succeeds. Fixes #402182.
4107 2008-06-20 Rodrigo Kumpera  <rkumpera@novell.com>
4109         * metadata-internals.h: Added MonoDynamicImage::methodspec
4110         hashtable to store methodspec tokens created for MethodBuilders.
4112         * reflection.c (mono_image_get_methodbuilder_token): Encode generic
4113         MethodBuilders as open instantiations if a methodspec was requested.
4115         * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
4117         * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
4119         * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
4121         Fixes bug #349190.
4123 2008-06-20 Rodrigo Kumpera  <rkumpera@novell.com>
4125         * loader.c (method_from_methodspec): Avoid crashing if the
4126         method lookup fails.
4128 2008-06-20  Dick Porter  <dick@ximian.com>
4130         * socket-io.c (get_socket_assembly): Cope with Moonlight network
4131         classes being in a different assembly.  Fixes bug 399184.
4133 2008-06-20  Zoltan Varga  <vargaz@gmail.com>
4135         * loader.c (mono_loader_init): Make this callable multiple times.
4136         (mono_dllmap_insert): Call mono_loader_init () so this works even before
4137         the runtime is initialized. Fixes #401755.
4139 2008-06-19  Dick Porter  <dick@ximian.com>
4141         * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
4142         Fixes bug 349688.
4144 2008-06-19  Dick Porter  <dick@ximian.com>
4146         * socket-io.c:
4147         * icall-def.h: Implement Socket generic Send() and Receive()
4148         methods.  Fixes bug 395168.
4150 2008-06-19  Kornél Pál  <kornelpal@gmail.com>
4152         * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
4154         Contributed under MIT/X11 license.
4156 2008-06-18  Martin Baulig  <martin@ximian.com>
4158         * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
4159         `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
4160         set to 80.0.  The debugger <-> runtime interface is now frozen as
4161         well.   
4163         * mono-debug.c
4164         (mono_debug_debugger_version): Bump to 4.
4166 2008-06-18  Martin Baulig  <martin@ximian.com>
4168         * debug-mono-symfile.c
4169         (load_symfile): Don't check the minor version.
4171         * debug-mono-symfile.h: Bump the version number to 50.0.
4173 2008-06-18  Martin Baulig  <martin@ximian.com>
4175         * debug-mono-symfile.c
4176         (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
4177         minimum required version.
4179 2008-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
4181         * reflection.c (mono_custom_attrs_from_property): Fix support for
4182         retriveving cattrs of dynamic inflated generic types.
4184         * reflection.c (mono_custom_attrs_from_event): Same.
4186         * reflection.c (mono_custom_attrs_from_field): Same;
4188         * reflection.c (typebuilder_setup_events): Same cattrs of events.
4190         * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
4191         Moved to metadata.c.
4193         * metadata.c: New functions to retrive the equivalent field, event
4194         of property from the generic type definition.
4196         * metadata-internals.h: Added new functions from metadata.c.
4198 2008-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
4200         * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
4201         to cached in a mempool is used.
4203         * metadata.c (free_generic_class): In some situations field generic_info type
4204         is not properly dup'ed and leads to double free'ing.
4206         Fixes #400643.
4208 2008-06-17  Mark Probst  <mark.probst@gmail.com>
4210         * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
4211         this arguments (will be needed later for generic methods).
4212         Collect stats.
4214 2008-06-17  Mark Probst  <mark.probst@gmail.com>
4216         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
4217         Create a static RGCTX invoke wrapper for methods which require it.
4219 2008-06-17  Mark Probst  <mark.probst@gmail.com>
4221         * object.c, class-internals.h: New function for checking whether
4222         an individual field is special static.
4224 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
4226         * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
4227         linear search since the table is sorted.
4229         * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
4230         Fixes #324180.
4232 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
4234         * appdomain.c (unload_thread_main): Applied patch from Tim Howard 
4235         (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
4237         * gc.c (mono_domain_finalize): Allow an infinite timeout.
4239         * threads.c (mono_threads_abort_appdomain_threads): Ditto.
4240         
4241         * threads.c (mono_thread_request_interruption): Get rid of locking, use
4242         InterlockedCompareExchange to query and modify 
4243         thread->interruption_requested.
4245         * object-internals.h (struct _MonoThread): Change interruption_requested
4246         to a gint32 so it can be modified by atomic operations. Add 
4247         'critical_region_level' from the managed side, change small_id to a guint32,
4248         add new set of 'unused' fields.
4250         * appdomain.c: Bump corlib version.
4252 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
4254         * class.c (mono_class_from_name): Search modules as well. Fixes
4255         #322332.
4257 2008-06-13  Mark Probst  <mark.probst@gmail.com>
4259         * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
4260         templates.  Templates are generalized with an additional type_argc
4261         argument.  RGCTX templates have type_argc==0, MRGCTX templates
4262         have type_argc>0.
4264         * domain-internals.h, domain.c: New hash table for looking up
4265         MRGCTXs.
4267         * metadata.c, metadata-internals.h: Rename hash and equal
4268         functions for MonoGenericInst's and make them public.
4270         * class-internals.h: New data structures for the MRGCTX.  Macros
4271         for distinguishing slots in the RGCTX and the MRGCTX.
4273 2008-06-13  Mark Probst  <mark.probst@gmail.com>
4275         * object.c (mono_method_get_imt_slot): Put the same methods of
4276         different instantiations of the same generic interface in the same
4277         IMT slots, to make generic sharing simpler.
4279 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
4281         * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
4283         * metadata.c (mono_metadata_field_info_with_mempool): Added.
4284         This function works just like mono_metadata_field_info, but
4285         accept a mempool as argument to be used allocating memory.
4287         * marshal.c (mono_marshal_load_type_info): Use new function
4288         to load marshal data into image mempool.
4290 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
4292         * class.c (mono_class_inflate_generic_type_with_mempool):
4293         This function allows to inflate a generic type using
4294         a mempool.
4296         * class.c (inflate_generic_type): Take a mempool as argument
4297         and use it to do type dup'ing.
4299         * class.c (mono_class_setup_fields): Field type for generic
4300         generic classes are allocated from the image mempool.
4302         * metadata.c (free_generic_class): Inflated field type is
4303         now allocated in the image mempool.
4305 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
4307         * threads.c (thread_cleanup): Free MonoThread::name.
4309 2008-06-12  Marek Habersack  <mhabersack@novell.com>
4311         * appdomain.c (ensure_directory_exists): avoid unnecessary
4312         mkdir(2) calls when the shadow directory already exists.
4313         (mono_make_shadow_copy): copy also satellite assemblies from the
4314         private bin directories.
4316 2008-06-11  Zoltan Varga  <vargaz@gmail.com>
4318         * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
4319         
4320         * threads.c (mono_thread_get_stack_bounds): Align the stack address to
4321         a page boundary. Fixes #396219.
4323 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
4325         * marshal.c (mono_marshal_load_type_info): Add a memory barrier
4326         due to double-checked locking.
4328 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
4330         * assembly.c (build_assembly_name): Release memory on failure.
4332         * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
4334 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
4336         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
4337         memory on failure.
4339 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
4341         * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
4342         memory on failure.
4344 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
4346         * loader.c (field_from_memberref): Check if field signature type is equal
4347         to the non-inflated type of the field. Fixes #398980.
4349 2008-06-11  Zoltan Varga  <vargaz@gmail.com>
4351         * assembly.c (mono_assembly_load_from_full): Call 
4352         mono_assembly_load_friends () outside the assemblies lock, since it can
4353         acquire the loader lock. Fixes #323696.
4355         * reflection.c (resolve_object): Inflate the inst with the context for
4356         FieldOnTypeBuilderInst. Fixes #399010.
4358 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
4360         * reflection.c (mono_image_get_field_on_inst_token): Don't
4361         inflate the field to encode it's signature. If it's a
4362         VAR or MVAR it should stay that way in the signature.
4363         Fixes #399047.
4365 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
4367         * reflection.c (resolve_object): Release memory of inflated types.
4369 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
4371         * loader.c (mono_method_get_signature_full): Remove assert about
4372         loading a methodspec to a generic method. We have such methods, such as
4373         System.Threading.Interlocked::CompareExchange<T>.
4374         This assert was removed since it crashes the verifier when it checks
4375         methods calling CompareExchange<T>.
4377 2008-06-10  Marek Safar  <marek.safar@gmail.com>
4379         * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
4380         of Type array and not MonoType.
4382 2008-06-10  Marek Habersack  <mhabersack@novell.com>
4384         * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
4385         <lupus@ximian.com>
4387 2008-06-10  Martin Baulig  <martin@ximian.com>
4389         * debug-mono-symfile.h
4390         (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6.  There were no
4391         changes to the file format, but we were generating incorrect
4392         source file indices in the line number table due to a bug, which
4393         made backtraces report an incorrect source file.
4395 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
4397         * mono-debug.c: Moved mono_debug_free_method_jit_info from
4398         mini/debug-mini.c to here.
4400         * mono-debug.c (il_offset_from_address): Free memory from find_method.
4402         * mono-debug.h: Export mono_debug_free_method_jit_info, users should
4403         use it to release structs returned by mono_debug_find_method.
4405 2008-06-10  Zoltan Varga  <vargaz@gmail.com>
4407         * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
4408         since it needs to set method->slot for all interface methods.
4410 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
4412         * class-internals.h: Forgot to add.
4414 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
4416         * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
4418         * reflection.c (lookup_custom_attr): Added a MonoImage argument.
4419         Lookup the custom attributes from property_hash.
4421         * reflection.c (mono_save_custom_attrs): Save the custom attributes
4422         in property_hash. Allocate all data using the image mempool.
4424         * reflection.c: Removed dynamic_custom_attrs. Changed all checks
4425         for dynamic_custom_attrs to checks if the image is dynamic.
4427 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
4429         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
4430         assemblies array.
4431         
4432         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
4433         runtime functions while holding the domain assemblies lock.
4435 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
4437         * verify.c: Reapplied the last bit of the reverted changes.
4439 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
4441         * verify.c: Reapplied more of the reverted changes.
4443 2008-06-09  Martin Baulig  <martin@ximian.com>
4445         * debug-mono-symfile.c (load_symfile): Check the major version
4446         first; if it's wrong, don't print the minor version in the error message.
4448 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
4450         * appdomain.c (set_domain_search_path): Make this use the domain assemblies
4451         lock instead of the domain lock to avoid deadlocks, since the thread might
4452         already hold the loader lock.
4454         * threads.c (start_wrapper): Call mono_monitor_init_tls ().
4455         (mono_thread_attach): Ditto.
4457         * monitor.c: Use a TLS variable for holding the current thread id instead
4458         of calling pthread_self ().
4459         (mono_monitor_init_tls): New internal function to initialize the TLS
4460         variable.
4461         (mono_monitor_try_enter_internal): Put the owner == id check after the
4462         owner == 0 check.
4464         * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
4465         missed optimizations when using gcc-4.3.
4467 2008-06-08 Rodrigo Kumpera  <rkumpera@novell.com>
4469         * reflection.c (mono_dynamic_image_free): Free the memory
4470         used by MonoGenericParam in MonoDynamicImage::gen_param.
4472         * reflection.c (mono_reflection_setup_generic_class): Allocate
4473         container from mempool.
4475         * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
4476         container from mempool.
4478 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
4480         * threads.c (mono_set_pending_exception): New internal function to set the
4481         pending exception of the current thread.
4482         (mono_thread_get_and_clear_pending_exception): Check for 
4483         thread->pending_exception as well.
4485         * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
4487         * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
4488         it can trigger a collection.
4490 2008-06-06  Martin Baulig  <martin@ximian.com>
4492         Merged the `debugger-kahalo' branch.
4494         * mono-debug.h
4495         (MONO_DEBUGGER_VERSION): Bumped to 72.
4497         * debug-mono-symfile.h
4498         (MonoSymbolFileMethodIndexEntry): Removed.
4499         (MonoSymbolFileMethodEntry): New public typedef.
4500         (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
4501         (MonoSymbolFileSourceEntry): Remove everything except `index' and
4502         `data_offset'.
4503         (MonoSymbolFileMethodEntry): Removed.
4504         (MonoSymbolFileLexicalBlockEntry): Removed.
4505         (MonoSymbolFileLineNumberEntry): Removed.
4506         (MonoDebugLexicalBlockEntry): Removed.
4507         (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
4508         removed `num_il_offsets' and `il_offsets'.
4509         (MonoSymbolFile): Replace `version' with `major_version' and
4510         `minor_version'.
4511         (MONO_SYMBOL_FILE_VERSION): Replace with
4512         `MONO_SYMBOL_FILE_MAJOR_VERSION' and
4513         `MONO_SYMBOL_FILE_MINOR_VERSION'.
4515         * debug-mono-symfile.c
4516         (mono_debug_symfile_lookup_location): Add support for the new line
4517         number table format.
4519 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
4521         * metadata.c (free_generic_class): Release the inflated
4522         MonoClass of dynamic generic classes if it's not a generic
4523         type definition.
4525 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
4527         * verify.c: Reapplied more of the reverted changes.
4529 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
4531         * reflection.c (lookup_custom_attr): Clean the cached flag or
4532         nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
4533         for SRE types.
4535 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
4537         * verify.c: Reapplied a small part of the reverted changes.
4539 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
4541         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4543         * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was 
4544         previously in managed code.
4545         (mono_monitor_exit): Ditto.
4546         (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
4548         * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
4549         the managed definition.
4551 2008-06-06 Rodrigo Kumpera  <rkumpera@novell.com>
4553         * verify.c: Revert changes to see if it helps with weird buildbot crashes.
4555 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
4557         * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
4558         
4559         * monitor.c: Add some micro optimizations.
4561         * icall.c (type_from_typename): Handle 'bool'.
4563 2008-06-06 Rodrigo Kumpera  <rkumpera@novell.com>
4565         * verify.c: Implement constructor verification per P III 1.8.1.4.
4566         Fixes #396716.
4568 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
4570         * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
4571         holding the assemblies lock here too.
4573 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
4575         * verify.c: Kill stack_top function.
4577 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
4579         * verify.c: Kill stack_get function.
4581 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
4583         * verify.c (mono_method_verify): Last change broke the build. Fixed.
4585 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
4587         * verify.c (verify_type_compatibility_full): Make SZARRAY checks
4588         more reliable.
4590         * verify.c (mono_method_verify): Inflate params and locals to avoid
4591         mismatch when checking for compatibility.
4593 2008-06-05  Jonathan Chambers  <joncham@gmail.com>
4595         * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
4596         Length prefix should be size in bytes. Fix bug #339530.
4597         
4598         * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
4599         Length prefix should be size in bytes. Fix bug #339530.
4601         Code is contributed under MIT/X11 license.
4603 2008-06-05  Bill Holmes <billholmes54@gmail.com>
4605         * decimal.c:  Adding MSVC implementation to my_g_bit_nth_msf.
4607         Contributed under MIT/X11 license.
4609 2008-06-05  Martin Baulig  <martin@ximian.com>
4611         * mono-debug-debugger.c
4612         (mono_debugger_check_breakpoints): Reflect latest runtime changes.
4614 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
4616         * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
4617         while holding the assemblies lock to prevent deadlocks. Handle the case
4618         where the search hook returns NULL but the assembly was still loaded.
4619         Fixes #323696.
4621         * appdomain.c (set_domain_search_path): Acquire the domain lock since we
4622         modify domain state.
4624 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
4626         * boehm-gc.c: Add DTrace probes gc-{begin,end}.
4627         * Makefile.am (pedump_LDADD): Post-process object files and
4628         add dtrace-generated object file, if necessary.
4630         Code is contributed under MIT/X11 license.
4632 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
4634         * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
4636 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
4638         * class.c (mono_type_get_full): Add a work-around for generic type definitions.
4640 2008-06-04  Mark Probst  <mark.probst@gmail.com>
4642         * threads.c: Try to free everything from the delayed free table
4643         when shutting down threads, and set the variable to NULL after the
4644         table is freed so that calling
4645         mono_thread_hazardous_try_free_all() when shutting down the root
4646         domain doesn't crash.
4648 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
4650         * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
4651         the caller if resulting type was inflated.
4653         * class.c (mono_class_create_from_typespec): Free the MonoType if it
4654         was inflated.
4656         * class.c (mono_type_get_full): Free the MonoType if it was inflated.
4659 2008-06-04  Zoltan Varga  <vargaz@gmail.com>
4661         * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
4662         class library tests.
4664         * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume 
4665         (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
4666         #396989.
4668 2008-06-04  Mark Probst  <mark.probst@gmail.com>
4670         * domain.c, domain-internals.h: The JIT infos are now freed by the
4671         JIT info table code.  They are freed immediately if there only a
4672         single JIT info table in circulation.  If there is more, the free
4673         is delayed via a queue.
4675         * threads.c, threads-types.h: New hazard pointer function for
4676         freeing all freeable delayed items in one sitting.
4678 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
4680         * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
4682         * reflection.c (typebuilder_setup_properties): Same.
4684         * reflection.c (typebuilder_setup_events): Same.
4686 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
4688         * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
4689         and use it for allocating memory.
4691         * reflection.c (mono_marshal_spec_from_builder): Same.
4693         * reflection.c: Change code to use new signatures.
4695         * metadata.c (mono_metadata_type_dup): Add a FIXME note.
4697 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
4699         * decimal.c (rescale128): Put back one line which was accidently commented
4700         out.
4701         
4702         * decimal.c (rescale128): Disable the code added by the last patch, as it seems
4703         to cause crashes.
4705 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
4707         * reflection.c (mono_reflection_generic_class_initialize): Name must
4708         be always malloc'ed so we can free it later on. Do this for field, property
4709         and event.
4711         * metadata.c (free_generic_class): Free field, property and event names.
4713 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
4715         * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
4716         instead of g_memdup.
4718         * reflection.c (typebuilder_setup_fields): Same.
4720 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
4722         * decimal.c (rescale128): Optimize this function a bit more.
4724 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
4726         * metadata.c (free_generic_class): Release some memory from
4727         SRE generic classes.
4729 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
4731         * reflection.c (mono_image_get_generic_field_token): No reference
4732         to name is kept, free it.
4734         * reflection.c (mono_reflection_generic_class_initialize): Free
4735         more memory of the inflated field.
4737 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
4739         * decimal.c (mono_decimalDiv): Moved equality checks here from managed
4740         code.
4742 2008-06-02 Rodrigo Kumpera  <rkumpera@novell.com>
4744         * reflection.c (mono_dynamic_image_free): Release memory used by
4745         MonoDynamicImage::array_methods elements.
4747         * reflection.c (assembly_add_win32_resources): Release memory after
4748         encoding.
4750 2008-06-02  Zoltan Varga  <vargaz@gmail.com>
4752         * decimal.c (log2_32): Use an optimized version for this function too.
4753         
4754         * decimal.c (log2_64): Fix this on 32 bit machines.
4756 2008-06-02 Rodrigo Kumpera  <rkumpera@novell.com>
4758         * class.c (mono_dup_array_type): Implement allocation using a mempool.
4760         * class.c (mono_metadata_signature_deep_dup): Same.
4762         * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
4763         a mempool.
4765         * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
4767         * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
4769         * metadata-internals.h: Added mono_metadata_signature_dup_full.
4771         * class-internals.h: Update signatures to take a MonoMemPool.
4773 2008-06-02  Dick Porter  <dick@ximian.com>
4775         * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage): 
4776         * icall-def.h: Add
4777         System.ComponentModel.Win32Exception.W32ErrorMessage, using the
4778         FormatMessage API to get the error text.  Fixes bug 321827.
4780 2008-06-02  Zoltan Varga  <vargaz@gmail.com>
4782         * decimal.c: Add some micro optimizations to make decimal operations faster.
4784 2008-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
4786         * reflection.c (method_encode_clauses): Take a mempool
4787         as parameter and use it to allocate the clause array.
4789         * reflection.c (mono_image_get_field_on_inst_token): Free
4790         the inflated type after encoding it.
4792         * reflection.c (mono_dynamic_image_free): Free each element
4793         of MonoDynamicImage::gen_params.
4795         * reflection.c (reflection_methodbuilder_to_mono_method):
4796         Allocate the generic param array from the mempool.
4797         Allocate signature params from the mempool.
4799         * reflection.c (mono_reflection_generic_class_initialize):
4800         Free inflated fields after been used.
4802 2008-05-30 Rodrigo Kumpera  <rkumpera@novell.com>
4804         * icall.c: Reapply the memory leak fixes as they no
4805         longer make mono crash.
4807 2008-05-30 Rodrigo Kumpera  <rkumpera@novell.com>
4809         * reflection.c (mono_type_get_object): Don't store the suplied
4810         MonoType with type_hash. A caller which pass a type that
4811         was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
4812         might end with a pointer to freed memory.
4813         The solution is to use byval_arg or this_arg from the associated
4814         MonoClass of the supplied type.
4816 2008-05-29  Zoltan Varga  <vargaz@gmail.com>
4818         * icall.c: Revert the rest of the last change as it breaks the build too.
4820 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
4822         * icall.c: Revert a leak fix as it's breaking the build.
4824 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
4826         * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
4828 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
4830         * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
4832 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
4834         * icall.c: Fix some memory leaks.
4836 2008-05-29  Dick Porter  <dick@ximian.com>
4838         * threadpool.c (mono_thread_pool_remove_socket): Always remove the
4839         async socket operations from the pending list when a socket
4840         closes.  Leaving it until the threadpool services the event
4841         exposes a race condition when a socket descriptor is reused.
4842         Fixes bug 377589.
4844 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
4846         * object.c: Fix negative index check for array alocation.
4848 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
4850         * icall.c, marshal.c: Delegate wrappers should skip visibility.
4851         This check is performed by the verifier for IL created delegates
4852         and by Delegate::CreateDelegate for programatically created ones.
4853         Fixes #372406.
4855 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
4857         * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
4858         Fix code to use mono_array_size_t instead of int.
4860         Based on patch by Luis F. Ortiz.
4861         Contributed under X11 license.
4862         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
4864 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
4866         * icall.c: Added ves_icall_System_Array_GetLongLength and
4867         ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
4868         arrays.
4870         * icall.h: Export both new functions.
4872         Based on patch by Luis F. Ortiz.
4873         Contributed under X11 license.
4874         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
4876 2008-05-28  Martin Baulig  <martin@ximian.com>
4878         The debugger now requires exactly r103463.
4880         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
4881         This version is not supported by the debugger, wait for 72.
4883 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
4885         * object.h: Changed array related functions to use
4886         mono_array_size_t instead of guint32. Forgot to commit this file.
4888         Patch by Luis F. Ortiz.
4889         Contributed under X11 license.
4890         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
4893 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
4895         * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
4896         don't define it. Use the number literal instead.
4898 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
4900         * icall.c: Changed array related functions to use
4901         mono_array_size_t instead of guint32.
4903         * icall.c (ves_icall_System_Array_GetLength): Check for length
4904         overflow under MONO_BIG_ARRAYS.
4906         Based on patch by Luis F. Ortiz.
4907         Contributed under X11 license.
4908         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
4910 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
4912         * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
4914         Based on patch by Luis F. Ortiz.
4915         Contributed under X11 license.
4916         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
4918 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
4920         * object.c, object.h: Changed array related functions to use
4921         mono_array_size_t instead of guint32.
4923         Patch by Luis F. Ortiz.
4924         Contributed under X11 license.
4925         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
4927 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
4929         * object.h: Introduced mono_array_size_t typedef. This must be used
4930         in all places an array length is expected. This is 64bits wide if
4931         MONO_BIG_ARRAYS is enabled.
4933         Patch by Luis F. Ortiz.
4934         Contributed under X11 license.
4935         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
4937 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
4939         * security-manager.c class.c: Set the class exception info by calling
4940         mono_class_set_failure ().
4942         * class.c (mono_class_get_exception_data): New accessor function.
4943         (mono_class_set_failure): Store exception_data in the property hash.
4945         * class-internals.h (struct _MonoClass): Store 'exception_data' outside
4946         the struct as a property.
4948         * loader.c (mono_get_method_full): Store the lookup result for method
4949         tokens in method_cache, the others in methodref_cache to decrease the memory
4950         usage of hash tables.
4952         * image.c (mono_image_close): Destroy method_cache and methodref_cache.
4953         (mono_image_init): method_cache is lazy inited now.
4955         * metadata-internals.h (struct _MonoImage): Change method_cache to
4956         a MonoValueHashTable, add a separate methodref_cache.
4958 2008-05-27  Eyal Alaluf <eyala@mainsoft.com>
4960         * number-formatter.h: Fix tables to avoid arithemtic overflow in
4961           Double.ToString as exposed by Bug #383531.
4963 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
4965         * number-formatter.h: Make some tables static.
4967         * class.c (mono_method_set_generic_container): New accessor function.
4968         (mono_method_get_generic_container): Ditto.
4970         * class-internals.h (struct _MonoMethod): Remove rarely used 
4971         'generic_container' field, store it in the property hash instead. Add 
4972         'is_generic' boolean field instead.
4974         * image.c (mono_image_init): Initialize property_hash.
4975         (mono_image_close): Destroy property_hash.
4977         * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
4978         hold rarely used fields of runtime structures belonging to this image.
4980         * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
4981         to get/set method->generic_container.
4983         * loader.c (mono_get_method_from_token): Avoid loading the method header for
4984         generic methods.
4986 2008-05-25  Zoltan Varga  <vargaz@gmail.com>
4988         * class.c (mono_class_inflate_generic_method_full): Don't increase
4989         mono_stats.inflated_method_count for methods found in the cache.
4991         * threads.c (mono_thread_request_interruption): Add a comment about 
4992         QueueUserAPC ().
4994 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
4996         * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
4997         interface_offsets_packed table.
4998         
4999         * class.c (mono_class_init): Remove some dead code.
5001         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
5002         mono_class_setup_vtable () when CAS is active to detect security problems.
5004 2008-05-23 Rodrigo Kumpera  <rkumpera@novell.com>
5006         * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
5008         * verify.c (mono_delegate_signature_equal): Don't compar number of generic
5009         parameters as it's irrelevant for delegate checking.
5011 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
5013         * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
5015         * class.c (mono_class_init): Control the creation of a generic vtable using
5016         a global which is true by default, but set to false by the runtime startup code.
5017         
5018         * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
5019         Disabled for now since it breaks the embedding API.
5020         Move the setup of class->methods for arrays to mono_class_setup_methods ().
5021         (mono_class_setup_methods): Add a memory barrier.
5023         * object.c (mono_class_create_runtime_vtable): Add code to handle the case
5024         when mono_class_init () doesn't compute the generic vtable.
5025         
5026 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
5027         * profiler.c: Added mono_profiler_install_statistical_call_chain,
5028         mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
5029         to support call chains (backtrace) in the stat profiler.
5030         * profiler.c, profiler-private.h: Likewise.
5032 2008-05-22  Mark Probst  <mark.probst@gmail.com>
5034         * generic-sharing.c: Init generic class when a method of it is
5035         requested via a runtime generic context.
5037 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
5039         * class.c (mono_class_init): Add a comment about trying to avoid calling this.
5041         * reflection.c (mono_type_get_object): Add a FIXME.
5043         * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
5045         * class.c (mono_class_get_method_by_index): New helper function, returning an
5046         entry in the class->methods array.
5048 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
5050         * class.c (mono_class_init): Only do the array optimization for szarrays. 
5051         Avoid creating a generic vtable for generic instances as well.
5052         (mono_class_get_method_from_name_flags): Don't search in the metadata for
5053         generic instances.
5055 2008-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
5057         * loader.c (mono_get_method_constrained): Inflate the signature
5058         with class context. Fix #325283.
5060 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
5062         * object.c (mono_class_create_runtime_vtable): Add a comment.
5064         * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
5065         where needed.
5066         (setup_interface_offsets): Handle the case when this is called twice for arrays.
5067         (mono_class_setup_vtable_general): Add an assert.
5068         (mono_class_init): Avoid creating a generic vtable for arrays.
5070         * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
5071         here, let mono_class_init () do that.
5073         * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
5074         interfaces in mscorlib.
5076         * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
5077         interfaces. Add some comments.
5078         (mono_class_init): Call mono_class_setup_methods () here since it is no
5079         longer called by mono_class_setup_vtable ().
5081         * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
5082         not set in class->vtable.
5083         (mono_class_create_runtime_vtable): Reenable the disabled code.
5085         * object.c (mono_class_create_runtime_vtable): Disable the last change for
5086         now as it causes some test failures.
5088         * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
5089         if using the vtable trampoline. Also remove some strange code which put the
5090         generic methods themselves into the vtable slots. Remove the AOT init_vtable
5091         stuff as it is no longer needed.
5093 2008-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
5095         * pedump.c: Give make --verify all option check code as well.
5096         Using --verify code won't check for metadata now.
5098 2008-05-19  Martin Baulig  <martin@ximian.com>
5100         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
5102         * mono-debug.c
5103         (_mono_debug_using_mono_debugger): New global variable; it's set
5104         directly by the debugger, so mono_debug_using_mono_debugger() also
5105         works after attaching.
5107 2008-05-18 Rodrigo Kumpera  <rkumpera@novell.com>
5109         * object.c (mono_class_create_runtime_vtable): Use memory barriers
5110         as we do double checked locking on MonoClass::runtime_info and
5111         MonoClassRuntimeInfo::domain_vtables.
5113 2008-05-18  Zoltan Varga  <vargaz@gmail.com>
5115         * debug-helpers.c (print_field_value): Fix a warning.
5117 2008-05-16  Zoltan Varga  <vargaz@gmail.com>
5119         * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
5120         set in the AOT case.
5122 2008-05-16 Rodrigo Kumpera  <rkumpera@novell.com>
5124         * class.c (mono_class_setup_vtable_general): Use memory barriers
5125         as we do double checked locking on MonoClass::vtable.
5127 2008-05-16 Rodrigo Kumpera  <rkumpera@novell.com>
5129         * reflection.c (resolve_object): Inflate only if the generic context
5130         is not null. Fixes #389886.
5132 2008-05-15  Jonathan Chambers  <joncham@gmail.com>
5134         * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
5135         instead of g_free.
5137         Code is contributed under MIT/X11 license.
5139 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
5141         * class.c: Revert unrelated change.
5143 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
5145         * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
5146         a generic instantiation, use mono_class_from_mono_type instead of playing
5147         with MonoType directly.
5149 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
5151         * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
5152         checks must ignore generic instantiations, so mono_class_has_parent is not
5153         suitable. Fixes #390128.
5155 2008-05-14  Zoltan Varga  <vargaz@gmail.com>
5157         * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
5158         it to avoid registering tokens during metadata generation. Fixes #390023.
5160 2008-05-14  Kornél Pál  <kornelpal@gmail.com>
5162         * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
5163         consistent.
5165         Contributed under MIT/X11 license.
5167 2008-05-14  Kornél Pál  <kornelpal@gmail.com>
5169         * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
5170         even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
5171         to fixup the EXE image.
5172         (mono_cleanup): Use mono_close_exe_image.
5173         (mono_close_exe_image): New function.
5174         * image.c: Include "marshal.h".
5175         (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
5176         (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
5177         counting when the image is loaded outside of mono_image_open_full. Set status
5178         based on GetLastError.
5179         * coree.c: Include required headers. Add init_from_coree.
5180         (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
5181         mono_assembly_open only when the image has vtfixups. Set init_from_coree.
5182         (_CorExeMain): Set init_from_coree.
5183         (CorExitProcess): Only call ExitProcess for now.
5184         (CorBindToRuntimeEx): New stub implementation.
5185         (CorBindToRuntime): New function.
5186         (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
5187         (MonoFixupExe): ILONLY executables require no fixups.
5188         (mono_set_act_ctx): New function to set activation context.
5189         (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.  
5190         * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
5191         Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
5192         mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
5193         as MONO_INTERNAL.
5194         * domain-internals.h: Add mono_close_exe_image.
5196         Contributed under MIT/X11 license.
5198 2008-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
5200         * metadata.c (mono_metadata_compute_size): Correctly calculate field
5201         size for generic param and event tables. Fixes #388977.
5203 2008-05-13  Zoltan Varga  <vargaz@gmail.com>
5205         * loader.c (mono_method_signature): Use memory barriers because of the double
5206         checked locking pattern.
5208         * threads.c (remove_and_abort_threads): Stop and wait for threads which are
5209         aborting or aborted as well. Fixes #376391.
5210         
5211         * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
5212         existing runtime state in the Suspend handler during shutdown.
5214 2008-05-12  Zoltan Varga  <vargaz@gmail.com>
5216         * threads.c (mono_thread_request_interruption): Add some FIXMEs.
5218         * threads.c (mono_thread_suspend_all_other_threads): Add support for threads 
5219         which are starting up or shutting down.
5221         * threads.c (mono_threads_set_shutting_down): Don't return a value since
5222         this function never returns if the runtime is already shutting down.
5224         * icall.c (ves_icall_System_Environment_Exit): Update after 
5225         mono_threads_set_shutting_down () signature change.
5226         
5227 2008-05-09 Rodrigo Kumpera  <rkumpera@novell.com>
5229         * class.c: Added can_access_instantiation to verify if the instantiation
5230         is visible. Fix access check for nested types as they returned TRUE
5231         before doing type and generic instantiation visibility checks.
5233 2008-05-08 Rodrigo Kumpera  <rkumpera@novell.com>
5235         * reflection.c (mono_reflection_create_generic_class): The created type
5236         must have a different container from its TypeBuilder. Otherwise they
5237         will end sharing generic arguments, which is wrong.
5239         Due to the sharing, making a generic instance of the created type using
5240         the TypeBuider generic arguments resulted in the generic type definition
5241         been returned, which is wrong as well.
5243         As a bonus the code was leaking the type_params array. This memory should
5244         be allocated from the image mempool.
5246         This fixes bug #354047.
5248 2008-05-08 Rodrigo Kumpera  <rkumpera@novell.com>
5250         * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
5251         to here         as they are now used in assembly.c new code.
5252         Added a skipverification flag to MonoAssembly.
5253         New internal function mono_assembly_has_skip_verification.
5255         * assembly.c: New function mono_assembly_has_skip_verification. It checks
5256         if an assembly has a version 2.0 SkipVerification security attribute. Fixes
5257         part of #387274.
5259 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
5261         * object.c (mono_object_get_virtual_method): Inflate the resulting method if
5262         needed. Fixes #387034.
5264         * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
5266 2008-05-06  Miguel de Icaza  <miguel@novell.com>
5268         * assembly.c (mono_assembly_load_reference): Prevent crash while
5269         disassembling Silverlight 2.0 executables while we still do not
5270         have GACed libraries.
5272 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
5274         * reflection.c: Special case generic type definitions as well. Fixes #383444.
5276 2008-05-06  Zoltan Varga  <vargaz@gmail.com>
5278         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
5279         of the dynamic case. Fixes #387404.
5281 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
5283         *verify.c (mono_verifier_is_class_full_trust): If under
5284         verify_all and the verifier mode was not set, only
5285         gac and corlib types are fulltrust. This makes --verify-all
5286         usable to detect unverifiable code, which is the expected
5287         use case.
5289 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
5291         * verify.h: Ops, commited the header with debug
5292         enabled.
5294 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
5296         * verify.c (merge_stack): Use the new value on unverifiable
5297         stack merges.
5299         * verify.c (verify_type_compatibility_full): Comparison
5300         of nullable types can't use mono_class_is_assignable_from.
5302         * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
5303         that makes all verification errors be reported.
5305         * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
5306         mono_method_verify.
5308 2008-05-05  Robert Jordan  <robertj@gmx.net>
5310         * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
5311         support for value types. See #386415.
5313         * object.c: comments.
5315         Code is contributed under MIT/X11 license.
5317 2008-05-05  Martin Baulig  <martin@ximian.com>
5319         * debug-mono-symfile.h
5320         (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
5321         for old pre-terrania symbol files.
5323 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5325         * mono-config.c: Add ppc64 architecture.
5327         Code is contributed under MIT/X11 license.
5329 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5331         * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
5332           PPC64 uses function descriptors as well.
5334         Code is contributed under MIT/X11 license.
5336 2008-05-04  Zoltan Varga  <vargaz@gmail.com>
5338         * object.c (compute_class_bitmap): Ignore literal static fields.
5340         * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
5341         var has an invalid format.
5342         (describe_ptr): Add some sanity checks for the vtable.
5343         (add_nursery_frag): Clear unused nursery fragments.
5344         (major_collection): Clear all remaining nursery fragments.
5346 2008-05-03  Robert Jordan  <robertj@gmx.net>
5348         * image.c, metadata-internals.h: add thunk_invoke_cache.
5350         * marshal.c, marshal.h: implement
5351         mono_marshal_get_thunk_invoke_wrapper ().
5353         * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
5355         Code is contributed under MIT/X11 license.
5357 2008-05-02 Rodrigo Kumpera  <rkumpera@novell.com>
5359         * verify.c (do_leave): Empty the stack.
5361 2008-05-02 Rodrigo Kumpera  <rkumpera@novell.com>
5363         * class.c (mono_class_is_assignable_from): Variance
5364         doesn't work between reference and value types. For example,
5365         given type C<T+>, C<int32> is not assignable to C<object>.
5366         Break the argument checking loop on first error. 
5368 2008-05-02  Atsushi Enomoto  <atsushi@ximian.com>
5370         * icall.c : base64_to_byte_array() needs some more strict
5371           check for sequence of '=' characters. Patch by Santa
5372           Marta (http://deee.g.hatena.ne.jp/santamarta).
5374           Contributed under MIT/X11 license.
5375           (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
5377 2008-05-02  Jonathan Chambers  <joncham@gmail.com>
5379         * domain.c: Disable LoadLibrary support to fix Win32 build.
5381         Code is contributed under MIT/X11 license.
5383 2008-05-02  Zoltan Varga  <vargaz@gmail.com>
5385         * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
5386         to help with cache behaviour.
5388 2008-05-01  Miguel de Icaza  <miguel@novell.com>
5390         * appdomain.c (mono_domain_from_appdomain): Add new accessor
5391         method. 
5393 2008-05-01  Zoltan Varga  <vargaz@gmail.com>
5395         * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
5397 2008-05-01  Dick Porter  <dick@ximian.com>
5399         * process.c (process_get_fileversion): Only pass 16 bits of
5400         language ID to VerLanguageName.  Fixes bug 381204.
5402 2008-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
5404         * verify.c (mono_method_verify): Fix the comparison
5405         operator for code bounds check.
5407 2008-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
5409         * verify.c (mono_method_verify): Check the bounds of
5410         all access of the code array.
5412 2008-04-29  Kornél Pál  <kornelpal@gmail.com>
5414         * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
5416 2008-04-28  Zoltan Varga  <vargaz@gmail.com>
5418         * image.c (mono_image_strong_name_position): Fix return value when the rva is
5419         not valid.
5421 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
5423         * loader.c (mono_get_method_from_token, mono_method_signature): Add
5424         support for METHOD_IMPL_ATTRIBUTE_NATIVE.
5425         * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
5426         fixup main EXE images when using mono.exe for mixed-mode assembly support.
5427         * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
5428         mono_runtime_load.
5429         * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
5430         runtime initialization from metadata.
5431         * assembly.c: Remove obsolete ceGetModuleFileNameA.
5432         (mono_set_rootdir): Use mono_get_module_file_name.
5433         (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
5434         handles.
5435         * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
5436         * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
5437         * image.c (mono_cli_rva_image_map): Use MonoImage instead of
5438         MonoCLIImageInfo. Add support for module handles.
5439         (load_cli_header): Update mono_cli_rva_image_map signature.
5440         (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
5441         (mono_image_strong_name_position): Use mono_cli_rva_image_map.
5442         (mono_image_rva_map): Add support for module handles.
5443         (mono_image_ensure_section_idx): Add support for module handles.
5444         (mono_image_close): Add support for module handles.
5445         (do_load_header): Add support for module handles.
5446         (mono_image_open_from_module_handle): New function for internal use.
5447         (mono_image_open_full): Load normal images using LoadLibrary on Windows.
5448         (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
5449         (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
5450         handles.
5451         (mono_image_fixup_vtable): New function for mixed-mode assembly support.
5452         * image.h: Add mono_image_fixup_vtable.
5453         * coree.c: New file for mscoree.dll functions and mixed-mode assembly
5454         support.
5455         * coree.h: New file.
5456         * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
5457         unsupported native code.
5458         (mono_marshal_set_callconv_from_modopt): New function splitted from
5459         mono_marshal_get_managed_wrapper.
5460         (mono_marshal_get_managed_wrapper): Use
5461         mono_marshal_set_callconv_from_modopt.
5462         (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
5463         * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
5464         * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
5465         that results in a deadlock when the runtime is loaded in _CorDllMain.
5466         * Makefile.am: Add coree.c and coree.h.
5468         Contributed under MIT/X11 license.
5470 2008-04-28  Mark Probst  <mark.probst@gmail.com>
5472         * generic-sharing.c: Search for type arguments in array element
5473         types as well.
5475 2008-04-28  Mark Probst  <mark.probst@gmail.com>
5477         * class-internals.h, generic-sharing.c: New, small runtime generic context.
5479         * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
5481         * object.c: Don't setup the RGCTX when the vtable is created,
5482         because we're setting it up lazily now.
5484 2008-04-26  Zoltan Varga  <vargaz@gmail.com>
5486         * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix 
5487         64 bit support.
5489 2008-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
5491         * verify.c (verify_class_for_overlapping_reference_fields): 
5492         If class is under fulltrust allow reference types to overllap
5493         if they have the same RVA.
5495 2008-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
5497         * pedump.c: Added new flag valid-only, that makes the verifier
5498         behaves just like --security=validil. It won't fail type load
5499         due to unverifiable restrictions.
5501 2008-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
5503         * class-internals.h (struct MonoMethod): Added a verification_success
5504         field to cache verifier executions. Reduced MonoMethod:slot size by
5505         one bit.
5507 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
5509         * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
5510         instead of a 'vt' argument to save an indirection and to allow these to be used
5511         for valuetypes.
5512         (scan_vtype): New helper function to scan an area using a gc descriptor.
5513         (mono_gc_wbarrier_value_copy): Implement this.
5514         (handle_remset): Add support for REMSET_VTYPE.
5515         (find_in_remset_loc): Ditto.
5516         (mono_gc_base_init): Allow some debugging options to be controlled through the
5517         use of the MONO_GC_DEBUG env variable.
5518         (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
5519         (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
5521 2008-04-23  Martin Baulig  <martin@ximian.com>
5523         * domain.c (mono_domain_create): Move the call to
5524         mono_debug_domain_create() down, after allocating the domain id.
5526 2008-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
5528         verify.c (verify_class_for_overlapping_reference_fields): Skip
5529         static fields while verifying for overlapping fields as they
5530         don't matter at all.
5532 2008-04-23  Marek Habersack  <mhabersack@novell.com>
5534         * domain-internals.h: added a declaration of
5535         mono_make_shadow_copy.
5537         * assembly.c (mono_assembly_open_full): shadow copying of
5538         assemblies moved to here, so that all the assemblies within the
5539         application domain's private binary directories can be
5540         processed. Fixes bug #380546
5542         * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
5543         mono_make_shadow_copy and made non-static. The decision whether
5544         to shadow-copy an assembly is made based on its location - it's
5545         copied if it's in one of the private application domain binary
5546         directories and its different to the target file in the shadow
5547         directory. Fixes bug #380546
5549 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
5551         * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
5553         * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
5554         types.
5556         * reflection.c (mono_image_create_token): Handle 
5557         Method/ConstructorOnTypeBuilderInst.
5558         (resolve_object): Ditto.
5559         (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
5560         so it can be called from resolve_object. Also handle the case when the inflated
5561         class already has its methods setup.
5563 2008-04-21  Martin Baulig  <martin@ximian.com>
5565         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
5567 2008-04-20  Geoff Norton  <gnorton@novell.com>
5569         * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
5570         pointer dereference.
5572 2008-04-15  Marek Habersack  <mhabersack@novell.com>
5574         * appdomain.c (try_load_from): if IOMAP is in effect, call the
5575         portability API to look up the assembly file. Fixes behavior in
5576         situations when the application has a bin/ directory, but the
5577         assembly search patch refers to Bin/ (and thus the requested file
5578         name is Bin/SomeLibrary.dll). Fixes bug #379888
5580 2008-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
5582         verify.c (mono_type_is_generic_argument): Extracted this check
5583         from a dozen places to here.
5585         verify.c: Fixed all issues related to boxing generic arguments
5586         and their constraints.
5588 2008-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
5590         verify.c (mono_class_interface_implements_interface): Fix win32 build.
5592 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
5594         * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
5595         isn't finished yet. Fixes #363447.
5597 2008-04-13  Zoltan Varga  <vargaz@gmail.com>
5599         * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
5600         Fixes #346419.
5602 2008-04-13  Jb Evain  <jbevain@novell.com>
5604         * domain.c: update the 2.1 profile versions.
5605         Merged from the Moonlight 2 branch.
5607 2008-04-12  Zoltan Varga  <vargaz@gmail.com>
5609         * assembly.c (mono_assembly_load_from_full): Do the check for loading other
5610         mscorlibs for the non-refonly case as well.
5612         * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
5613         in mono_assembly_load_from_full (). Fixes #378924.
5615 2008-04-11  Geoff Norton  <gnorton@novell.com>
5617         * icall.c: The global extern environ doesn't exist on Mac.  We
5618         need to call NSGetEnviron instead.
5620 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
5622         verify.c: Add generic method constraint verification.
5624 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
5626         class.c (mono_class_inflate_generic_method_full): Add a long
5627         explanation to the is_mb_open hack. Remove the FIXME.
5629 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
5631         * verify.c (mono_method_verify): Mark all unknown opcodes
5632         as invalid. Mark jmp as unverifiable.
5634 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
5636         * verify.c: Add code to do type constraint verification on class instances.
5638         * verify.c (mono_verifier_verify_class): Use the type constraint 
5639         verification code.
5641 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
5643         * class.c (mono_class_get_field_default_value): Don't pass cindex
5644         as hint to mono_metadata_get_constant_index. The local is not initialized
5645         and should contain garbage most of the time. This could only work
5646         with a lot of luck.
5648 2008-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
5650         * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
5652 2008-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
5654         * class-internals.h: Add generic_param_token to MonoClass::sizes union.
5656         * class.c (mono_class_from_generic_parameter): Save the token of the
5657         generic param in MonoClass::sizes.generic_param_token.
5659         * reflection.c (mono_custom_attrs_from_class): If the class type is
5660         VAR or MVAR retrieve the attributes of the generic param.
5662 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
5664         * class.c (mono_class_init): Do class verification if the verifier
5665         is enabled.
5667 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
5669         * verify-internal.h: Added mono_verifier_verify_class.
5671         * verify.c: Added mono_verifier_verify_class. It checks for
5672         classes with explicit layout that have overlapping reference fields.
5674         * pedump.c: Init the verifier state prior to verification. Fixed
5675         command line arguments.
5677 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
5679         * Makefile.am: Added verify-internals.h, hopefully fix the build.
5681 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
5683         * verify-internals.h: Fix a warning.
5685 2008-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
5687         * verify-internals.h: New header with the verifier configuration
5688         extracted from mini.c.
5690         * verify.c: Implemented the new functions exported by verify-internals.h.
5692 2008-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
5694         * verify.c: Add proper verification of ckfinite.
5696 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
5698         * verify.c (do_conversion): Improved error message to something
5699         more meanfull.
5701         * verify.c (check_is_valid_type_for_field_ops): Fix to work
5702         with primitive types.
5704 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
5706         * verify.c: Added tail prefix checking. Marked icall
5707         as unverifible.
5709 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
5711         * verify.c: Fix the detection of branches to the middle
5712         of an instruction.
5714 2008-04-03 Rodrigo Kumpera  <rkumpera@novell.com>
5716         * verify.c: Implemented verification of volatile. and
5717         unaligned. prefix. Check if a type is valid after retrieving it.
5719 2008-04-01  Dick Porter  <dick@ximian.com>
5721         * process.c (process_get_fileversion): If there's no string block,
5722         set the file language to en_US.  Fixes the other new part of bug
5723         374600.
5725 2008-03-29 Rodrigo Kumpera  <rkumpera@novell.com>
5727         * class.c: New functions mono_method_can_access_field_full and
5728         mono_method_can_access_method_full. They perform type visibility
5729         and type site check.
5731         * class-internal.h: Added exported functions.
5733         * verify.c: Use new functions to implement proper visibility checks.
5735 2008-03-29  Zoltan Varga  <vargaz@gmail.com>
5737         * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
5739 2008-03-28  Dick Porter  <dick@ximian.com>
5741         * process.c (process_get_fileversion): Use the first language ID
5742         we see, rather than insisting on an invariant language.  Fixes bug
5743         374600.
5745 2008-03-28  Zoltan Varga  <vargaz@gmail.com>
5747         * reflection.c (calc_section_size): Use add_stream_zero to align the size of
5748         the streams to fix reading of invalid memory later.
5750         * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
5751         to ease debugging.
5753 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
5755         * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
5756         (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
5758 2008-03-26  Massimiliano Mantione  <massi@ximian.com>
5759         * threads.h: Added MonoThreadManageCallback type and
5760         mono_thread_set_manage_callback prototype
5761         * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
5762         (used to store the mono_thread_manage callback).
5763         * threads.c: Added mono_thread_set_manage_callback, and handle
5764         "MonoThread->manage_callback" in build_wait_tids.
5766 2008-03-26  Dick Porter  <dick@ximian.com>
5768         * process.c (process_get_fileversion): Set FileVersionInfo strings
5769         to Empty when the resource doesn't have the particular info.
5770         Fixes bug 355717.
5772 2008-03-25 Rodrigo Kumpera  <rkumpera@novell.com>
5774         * verify.c (mono_method_verify): Proper prefix validation.
5776 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
5778         * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
5779         itself in a separate argument instead of throwing them. Fixes #373448.
5781         * appdomain.c: Bump corlib version.
5783 2008-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
5785         * verify.c: Implemented readonly prefix and verify controled mutability pointers.
5787 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
5789         * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
5790         version macros.
5792 2008-03-20  Mark Probst  <mark.probst@gmail.com>
5794         * generic-sharing.c, class-internals.h: Code for putting
5795         reflection types into the runtime generic context.
5797 2008-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
5799         * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
5800         Fixes #340662. 
5803 2008-03-17 Rodrigo Kumpera  <rkumpera@novell.com>
5805         * verify.c (VerifyContext): Added instruction prefix data to the struct.
5807         * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
5809         * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
5811         * verify.c (do_cast): Let the result value keep the boxed status.
5813         * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
5815 2008-03-17  Jb Evain  <jbevain@novell.com>
5817         * reflection.c: when running on a 2.0 runtime, emit
5818         unconditionally the #~ header version as 2.0, and the
5819         CLI header version as 2.5, for symmetry's sake with csc.
5821 2008-03-16  Zoltan Varga  <vargaz@gmail.com>
5823         * class.c: Remove the unused cache_interface_offsets stuff.
5825         * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
5826         profiler.c: Fix warnings.
5828 2008-03-16  Mark Probst  <mark.probst@gmail.com>
5830         * generic-sharing.c, class-internals.h: Support for putting
5831         methods into the runtime generic context.
5833 2008-03-16  Zoltan Varga  <vargaz@gmail.com>
5835         * class.c (mono_class_setup_fields): Ignore calls made to this function for
5836         classes which are generic instances of not-yet finished typebuilders. Fixes
5837         #351172.
5839         * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
5841 2008-03-15  Zoltan Varga  <vargaz@gmail.com>
5843         * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
5845         * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
5846         field, replace it with a hash table in MonoDynamicImage.
5848         * reflection.c (inflate_mono_method): Access the generic definition object from
5849         image->generic_def_objects instead of imethod->reflection_info.
5851         * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto. 
5853         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
5854         
5855         * image.c (mono_image_close): Move the dynamic image freeing code to a separate
5856         function in reflection.c so it is easier to keep in sync with the dynamic image
5857         creation code.
5859         * reflection.c (mono_dynamic_image_free): New internal function, extracted from
5860         mono_image_close ().
5862 2008-03-15  Mark Probst  <mark.probst@gmail.com>
5864         * class.c (mono_class_generic_sharing_enabled): Disable generic
5865         sharing for all architectures except AMD64 and x86 to fix build.
5867 2008-03-14 Rodrigo Kumpera  <rkumpera@novell.com>
5869         * verify.c: Use the generic definition MonoGenericContext when available.
5870         Remove code for checking generics instance compatibility in favor of
5871         mono_class_is_assignable_from.
5873 2008-03-14  Mark Probst  <mark.probst@gmail.com>
5875         * marshal.c, marshal.h, metadata-internals.h, image.c,
5876         wrapper-types.h: New wrapper for invoking a shared static method
5877         without having to pass the runtime generic context argument.
5879 2008-03-14 Rodrigo Kumpera  <rkumpera@novell.com>
5881         * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
5883 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
5885         * reflection.c (mono_image_get_field_on_inst_token): Add caching.
5886         
5887         * reflection.c (mono_image_get_field_on_inst_token): New helper function to
5888         create a token from a FieldOnTypeBuilderInst.
5889         (mono_image_create_token): Handle FieldOnTypeBuilderInst.
5890         (resolve_object): Ditto.
5892         * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
5893         mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
5895 2008-03-14  Martin Baulig  <martin@ximian.com>
5897         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
5899         * debug-mono-symfile.h
5900         (MONO_SYMBOL_FILE_VERSION): Bump to 41.
5901         (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
5903 2008-03-10  Martin Baulig  <martin@ximian.com>
5905         * debug-mono-symfile.h
5906         (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
5907         `lexical_block_table_offset'.
5908         (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
5909         `lexical_blocks'.
5910         (MonoSymbolFile): Added `version'.
5912         * mono-debug.h
5913         (MonoDebugLexicalBlockEntry): Removed.
5914         (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
5915         `lexical_blocks'.
5917         * mono-debug.c (mono_debug_add_method): Don't compute lexical
5918         blocks here; the debugger now does this internally.
5920 2008-02-27  Martin Baulig  <martin@ximian.com>
5922         * object.c (mono_runtime_exec_main): Call
5923         `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
5924         `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
5926 2008-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
5928         * verify.c (verify_type_compatibility_full): Allow native int to be converted
5929         to native pointer in non-strict mode. Required to "(IntPtr)null" work.
5931 2008-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
5933         * verify.c (verify_ldftn_delegate): Accept a sealed type when using
5934         ldftn with a virtual method.
5936 2008-03-13  Geoff Norton  <gnorton@novell.com>
5938         * decimal.c:  Only include memory.h if the platform has it.
5940 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
5942         * assembly.c, class.c, metadata-internals.h: make sure public key
5943         tokesns are compared in a case-insensitive way. Also, all
5944         the lookups in the GAC use a lowercase public key token
5945         (gaacutil already does the lowercasing on install). Fixes
5946         bug #369541.
5948 2008-03-11 Rodrigo Kumpera  <rkumpera@novell.com>
5950         * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
5951         and return value.
5953 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
5955         * image.c: when someone loads a mscorlib from a file, return the
5956         currently loaded mscorlib (fixes bug #369253).
5958 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
5960         * class.c: handle types with no parents by forcing them to have
5961         System.Object as a parent and marking them as broken (this currently
5962         allows the first part of bug #369173 to work as well, likely because
5963         we don't check for typeload exceptions everywhere yet).
5965 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
5967         * class.c: more complete check that types belong to corlib
5968         (fixes second part of bug #369173).
5970 2007-03-10  Bill Holmes  <billholmes54@gmail.com>
5972         * generic-sharing.c:  Including glib.h for the MSVC builds to define
5973           "inline" to "__inline" before including mono-membar.h.
5974           
5975         * mono-perfcounters.c:  Adding HAVE_SYS_TIME_H check for MSVC builds.
5976           Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for 
5977           MSVC builds.
5979         Contributed under MIT/X11 license.
5981 2008-03-10 Rodrigo Kumpera  <rkumpera@novell.com>
5983         * verify.c (do_invoke_method): Remove return type validation.
5985         * verify.c (do_ret): Do return type validation at return site instead of
5986         call site.
5988 2008-03-10 Rodrigo Kumpera  <rkumpera@novell.com>
5990         * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
5992         * verify.c: Some todos cleaned and improved a few error messages.
5994 2008-03-08  Zoltan Varga  <vargaz@gmail.com>
5996         * class.c (mono_class_setup_mono_type): Improve the test for corlib.
5998 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
6000         * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
6001         system types correctly.
6003         * exception.h exception.c (mono_exception_from_token_two_strings): New helper
6004         function.
6006 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
6008         * assembly.c (build_assembly_name): Fix a warning.
6010 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
6012         * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
6013         the called function takes an object type argument. Fixes storing or
6014         valuetypes across remoting as well as reducing memory usage.
6015         * image.c, metadata-internals.h: remove now unused ldfld_remote and
6016         stfld_remote wrapper caches.
6018 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
6020         * icall.c (mono_lookup_internal_call): Update the exception message when an icall
6021         is not found.
6023         * reflection.c (mono_image_register_token): New helper function to save
6024         a token->object mapping.        
6026         * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
6027         managed code.
6029         * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
6030         one dimension arrays. Fixes #367670.
6031         (mono_reflection_get_type_internal): Ditto.
6033 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
6035         * marshal.c: mono_load_remote_field_new() always returns object.
6036         so use the proper signature (fixes bug #366445).
6038 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
6039         
6040         * class-internals.h (MonoMethod): Remove unused uses_this flag, 
6041         add an 'inline_failure' flag instead.
6043 2008-03-04  Mark Probst  <mark.probst@gmail.com>
6045         * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
6046         with a new structure, MonoGenericJitInfo, in the MonoJitInfo.  It
6047         contains the location of "this", used for exception handling.
6049 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
6051         * class.c (mono_class_layout_fields): Set the min alignment of small structs to
6052         their size on all platforms for perf reasons.
6054 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
6056         * reflection.h: Move mono_reflection_is_valid_dynamic_token to
6057         object-internal.h
6059         * object-internal.h: Same.
6061 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
6063         * reflection.h: Fix the build I just broke.
6065 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
6067         * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
6068         Test if a token is valid, this remove explicit usage of 
6069         MonoDynamicImage::tokens from the verifier code.
6071         * reflection.h: Added mono_reflection_is_valid_dynamic_token.
6073         * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
6074         instead of direct access to MonoDynamicImage::tokens.
6076 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
6078         * verify.c (token_bounds_check): Fix the build I just broke.
6080 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
6082         * verify.c (token_bounds_check): Fix bounds check for dynamic images.
6084         * verify.c (verifier_load_method): Fixed the errors message.
6086         * verify.c (mono_method_verify): Fixed a debug message.
6088 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
6090         * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
6091         mono-perfcounters.h, class-internals.h: support for predefined
6092         writable counters, query of categories and counters, bugfixes.
6094 2008-02-28 Rodrigo Kumpera  <rkumpera@novell.com>
6096         * verify.c (do_refanytype): Verify the refanytype opcode.
6098         * verify.c (mono_method_verify): Use do_refanytype.
6100 2008-02-28 Rodrigo Kumpera  <rkumpera@novell.com>
6102         * verify.c (do_mkrefany): Verify the mkrefany opcode.
6104         * verify.c (mono_method_verify): Use do_mkrefany.
6106 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
6108         * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
6109         mono-perfcounters.c, mono-perfcounters.h: basic performance counter
6110         implementation.
6112 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
6114         * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
6115         the type load exception.
6117 2008-02-27 Rodrigo Kumpera  <rkumpera@novell.com>
6119         * verify.c: Added a few FIXME for method signatures
6121         * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
6122         of mono_method_get_signature and get vararg call working. Removed unused
6123         checks for return value.
6125         * verify.c (do_refanyval): Verify the refanyval opcode.
6127         * verify.c (mono_method_verify): Implemented verification of arglist and
6128         use do_refanyval.
6130 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
6132         * class.c (mono_class_setup_methods): Move the check for synchronized methods on
6133         vtypes to marshal.c.
6135         * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
6136         it works for AOT as well.
6138 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
6140         * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
6141         with mono_msec_ticks () which is monotonic and doesn't cause bugs when
6142         the system time is adjusted.
6144 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
6146         * icall.c, icall-def.h: use the new time functions (fixes the
6147         non-monotonic behaviour of TickCount).
6149 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
6151         * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
6152         it breaks the build.
6153         
6154         * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
6155         cattr is not finished yet.
6157 2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>
6159         * verify.c: Proper token validation for field, method and type.
6161 2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>
6163         * loader.c (field_from_memberref): Generate a loader error if the type is not found.
6165         * loader.c (method_from_memberref): Generate type load error instead of method missing
6166         if the type is not found.
6168 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
6170         * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
6171         some of the conversions caused the generation of a marshal directive exception.
6173 2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>
6175         verify.c: Report which exception should be thrown by the JIT.
6176         Added a lot of FIXME notes.
6178 2008-02-22  Mark Probst  <mark.probst@gmail.com>
6180         * generic-sharing.c: Runtime generic context slots are not
6181         instantiated on init anymore.  Instead, provide function to do the
6182         instantiating on demand.
6184         * class-internals.h: Added vtable to runtime generic context.
6185         Macros for encoding direct and indirect slot offsets in one
6186         guint32.
6188 2008-02-21  Mark Probst  <mark.probst@gmail.com>
6190         * object.c, generic-sharing.c: Moved some generic sharing code
6191         from object.c to generic-sharing.c.
6193         * generic-sharing.c: Added support for extensible runtime generic
6194         context.
6196         * metadata-internals.h: Two new hash tables in MonoImage for
6197         extensible runtime generic context support.
6199         * domain.c: Unregister generic vtables upon domain unloading.
6201         * image.c: Destroy new hash tables upon image unloading.
6203         * metadata.c: Unregister generic subclasses upon image unloading.
6205         * class-internals.h: New data structure for runtime generic
6206         context template.  New fields in the runtime generic context for
6207         extensible part.
6209         * Makefile.am: Added generic-sharing.c.
6211 2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>
6213         icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
6214         there is a pending loader exception, raise it.
6216         icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
6217         same.
6219         icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): 
6220         same.
6222         Fixes #363450.
6224 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
6226         * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
6228         * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
6229         
6230         * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
6231         ref-only requests for compatibility with MS.
6233 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
6235         * reflection.c (mono_custom_attrs_from_method): Don't silently
6236         return an empty list for generic method instances.
6237         (mono_custom_attrs_from_param): Likewise.
6239 2008-02-20  Rodrigo Kumpera  <rkumpera@novell.com>
6240             Raja R Harinath  <harinath@hurrynot.org>
6242         Fix #354757
6243         * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
6244         * class.c (mono_class_inflate_generic_method_full): Initialize it
6245         when a fully-open method is instantiated.
6246         * metadata.c (inflated_method_equal, inflated_method_hash): Update
6247         to new field.
6248         * reflection.c (inflate_mono_method): Don't create a temporary context.
6250 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
6252         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
6253         Compute correct value, to prepare for imethod->reflection_info going away.
6255 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
6257         * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
6259 2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
6261         * verify.c: Implement skip visibility flag.
6263 2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
6265         * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
6266         which contains an extra field to tell the kind of exception that should be thrown.
6268         * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
6270 2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
6272         * loader.c (mono_method_get_param_names): Initialize 'klass' after
6273         'method' is updated.
6275 2008-02-11  Zoltan Varga  <vargaz@gmail.com>
6277         * class.c (mono_class_layout_fields): Set class->min_align for classes using
6278         explicit layout as well. Fixes #360375.
6280 2008-02-11  Geoff Norton  <gnorton@novell.com>
6282         * loader.c: Guard and dereference against inflated generic methods
6284 2008-02-10  Gert Driesen  <drieseng@users.sourceforge.net>
6286         * class.c: Include Retargetable spec in assembly name.
6287         * assembly.c: Always include PublicKeyToken spec in assembly name
6288         (with value "null" if assembly is not signed), and include
6289         Retargetable spec.
6290         * icall-def.h: Added icall for Assembly.get_fullname.
6291         * icall.c: Added icall returning the fullname of an assembly.
6293 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
6295         * class.c (mono_class_setup_vtable_general): Add a missing call to
6296         mono_class_setup_methods () which is needed in the AOT case.
6298 2008-02-08 Rodrigo Kumpera  <rkumpera@novell.com>
6300         * verify.c (mono_type_get_stack_name): Added. Return the name for the
6301         stack type of the given MonoType.
6303         * verify.c (verify_type_compatibility_full): Handle the void type.
6305         * verify.c (is_compatible_boxed_valuetype): Changed to fit the
6306         way stack merging works.
6308         * verify.c (store_local): Improved verification message.
6310         * verify.c (do_branch_op): If the merging is invalid, the method
6311         is unverifiable and not invalid. Improved error message.
6313         * verify.c (merge_stacks): Properly merge a boxed valuetype and
6314         a reference type diferent than System.Object. Improved error
6315         message.
6317 2008-02-07 Rodrigo Kumpera  <rkumpera@novell.com>
6319         * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
6321         * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
6322         type of an enum even if the argument is byref.
6324         * verify.c: Replace all explicit uses of enumtype and enum_basetype
6325         to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
6327         * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
6329         *verify.c (verify_type_compatibility_full): Make enum types
6330         compatible with their base types.
6332         * verify.c (is_compatible_boxed_valuetype): Added. Check if both
6333         types are compatible for the special case of a boxed valuetype and
6334         System.Object.
6336         * verify.c (verify_stack_type_compatibility): The function
6337         is_compatible_boxed_valuetype was extracted from here.
6339         * verify.c (push_arg): Only set ctx->has_this_store if the method
6340         is not static.
6342         * verify.c (do_ldelem): Fixed a typo in an error message and added
6343         strict check for mixing int32 and native int as the array type
6344         and ldelem type.
6346         * verify.c (merge_stacks): Consider boxed valuetypes in the
6347         compatibility checks.
6349 2008-02-07  Massimiliano Mantione  <massi@ximian.com>
6350         * profiler.h: (MonoGCEvent): Added start-stop the world events.
6352 2008-02-06  Massimiliano Mantione  <massi@ximian.com>
6353         *class.c: use_new_interface_vtable_code: renamed the env var to have
6354         a "MONO_" prefix, and fix the logic to enable it by default.
6356 2008-02-06  Massimiliano Mantione  <massi@ximian.com>
6357         *class.c:
6358         mono_class_setup_vtable_general: rewrote the way in which interface
6359         methods are added to vtables. Makes bug-77127.exe pass, and hopefully
6360         makes the code more maintainable.
6361         For now the old code is still there, and can be activated setting
6362         the env var "USE_NEW_INTERFACE_VTABLE_CODE".
6364 2008-02-06 Rodrigo Kumpera  <rkumpera@novell.com>
6366         * verify.c: guarded some debug functions around and #ifdef.
6368         * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
6370 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
6372         * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
6373         changes for now since they seem to break too many things.
6375 2008-02-05  Mark Probst  <mark.probst@gmail.com>
6377         * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
6378         mono_marshal_find_nonzero_bit_offset): Added macro and function
6379         for finding the byte- and bit-offset of a bitfield within a
6380         struct.
6382 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
6384         * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
6385         (mono_marshal_get_struct_to_ptr): Ditto.
6387         * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of 
6388         cctor_signature.
6390 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
6392         * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
6393         between methods for non-corlib types.
6395 2008-02-02  Geoff Norton  <gnorton@novell.com>
6397         * loader.c (mono_method_get_param_names): Populate the parameter name for 
6398         generic parameters as well. (Fixes #342536)
6400 2008-01-31 Rodrigo Kumpera  <rkumpera@novell.com>
6402         * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
6404         * verify.c (do_invoke_method): Fix for calling with byref structs.
6406         * verify.c (do_cast): push a boxed value type based on the type token and not
6407         the type of stack.
6409 2008-01-31  William Holmes  <billholmes54@gmail.com>
6411         * process.c (process_module_string_read): Check the size returned form 
6412           VerQueryValue to avoid out of memory exception. 
6414 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
6416         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
6417         Handle properly modules which are not in the moduleref table. Fixes
6418         #356938.
6420 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
6422         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
6423         the dynamic case which is now in managed code.
6424         (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
6426         * marshal.c (mono_string_to_bstr): Fix a warning.
6427         (init_com_provider_ms): Ditto.
6429         * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
6431         * exception.c (mono_get_exception_out_of_memory): New helper function.
6433 2008-01-28  Jonathan Chambers  <joncham@gmail.com>
6435         * marshal.c: Add support for BSTR marshalling
6436         using other COM systems.
6438         Code is contributed under MIT/X11 license.
6440 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
6442         * object.c (mono_runtime_invoke_array): reverted previous
6443         commit as it breaks the build.
6445 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
6447         * object.c (mono_runtime_invoke_array): Verify arguments for
6448         invalid types. Fixes #348522.
6450 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
6452         * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
6453         non-final virtual calls using call. 
6455         * verify.c (do_invoke): fixed some TODOs.
6457         * verify.c (push_arg): set has_this_store for "ldarga 0".
6459 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
6461         * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
6462         which belong to an inflated class. Fixes #356531.
6464 2008-01-26  Robert Jordan  <robertj@gmx.net>
6466         * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
6467         which resort to FindFirstFile when a certain error condition
6468         (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
6469         Code is contributed under MIT/X11 license.
6471 2008-01-24  Jonathan Chambers  <joncham@gmail.com>
6473         * marshal.c (emit_marshal_string): Fix out string marshalling
6474         to use specified encoding. Fixes #323900.
6476         Code is contributed under MIT/X11 license.
6478 2008-01-24  Raja R Harinath  <harinath@hurrynot.org>
6480         * class.c (mono_class_inflate_generic_method_full): Don't modify
6481         iresult->context after cache check.
6483 2008-01-23  Zoltan Varga  <vargaz@gmail.com>
6485         * class.c (mono_class_inflate_generic_method_full): Change the
6486         struct assignments to memcpy for better visibility and add some comments.
6488 2008-01-23  Dick Porter  <dick@ximian.com>
6490         * threads.c (mono_threads_set_shutting_down): Simplify shutdown
6491         procedure, and make it work on windows.
6493 2008-01-22  Zoltan Varga  <vargaz@gmail.com>
6495         * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
6496         a MonoReflectionTypeBuilder since it is always of that type.
6498         * reflection.c (mono_type_get_object): Remove an unneccesary check.     
6500         * reflection.c (mono_generic_class_get_object): Simplify this a bit.
6502         * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
6503         
6504         * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
6506         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
6508         * reflection.c (mono_reflection_create_runtime_class): Remove already created
6509         instantiations from the type cache.
6511 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
6513         * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
6515         * verify.c (do_unbox_value): push a controled mutability managed pointer.
6517 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
6519         * verify.c (do_ldstr): added, verifies if the #US token is valid.
6521         * verify.c (mono_method_verify): removed old TODO
6523 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
6525         * verify.c (do_newobj): add visibility check.
6527 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
6529         * verify.c (do_load_function_ptr): add visibility check.
6531 2008-01-21  Massimiliano Mantione  <massi@ximian.com>
6532         *class.c:
6533         mono_generic_class_get_class: hook profiler events.
6534         mono_field_get_offset: added to support heap-shot in the new profiler.
6535         *class.h: exported mono_field_get_offset.
6536         * reflection.c:
6537         mono_reflection_setup_internal_class: hook profiler events.
6539 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
6541         * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions' 
6542         argument here too and use it to avoid checking for pending exceptions if 
6543         possible.
6545 2008-01-20  Gert Driesen  <drieseng@users.sourceforge.net>
6547         * assembly.c (build_assembly_name): add arg for passing the assembly
6548         flags. Do not consider a PublicKey with value "null" valid.
6549         (mono_assembly_name_parse_full): added boolean argument that will be
6550         set if the assembly name contains a PublicKeyToken spec. Added support
6551         for the Retargetable spec for which only Yes or No are allowed as valid
6552         value. Consider assembly name invalid if Retargetable spec is set, but
6553         either version, culture or public key (token) are not specified.
6554         * metadata-internals.h: sync signature of mono_assembly_name_parse_full
6555         with implementation in assembly.c.
6556         * icall.c (fill_reflection_assembly_name): also copy assembly flags
6557         from MonoAssemblyName.
6558         (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
6559         introduced argument for mono_assembly_name_parse_full to know if the
6560         assembly name has a PublicKeyToken spec, and if it has instruct
6561         fill_reflection_assembly_name to use default value for keyToken (if
6562         PublicKeyToken is null).
6564 2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
6566         * verify.c (mono_method_verify): fixed ovf ops with
6567         float values. They are unverifiable now.
6569 2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
6571         * class.c (set_failure_from_loader_error): add BadImageException to the
6572         list of exceptions that can cause a type to fail to load.
6574         * class.c (mono_class_get_exception_for_failure): same.
6576 2008-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
6578         * verify.c (in_any_exception_block): added, check if offset
6579         is part of any exception handling clause.
6581         * verify.c (get_stack_type): added VAR and MVAR types.
6583         * verify.c (do_stobj): better error messages.
6585         * verify.c (do_cpobj): added, check cpobj.
6587         * verify.c (do_initobj): added, check initobj.
6589         * verify.c (do_sizeof): added, check sizeof.
6591         * verify.c (do_localloc): added, check localloc.
6593         * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
6595 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
6597         * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
6598         save_lmf/restore_lmf opcodes.
6600         * threads.c (mono_threads_install_notify_pending_exc): New function to
6601         install a callback notifying the JIT there is a pending exception on a thread.
6602         (mono_thread_request_interruption): Call the new callback.
6603         (mono_thread_get_and_clear_pending_exception): New function to return the
6604         exception pending on a thread.
6606         * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
6607         to turn off checking for pending exceptions.
6608         (mono_marshal_get_native_wrapper): Ditto.
6610 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
6612         * threads-types.h: Get rid of the unnecessary extern declarations.
6614 2008-01-16  Gert Driesen  <drieseng@users.sourceforge.net>
6616         * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
6617         return field from parent class if not private.
6618         (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
6619         returns fields from parent class if they are not private.
6620         (method_nonpublic): added function to determine if a given method
6621         should be considered non-public. Returns false for private methods
6622         on parent class, and internal methods from parent on the 1.0 profile.
6623         (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
6624         use method_nonpublic function to determine whether method should be
6625         returned.
6626         (property_accessor_public): use newly introduced method_nonpublic
6627         function to determine whether accessor is non-public. 
6628         (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
6629         event from parent class if not private. Only return static event if
6630         Static flag is set, and only return static event from parent class if
6631         FlattenHierarchy flag is set.
6632         (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
6633         include non-private events from parent class.
6635 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
6637         * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
6638         warning.
6640 2008-01-16  Wade Berrier <wberrier@novell.com>
6642         * security.c: Add assembly.h header to appease some warnings
6644 2008-01-16  Dick Porter  <dick@ximian.com>
6646         * process.c (process_module_string_read): Remove trailing null
6647         when saving string.
6649 2008-01-16  Mark Probst  <mark.probst@gmail.com>
6651         * class-internals.h: A new data structure describing the layout of
6652         a runtime generic context (MonoRuntimeGenericContextTemplate).
6654         * metadata-internals.h: Added a hash table to MonoDomain that maps
6655         from open generic classes to their runtime generic context
6656         templates.
6658         * object.c: Building of the runtime generic context, including
6659         proper handling of generic type arguments of superclasses.
6660         Building of the runtime generic context according to the template.
6662 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
6664         * class.c (mono_class_setup_fields): Set field.count for generic instances.
6665         Fixes #350856.
6667         * image.c (do_mono_image_open): Pass TRUE as last_exists to 
6668         mono_portability_find_file (). Fixes #325466.
6669         (mono_image_get_public_key): Fix a warning.
6671 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
6673         * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
6674         Fixes #353550.
6675         (mono_class_from_name_case): Ditto.
6677 2008-01-13  Eyal Alaluf <eyala@mainsoft.com>
6679         * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
6680           common storage for the tables used in the System/NumberFormatter class.
6682 2008-01-13  Zoltan Varga  <vargaz@gmail.com>
6684         * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
6686 2008-01-11  Rodrigo Kumpera  <rkumpera@novell.com>
6688         * verify.c (get_boxable_mono_type): check if the token is valid.
6690         * verify.c (set_stack_value): changed to add an error if an
6691         invalid type is set on stack. Changed all callers due to signature change.
6693         * verify.c (do_stobj): implement stobj validation.
6695 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
6697         * reflection.c (reflection_methodbuilder_to_mono_method): No need to
6698         set container->is_method, it was set earlier.
6700         * metadata.c (type_in_image): Handle MVARs which belong to not finished
6701         generic methods.
6703         * reflection.c (mono_reflection_initialize_generic_parameter): Set
6704         is_method of the generic container to TRUE for methods.
6706 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
6708         * metadata.c (type_in_image): Handle type parameters properly.
6710         * class-internals.h (MonoGenericParam): Add an 'image' argument to track
6711         memory ownership of this structure.
6713 2008-01-10  Rodrigo Kumpera  <rkumpera@novell.com>
6715         * verify.c (get_boxable_mono_type): make typedref types been just
6716         unverifiable. check for void type.
6718         * verify.c (do_unbox_any): added, verify opcode unbox.any.
6720         * verify.c (do_load_function_ptr): accept method spec tokens.
6722 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
6724         * marshal.c (mono_class_native_size): Always set *align even if this is called
6725         recursively.
6727 2008-01-09  Zoltan Varga  <vargaz@gmail.com>
6729         * verify.c (mono_verify_corlib): Remove this as it was not used and was 
6730         out-of-date.
6732 2008-01-09  Rodrigo Kumpera  <rkumpera@novell.com>
6734         * verify.c: removed some old unused tables. A huge bunch of small fixes
6735         to things found while testing the verifier with mono basic.
6737         * verify.c (dump_stack_value): dump null literal flag to.
6739         * verify.c (verify_type_compatibility_full): fix comparison
6740         for types that have a generic super type.
6742         * verify.c (verify_stack_type_compatibility): fix compatibility
6743         between null literals and reference types. fix compatibility between
6744         boxed valuetypes and object. fix corner case test for enums.
6746         * verify.c (do_cmp_op): proper verification of cgt.un in case
6747         of reference types.
6749         * verify.c (do_invoke_method): fix error message.
6751         * verify.c (do_store_indirect
6753         * verify.c (check_is_valid_type_for_field_ops): proper verification
6754         of managed pointers to valuetypes and boxed valuetypes. proper verification
6755         of null literals.
6757         * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
6758         allow token to be a reference type.
6760         * verify.c (do_cast): proper handling of boxes valuetypes.
6762         * verify.c (do_stelem): proper handling of storing a boxed valuetype
6763         in object[].
6765         * verify.c (mono_method_verify): pass the opcode to do_cmp_op
6766         to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
6767         fixed the decoding of unbox_any
6769 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
6771         * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
6773 2008-01-08  Rodrigo Kumpera  <rkumpera@novell.com>
6775         * verify.c (do_newobj): do delegate verification.
6777         * verify.c (verify_delegate_compatibility): perform delegate
6778         verification.
6780         * verify.c (verify_ldftn_delegate): perform tests related to
6781         ldftn delegates.
6783         * verify.c (mono_delegate_signature_equal): perform the
6784         slightly diferent signature comparison required by delegates.
6786         * metadata.c (mono_metadata_type_equal_full): added and exported
6787         as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
6788         allows signature only comparison.
6790         * metadata-internal.h (mono_metadata_type_equal_full): added and exported
6791         as MONO_INTERNAL.
6793 2008-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
6795         * verify.c: added a bunch of stack_slot_* functions to
6796         make access to stack slot type easier. This is required to
6797         allow optional flags, like null literal, boxed value and
6798         this pointer.
6799         All access paths to IlStackDesc::stype have been changed 
6800         to use these new funcions.
6801         Removed a bunch of unused functions and cleared all warnings.
6802         This patch introduces the usage of the this pointer and 
6803         boxed value flags.
6805 2008-01-07  Zoltan Varga  <vargaz@gmail.com>
6807         * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
6809 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
6811         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
6812         match managed version.
6814         * appdomain.c: Bump corlib version.
6815         
6816         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
6817         argument.
6819 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
6821         * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
6822         Set public key token to zero-length byte array if assembly is not
6823         strongnamed.
6825 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
6827         * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
6828         writing a vtype array elem.
6830 2007-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
6832         * assembly.c (build_assembly_name): return FALSE if length of token is
6833         not 16 (if not "null").
6834         (mono_assembly_name_parse_full): return FALSE if value of version,
6835         culture, token or key is 0.
6836         * icall.c (fill_reflection_assembly_name): add boolean arguments to
6837         specify whether public key and public key token must be set to default
6838         value (zero-length byte array) if not available. Set versioncompat to
6839         SameMachine. If public key is available or the default is set, then
6840         set PublicKey flag.
6841         (ves_icall_System_Reflection_Assembly_FillName): if no public key
6842         is available, use empty byte array as default value. On the 2.0
6843         profile, use default value for public key token if not set.
6844         (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
6845         profile, use default value for public key if not set. On the 2.0
6846         profile, use default value for public key token if not set.
6847         (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
6848         default values for public key and public key token.
6850 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
6852         * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
6853         field to keep it in synch with the managed object.
6855         * marshal.c (emit_marshal_object): Add support for byref marshalling of
6856         delegates. Fixes #351520.
6858         * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
6859         contains defined memory.
6860         
6861         * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
6863         * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
6864         
6865         * sgen-gc.c (check_consistency): New helper function to do a consistency check
6866         of the GC data structures.
6868         * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
6870         * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
6871         
6872         * object.c (mono_array_full_copy): Fix detection of whenever to use a write
6873         barrier.
6874         (mono_array_clone_in_domain): Ditto.
6875         (mono_array_clone_in_domain): Ditto.
6877         * threads.c (start_wrapper): Register the thread start argument as a GC root.
6878         (cache_culture): Use a write barrier.
6880         * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
6881         (ves_icall_get_property_info): Ditto.
6883         * object.h (MONO_STRUCT_SETREF): New macro.
6885         * class-internals.h (MonoStats): Add some GC statistics.
6887         * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
6889 2008-01-04  Andreas Faerber  <andreas.faerber@web.de>
6891         * exception.c (mono_exception_from_name_two_strings):
6892         Break from loop after method is found.
6894 2008-01-04  Dick Porter  <dick@ximian.com>
6896         * process.c (process_module_string_read): Rename variable to
6897         reflect correct usage, after fixing bug 345972.
6899 2008-01-03  Rodrigo Kumpera  <rkumpera@novell.com>
6901         * verify.c (mono_type_create_fnptr_from_mono_method): 
6902         created a MonoType function pointer instance to be used during
6903         verification. The verifier releases this memory at end.
6905         * verify.c (mono_method_is_constructor): extracted repeated
6906         checks for constructor into a single class.
6908         * verify.c (do_push_field): use new extracted method
6909         for constructor check.
6911         * verify.c (do_newobj): same.
6913         * verify.c (do_ldftn): renamed to do_load_function_ptr
6914         and make it verify ldvirtftn too.
6916         * verify.c (mono_method_verify: proper verification
6917         of ldvirtftn. release created MonoMethod instances.
6919 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
6921         * verify.c (token_bounds_check): added.
6923         * verify.c (do_ldftn): added.
6925         * verify.c (mono_method_verify): proper verificartion of ldftn.
6927 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
6929         * metadata.c (mono_metadata_decode_row): Assert if index is bigger
6930         than the table row count. It's the resposibility of the caller to
6931         make the bounds check and raise the correct error.
6933         * metadata.c (mono_metadata_decode_row_col): Same.
6935         * loader.c (mono_get_method_from_token): perform bounds check
6936         on token for methoddef table.
6938 2007-12-29  Miguel de Icaza  <miguel@novell.com>
6940         * icall.c
6941         (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
6942         assert into a negative result, the managed code already coped with
6943         that.
6945         Some folks on Windows reported this error. 
6947 2007-12-28  Gert Driesen  <drieseng@users.sourceforge.net>
6949         * appdomain.c: Bump corlib version.
6950         * icall.c:
6951         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
6952         CultureInfo.CreateCulture to create CultureInfo for name.
6953         (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
6954         create CultureInfo for name. Fixes bug #347174.
6956 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
6958         * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
6959         flags.
6961         * verify.c (is_valid_branch_instruction): allow branching to the
6962         first instruction of the protected block.
6964         * verify.c (is_valid_cmp_branch_instruction): same.
6966         * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
6967         avoid double initialization.
6969         * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
6970         detect which cases the eval stack should just be copied.
6972         * verify.c (mono_method_verify): check if the eval stack
6973         is empty when entering a protected block.
6975 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
6977         * verify.c: added is_clause_in_range, is_clause_inside_range,
6978         is_clause_nested and verify_clause_relationship. They perform
6979         the verifications stated in P1 12.4.2.7.
6981         * verify.c (mono_method_verify): remove some unused variables,
6982         add the new exception clause checks, add instruction border
6983         checks for protected block start/end, improved some error 
6984         messages and fixed a bug in the way invalid instruction access
6985         is detected.
6987 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
6989         * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
6990         from GC 7.0 if available.
6992         * object.c: Remove an unused define.
6993         
6994         * object.c (mono_class_compute_gc_descriptor): Fix a warning.
6996         * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
6998         * null-gc.c (mono_gc_make_descr_for_array): Implement.
7000         * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
7002         * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
7003         to take the same arguments as the other make_descr functions.
7005         * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
7007         * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
7008         directly.
7010         * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
7011         mini.c.
7013         * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc () 
7014         call to boehm-gc.c.
7016         * boehm-gc.c (mono_gc_register_root): Fix a warning.
7018         * null-gc.c (mono_gc_register_root): Fix a warning.
7020         * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
7022         * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
7023         (mono_gc_base_init): Call GC_init ().
7025         * null-gc.c: Define mono_gc_register_root () as a no-op.
7027         * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
7029 2007-12-24  Rodrigo Kumpera  <rkumpera@novell.com>
7031         * verify.c: add prototype for merge_stacks at top
7033         * verify.c (do_switch): added.
7035         * verify.c (merge_stacks): on some cases the stack merging
7036         was not happening properly. Unequal stack sizes at merge
7037         points should be invalid.
7039         * verify.c (mono_method_verify): added more debug info on stack state.
7040         verify switch properly.
7042 2007-12-24  Zoltan Varga  <vargaz@gmail.com>
7044         * method-builder.h: New file, moved the mono_mb_ declarations here from 
7045         marshal.h.
7047         * boehm-gc.c marshal.c: Include method-builder.h.
7049         * marshal.c: Use mono_mb_emit_branch_label () in a few places.
7051         * marshal.c: Remove some code which is now in method-builder.c.
7053 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
7055         * method-builder.c: New file, extraction of the method builder functionality 
7056         from marshal.c.
7058         * marshal.c: Move the mb functions into method-builder.c.
7060         * marshal.h marshal.c: Export some mono_mb_... functions.
7062         * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
7064         * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
7065         the caller.
7067         * class.c (mono_class_get_full): Check the token type in the dynamic case.
7069         * loader.c (mono_field_from_token): Ditto.      
7071         * loader.c (mono_get_method_from_token): Change the check so it checks memberref
7072         type as well.
7073         
7074         * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
7075         Fixes #342565.
7077         * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
7078         a helper function for setting it.
7080         * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
7082         
7083         * assembly.c: Significally simplify code now that referenced assemblies are 
7084         loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
7086         * threads.h: Don't include  the internal threads-types.h header file. Fixes
7087         #349952.
7089 2007-12-21  Rodrigo Kumpera  <rkumpera@novell.com>
7091         * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
7092         instructions that were target of branches or are at protected block boundaries.
7094         * verify.c (in_same_block): handle filter clauses.
7096         * verify.c (is_valid_branch_instruction): added. checks the target of
7097         instructions br or brtrue/false.
7099         * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
7100         binary branch instructions such as beq and bge.
7102         * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
7103         and made it pin the instruction as been part of the exception block.
7105         * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
7106         of in_same_block.
7108         * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
7109         of in_same_block.
7111         * verify.c (do_ret): ret from a protected block is unverifiable and
7112         not invalid.
7114         * verify.c (do_static_branch): verify br and br.s instructions.
7116         * verify.c (merge_stacks): add extra param to support detection
7117         of branches in the middle of instructions.
7118         
7119         * verify.c (mono_method_verify): verify branches and exception blocks
7120         that target the middle of instructions. Proper verification of br and br.s.
7122 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
7124         * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
7125         skip_visibility field.
7126         (reflection_methodbuilder_from_dynamic_method): Ditto.
7128         * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
7129         registrations. Fixes #348193.
7131         * threads.h: Move the internal mono_thread_get_pending_exception () to
7132         threads-types.h and rename it to mono_thread_get_undeniable_exception ().
7134 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
7136         * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
7137         icall registration. Fixes #348193.
7139         * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
7140         for corlib classes into object. Fixes #349621.
7142 2007-12-20  Gert Driesen  <drieseng@users.sourceforge.net>
7144         * icall.c (property_accessor_nonpublic): new function to determine
7145         whether an accessor allows a property to be considered non-public.
7146         Returns false for private accessor(s) from parent class, and internal
7147         accessor(s) from parent on 2.0 profile (and higher).
7148         (ves_icall_Type_GetPropertiesByName): Use newly introduced function
7149         to determine whether property should be included if NonPublic flag
7150         is set. Fixes bug #349078.
7152 2007-12-20  Rodrigo Kumpera  <rkumpera@novell.com>
7154         * verify.c (init_stack_with_value): added.
7156         * verify.c (mono_method_verify): extracted common
7157         code for exception initialization into init_stack_with_value.
7159         * verify.c (mono_method_verify): initialize the exception
7160         for handler clauses as well.
7162         * verify.c (mono_method_verify): fix the exception clause
7163         ordering rules, it should use handler end offset and not
7164         start offset.
7166 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
7168         * rawbuffer.c: remove useless warning.
7170 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
7172         * threads.h, threads-types.h: move functions to the correct header
7173         (fixes bug#349952).
7175 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
7177         * verify.c (mono_method_verify): proper verification
7178         of exception handling clauses ranges and fallthru in
7179         and out of protected blocks.
7181 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
7183         * verify.c (mono_method_verify): fixed compilation issue.
7185 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
7187         * verify.c (mono_method_verify): a printf slipped in, changed
7188         to use verifier debug macro.
7190 2007-12-18  Rodrigo Kumpera  <rkumpera@novell.com>
7192         * verify.c (is_correct_leave): check for filter clauses.
7194         * verify.c (do_filter): added.
7196         * verify.c (mono_method_verify): property verification of leave.
7199 2007-12-18  Mark Probst  <mark.probst@gmail.com>
7201         * threads.c: Disable calls to _wapi_thread_signal_self() to fix
7202         Win32 build, until we figure out how to do the proper thing on
7203         Win32.
7205 2007-12-17  Zoltan Varga  <vargaz@gmail.com>
7207         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
7208         by the previous patch.
7209         
7210         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
7211         the assembly resolve handler for refonly assemblies.
7213 2007-12-17  Mark Probst  <mark.probst@gmail.com>
7215         * threads.c, thread-types.h, icall.c: New shutdown safeguards.
7216         Make sure only one thread is allowed to commence shutdown, and
7217         don't allow new threads to be started once shutdown is in
7218         progress.
7220 2007-12-14  Rodrigo Kumpera  <rkumpera@novell.com>
7222         * verify.c (is_correct_endfilter): added.
7224         * verify.c (is_unverifiable_endfilter): added.
7226         * verify.c (do_endfilter): added.
7228         * verify.c (mono_method_verify): property verification of endfilter
7229         and fixed a corner case or endfinally.
7231 2007-12-13  Rodrigo Kumpera  <rkumpera@novell.com>
7233         * verify.h: new flags to support fail fast of unverifiable code and
7234         do non-strict verification. Non-strict verification is required to
7235         have MS runtime compatibility. There are a huge amount of unverifiable
7236         code that it accepts as verifiable. The strict mode verifies the code
7237         as the specs says.
7238         Non-strict mode will be required in cases where code needs to be
7239         accepted as verifiable but fails under strict mode.
7241         * pedump.c: added support to fail fast and non-strict verification.
7243         * verify.c: added support for both fail fast and non-strict verification.
7245 2007-12-12  Rodrigo Kumpera  <rkumpera@novell.com>
7247         * verify.c (is_correct_endfinally): added.
7249         * verify.c (mono_method_verify): property verification of endfinally.
7251 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
7253         * verify.c (in_any_block): check for filter clauses.
7255         * verify.c (is_correct_rethrow): added.
7257         * verify.c (mono_method_verify): property verification of rethrow.
7259         * metadata.h: added MONO_OFFSET_IN_FILTER macro.
7261 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
7263         * verify.c (do_throw): added.
7265         * verify.c (mono_method_verify): property verification of throw
7267 2007-12-11  Zoltan Varga  <vargaz@gmail.com>
7269         * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
7270         assemblies. Fixes #346425.
7272 2007-12-10  Zoltan Varga  <vargaz@gmail.com>
7274         * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
7275         FieldBuilders.
7277         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
7279         * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
7280         prevent asserts when this is called with a token which might not be valid.
7282         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
7283         lookup_dynamic_token_class with valid_token == FALSE.
7285         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.       
7287         * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
7289         * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
7290         
7291 2007-12-10  Mark Probst  <mark.probst@gmail.com>
7293         * gc.c: Don't delay threadpool thread finalization unless Mono is
7294         shutting down.
7296 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7298         * threads.c: turn an assert into a non-fatal warning.
7300 2007-12-09  Robert Jordan  <robertj@gmx.net>
7302         * icall.c (GetVirtualMethod): Add missing argument validation.
7304 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
7306         * verify.c (do_cast): added.
7308         * verify.c (mono_method_verify): property verification of castclass and isinst.
7311 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
7313         * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
7315         * verify.c (do_stelem): added.
7317         * verify.c (mono_method_verify): property verification of stelem.X.
7319 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7321         * class.c, class-internals.h: Introduce an environment variable
7322         (MONO_GENERIC_SHARING) through which the extent of generic code
7323         sharing can be controlled (share all classes, share only corlib
7324         classes, or share nothing).
7326         * object.c: Only create runtime generic context for classes for
7327         which sharing is enabled.
7329 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
7331         * verify.c (do_ldelem): refactor it to work with ldelem.any.
7333         * verify.c (mono_method_verify): property verification of ldelem.any.
7335 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
7337         * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
7338         added ldelem.X opcodes.
7340         * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
7342         * verify.c: proper verification of ldelem.X 
7344 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
7346         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
7348 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
7350         * verify.c (mono_method_verify): null literal requires special handling,
7351         the value pushed on stack need to be flagged as so.
7353         * verify.c (do_ldelema): Verify ldelema properly.
7355 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
7357         * verify.c: Verify ldlen properly.
7359 2007-12-05  Zoltan Varga  <vargaz@gmail.com>
7361         * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
7362         to the target object's type. Fixes #346160.
7364 2007-12-05  Dick Porter  <dick@ximian.com>
7366         * threadpool.c (socket_io_add_poll): Asynchronous connect() on
7367         Solaris needs the same workaround as BSD-derived systems.  Fixes
7368         bug 323524, patch by Burkhard Linke
7369         <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
7371 2007-12-04  Gert Driesen  <drieseng@users.sourceforge.net>
7373         * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
7374         handle to use when error dialog is shown; otherwise, update mask
7375         to show no error dialog when an error occurs.
7377 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
7379         * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
7381         * class.c (mono_class_get_field_default_value): New helper function to initialize
7382         field->def_type and field->data.
7384 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
7386         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
7387         the general one.
7389         * object.c (mono_runtime_create_delegate_trampoline): New helper function.
7391         * marshal.c: Avoid depending on delegate->method_info being set.
7393         * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
7394         
7395         * object.c (mono_delegate_ctor): Set delegate->method.
7397         * object-internals.h (struct _MonoDelegate): Add 'method' field.
7399         * appdomain.c: Bump corlib version.
7401 2007-11-27  Raja R Harinath  <harinath@gmail.com>
7403         * metadata.c (mono_generic_inst_equal_full): Short-circuit
7404         equality check if we're comparing canonicalized MonoGenericInsts.
7406 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
7408         * class.c (generic_array_methods): Call mono_class_setup_methods () before
7409         accessing class->methods.
7411 2007-11-22  Dick Porter  <dick@ximian.com>
7413         * threads.c: Ensure that the synch_cs is set before trying to use
7414         it.
7416 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
7418         * profiler.c: r89126 broke the statistial profiler, unbreak.
7420 2007-11-22  Martin Baulig  <martin@ximian.com>
7422         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
7424         * mono-debug.c
7425         (mono_debug_debugger_version): Bump to 3.
7426         (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
7427         -> mono_debugger_class_initialized().
7429         * mono-debug-debugger.c
7430         (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
7432         * class.c
7433         (mono_debugger_start_class_init_func): Removed.
7434         (mono_debugger_class_loaded_methods_func): Added.
7435         (mono_class_setup_methods): Call it here.
7437 2007-11-22  Martin Baulig  <martin@ximian.com>
7439         * mono-debug.c
7440         (mono_debug_add_delegate_trampoline): New public method.
7441         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
7443         * mono-debug.h
7444         (MonoSymbolTable): Added `global_data_table'.
7445         (MonoDebuggerTypeKind): Removed.
7447 2007-11-21  Zoltan Varga  <vargaz@gmail.com>
7449         * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
7450         these methods.
7452         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7453         
7454 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
7456         * object.c: some fields don't have a valid rva: ignore them (bug #343083).
7458 2007-11-20  Martin Baulig  <martin@ximian.com>
7460         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
7462         * mono-debug-debugger.c
7463         (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
7464         (mono_debugger_remove_breakpoint): Likewise.
7465         (mono_debugger_check_breakpoints): Likewise.
7466         (mono_debugger_register_class_init_callback): New public method.
7467         (mono_debugger_remove_class_init_callback): Likewise.
7468         (mono_debugger_add_type): Likewise.
7470         * mono-debug-debugger.h
7471         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
7473 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
7475         * class.c: more interface implementations needed for the
7476         array enumerator (fixes bug #341112).
7478 2007-11-18  Gert Driesen  <drieseng@users.sourceforge.net>
7480         * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
7481         fix ParamName of ArgumentNullExceptions.
7483 2007-11-17  Miguel de Icaza  <miguel@novell.com>
7485         * reflection.c (mono_reflection_encode_sighelper): Generate the
7486         modopts and modreqs.   I have a useless test that crashes monodis,
7487         but that shows the code working.
7489 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
7491         * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
7492         (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
7494 2007-11-15  Dick Porter  <dick@ximian.com>
7496         * threads.c (ves_icall_System_Threading_Thread_Join_internal):
7497         When joining a thread, it's the thread that's calling Join that
7498         gets WaitSleepJoin state not the target.  Fixes the standalone
7499         test case in bug 334740, and hopefully the whole bug too.
7501 2007-11-15  Dick Porter  <dick@ximian.com>
7503         * process.c: Read file version info from the files pointed at by
7504         process modules, not the current process.  Fixes bug 315969.
7506         Use windows typedef names in some places to fix warnings on the
7507         windows build.
7509 2007-11-15  Mark Probst  <mark.probst@gmail.com>
7511         * image.c, metadata-internals.h: Added a generic_class_cache hash
7512         to MonoImage for looking up generic classes when sharing generics.
7514 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
7516         * sgen-gc.c: warning cleanups.
7518 2007-11-15  Zoltan Varga  <vargaz@gmail.com>
7520         * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
7521         inherited properties.
7523 2007-11-14  Mark Probst  <mark.probst@gmail.com>
7525         * object.c, class-internals.h: Added more information to the
7526         runtime generic context.
7528 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
7530         * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
7531         instead of just the target method. Generalize the abstract method handling to
7532         handle any non-static method.
7534         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
7535         mono_marshal_get_delegate_invoke () signature change.
7537 2007-11-13  Mark Probst  <mark.probst@gmail.com>
7539         * class.c, class-internals.h: Made
7540         mono_type_get_basic_type_from_generic () public.  Fixed member
7541         access check for shared generics.
7543         * loader.c: Don't insert field into field cache if it's part of a
7544         non-inflated generic class.
7546         * domain.c, domain-internals.h: The generic sharing context is now
7547         part of the jit info data structure.  Added two accessor
7548         functions.
7550 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
7552         * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
7553         the array Get/Set/Address methods, since the JIT inlines them.
7555         * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
7557         * image.c (mono_image_close): Free runtime_invoke_direct_cache.
7558         (mono_image_init): Initialize runtime_invoke_direct_cache.      
7560         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
7561         mono_marshal_get_delegate_invoke signature change.
7563         * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
7564         an additional argument. Add support for invoking abstract methods.
7566         * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
7568         * image.c (mono_image_close): Free delegate_abstract_invoke_cache.      
7570 2007-11-09  Mark Probst  <mark.probst@gmail.com>
7572         * class.c: Do field layout for open generic classes as well.
7574 2007-11-09  Mark Probst  <mark.probst@gmail.com>
7576         * gc.c, gc-internal.h: Don't finalize threadpool threads with
7577         other objects, because the threadpool is still around.  Put them
7578         in a list instead and after finalizing all other objects in the
7579         root domain shut down the thread pool and then finalize the
7580         threads.  Fixes bug #337383.
7582         * threads.c, thread-types.h: New mono_thread_create_internal()
7583         function for marking a thread with the threadpool flag before it
7584         started.  Set synch_cs to NULL after freeing it.
7586         * threadpool.c: Mark threadpool threads before they start.
7588 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
7590         * reflection.h, reflection.c: don't export random functions
7591         and lazy load dbnull and missing objects.
7593 2007-11-07  Jonathan Chambers <joncham@gmail.com>
7595         * class.c: Initialize COM types if COM interfaces
7596         are present (not just COM classes).
7597         
7598         Code is contributed under MIT/X11 license.
7600 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
7601         * reflection.c:
7602         create_dynamic_mono_image: hook module profiler events (dynamic case).
7603         mono_image_basic_init: hook assembly profiler events (dynamic case).
7605 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
7606         * profiler.c:
7607         simple_appdomain_unload: completely terminate the profiler
7608         instead of only processing the statistical samples.
7609         simple_shutdown: make sure this is really called exactly once,
7610         even in multithreaded applications, and always listen to
7611         appdomain events.
7612         * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
7613         here, the "[un]load" functions will do it.
7614         Fixes bugs #333791 and #325261.
7616 2007-11-07  Geoff Norton  <gnorton@novell.com>
7618         * socket-io.c:  Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
7619         rather than depend on __APPLE__.
7621 2007-11-07  Mark Probst  <mark.probst@gmail.com>
7623         * icall.c: Safety checks in InitializeArray.  Fixes bug #324535.
7625 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com> 
7627         * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
7628         UTF16 MonoString. Fix the crash from bug #335488
7630 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com>
7632         * marshal.c: Correct (for non-Win32 OS) length != size in 
7633         mono_string_from_bstr. Fix #339530.
7635 2007-11-06  Geoff Norton  <gnorton@novell.com>
7637         * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
7638         to succeed
7640 2007-11-05  Kornél Pál  <kornelpal@gmail.com>
7642         * process.c: Added run-time GetProcessId API detection for Windows.
7644 2007-11-04  Miguel de Icaza  <miguel@novell.com>
7646         * reflection.c  (mono_param_get_objects): If a parameter has the
7647         attribute [System.Runtime.InteropServices.Optional] we should
7648         set the DefaultValue of the ParameterInfo to be
7649         System.Reflection.Missing instead of DBNull.
7651         See bug #339013.
7653         (mono_get_reflection_missing_object): New method,
7654         returns the System.Reflection.Missing.Value singleton instance.
7656 2007-11-03  Atsushi Enomoto  <atsushi@ximian.com>
7658         * culture-info-table.h : regenerated.
7660 2007-11-02  Jonathan Chambers <joncham@gmail.com>
7662         * icall.c: Use GetEnvironmentStrings on windows
7663         so we are using the same environment block as 
7664         GetEnvironmentVariable/SetEnvironmentVariable. Fixes
7665         #333740.
7666         
7667         Code is contributed under MIT/X11 license.
7669 2007-10-31  Martin Baulig  <martin@ximian.com>
7671         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
7673         * mono-debug-debugger.h
7674         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
7676 2007-10-30  Zoltan Varga  <vargaz@gmail.com>
7678         * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated 
7679         classes.
7681 2007-10-30  Atsushi Enomoto  <atsushi@ximian.com>
7683         * culture-info-table.h : regenerated.
7685 2007-10-30  Robert Jordan  <robertj@gmx.net>
7687         * icall-def.h, icall.c:
7688         Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
7690         Code is contributed under MIT/X11 license.
7692 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
7694         * class.c (mono_class_setup_vtable): Find the inflated methods in the
7695         inflated class instead of inflating them again.
7696         
7697         * class.c (mono_class_setup_vtable): Inflate the override methods in the 
7698         dynamic case.
7700         * class.c (mono_generic_class_get_class): Set klass->property.count as well.
7701         Call setup_supertypes () after klass->parent is set.
7702         (mono_class_setup_properties): Enable this to work on dynamic generic classes.
7704         * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
7705         for inflated instances of not yet created dynamic generic classes.
7706         (ctorbuilder_to_mono_method): Handle the case when this is called multiple
7707         times from inflated_method.
7708         (methodbuilder_to_mono_method): Ditto.
7710 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
7712         * gc.c: code cleanup and removed old untested option of not creating the
7713         finalizer thread.
7715 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
7717         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
7718         creating a jump trampoline for dynamic methods.
7720 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
7722         * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
7723         generic TypeBuilders when called from another method of the same type (bug #335131).
7726 2007-10-27  Zoltan Varga  <vargaz@gmail.com>
7728         * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
7729         doesn't seem to work perfectly.
7730         
7731         * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
7732         called multiple times.
7733         (methodbuilder_to_mono_method): Ditto.
7734         (resolve_object): Inflate FieldBuilder's.
7736 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7738         * string-icalls.c, string-icalls.h, appdomain.c: patch from
7739         Tyler Larson <mono-devel@tlarson.com> to fix the handling of
7740         RemoveEmptyEntries in the string.Split implementation (bug #322375).
7742 2007-10-26  Dick Porter  <dick@ximian.com>
7744         * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
7745         Thread initialisation changes
7747 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
7749         * verify.c: fix compatibility check between arrays and System.Array
7751 2007-10-26  Zoltan Varga  <vargaz@gmail.com>
7753         * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
7754         too. Fixes #336999.
7756 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
7758         * object.c (mono_value_box): Use typed allocation here.
7760 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
7762         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
7763         trampoline instead of compiling the method right away.
7765         * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
7767 2007-10-21  Zoltan Varga  <vargaz@gmail.com>
7769         * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
7770         related fields for dynamic classes. Fixes #334493.
7772 2007-10-20  Zoltan Varga  <vargaz@gmail.com>
7774         * class.c (mono_generic_class_get_class): Set klass->field.count as well.
7775         
7776         * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
7778         * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
7779         (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
7781         * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
7783         * reflection.c (create_generic_typespec): Initialize klass->generic_container
7784         if needed.
7785         (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
7787 2007-10-18  Jonathan Chambers <joncham@gmail.com>
7789         * marshal.c: Use correct key when removing item
7790         from ccw_hash.
7791         
7792         Code is contributed under MIT/X11 license.
7794 2007-10-17  William Holmes  <billholmes54@gmail.com>
7796         *marshal.c: Adding a case to marshal booleans to U1
7798         Code is contributed under MIT/X11 license.
7800 2007-10-18  Zoltan Varga  <vargaz@gmail.com>
7802         * class.c (mono_class_from_name): Search the modules compromising dynamic
7803         assemblies. Fixes #331601.
7805 2007-10-16  Zoltan Varga  <vargaz@gmail.com>
7807         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
7808         exception if the type name contains an assembly component. Fixes #334203.
7810         * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
7811         modules inside dynamic assemblies. Fixes #334200.
7812         
7813         * reflection.c: Set image->public_key and image->public_key_length;
7815         * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
7816         fields.
7818         * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.        
7819         
7820 2007-10-16  Mark Probst  <mark.probst@gmail.com>
7822         * metadata.c: Implemented correct comparing of generic classes.
7823         An inflated generic class can be equal to a non-inflated one if it
7824         is inflated with generic type variables as type arguments.  Fixes
7825         bug #333798.
7827 2007-10-15  Dick Porter  <dick@ximian.com>
7829         * monitor.c (mono_monitor_try_enter_internal): Set thread state to
7830         WaitSleepJoin while it is waiting to acquire a lock.  Fixes bug
7831         81646.
7833         * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
7834         instead of a monitor lock.  This means that monitor_try_enter and
7835         co can set the thread state safely.
7836         (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
7837         thread_interrupt_requested, so interrupt actually works.
7839         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
7840         ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
7841         state accessor function
7843 2007-10-15  Martin Baulig  <martin@ximian.com>
7845         * mono-debug.h
7846         (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
7847         the debugger with the current runtime.
7849 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
7851         * object.c, object-internals.h: added the ability to set a single
7852         trampoline for all the slots in a vtable.
7854 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7856         * marshal.c: deal with a possible race condition during multicast
7857         delegate invocation.
7859 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7861         * class.c: ensure value type methods don't have the synchronized
7862         flag set.
7864 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
7866         * string-icalls.c, string-icalls.h: reverted unapproved patch that
7867         breaks the build.
7869 2007-10-11  Joel Reed  <joelwreed@comcast.com>
7871         * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
7872         to take an options parameter so that empty entries can be removed during
7873         the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
7875 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7877         * marshal.c: make sure we don't store the signature from a dynamic
7878         method into the runtime invoke cache (bug #327189).
7880 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
7882         * marshal.c: make sure the wrapper methods are properly initialized.
7884 2007-10-11  Mark Probst  <mark.probst@gmail.com>
7886         * metadata.c, metadata-internals.h: Generalized
7887         mono_type_stack_size() to mono_type_stack_size_internal() which
7888         takes an additional argument specifying whether it allows open
7889         types.
7891 2007-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
7893         * verify.c (do_invoke_method): handle typedbyref params
7894         correctly and check for unverifiable return values.
7896         * verify.c (do_newobj): fix a warning.
7898 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
7900         * verify.c: don't tread typedbyref as allways unverifable,
7901         so uses, like (ld/st)loc.0 are valid. verify for the cases
7902         that it matters, like boxing related operations.
7904 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
7906         * verify.c: add verification of the newobj opcode. verification
7907         of delegate instantation still missing due ldftn and virldftn not
7908         pushing the function type on stack
7910 2007-10-08  Mark Probst  <mark.probst@gmail.com>
7912         * class-internals.h: Runtime generic context data structure
7913         definition.
7915         * object.c: Initialization of runtime generic context at runtime
7916         vtable creation time.
7918 2007-10-08  Massimiliano Mantione  <massi@ximian.com>
7919         * class.c (mono_class_create_from_typedef,
7920         mono_class_from_generic_parameter, mono_ptr_class_get,
7921         mono_fnptr_class_get, mono_bounded_array_class_get)
7922         * domain.c (mono_domain_create, mono_domain_free)
7923         * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
7924         * image.c (do_mono_image_load, mono_image_close):
7925         Hooked up load-unload profiler events.
7927 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
7929         * domain.c: track statistics about the actual amount of native code
7930         allocated.
7932 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7934         * class.c: the valuetype enumerators don't have the additional
7935         supertypes interfaces.
7937 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
7939         * class.c: need more interfaces setup for the IEnumerator<T>
7940         object created for arrays (tests/ienumerator-interfaces.2.cs).
7942 2007-10-05  Zoltan Varga  <vargaz@gmail.com>
7944         * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
7946 2007-10-05  Alp Toker  <alp@atoker.com>
7948         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
7949         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
7950         #315863.
7952 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
7954         * verify.c (verify_type_compatibility_full): verification of
7955         compatibility improved, validates correctly non-strict checks between
7956         native int and I4 types different than (unsigned)int32.
7958         * verify.c (do_store_indirect): added, do all verification of
7959         ldind.X opcodes. 
7961         * verify.c (get_load_indirect_mono_type): renamed to
7962         get_indirect_op_mono_type, as it now returns the MonoType for 
7963         ldind.X and stind.X opcodes.
7965 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
7967         * reflection.c: Fix the encoding of generic type definition for
7968         TypeBuilders.
7970         * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
7971         mono_image_typedef_or_ref but allows to specify if typespec lookups should
7972         be made. Typespec check is done prior to typeref cache lookup.
7974         * reflection.c (mono_image_typedef_or_ref): now just delegate to
7975         mono_image_typedef_or_ref_full.
7977         * reflection.c (encode_generic_class): encode the generic class
7978         directly instead of calling encode_type.
7980         * reflection.c (encode_type): encode the generic type definition
7981         MonoClass as a generic instantiation.
7983         * reflection.c (create_typespec): cache typespec tokens in
7984         the assembly->typespec cache. Don't create typespec for a generic
7985         instance MonoClass. Create typespec for the generic type defintion.
7987         * reflection.c (create_generic_typespec): encode the generic
7988         class directly instead of calling encode_type.
7990         * reflection.c (mono_image_create_token): encode the generic
7991         type definition not using a typespec for MonoType instances.
7994 2007-10-04  Raja R Harinath  <rharinath@novell.com>
7996         Fix #328812
7997         * class.c (mono_image_init_name_cache): Don't return nested
7998         'protected internal' classes.
7999         (mono_class_from_name_case): Likewise.
8001 2007-10-04  Atsushi Enomoto  <atsushi@ximian.com>
8003         * icall-def.h, icall.c : get_bundled_machine_config() is now the
8004           common function used by both DefaultConfig in System.dll and
8005           InternalConfigurationHost in System.Configuration.dll.
8007 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
8009         * class.c: automatically add to vectors only a few essential explicit
8010         generic interfaces. The rest of the interfaces that arrays should
8011         provide are currently implicitly added (but still not lazily, see the
8012         design in the discussion of bug#325495 for the details of what is
8013         needed for that). Additionally, implicit interfaces are assigned the
8014         same vtable slot as the explicit interfaces (as they are compatible):
8015         this enables huge memory savings since we don't need to instantiate
8016         as many memthods and as large vtables anymore. Also, Since
8017         GetEnumerator<T> returns an instance of a type that is required to
8018         support a similarly large set of interfaces as arrays, we add
8019         implicit interfaces and interface offset sharing support to those
8020         types, too. This change adds all the required interfaces so that
8021         the anonarray.cs test case in the bug report works (we don't add
8022         all the interfaces to arrays of arrays 3-level deep and more because
8023         of the memory requirements explained in the bug and since they are much
8024         less common: the lazy-loading support will enabled them to work, too).
8026 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
8028         * verify.c (merge_stacks): major clean up, all type compatibility
8029         checks are done by verify_type_compatibility. This fix my earlier lack
8030         of understanding of the CLR type system and merge_stacks no longer looks
8031         scary.
8033         * verify.c: fixed some bad spelling.
8035 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
8037         * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
8038         a given stack slock.
8039         
8040         * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
8041         verify_type_compatibility_full. This removed a near indentical function and fixed
8042         handling of Int32 and IntPtr across all opcodes.
8044 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
8046         * class.c: only vectors have the additional generic interfaces.
8048 2007-10-01  Jonathan Chambers <joncham@gmail.com>
8050         * mono-config.c: Use g_strcasecmp instead of
8051         strcasecmp like everywhere else to fix
8052         compilation with MSVC.
8053         
8054         Code is contributed under MIT/X11 license.
8056 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
8058         * object.c, object-internals.h: refactored the IMT code to enable
8059         building a single slot at a time and lazily creating the IMT trampolines
8060         and thunks.
8062 2007-09-29  Zoltan Varga  <vargaz@gmail.com>
8064         * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
8066         * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
8067         Fixes #328501.
8068         
8069 2007-09-29  Raja R Harinath  <harinath@gmail.com>
8071         * loader.c (method_from_methodspec): Rearrange to avoid
8072         un-necessary exposition.  Don't assert out if the method's
8073         declaring type is a generic type definition.
8075 2007-09-28  Martin Baulig  <martin@ximian.com>
8077         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
8079 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
8081         * class-internals.h: optimize field layout of MonoClass to
8082         requires less cachelines at runtime and save a few bytes on 64 bit
8083         systems.
8085 2007-09-28  Jb Evain  <jbevain@novell.com>
8087         * reflection.c: when encoding type names in custom attributes,
8088         if the type is a closed generic type, its generic arguments
8089         have to be serialized as AssemblyQualifiedName, so that when
8090         they are deserialized, it's possible to re-create them properly.
8091         Fixes #329450.
8094 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
8096         * object.c, class-internals.h: added delegate-creation counter.
8098 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
8100         * class.c: cleanup of the code that synthetizes interfaces for
8101         arrays in 2.0: saves quit a bit of corlib mempool memory.
8102         Code to fix bug #325495 ifdeffed out for now until the issues
8103         with memory usage and O(n^2) behaviour are fixed.
8105 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
8107         * marshal.c: when possible, do not duplicate the name of the methods
8108         in the method builder and in the generated MonoMethod.
8110 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
8111         * verify.c: added support for type checking ldind_* opcodes.
8113 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
8115         * class-internals.h (struct _MonoGenericClass): new field is_tb_open
8116         which is used to distinguish the fully open instantiation of a TypeBuilder
8117         with the rest. This temporary hack is required to restore the property that
8118         the fully open instantiation is the same type of the generic type definition.
8120         * class-internals.h (mono_generic_class_is_generic_type_definition):
8121         new function as part of the internal API.
8123         * class.c (inflate_generic_type): return NULL when the generic inst is
8124         fully open. The fully open generic type is now the same as the generic type
8125         definition for non TypeBuilder types.
8127         * class.c (mono_generic_class_get_class): removed assert since it is
8128         no longer valid, gklass->cached_class can point to the generic type definition.
8130         * class.c (mono_generic_class_is_generic_type_definition): new.
8132         * metadata.c (mono_generic_class_hash): added is_tb_open field
8133         to the hash calculation.
8135         * metadata.c (free_generic_class): if the generic class is associated
8136         with the generic type definition, its field will come from the mempool and
8137         must not be freed.
8139         * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
8140         new, this function identifies the corner case of a TypeBuilder fully open
8141         instantiation.
8143         * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
8144         for lookup. Set gclass->cached_class to be the container class in case of
8145         the fully open instantiation of non TypeBuilder types.
8147         * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
8148         to compare generic classes.
8150         * reflection.c (method_encode_methodspec): remove assert that
8151         no longer is valid.
8153         * reflection.c (mono_reflection_generic_class_initialize): add
8154         an aditional assert to ensure the proper type is used.
8156 2007-09-26  Rodrigo Kumpera  <rkumpera@novell.com>
8158         * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
8159         to enjoy it.
8161 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
8163         * verify.c (push_arg): Fixed support for ldarga
8164         * verify.c (set_stack_value): Removed superfluous parameter, fixed the
8165         MonoType used as first arg in case of instance calls.
8167 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
8169         * verify.c: Support for verifying VAR and MVAR types, 
8171 2007-09-25  Zoltan Varga  <vargaz@gmail.com>
8173         * icall.c (ves_icall_get_property_info): Set the reflected type of the
8174         accessors correctly.
8176 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
8178         * threads.c: support OSX and other systems in
8179         mono_thread_get_stack_bounds (bug #328026).
8181 2007-09-25  Martin Baulig  <martin@ximian.com>
8183         * mono-debug.h
8184         (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
8186 2007-09-24  Martin Baulig  <martin@ximian.com>
8188         * mono-debug.h
8189         (MonoDebugClassEntry): Moved the definition of this struct into
8190         mono-debug.c to make it private.
8192         * mono-debug.c
8193         (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
8194         type table per symbol file, we don't need to store the symfile id
8195         any longer.
8197 2007-09-24  Martin Baulig  <martin@ximian.com>
8199         Create one type table per symbol file, since a `MonoClass *' gets
8200         invalid when its image is unloaded.
8202         * mono-debug.h (MonoSymbolTable): Removed `type_table'.
8203         (MonoDebugHandle): Added `type_table'.
8205 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
8207         * mempool.c, mempool.h: added mono_mempool_new_size () API
8208         to be able to specify a smaller initial size for the pool.
8209         Adjusted the code to slowly increase pool size before using
8210         the previous default size.
8211         * image.c: use a small initial size for image mempools.
8213 2007-09-23  Zoltan Varga  <vargaz@gmail.com>
8215         * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
8216         Fixes ##320990.
8218         * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal): 
8219         Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
8221 2007-09-22  Zoltan Varga  <vargaz@gmail.com>
8223         * metadata.c (mono_type_create_from_typespec): Remove an invalid
8224         free. Fixes #327438.
8226 2007-09-21  Raja R Harinath  <harinath@gmail.com>
8228         * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
8229         generic instantiations, etc.
8230         <MONO_TYPE_ARRAY>: Likewise.
8232 2007-09-21  Martin Baulig  <martin@ximian.com>
8234         * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
8235         these structs were never defined.
8236         (MonoDebugHandle): Removed the `_priv' field, it was never used.
8238 2007-09-21  Martin Baulig  <martin@ximian.com>
8240         * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
8242 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
8244         * image.c: removed the guid hash tables: we can get the same info
8245         without the additional memory usage hit (partially fixes also bug #327052).
8247 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
8249         * profiler.h, profiler-private.h, profiler.c: add a new profiler
8250         event to handle unloading methods. After the event is called, the
8251         corresponding MonoMethod* must be considered invalid.
8252         * loader.c (mono_free_method): call the new mono_profiler_method_free
8253         event.
8255 2007-09-20  Mark Probst  <mark.probst@gmail.com>
8257         * domain-internals.h: New flag in MonoJitInfo which marks shared
8258         generic methods.  New hash table (shared_generics_hash) in
8259         MonoDomain to keep track of shared generic methods.  Prototypes
8260         for functions to register and lookup shared generic methods.
8262         * domain.c: Support for registering and looking up shared generic
8263         methods via a hash table (shared_generics_hash) in MonoDomain.
8265         * class-internals.h: New exception to signal failure of shared
8266         compilation of a generic method.  New counters for generics
8267         sharing in MonoStats.
8269 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
8271         * image.c, metadata-internals.h: don't keep a file descriptor open
8272         for loaded assemblies (bug#325988).
8274 2007-09-19  Raja R Harinath  <rharinath@novell.com>
8276         * metadata.c (signature_in_image): New.  Carve out of type_in_image.
8277         (ginst_in_image, gclass_in_image): Simplify.  Change signature to
8278         use the corresponding datatypes.
8279         (type_in_image): Update to changes.
8280         (CleanForImageUserData): Simplify.
8281         (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
8282         Avoid quadratic behaviour in handling the "stolen" list by
8283         separating the filter predicate out, and by prepending the stolen
8284         items rather than appending them.
8285         (steal_ginst_in_image): Likewise.
8286         (mono_metadata_clean_for_image): Update to changes.
8288 2007-09-19  Martin Baulig  <martin@ximian.com>
8290         * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
8292 2007-09-19  Martin Baulig  <martin@ximian.com>
8294         * mono-debug.c (mono_debug_cleanup): Don't call
8295         mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
8297 2007-09-19  Raja R Harinath  <harinath@gmail.com>
8299         Fix crash on 'make run-test' in mcs/errors
8300         * metadata.c (type_in_image): New.  Carve out of ginst_in_image.
8301         Avoid more potential allocations in mono_class_from_mono_type.
8302         (ginst_in_image): Update to changes.
8303         (gclass_in_image): Rearrange slightly.
8305 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
8307         * class.c (mono_class_init): Move the code that sets up class->methods to 
8308         mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
8310         * metadata.c (mono_metadata_get_inflated_signature): New function to return a
8311         canonical instance of an inflated generic signature.
8312         (mono_type_create_from_typespec): Remove an invalid free.
8314         * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.  
8316 2007-09-18  Marek Habersack  <mhabersack@novell.com>
8318         * domain-internals.h: added a declaration of the
8319         mono_assembly_load_full_nosearch internal function.
8321         * assembly.c (mono_assembly_load_with_partial_name): use
8322         mono_try_assembly_resolve return value properly.
8323         (mono_assembly_load_full_nosearch): copied the function body from
8324         mono_assembly_load_full, without the code to invoke assembly
8325         search hooks.
8326         (mono_assembly_load_full): calls the above new function and if the
8327         assembly is not resolved, invokes the search hooks.
8329         * appdomain.c (mono_runtime_init): restore the global postload
8330         assembly search handlers.
8332 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
8334         * class.c (mono_class_init): Make sure class->methods and class->properties
8335         are never NULL in the generics case.
8337         * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
8339 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
8341         * metadata.c (free_generic_class): Disable some code to fix the build.
8343         * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
8345         * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
8346         from the image mempool.
8348         * metadata.c (free_generic_class): Free more data from the inflated class.
8350         * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
8352         * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
8353         mempool.
8354         (mono_type_create_from_typespec): Ditto.
8356         * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
8357         MonoImage to the caller.
8358         (mono_init_internal): Save the opened image in a global variable.
8359         (mono_cleanup): Close the image opened in get_runtimes_from_exe.
8361         * reflection.c (resolve_object): Fix a leak.
8363         * metadata.c: Fix the freeing of data in the generics caches.
8364         
8365         * metadata.c (free_generic_inst): Comment this out to fix the build.
8366         (free_generic_class): Ditto.
8368         * metadata.c: Free cached generic methods, instantinations and classes when
8369         they are removed from the caches.
8370         (mono_metadata_free_type): Free the type itself.
8372         * class.c: Free the result of mono_class_inflate_generic_type () in a few
8373         places.
8375 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
8377         * boehm-gc.c: restrict managed allocs to __thread supporting
8378         architectures.
8380 2007-09-16  Zoltan Varga  <vargaz@gmail.com>
8382         * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
8383         (mono_generic_class_get_class): Fix a leak.
8385         * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
8386         mono_metadata_free_type ().
8387         (mono_metadata_inflate_generic_inst): Fix a leak.
8389 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
8391         * mono-debug.c (free_header_data): Fix a leak missed earlier.
8393         * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
8394         mempool.
8396         * mono-debug.c (mono_debug_close_image): Fix call to 
8397         g_hash_table_remove ().
8399 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
8401         * icall-def.h: redirect all the string ctor to the managed
8402         CreateString () methods.
8403         * string-icalls.c, string-icalls.h: removed dead code for string
8404         ctors and icalls.
8406 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
8408         * mono-debug.c: Fix memory leaks.
8410 2007-09-14  Jonathan Chambers <joncham@gmail.com>
8412         * threads-types.h: Implement mono_hazard_pointer_set and 
8413         mono_hazard_pointer_clear macros using do/while(0) to fix
8414         compilation with MSVC.
8415         
8416         Code is contributed under MIT/X11 license.
8418 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
8420         * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
8421         -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
8423 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
8425         * icall-def.h, string-icalls.c: get rid of old, no longer used, string
8426         icalls.
8428 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
8430         * boehm-gc.c, gc-internal.h, object.c: allow strings to be
8431         managed-code allocated as well.
8433 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
8435         * class.c (mono_class_is_assignable_from): Add support for generic variance.
8437 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
8439         * boehm-gc.c: fixed the build after the AOT changes.
8441 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
8443         * wrapper-types.h: Add an ALLOC wrapper type.
8445         * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
8446         reference managed allocator methods.
8448 2007-09-12  Marek Safar  <marek.safar@gmail.com>
8450         * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
8451         of Type array and not MonoType, a fix suggested by Hari.
8452         
8453 2007-09-12  Jonathan Chambers <joncham@gmail.com>
8455         * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
8456         and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
8457         
8458         Code is contributed under MIT/X11 license.
8460 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
8462         * domain.c, object.c, mono-config.c, object-internals.h: Fixed  #82416.
8464 2007-09-12  Marek Habersack  <mhabersack@novell.com>
8466         * image.c (do_mono_image_open): if assembly file fails to open and
8467         MONO_IOMAP is in effect, try to find the path in a
8468         case-insensitive way.
8470         * appdomain.c (mono_runtime_init): do not install postload hooks -
8471         tests show that MS.NET doesn't use anything of that sort to
8472         trigger the AppDomain.AssemblyResolve event.
8473         (mono_try_assembly_resolve): renamed from try_assembly_resolve and
8474         made non-static.
8475         (mono_runtime_init): init portability helpers here.
8477         * assembly.c (mono_assembly_load_with_partial_name): if other   
8478         attempts fail, trigger the AppDomain.AssemblyResolve event handler
8479         to resolve the assembly.
8481         * domain-internals.h: added mono_try_assembly_resolve and marked
8482         it as internal.
8484 2007-09-11  Jb Evain  <jbevain@novell.com>
8486         * object-internals.h (MonoReflectionDynamicMethod): add
8487         a `MonoReflectionType *owner` field. The owner is used
8488         * reflection.c:
8489         (mono_reflection_create_dynamic_method): use the owner of the dynamic
8490         method as the class declaring the dynamic method.
8491         (reflection_methodbuilder_from_dynamic_method): copy the owner of the
8492         dynamic method to the declaring type of the methodbuilder.
8494 2007-09-11  Mark Probst  <mark.probst@gmail.com>
8496         * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
8497         rules for calling methods via reflection.
8499 2007-09-11  Zoltan Varga  <vargaz@gmail.com>
8501         * reflection.c (resolve_object): Add support for MonoGenericClass. 
8502         Inflate MonoType's.
8504 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
8506         * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
8507         provide a managed method that does fast allocations without needing
8508         a managed->unmanaged transition. Boehm GC implementation currently
8509         enabled for ptrfree objects on sane architectures.
8511 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
8513         * marshal.c, marshal.h: exported a couple of useful functions and
8514         added mono_mb_get_label () to easily handle backward branches.
8516 2007-09-10  Zoltan Varga  <vargaz@gmail.com>
8518         * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
8520 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
8522         * loader.c (find_method): Fixed the regression introduced while
8523         fixing bug #81466.
8525 2007-09-09  Zoltan Varga  <vargaz@gmail.com>
8527         * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
8528         well.
8529         
8530         * class.c loader.c metadata.c object.c class-internals.h object-internals.h
8531         icall.c reflection.c: Pass a MonoGenericContext argument to 
8532         mono_lookup_dynamic_token ().
8534         * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
8535         #82744.
8536         
8537 2007-09-09  Robert Jordan  <robertj@gmx.net>
8539         * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
8540         for generic methods.
8542         * object.c (mono_object_get_virtual_method): Handle generic methods.
8543         Fixes bug #78882.
8545         Code is contributed under MIT/X11 license.
8547 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
8549         * image.c: fix locking in mono_image_load_file_for_image ().
8551 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
8553         * reflection.c, icall.c, icall-def.h: the methodinfos name field is
8554         used only as a cache: added an icall to fill it.
8556 2007-09-16  Rodrigo Kumpera  <rkumpera@novell.com>
8558         * reflection.h: exposed mono_reflection_free_type_info
8559         * reflection.c (mono_reflection_get_type_internal): type_args is always freed
8560         since mono_reflection_bind_generic_parameters makes a copy of it.
8561         * reflection.c (free_type_info): subinfos should be freed.
8562         * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and 
8563         made non static.
8564         * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
8565         replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
8566         this fixes #82695 and #81726.
8567    
8569 2007-09-03  Atsushi Enomoto  <atsushi@ximian.com>
8571         * process.h, process.c:  added support for user profile/info in
8572           ProcessStartInfo. For now only Windows works.
8574 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
8576         * metadata.c: consider the generic arguments when comparing
8577         signatures (bug #82614).
8579 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
8581         * cil-coff.h, image.c: updated assembly loader to cope with the
8582         PE32+ 64 bit file format.
8584 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
8586         * assembly.c, class.c, domain.c, loader.c: remove useless
8587         inclusion of cil-coff.h.
8589 2007-08-29  Jonathan Chambers  <joncham@gmail.com>
8591         * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
8592         if interface is marked with CoClassAttribute. 
8593    
8594         Code is contributed under MIT/X11 license.
8596 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
8598         * sgen-gc.c: ensure no object from the to space is copied again or finalized
8599         if it's seen twice in major collections.
8601 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
8603         * sgen-gc.c: big objects are not copied to the gray area, but they
8604         need to be considered for scanning, too, if they are brought alive
8605         by an object ready for finalizations or a survived one.
8607 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
8609         * sgen-gc.c: properly account the number of disappearing links when
8610         they are nullified.
8612 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
8614         * sgen-gc.c: share the code to scan the registered roots between the
8615         different types of collections.
8617 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
8619         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
8621 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
8623         * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
8624         class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
8626 2007-08-28  Mark Probst  <mark.probst@gmail.com>
8628         * security-manager.c (mono_security_manager_get_methods):
8629         LinkDemandSecurityException now has 2 arguments instead of 3.
8631 2007-08-27  Zoltan Varga  <vargaz@gmail.com>
8633         * class.c (mono_class_layout_fields): Only do the struct alignment hack on
8634         platforms which need it.
8636 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8638         * sgen-gc.c: unregister thread data structures with a pthread_key_t
8639         dtor.
8641 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
8643         * threads.c: free the thread static data on thread exit.
8645 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
8647         * class.c: walk the hierarchy to find the generic definition for
8648         a class (fixes runtime part of bug #82498).
8650 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
8652         * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
8653         ...
8655         * image.c (mono_image_close): Here. Hopefully fixes #82510.
8657 2007-08-24  Mark Probst  <mark.probst@gmail.com>
8659         * monodiet.c (handle_cattrs): Fixed a custom attr leak.
8661 2007-08-24  Robert Jordan  <robertj@gmx.net>
8663         * appdomain.c: don't perform the ':'->';' substitution on Win32.
8665 2007-08-24  Jb Evain  <jbevain@novell.com>
8667         * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
8668         for byref types.
8670 2007-08-24  Mark Probst  <mark.probst@gmail.com>
8672         * threads.c: Make sure a thread gets cleaned up only once.  Fixes
8673         #82286.
8675 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
8677         * assembly.c: Fix a warning.
8678         
8679 2007-08-23  Marek Habersack  <mhabersack@novell.com>
8681         * appdomain.c: parse the <runtime> section looking for the probing
8682         element with the 'privatePath' attribute, which sets additional
8683         directories in which the runtime should look for assemblies.
8685 2007-08-23  Robert Jordan  <robertj@gmx.net>
8687         * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
8688         Fixes #82499.
8690 2007-08-23  Martin Baulig  <martin@ximian.com>
8692         * mono-debug.[ch]: Rename mono_debug_init_corlib() into
8693         _mono_debug_init_corlib() and remove it from the header file.
8695 2007-08-23  Martin Baulig  <martin@ximian.com>
8697         * mono-debug-debugger.c
8698         (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
8699         don't notify the debugger about it.
8701         * mono-debug-debugger.h
8702         (MonoDebuggerEvent): Removed `THREAD_ABORT'.
8704 2007-08-23  Robert Jordan  <robertj@gmx.net>
8706         * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
8707         Code is contributed under MIT/X11 license.
8709 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8711         * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
8713 2007-08-22  Martin Baulig  <martin@ximian.com>
8715         * mono-debug.c: Store debugging info on a per-domain basis and
8716         free it on domain unload.  Add support for unloading symbol files.
8718         * mono-debug.h
8719         (MonoDebugList): New typedef.
8720         (MonoSymbolTable):
8721         - add `data_tables and `type_table'.
8722         - replace 'symbol_files' and `num_symbol_files' with a
8723           `MonoDebugList *'.
8724         (mono_debug_data_table): Removed.
8725         (mono_debug_list_add): New public function.
8726         (mono_debug_list_remove): New public function.
8727         (mono_debug_init_1): Renamed into mono_debug_init_corlib().
8728         (mono_debug_init_2_memory): Renamed into
8729         mono_debug_open_image_from_memory().
8730         (mono_debug_close_image): New public function.
8731         (mono_debug_domain_create): Likewise.
8732         (mono_debug_domain_unload): Likewise.
8733         (MONO_DEBUGGER_VERSION): Bump to 60.
8735         * mono-debug-debugger.h
8736         (MonoDebuggerEvent):
8737         - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
8738         - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
8739         - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
8740         - rename `THREAD_CREATED' and `THREAD_EXITED' into
8741           `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
8742         - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
8743           meaning.
8744         (mono_debugger_add_symbol_file): Removed.
8745         (mono_debugger_add_type): Removed.
8746         (mono_debugger_lookup_type): Removed.
8747         (mono_debugger_lookup_assembly): Removed.
8749         * domain.c
8750         (mono_domain_create): Call mono_debug_domain_create().
8751         (mono_init_internal): Call mono_debug_init_corlib().
8753         * assembly.c
8754         (mono_assembly_close): Call mono_debug_close_image().
8756 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
8758         * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
8759         mmap call.
8761 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
8763         * sgen-gc.c: ensure section->pin_queue_end is initialized
8764         correctly when non pinning objects in the section have been found.
8766 2007-08-22  Marek Habersack  <mhabersack@novell.com>
8768         * appdomain.c (set_domain_search_path): cope with PrivateBinPath
8769         containing a list of directories separated by ':'. MSDN docs say
8770         the directories should be separated with ';'. Part of a bugfix for
8771         bug #81446
8773 2007-08-21  Rodrigo Kumpera  <rkumpera@novell.com>
8775         * class.c (mono_type_retrieve_from_typespec) : fixed the return type
8776         it should MonoType and not MonoClass.
8778 2007-08-21  Atsushi Enomoto  <atsushi@ximian.com>
8780         * culture-info-table.h : regenerated.
8782 2007-08-20  William Holmes  <billholmes54@gmail.com>
8784         *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
8785          to call ReplaceFile Kernel32 on windows or in io-layer.
8786         *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
8787         *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
8788          as an internal call.
8790         Code is contributed under MIT/X11 license.
8792 2007-08-20  Jb Evain  <jbevain@novell.com>
8794         * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
8795         and MONO_EXCEPTION_FIELD_ACCESS.
8797         * debug-helpers.[c|h]: new mono_field_full_name function.
8799 2007-08-20  Mark Probst  <mark.probst@gmail.com>
8801         * class.c: Removed class_security_level() and moved it to
8802         security-core-clr.c.
8804         * security-core-clr.c, security-core-clr.h: class_security_level()
8805         is now public and renamed to mono_security_core_clr_class_level().
8806         It also looks for security attributes in the classes a class is
8807         nested in.
8809 2007-08-20  Mark Probst  <mark.probst@gmail.com>
8811         * security-core-clr.c, security-core-clr.h: CoreCLR security
8812         utility functions.
8814         * Makefile.am: Added security-core-clr.[ch].
8816         * security-manager.c, security-manager.h: Functions and enum for
8817         setting and getting the security mode.
8819         * class.c: CoreCLR security checks.
8821 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
8823         * icall-def.h, process.c, process.h: implemented icall to get
8824         user/system processor times.
8826 2007-08-17  Mark Probst  <mark.probst@gmail.com>
8828         * domain.c, threads.c, class-internals.h, domain-internals.h: New
8829         reader-lock-free jit_info_table.
8831 2007-08-17  Zoltan Varga  <vargaz@gmail.com>
8833         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
8835         * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.   
8837         * object-internals.h (MonoException): Add missing _data member.
8839 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
8841         * loader.c (find_method, find_method_in_class): Fixed bug #81466,
8842         checking that only methods with matching qname or fqname are picked
8843         from implemented interfaces.
8845 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
8847         * verify.c (do_newarr):added, do type verification of
8848         newarr ops, push the right value on the eval stack.
8849         * verify.c (mono_method_verify): use do_newarr
8852 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
8854         * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
8855         factored the common code into get_boxable_mono_type, which
8856         is now using mono_type_get_full, this fixed byref related tests.
8858 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
8860         * class.c: added mono_type_get_full, this function has the same
8861         behavior of mono_class_get_full but the returned MonoType has
8862         all metadata of the associated token in case of a typespec token.
8863         * class.c: added mono_type_retrieve_from_typespec, used by 
8864         mono_type_get_full to retrieve the token type.
8865         * class.c (mono_class_create_from_typespec): changed to use
8866         mono_type_retrieve_from_typespec.
8867         * class.c (mono_ldtoken): changed to use mono_type_get_full
8868         for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
8869         * class-internals.h: exported mono_type_get_full for internal use.
8871 2007-08-16  Jb Evain  <jbevain@novell.com>
8873         * domain.c (supported_runtimes): add entry for
8874         the 'moonlight' runtime version.
8876 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
8878         * verify.c (mono_method_verify): small typo sliped in.  
8880 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
8882         * verify.c (do_unbox_value): added, do type verification of
8883         unboxing ops
8884         * verify.c (mono_method_verify): use do_unbox_value
8887 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
8889         * verify.c (dump_stack_value): fixed typo, was printing string
8890         instead of object on stack.
8891         * verify.c (do_box_value): moved the byref check up as it leads
8892         to invalid code and should be done earlier.
8893         * verify.c: improved error messages for and ldobj
8895 2007-08-15  William Holmes  <billholmes54@gmail.com>
8897         * marshal.c (emit_marshal_custom): Omit the call to 
8898           marshal_native_to_managed when calling native to managed 
8899           and the argument is specified as an out argument.
8901         Code is contributed under MIT/X11 license.
8903 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
8905         * verify.c: fixed the type checks for generics, function pointers and vectors.
8906         Added type verification for ldobj and ldtoken. The verifier
8907         would segfault if header or signature of a method contained references
8908         to non-existant types.
8910 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
8912         * marshal.c (cominterop_get_ccw): Patch from
8913         Bill Holmes to no walk up interface hierarchy. 
8914         All parent methods should be present in the interface for COM.
8915    
8916         Code is contributed under MIT/X11 license.
8918 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
8920         * marshal.c (emit_marshal_com_interface): Patch from
8921         Bill Holmes to handle COM Interfaces as return values
8922         for native->managed calls.
8923    
8924         Code is contributed under MIT/X11 license.
8926 2007-08-14  Jonathan Chambers  <joncham@gmail.com>
8928         * marshal.c (cominterop_get_idispatch_for_object): Implement
8929         for runtime callable wrappers.
8930    
8931         Code is contributed under MIT/X11 license.
8933 2007-08-13  Rodrigo Kumpera  <rkumpera@novell.com>
8935         * pedump.c (main): changed from mono_init to mono_init_from_assembly
8936         so 2.0 types are accessible
8939 2007-08-13  Miguel de Icaza  <miguel@novell.com>
8941         * domain.c (mono_init_internal): Call mono_assembly_load_friends
8942         once we load mscorlib.   Due to the order in which we initialize,
8943         the mono_assembly_load_full routine that loads mscorlib did not
8944         load friends.   We now load it once we load the
8945         mono_defaults.internals_visible_class class. 
8947         * assembly.c: Expose the mono_load_friend_assemblies method.
8949 2007-08-11  Rodrigo Kumpera  <rkumpera@novell.com>
8951         * verify.c: improved the handling of boxing, better
8952         type checking for unary ops and conversion. Fix bug
8953         regarding managed pointer compatibility checking
8955 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
8957         * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
8959         * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
8961 2007-08-09  Raja R Harinath  <rharinath@novell.com>
8963         * reflection.c (dup_type): Remove.
8964         * class.c (dup_type): Remove.
8965         (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
8966         instead of the dodgy 'dup_type'.
8967         (inflate_generic_type): Likewise.  Fix the VAR/MVAR cases to
8968         handle the case where 'dup_type' needed the second argument.
8970 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
8972         * domain.c: Fix a warning.
8974 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
8976         * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
8977         checking that methods with the same fqname are not overridden
8978         with a method from an ancestor.
8980 2007-08-07  Zoltan Varga  <vargaz@gmail.com>
8982         * threads.c (free_thread_static_data_helper): Avoid a crash if
8983         thread->static_data is not yet set.
8985 2007-08-07  Jonathan Chambers  <joncham@gmail.com>
8987         * marshal.c: Use correct image when emitting
8988         native wrapper for COM calls.
8989    
8990         Code is contributed under MIT/X11 license.
8992 2007-08-07  Atsushi Enomoto  <atsushi@ximian.com>
8994         * icall-def.h, security.c, security.h :
8995           added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
8997 2007-08-07  Martin Baulig  <martin@ximian.com>
8999         * mono-debug-debugger.h
9000         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
9002         * domain.c (mono_domain_free): Call
9003         `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
9005 2007-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
9007         * verify.c (check_underflow, check_overflow): error message now returns IL offset
9008         * verify.c (in_same_block): code should test if either offset is inside the clauses
9009         * verify.c (mono_method_verify): push the exception into the eval stack of exception
9010         and filter blocks
9012 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
9014         * image.c (mono_image_close): Fix a leak.
9016         * object.c (mono_runtime_invoke_array): Avoid using alloca.
9018         * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.        
9020 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
9022         * domain.c, threads.c, threads-types.h: fix memory retention issue
9023         with thread static variables not being cleared on domain unload.
9024         Reuse thread static slots after domain unload.
9026 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
9028         * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
9029         nullable type.
9031         * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
9032         now done in mono_runtime_invoke_array.
9034         * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the 
9035         receiver is a nullable type.
9037         * class.c (mono_class_is_assignable_from): Handle the case when klass is a 
9038         generic parameter.
9040 2007-08-03  Jonathan Chambers  <joncham@gmail.com>
9042         * marshal.c: Implement COM Objects as return type for 
9043         managed->unmanaged calls. Added Release calls for COM Object
9044         out/return values in managed->unmanaged calls.
9046         Code is contributed under MIT/X11 license.
9048 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
9050         * threads.h, threads-type.h: move the hazard pointer declarations
9051         to the private header.
9053 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
9055         * file-io.c, appdomain.c: memory leak fixes.
9057 2007-08-02  Dick Porter  <dick@ximian.com>
9059         * socket-io.c
9060         (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
9061         SO_REUSEADDR setting into io-layer/sockets.c.
9063 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
9065         * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
9066         from Object when called on a generic parameter. Fixes #82211.
9068 2007-08-01  Dick Porter  <dick@ximian.com>
9070         * file-io.c (convert_share): Test FileShare values bit-by-bit.
9071         Fixes bug 79250 yet again.
9073 2007-07-30  Martin Baulig  <martin@ximian.com>
9075         Merged the `debugger-dublin' branch.
9077         * mono-debug.h
9078         (MonoDebugDataTable): New typedef.
9079         (MonoDebugMethodAddressList): New typedef.
9080         (MonoDebugWrapperData): Removed.
9081         (MonoDebugSymbolTable): Removed `current_data_table',
9082         `current_data_table_size', `current_data_table_offset'.
9083         (MonoDebugDataItemType): Moved into mono-debug.c.
9084         (MonoDebugMethodJitInfo): Remove `address'.
9085         (mono_debug_data_table): New global variable.
9086         (mono_debug_lookup_method_addresses): New public function.
9087         (mono_debug_find_method): Take a `MonoMethod *', not a
9088         `MonoDebugMethodInfo *'.
9090         * mono-debug.c: Drop support for the old symbol tables.
9092 2007-06-28  Martin Baulig  <martin@ximian.com>
9094         * mono-debug.c (mono_debug_debugger_version): New public variable.
9096 2007-07-31  William Holmes  <billholmes54@gmail.com>
9098         * metadata.c Changed mono_type_create_from_typespec to not insert
9099           the type into the hash map until after
9100           do_mono_metadata_parse_type has completed.
9101         Fixes Bug #82194
9102         Code is contributed under MIT/X11 license.
9104 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
9106         * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
9107         generic parameter. Fixes #82211.
9109 2007-07-27  Jb Evain  <jbevain@novell.com>
9111         * pedump.c (dump_metadata, dump_metadata_header): dump
9112         versions contained in the metadata header.
9114 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
9116         * threads.c: register small_id_table with the GC.
9118 2007-07-27  Mark Probst  <mark.probst@gmail.com>
9120         * threads.c, threads.h, class-internals.h, object-internals.h:
9121         Hazard pointers, to be used by lock-free parallel algorithms.
9123 2007-07-26  Dick Porter  <dick@ximian.com>
9125         * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
9126         routine on non-windows platforms, as I've not managed to think of
9127         a non-kludgy way of doing this.  Finishes off bug 78739.
9129 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
9131         * object.c: properly setup interface_bitmap in proxy vtables.
9133 2007-07-25  Marek Habersack  <mhabersack@novell.com>
9135         * appdomain.c (get_shadow_assembly_location): do not use TickCount
9136         to create unique shadow copy target directories, use the domain's
9137         serial number instead. Each domain gets a unique target directory
9138         that way.
9140         * domain.c (mono_domain_create): added code to increment domain
9141         shadow copy serial number and cache the value in the current
9142         domain structure.
9144         * domain-internals.h (struct _MonoDomain): added a new field -
9145         shadow_serial to hold the serial number used in generation of
9146         shadow-copy directories. This is to make sure that the directory
9147         name is unique for each and every domain created. We avoid a race
9148         condition with overriding assemblies already in use by other app
9149         domains.
9151 2007-07-24  Rodrigo Kumpera  <rkumpera@novell.com>
9153         * class.c (mono_bounded_array_class_get): fixed memory leak when 
9154         binding generic parameters.
9156 2007-07-24  Raja R Harinath  <rharinath@novell.com>
9158         * metadata.c (do_mono_metadata_parse_generic_class): Use
9159         mono_metadata_lookup_generic_class.  Don't g_assert on a metadata
9160         error.
9162 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
9164         * loader.c, class-internals.h, reflection.c: removed the per-method
9165         generics hashtable: we use the global one through the call of
9166         mono_class_inflate_generic_method ().
9168 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
9170         * class.c, metadata.c, class-internals.h: introduce yet another
9171         generics global cache for inflated methods (fixes 98% of the perf
9172         issue in bug #81806).
9174 2007-07-23  Raja R Harinath  <rharinath@novell.com>
9176         Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
9177         * metadata.c (mono_metadata_lookup_generic_inst): Kill.
9178         (mono_metadata_get_generic_inst): New.  Given a list of MonoType*,
9179         return a MonoGenericInst containing (a copy) of those types.
9180         (mono_metadata_inflate_generic_inst): Update to changes.
9181         (mono_metadata_parse_generic_inst): Likewise.
9182         (mono_get_shared_generic_inst): Likewise.
9183         * reflection.c (mono_class_bind_generic_parameters): Likewise.
9184         (mono_reflection_bind_generic_method_parameters): Likewise.
9185         * metadata-internals.h: Likewise.
9186         * icall.c (free_generic_context): Kill.
9187         (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
9189         * reflection.c (reflection_methodbuilder_to_mono_method): Use
9190         mono_metadata_type_dup.
9191         * marshal.c (mono_mb_create_method): Likewise.
9193         * metadata.c (mono_metadata_type_dup): Rename from
9194         mono_metadata_type_dup_mp.  Take an optional mempool instead of a
9195         MonoImage.  Handle a few more cases, esp. when no mempool is given.
9196         * marshal.c, metadata-internals.h: Update to changes.
9198 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
9200         * class.c: fixed a small leak for array classes and removed warning.
9202 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
9204         * loader.c (mono_method_get_param_token): Make this work on generic methods.
9205         Return 0x8000000 for return parameters. Fixes #82161.
9207 2007-07-21  Marek Habersack  <grendello@gmail.com>
9209         * appdomain.c (get_shadow_assembly_location): append the current
9210         ticks value to the path. Avoids overwriting the same assemblies by
9211         several threads at the same time.
9213 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
9214         and Raja R Harinath  <rharinath@novell.com>
9216         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
9217         Simplify slightly.
9218         (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
9219         property for testing if a method is a generic method definition.
9221 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
9223         * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
9225 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
9227         * verify.c: used function from private branch, reverted to the one in class.h 
9229 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
9231         * verify.c: a typo slipped in and the code wont compile
9233 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
9235         * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
9236         disabled box instruction as it is doing the wrong thing
9237         improved stack dump messages, now it is easier to debug type related issues
9240 2007-07-19  Juraj Skripsky  <js@hotfeet.ch>
9242         * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak. 
9244 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
9246         * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from 
9247         TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
9248         grouped with class and valuetype. This change will simply 
9249         the code as it should be handled just like unmanaged pointers.
9251 2007-07-19  Mark Probst  <mark.probst@gmail.com>
9253         * class.c (concat_two_strings_with_zero): Fixed a silly bug.
9255 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
9257         * verify.c: several stack merge issues fixed, reference comparisons now
9258         check the type size. strict type check now works correctly.
9259         added more uses of IS_MANAGED_POINTER macro.
9260         fixed issues pointed by running the test suite against .net.
9261         
9263 2007-07-19  Mark Probst  <mark.probst@gmail.com>
9265         * class.c, loader.c, class-internals.h: Removed the
9266         MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
9267         defines.
9269         * icall.c: Better error checking in some internal reflection
9270         methods.
9272 2007-07-18  William Holmes  <billholmes54@gmail.com>
9274         * filewatcher.c : removed unused variable 'filename' in 
9275           ves_icall_System_IO_FSW_SupportsFSW
9277 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
9279         * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
9280         obsolete, removed.
9282 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
9284         * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
9285         
9286         * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
9288 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
9290         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
9291         Implement generics support.
9292         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
9294         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
9295         type_args and method_args arguments.
9296         (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
9297         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
9298         (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
9300 2007-07-13  Rodrigo Kumpera  <rkumpera@novell.com>
9302         * reflection.c: patch from Thong Nguyen to fix atribute resolution.
9303           It adds a rootimage parameter to mono_reflection_get_type_internal,
9304           adds new function mono_reflection_get_type_with_rootimage and use
9305           the rootimage to resolve the types instead of the current image
9307 2007-07-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>
9309         * culture-info-table.h: Forgot to update after r78304.
9311 2007-07-13  Raja R Harinath  <rharinath@novell.com>
9313         * class.c (mono_class_is_open_constructed_type)
9314         <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
9316 2007-07-12  Rodrigo Kumpera  <rkumpera@novell.com>
9318         * class.c (mono_bounded_array_class_get):  method fails if used with
9319         an incomplete TypeBuilder enum (no basetype field), fixed it by 
9320         avoiding calculating the size for such array as it cannot be instantiated.
9321         Fix bug #82015
9323 2007-07-12  Raja R Harinath  <rharinath@novell.com>
9325         * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
9326         field.
9327         * metadata.c, reflection.c: Update to changes.
9329 2007-07-11  Rodrigo Kumpera  <rkumpera@novell.com>
9331         * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
9332         mono_class_is_valid_enum, they are used to valide a enum when loading.
9333         * reflection.c: used new functions to throw TypeLoadException when and
9334         invalid enum is build with TypeBuilder. Fixes #82018
9335   
9336 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
9338         * object.c: forgot commit of mono_class_setup_methods () to access
9339         iface->methods.
9340         * object-internals.h: added a few more handy fields to
9341         MonoIMTCheckItem.
9343 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
9345         * object.c (build_imt): Call mono_class_setup_methods () before accessing 
9346         iface->methods.
9348 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
9350         * class-internals.h, object-internals.h, object.c: IMT-based
9351         interface invocation core from Massimiliano Mantione
9352         (massi@ximian.com) with a reworked arch-specific interface,
9353         bsearch implementation and a few bugfixes and memory savings by me.
9355 2007-07-10  Rodrigo Kumpera  <rkumpera@novell.com>
9357         * class.c (mono_class_create_from_typedef): mono would segfault if 
9358         an enum did not have a __value field. It now throws a TypeLoadException
9359         for such cases. Fix bug #82022
9361 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
9363         * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
9365 2007-07-09  Mark Probst  <mark.probst@gmail.com>
9367         * class.c (mono_class_init): If a class is already inited but has
9368         an exception_type set, return FALSE, not TRUE.  Fixes: 82050.
9370 2007-07-09  Mark Probst  <mark.probst@gmail.com>
9372         * class.c: Properly handle the case of an unimplemented interface
9373         method.  Fixes: 81673.
9375 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
9377         * class-internals.h, object.c: cleanup patch from massi: use
9378         MonoVTable->interface_bitmap since the vtable interfaces offset array
9379         is going away.
9381 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
9383         * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
9384         GetMDStreamVersion icall instead.
9386 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
9388         * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
9389         not use mono_dl_build_path() with a full library name: makes
9390         fallbacks to libgaim and libfam work.
9392 2007-07-06  William Holmes  <billholmes54@gmail.com>
9394         * assembly.c: Added a continue statement in probe_for_partial_name when
9395          parse_assembly_directory_name fails.  Fixes : 82002
9397 2007-07-06  Rodrigo Kumpera  <rkumpera@novell.com>
9399         * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
9400         and added a verification  for TYPEDBYREF.
9401         * verify.c (verify_stack_type_compatibility): fix handling of byref types,
9402         make native int interchangeable with int32 and some small cleanup and formating.
9403         * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
9404         handle byref of byref.
9405         * verify.c (push_local): handle byref of byref.
9406         * verify.c (do_binop): invalid mix of values is unverifiable
9407         * verify.c (do_invoke_method): fixed the handling of bad params on stack and
9408         added visibility checks
9409         * verify.c (field related method): added visibility checks
9410         * verify.c (do_push_field): cannot take the address of a temporary valuetype field
9412 2007-07-06  Zoltan Varga  <vargaz@gmail.com>
9414         * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
9415         string.
9417 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
9419         * profiler.c (mono_profiler_load): Fix an off-by-one error.
9421         * marshal.c (emit_marshal_string): When returning a string from managed code,
9422         allways make a copy even for unicode strings. Fixes #81990.
9424 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
9426         * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
9427         of byref generic inst types (bug #81997).
9429 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
9431         * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
9432         * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
9434 2007-07-02  Zoltan Varga  <vargaz@gmail.com>
9436         * marshal.c (emit_marshal_string): Add support for unicode strings in
9437         MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
9439 2007-07-02 Rodrigo Kumpera  <rkumpera@novell.com>
9441         * verify.c: field load/store are now verified, missing only access checks now
9443 2007-06-28  Martin Baulig  <martin@ximian.com>
9445         * mono-debug.c (mono_debug_debugger_version): New public variable.
9447 2007-06-24  Gert Driesen  <drieseng@users.sourceforge.net>
9449         * locales.c: When constructing DateTimeFormat or NumberFormat for
9450         MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
9451         MonoCultureInfo contructed from the current locale is always
9452         read-only and has UseUserOverride set to true. All MonoCultureInfo
9453         instances returned for GetCultures have both IsReadOnly and
9454         UseUserOverride set to true. Fixes part of bug #81930.
9456 2007-06-22  Jonathan Chambers  <joncham@gmail.com>
9458        * icall-def.h: Update System.__ComObject icalls
9459        * marshal.c: Avoid managed transition (and object creation)
9460        when looking up COM interface in RCW.
9461        * marshal.h: Ditto.
9462        
9463        Code is contributed under MIT/X11 license.
9465 2007-06-22  Zoltan Varga  <vargaz@gmail.com>
9467         * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
9468         to avoid crashes during assembly unloading.
9470 2007-06-22  Raja R Harinath  <rharinath@novell.com>
9472         Fix MethodInfo.IsGenericMethodDefinition
9473         * reflection.c (mono_reflection_bind_generic_method_parameters):
9474         Rearrange code to ensure we always uses a generic method definition.
9475         * class.c (mono_class_inflate_generic_method_full): Set
9476         'generic_container' field only for generic method definitions.
9477         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
9478         Use presense of 'generic_container' field as indication of being a
9479         generic method definition.
9481 2007-06-21  Zoltan Varga  <vargaz@gmail.com>
9483         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9485         * object-internals.h: Reflect changes in the layout of the managed Delegate
9486         class.
9487         
9488         * object-internals.h reflection.c icall-def.h: Applied patch from Robert
9489         Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
9490         runtime memory used by the dynamic method. Fixes #77146.
9492 2007-06-21  Dick Porter  <dick@ximian.com>
9494         * file-io.h: 
9495         * file-io.c (convert_share): Cope with FileShare.Delete.  Patch
9496         from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
9497         81767.
9499 2007-06-21  Raja R Harinath  <rharinath@novell.com>
9501         * reflection.c (method_encode_methodspec): Add a tripwire.
9502         * class.c (inflate_generic_type): The fully open generic type is
9503         not the same as the generic type definition.
9505 2007-06-21  Martin Baulig  <martin@ximian.com>
9507         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
9509         * mono-debug-debugger.h
9510         (MonoDebuggerBreakpointInfo): Removed.
9511         (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
9512         (mono_debugger_remove_breakpoint): Likewise.
9513         (mono_debugger_breakpoint_callback): Likewise.
9514         (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
9516 2007-06-21  Raja R Harinath  <rharinath@novell.com>
9518         * metadata.c (mono_metadata_lookup_generic_class): The fully open
9519         generic type is not the same as the generic type definition.
9520         * class.c (mono_generic_class_get_class): Likewise.
9522 2007-06-20  Geoff Norton  <gnorton@customerdna.com>
9524         * icall.c: The second argument to 
9525         System.Reflection.MethodBase.GetMethodFromHandleInternalType
9526         is a MonoType not a MonoClass.
9528 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
9530         * verify.c: support for function pointers in the verifier
9532 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
9534         * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
9536 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
9538         * assembly.c: removed Mono.Data.SqliteClient from the list of
9539         forward-compatible assemblies as it breaks the ABI (bug #81899).
9541 2007-06-19  Raja R Harinath  <rharinath@novell.com>
9543         * metadata.c (mono_metadata_lookup_generic_class): Protect cache
9544         lookup/update with the loader lock.
9545         * reflection.c (mono_class_bind_generic_parameters): No need to
9546         protect mono_metadata_lookup_* with the loader lock.
9547         * class.c (inflate_generic_type): Likewise.
9548         
9549         * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
9550         on a generic instantiated type.
9552 2007-06-18  Rodrigo Kumpera <kumpera@gmail.com>
9554         *verify.c: produce meanfull error messages on verification error
9555         *verify.c: fixed some cases of verification errors reported as validation errors
9556         *pedump.c: fixed the error name array, now it shows validation errors properly
9557         *verify.h: fixed the contant that should be used for verification errors
9559 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
9561         * metadata.c, image.c, metadata-internals.h: part of the fixes needed
9562         for bug #77596, 81858 and 80743 (generics data structures on domain
9563         unload).
9565 2007-06-15  Raja R Harinath  <rharinath@novell.com>
9567         Avoid allocating 'MonoGenericContext' on the heap.
9568         * class-internals (_MonoMethodInflated::context): Make field
9569         inline, not a pointer.
9570         * loader.c (method_from_methodspec): Allocate 'new_context' on the
9571         stack.  Use the context embedded within the inflated method as the
9572         hash key, rather than 'new_context'.
9573         * class.c (inflate_generic_context): Simplify.  Return a struct
9574         rather than allocating on the heap.
9575         (mono_class_inflate_generic_method_full): Update to changes.  Now,
9576         doesn't salt away a copy of the context -- simplifying the
9577         lifetime rules of a 'MonoGenericContext *'.
9578         (mono_method_get_context): Return pointer to embedded context.
9579         (setup_generic_array_ifaces): Allocate temporary context on stack.
9580         * reflection.c (inflate_mono_method): Likewise.
9581         (mono_reflection_bind_generic_method_parameters): Likewise.
9582         Use the context embedded within the inflated method as the hash key.
9584         Avoid a source of allocation of 'MonoGenericContext'.
9585         * class-internals.h (_MonoGenericClass::context): Combine 'inst'
9586         and 'cached_context' fields into embedded 'MonoGenericContext' field.
9587         * class.c: Update to changes.
9588         (mono_generic_class_get_context): Simplify drastically.  Now just
9589         returns a pointer to the field.
9590         * metadata-internals.h (mono_metadata_generic_context_hash): Mark
9591         argument as a const pointer.
9592         (mono_metadata_generic_context_equal): Likewise.
9593         * metadata.c, loader.c, icall.c, reflection.c, verify.c:
9594         Update to changes.
9596 2007-06-14  Rodrigo Kumpera  <kumpera@gmail.com>
9598         * verify.c improved the handling of brtrue/brfalse, factored out common code
9600 2007-06-14  Raja R Harinath  <rharinath@novell.com>
9602         Kill MonoGenericMethod.
9603         * class-internals.h (MonoGenericContext::method_inst): Rename from
9604         'gmethod' and convert to a MonoGenericInst.
9605         (MonoGenericMethod): Remove.
9606         * metadata.h (MonoGenericMethod): Note that the name is obsolete.
9607         * loader.c (method_from_methodspec): Update to changes.  Use a
9608         MonoGenericContext as the key to the hashtable.
9609         * metadata.c (mono_metadata_generic_context_equal): Rename from 
9610         'mono_metadata_generic_method_equal' and take MonoGenericContext.
9611         (mono_metadata_generic_context_hash): Likewise from
9612         'mono_metadata_generic_method_hash'.  Change hash function.
9613         (mono_metadata_load_generic_params): Update to changes.
9614         (mono_get_shared_generic_method): Remove.
9615         * metadata-internals.h (mono_get_shared_generic_method): Remove.
9616         * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
9617         (inflate_generic_context): Likewise.
9618         (mono_class_inflate_generic_method_full): Likewise.
9619         (setup_generic_array_ifaces): Likewise.
9620         (mono_class_create_from_typespec): Likewise.
9621         * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
9622         (method_encode_methodspec): Update callsite.
9623         (reflection_methodbuilder_to_mono_method): Update to changes.
9624         (mono_reflection_bind_generic_method_parameters): Likewise.  Use a
9625         MonoGenericContext as the key to the hashtable.
9626         (inflate_mono_method): Update to changes.
9628         * class-internals.h (MonoGenericMethod::container): Remove.
9629         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
9631 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
9633         * profiler-private.h, profiler.c, profiler.h: added API to profile
9634         exception events.
9636 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
9638         * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments 
9640 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
9642         * verify.c: method invocation is now validated, now we verify parameter types on stack.
9643         Fixed overflow and underflow not aborting the verification process.
9645 2007-06-13  Mark Probst  <mark.probst@gmail.com>
9647         * class-internals.h (MonoStats): Added stats entries for dynamic
9648         code allocations.
9650 2007-06-12  Zoltan Varga  <vargaz@gmail.com>
9652         * loader.c (mono_free_method): Free header->locals and header->clauses.
9654         * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
9655         dynamic case.
9657         * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
9659         * class.c (setup_interface_offsets): Allocate memory from the image mempool.
9661 2007-06-12  Raja R Harinath  <rharinath@novell.com>
9663         * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
9664         the tables.
9666 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
9668         *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
9670 2007-06-11  Raja R Harinath  <harinath@gmail.com>
9672         MonoGenericMethod on a diet
9673         * class-internals.h (_MonoMethodInflated::reflection_info): Move
9674         here ...
9675         (_MonoGenericMethod::reflection_info): ... from here.
9676         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
9677         Update to changes.
9678         * reflection.c (inflate_mono_method): Likewise.
9679         (mono_reflection_bind_generic_method_parameters): Likewise.
9681 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
9683         *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
9684         *verify.c: factored long ldarg forms to share code with short forms
9686 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
9688         *verify.c: fixed code formating factored some duplicate code
9689         into a new function
9691         *verify.h: fixed binary incompatibility introduced earlier
9693         *pedump.c: fixed formating
9695 2007-06-11  Raja R Harinath  <harinath@gmail.com>
9697         Fix assertion when disassembling Mono.C5.dll
9698         * loader.c (method_from_methodspec): Avoid inflating a method
9699         twice with the same context.  If the methodref is inflated, use
9700         the declaring method instead.
9702         * class.c (mono_class_from_generic_parameter): Fix case similar to
9703         bug #81830 handled below, but for method containers.
9705 2007-06-10  Raja R Harinath  <harinath@gmail.com>
9707         * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
9708         get_shared_generic_class.  Directly inflate the instance.
9709         [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
9710         (inflate_generic_class): Delete.
9711         (get_shared_generic_class): Delete.  Move setting of
9712         'cached_class' and 'cached_context' ...
9713         * metadata.c (mono_metadata_lookup_generic_class): ... here.
9715         * metadata.c (mono_metadata_lookup_generic_class): Change
9716         signature to take the components of a MonoGenericClass rather than
9717         an allocated MonoGenericClass.  Change semantics to be intern-like.
9718         * reflection.c (mono_class_bind_generic_parameters): Update to
9719         changes.  Make locking region tighter.
9720         * class.c (inflate_generic_class): Update to changes.
9721         (get_shared_generic_class): Likewise.
9722         * metadata-internals.h: Likewise.
9724         * reflection.c (mono_class_bind_generic_parameters): Take and
9725         return a MonoClass*, not a MonoType*.  Add 'is_dynamic' parameter.
9726         (mono_reflection_bind_generic_parameters): Use
9727         'mono_class_bind_generic_parameters' rather than duplicate the code.
9728         * class.c (mono_bounded_array_class_get): Update to changes.
9729         * object-internals.h: Likewise.
9731         * reflection.c (mono_class_bind_generic_parameters): Only support
9732         parameterizing generic type definitions.  Remove support for other
9733         open types.
9735 2007-06-08  Zoltan Varga  <vargaz@gmail.com>
9737         * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
9739         * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
9740         in the dynamic case.
9742 2007-06-08  Gert Driesen  <drieseng@users.sourceforge.net>
9744         * threads.c: When cleaning up thread, reset the Background bit.
9745         Fixes bug #81720.
9747 2007-06-08  Jonathan Chambers  <joncham@gmail.com>
9749        * metadata.c: Move variable declarations to top of scope.
9750        * verify.c: Move variable declarations to top of scope.
9752        Code is contributed under MIT/X11 license.
9754 2007-06-08  Raja R Harinath  <rharinath@novell.com>
9756         * reflection.c (mono_class_bind_generic_parameters): Replace
9757         open-coded loop with mono_metadata_inflate_generic_inst.
9759         * class.c (get_shared_generic_class): Don't call
9760         mono_get_shared_generic_inst.  Use the container's own
9761         'class_inst'.
9763         * metadata.c (mono_metadata_load_generic_params): Move
9764         initialization of 'context' field here from ...
9765         * class.c (mono_class_create_from_typedef): ... here, and ...
9766         * loader.c (mono_get_method_from_token): ... here.
9768         * class.c (get_shared_generic_class): Rename from
9769         mono_get_shared_generic_class and make static.
9770         (mono_get_shared_generic_inst): Move to metadata.c.
9771         * loader.c (mono_get_shared_generic_method): Likewise.
9772         * class-internals.h, metadata-internals.h: Update to changes.
9774         Fix #81830
9775         * class.c (mono_class_from_generic_parameter): Don't assume a
9776         generic container owner exists.  Generic containers from monodis
9777         don't have any.
9779 2007-06-06  Rodrigo Kumpera  <kumpera@gmail.com>
9781         * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
9782         * verify.h: new typedefs to returns the non-verifiable status
9783         * verify.c: initial implementation of generics, stack merging and object compatibility check
9785 2007-06-06  Mark Probst  <mark.probst@gmail.com>
9787         * class.c, image.c, class-internals.h (MonoImage): class_cache is
9788         a MonoInternalHashTable again (fixed bug in internal hash table
9789         code).
9791 2007-06-06  Mark Probst  <mark.probst@gmail.com>
9793         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
9794         MonoInternalHashTable again (fixed bug in internal hash table
9795         code).
9797 2007-06-06  Mark Probst  <mark.probst@gmail.com>
9799         * class.c, image.c, class-internals.h, domain.c,
9800         domain-internals.h (MonoImage): Reverting MonoInternalHashTable
9801         changes.  Have to figure out what makes them break the SWF
9802         regression.
9804 2007-06-04  Mark Probst  <mark.probst@gmail.com>
9806         * class.c, image.c, class-internals.h (MonoImage): class_cache is
9807         a MonoInternalHashTable now.
9809 2007-06-04  Mark Probst  <mark.probst@gmail.com>
9811         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
9812         MonoInternalHashTable now.
9814 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
9816         * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
9817         invoke_impl code.
9819         * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
9821         * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
9822         dependent trampoline.
9824         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9826         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
9828 2007-05-29  Robert Jordan  <robertj@gmx.net>
9830         * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
9832 2007-05-28  Zoltan Varga  <vargaz@gmail.com>
9834         * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
9836 2007-05-25  Jonathan Chambers  <joncham@gmail.com>
9838        * marshal.c: Fix interface lookup loops for
9839        cominterop_get_com_slot_for_method and 
9840        cominterop_get_method_interface. Only need to lookup
9841        if type is a class, else use interface type method is on.
9843        Code is contributed under MIT/X11 license.
9845 2007-05-25  Sebastien Pouliot  <sebastien@ximian.com>
9847         * reflection.c: HasSecurity can be present even if no specially 
9848         encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
9849         SecurityAttribute). Fix CAS regression tests on buildbot.
9851 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
9853        * appdomain.c: Add configure checks for header files.
9854        * image.c: Add configure checks for header files.
9855        * file-io.c: Add configure checks for header files.
9856        * debug-mono-symfile.c: Add configure checks for header files.
9857        * threadpool.c: Add configure checks for header files.
9858        * console-io.c: Add configure checks for header files.
9859        * profiler.c: Add configure checks for header files.
9860        * rawbuffer.c: Add configure checks for header files.
9861        * icall.c: Add configure checks for header files.
9862        * rand.c: Add configure checks for header files.
9863        * socket-io.c: Add configure checks for header files.
9865        Code is contributed under MIT/X11 license.
9867 2007-05-24  Zoltan Varga  <vargaz@gmail.com>
9869         * reflection.c (mono_custom_attrs_from_builders): Remove the 
9870         assertion as it breaks the build.
9871         
9872         * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
9874         * reflection.c (lookup_custom_attr): Make a copy here too.
9876         * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
9877         dynamic images.
9879         * class.c (mono_class_init): Avoid accessing the metadata in dynamic
9880         images.
9882         * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
9883         info.
9885 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
9887         * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
9888         (load_cattr_value): Ditto.
9890 2007-05-20  Zoltan Varga  <vargaz@gmail.com>
9892         * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
9894 2007-05-19  Gert Driesen  <drieseng@users.sourceforge.net>
9896         * threads.c: In "start_wrapper", set apartment_state to MTA if
9897         apartment_state is Unknown and we're running on 2.0 profile or
9898         higher.
9899         * object.c: In "mono_runtime_exec_main", if STAThread is not applied
9900         to main method, then set apartment_state to Unknown on 1.0 profile,
9901         and MTA on 2.0 profile.
9903 2007-05-16  Jb Evain  <jb@nurv.fr>
9905         * class-internals.h (MonoDefaults): Add an attribute_class and
9906           customattribute_data_class.
9907         * domain.c (mono_init_internal): Populate them.
9908         * reflection.c: Use them to remove duplicates. Make a vew
9909         MonoClass variables `static'.
9911 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
9913         * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
9914         step in implementing IMT, so that all isinst checks now can go
9915         through the bitmap.
9916         This was needed because vtables for TransparentProxy need to look
9917         like the vtable of the "target" class, so they need to point to
9918         its interface bitmap directly.
9920         * object.c: inside "mono_class_create_runtime_vtable" and
9921         "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
9923 2007-05-15  Atsushi Enomoto  <atsushi@ximian.com>
9925         * object-internals.h
9926           culture-info.h : added territory field in MonoCulture and
9927           CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
9928         * locales.c : fill territory field above too.
9929         * culture-info-table.h : regenerated.
9931 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
9933         * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
9934         Fixes #81599.
9936 2007-05-11  Jonathan Chambers  <joncham@gmail.com>
9938         * object.c: Always initialize apartment, even if 
9939         there is no custom attributes on entry point.
9940         
9941         Code is contributed under MIT/X11 license.
9943 2007-05-10  Jonathan Chambers  <joncham@gmail.com>
9945         * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
9946         * metadata.c: If no encoding is set, check for unicode
9947         on class.
9948         
9949         Code is contributed under MIT/X11 license.
9951 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
9953         * threads.c: Handle if mono_thread_current returns NULL 
9954         
9955         Code is contributed under MIT/X11 license.
9957 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
9959         * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
9960         in start_wrapper. Added mono_thread_init_apartment_state and
9961         mono_thread_cleanup_apartment_state.
9962         * object.c: Initialize thread apartment state on main thread
9963         by checking for STAThreadAttribute on entry point.
9964         * object-internals.h: Add apartment_state field to MonoThread.
9965         * threads-types.h: Add unmanaged definition of 
9966         System.Threading.ApartmentState, MonoThreadApartmentState.
9967         
9968         Code is contributed under MIT/X11 license.
9969         
9970 2007-05-08  Jonathan Chambers  <joncham@gmail.com>
9972         * class.c: Fix windows build.
9973         * class-internals.h: Fix windows build.
9974         
9975         Code is contributed under MIT/X11 license.
9977 2007-05-08  Robert Jordan  <robertj@gmx.net>
9979         * process.c (CreateProcess_internal):
9980         Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
9981         .CreateNoWindow was specified. Fixes #81496.
9983 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
9985         * class-internals.h: Removed "MonoClass.interface_offsets" as a first
9986         step in implementing IMT, replaced it with two compact arrays
9987         (interfaces_packed and interface_offsets_packed) and a bitmap that
9988         is used for isinst checks (interface_bitmap).
9990         * class.c: (compare_interface_ids): compare function to pass to
9991         bsearch when looking for an interface with a given id.
9992         (mono_class_interface_offset): reimplemented using bsearch on
9993         interfaces_packed, getting the offset from interface_offsets_packed.
9994         (print_implemented_interfaces): utility debugging function.
9995         (setup_interface_offsets): reworked to initialize interfaces_packed,
9996         interface_offsets_packed and interface_bitmap.
9998         * object.c: replaced all accesses to "MonoClass.interface_offsets"
9999         with uses of interfaces_packed and interface_offsets_packed.
10001 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
10003         * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
10004         mono_class_interface_offset prototype to wrap all accesses to
10005         "MonoClass.interface_offsets".
10007         * class.c: Implemented mono_class_interface_offset, and wrapped all
10008         accesses to "MonoClass.interface_offsets".
10010         * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
10011         "MonoClass.interface_offsets".
10013 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
10015         * icall.c, icall-def.h: implemented new GetFieldFromHandle and
10016         GetMethodFromHandle overloads (bug #78637).
10018 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
10020         * assembly.c: parse ProcessorArchitecture in assembly name and ignore
10021         it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
10023 2007-05-01  Zoltan Varga  <vargaz@gmail.com>
10025         * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
10026         #81498.
10028         * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
10029         gracefully.
10030         (mono_custom_attrs_from_index): Ditto.
10032         * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes. 
10033         Fixes #81501.
10035 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
10037         * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
10038         is now allocated from a mempool.
10040 2007-04-28  Zoltan Varga  <vargaz@gmail.com>
10042         * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
10043         caller holds threads_lock, leading to deadlocks. Fixes #81476.
10045 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
10047         * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
10048         mono_loader_clear_error () too late. Fixes #81463.
10050 2007-04-26  Atsushi Enomoto  <atsushi@ximian.com>
10052         * culture-info-table.h : regenerated.
10054 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
10056         * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
10057         is missing.
10059 2007-04-25  Dick Porter  <dick@ximian.com>
10061         * Makefile.am: Put the mingw enforced-optimisation back into the
10062         PLATFORM_WIN32 section.
10064 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
10066         * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
10067         patch.
10069         * image.c (mono_image_load_module): New API function to load a module reference.
10071         * image.c (load_modules): Load modules lazily. Fixes #80812.
10073         * class.c (mono_class_from_typeref): Use mono_image_load_module.
10074         
10075         * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
10077         * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this 
10078         to mono_image_load_module_dynamic.
10080 2007-04-23  Jonathan Chambers  <joncham@gmail.com>
10082         * marshal.c: Fix calling convention for CCW on non-windows
10083         platforms. STDCALL on windows, CDECL everywhere else to work 
10084         with XPCOM and MainWin COM.
10085         
10086         Code is contributed under MIT/X11 license.
10088 2007-04-23  Martin Baulig  <martin@ximian.com>
10090         Fix #80969.
10092         * loader.c
10093         (method_from_memberref): Added `gboolean *used_context' argument.
10094         (mono_get_method_from_token): Likewise.
10095         (mono_get_method_full): Don't insert the method in the cache when
10096         `used_context' is true.
10098 2007-04-23  Raja R Harinath  <rharinath@novell.com>
10100         * monodiet.c (add_types_from_method): Fix "wrong type" warning.
10102         * reflection.c (mono_reflection_bind_generic_parameters): Don't
10103         create new MonoTypes for returned types.
10104         * class.c (mono_generic_class_get_class): Export mono-internal.
10105         * class-internals.h: Update to changes.
10107 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
10109         * threadpool.c, threadpool.h, icall-def.h: patch from
10110         Robert Jordan to implemnt ThreadPool.SetMaxThreads.
10112 2007-04-18  Zoltan Varga  <vargaz@gmail.com>
10114         * threads.c (mono_thread_get_stack_bounds): Fix windows build.
10115         
10116         * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
10118         * threads.c (mono_thread_get_stack_bounds): New helper function.
10120         * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
10121         Correctly compute stack bounds when attaching. Fixes #81394.
10123 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
10125         * reflection.c: fix handling of doubles in custom attributes
10126         for the arm-fpa format (bug #81368).
10128 2007-04-18  Raja R Harinath  <rharinath@novell.com>
10130         * reflection.c (assembly_add_win32_resources): Mildly relax an
10131         bounds check to let the end pointer point just past the end of the
10132         allocated buffer.  (may fix #81384)
10134 2007-04-17  Atsushi Enomoto  <atsushi@ximian.com>
10136         * culture-info-table.h : regenerated.
10138 2007-04-07  Zoltan Varga  <vargaz@gmail.com>
10140         * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
10141         the thread is aborted early.
10143 2007-04-05  Dick Porter  <dick@ximian.com>
10145         * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
10146         FindFirstFile()/FindNextFile() to find entries.  This lets the
10147         io-layer versions use MONO_IOMAP compatibility helpers.  Fixes bug
10148         81038.
10150         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
10151         the parameters of
10152         ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
10154 2007-04-04  Martin Baulig  <martin@ximian.com>
10156         * debug-helpers.c
10157         (mono_method_desc_full_match): Add support for nested classes.
10159 2007-04-02  Zoltan Varga  <vargaz@gmail.com>
10161         * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
10163 2007-04-01  Zoltan Varga  <vargaz@gmail.com>
10165         * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
10166         waiting for too many threads.
10168 2007-03-28  Sebastien Pouliot  <sebastien@ximian.com>
10170         * environment.c: Fix return value check on uname so we can get the 
10171         executing version on Solaris operating systems.
10173 2007-03-28  Jb Evain  <jbevain@gmail.com>
10175         * class.c (mono_type_get_name_recurse): Complete the
10176         fix for the creation of assembly qualified names for
10177         pointer types. Fixes #81208.
10179 2007-03-27  Dick Porter  <dick@ximian.com>
10181         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
10182         of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
10183         changed.
10185         * threads.c
10186         (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
10187         the value of ReleaseMutex().
10189 2007-03-27  Dick Porter  <dick@ximian.com>
10191         * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
10192         in little-endian order, not network endian, so must be converted
10193         to host endian here.  Fixes bug 80593.
10195 2007-03-22  Jb Evain  <jbevain@gmail.com>
10197         * class.c (mono_type_get_name_recurse): Fix the creation of assembly
10198         qualified names for pointer types. Fixes #81208.
10200 2007-03-21  Jonathan Chambers  <joncham@gmail.com>
10202         * marshal.c: Add support for PreserveSigAttribute. 
10203         
10204         Code is contributed under MIT/X11 license.
10206 2007-03-14  Zoltan Varga  <vargaz@gmail.com>
10208         * process.c: Fix endianness issues. Fixes #81126.
10210         * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
10211         multiple circular calls made from the same DynamicMethod work. Fixes #81141.
10213         * image.c (mono_image_lookup_resource): Make this work on big-endian
10214         machines.Change API contract so the caller needs to free the return value.
10215         
10216         * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
10217         API change.
10218         
10219 2007-03-14  Martin Baulig  <martin@ximian.com>
10221         * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
10222         mono_type_get_desc() as well.
10224 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
10226         * icall.c:  Fix environ access in VS.  
10227         
10228 2007-03-13  Alp Toker  <alp@atoker.com>
10230         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
10231         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
10232         #63841.
10234 2007-03-12  Zoltan Varga  <vargaz@gmail.com>
10236         * reflection.c (mono_reflection_create_dynamic_method): Add support for 
10237         circular references among dynamic methods. Fixes #81091.
10239         * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
10241 2007-03-09  Martin Baulig  <martin@ximian.com>
10243         * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
10245 2007-03-09  Jonathan Chambers  <joncham@gmail.com>
10247         * appdomain.c:  Fix shadow copy on Windows. Use g_snprintf instead
10248         of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.  
10249         
10250         Code is contributed under MIT/X11 license.
10251         
10252 2007-03-09  Gert Driesen  <drieseng@users.souceforge.net>
10254         * loader.c: Reapply patch for bug #79424.
10256 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
10258         * metadata.c (mono_type_to_unmanaged): Only convert object to
10259         MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
10261 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
10263         * class-internals.h, class.c, metadata.c, reflection.c: removed unused
10264         (and incorrectly set) is_reference field from MonoGenericInst.
10266 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
10268         * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
10269         a little earlier.
10271         * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
10273         * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
10275 2007-03-05  Miguel de Icaza  <miguel@novell.com>
10277         * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
10278         FileOptions.1 value to mean "temporary", map that to
10279         FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
10281         Fixes 80688
10283 2007-03-03  Marek Habersack  <mhabersack@novell.com>
10285         * appdomain.c: implement MS .Net style shadow copying. Copies of
10286         the assemblies are made in a subdirectory of the dynamic base
10287         directory, the assembly names are preserved.
10288         Copy .mdb and .config files along with the assemblies being shadowed.
10290 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
10292         * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
10293         (emit_marshal_handleref): Ditto.
10295         * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
10296         on Visual C++. Fixes #80671.
10298 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
10300         * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
10301         for clone operations.
10303 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
10305         * marshal.c: Fix warnings.
10307 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
10309         * loader.c: allow case-insensitive matching of the dll name
10310         in dllmap handling when prefixed with "i:".
10312 2007-02-20  Jonathan Chambers  <joncham@gmail.com>
10314         * threads.c: Fix #ifdef for dummy_apc function for VS.
10316 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
10318         * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
10320 2007-02-19  Massimiliano Mantione  <massi@ximian.com>
10321         * class.c (mono_class_setup_vtable_general): Fix bug 75903,
10322         giving precedence to the methods with a fully qualified name
10323         (InterfaceName.MethodName) when building the interface sections
10324         of the vtable.
10326 2007-02-16  Dick Porter  <dick@ximian.com>
10328         * threadpool.c (append_job): Fix fast-path array handling, so it's
10329         less likely the array will grow exponentially when the load is
10330         heavy.
10332 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
10334         * metadata-internals.h, loader.c: fix dllmap lookup order
10335         for non-function maps, too, and prepare for fallback code.
10337 2007-02-12  Robert Jordan  <robertj@gmx.net>
10339         * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
10340         to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
10341         and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
10342         GlobalFree. Fixes a part of bug #77075.
10344 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
10346         * loader.c: implemented typedef parent in field memberref.
10348 2007-02-11  Jonathan Chambers  <joncham@gmail.com>
10350         * marshal.c: Fix warnings and remember to call Release on
10351         IUnknown of RCW.
10352         
10353         Code is contributed under MIT/X11 license.
10355 2007-02-10  Miguel de Icaza  <miguel@novell.com>
10357         * class-internals.h: Add MonoHandleRef definition, and
10358         handleref_class to mono_defaults. 
10360         * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
10361         structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
10363         * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
10364         (do nothing on this stage)
10365         (emit_object_to_ptr_conv): Extract the handle from the HandleRef.  
10366         (emit_marshal_handleref): New method, used for argument handling
10367         of HandleRefs. 
10369 2007-02-08  Jonathan Chambers  <joncham@gmail.com>
10371         * class.c (mono_class_setup_parent): Lazily init com types.
10372         * domain.c (mono_init_internal, mono_init_com_types): Lazily 
10373         init com types.
10374         * object.c (mono_remote_class_vtable): Lazily init com types.
10375         * class-internals.h: Add iunknown and idispatch to MonoDefaults.
10376         * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
10377         * domain-internals.h: Expose mono_init_com_types.
10378         * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
10379         * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
10380         Add support for COM Callable Wrapper marshalling.
10381         * marshal.h: Add icall definitions.
10382         * gc.c: Handle freeing of CCWs in finalizer code.
10383         
10384         Code is contributed under MIT/X11 license.
10386 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
10388         * reflection.c: changed all the signature encoding code to use
10389         a variable-sized buffer.
10391 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10393         * marshal.c: locking fixes: never take the loader lock
10394         or other runtime locks when holding the marshal lock
10395         (fixes bug#80664).
10397 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
10399         * marshal.c: make the delegate function pointer mapping
10400         work for the moving GC.
10402 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
10404         * marshal.c: fix from Robert Jordan (robertj@gmx.net)
10405         for bug #80618.
10407 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10409         * image.h, loader.c, metadata-internals.h: use mono-dl instead of
10410         gmodule.
10412 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
10414         * threadpool.c: made the code moving-GC safe.
10416 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
10418         * assembly.c, boehm-gc.c, class-internals.h, class.c,
10419         debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
10420         monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
10421         warning cleanup.
10422         * reflection.c: warning cleanup, some threading and moving GC fixes.
10424 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
10426         * class.c, loader.c: create the needed Set/Get/Address array methods
10427         as well as the .ctors in mono_class_init (), fixes bug #80567.
10429 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
10431         * class.c (mono_class_layout_fields): When force-aligning a field, make sure
10432         we doesn't decrease its alignment. Should fix the sparc build.
10434 2007-01-24  Dick Porter  <dick@ximian.com>
10436         * socket-io.c
10437         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
10438         Create the returned object if we need to ignore an unsupported
10439         socket option.  Fixes a segfault reported by Atsushi.
10441 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
10443         * class.c, object.c: restrict GC-tracked fields to
10444         UIntPtr fields used inside corlib, so we provide better
10445         type info to the GC and also allow broken packing as in
10446         bug #80580.
10448 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
10450         * sgen-gc.c: removed duplicated function.
10452 2007-01-19  Miguel de Icaza  <miguel@novell.com>
10454         *  socket-io.c (convert_sockopt_level_and_name): return -2 as a
10455         value that means that the value is not supported, but that we
10456         should not return a failure, but instead report this as a
10457         successful operation.
10459 2007-01-19  Raja R Harinath  <rharinath@novell.com>
10461         Fix tests/bug79956.2.il
10462         * class.c (mono_type_get_underlying_type): Handle genericinst enums.
10463         (mono_generic_class_get_class): If the generic definition in an
10464         enum, copy over other fields related to it.
10466 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
10468         * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
10469         genericinst enums (bug #79215).
10471 2007-01-17  Massimiliano Mantione  <massi@ximian.com>
10472         * class.c: Fix bug 80307.
10474 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
10476         * image.c: if the file table is not present, try to load
10477         all the modules, since we don't have info about them
10478         having or not metadata (bug #80517).
10479         * assembly.c: allow mono_assembly_load_references () to
10480         work for netmodules.
10482 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
10484         * image.c, metadata-internals.h, object.c: execute module
10485         cctors when running on the 2 runtime if present (bug #80487).
10487 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
10489         * icall.c: optimized InitializeArray() on bigendian.
10491 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
10493         * icall.c: fix for the broken ARM FPA double format.
10495 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
10497         * icall.c: handle endian issues for r4 and r8 types, too, in
10498         the InitializeArray() icall.
10500 2007-01-15  Miguel de Icaza  <miguel@novell.com>
10502         * loader.c (mono_loader_error_prepare_exception): Clear the error
10503         once we have extracted the information from it, do this before we
10504         call into the JIT's class loading mechanisms.
10506         * object.c (mono_class_create_runtime_vtable): Do not clear the
10507         loader error before calling mono_class_get_exception_for_failure
10508         as the loader error is needed inside
10509         mono_class_get_exception_for_failure to throw the error (thinko).
10511         Fixes #80521
10512         
10513 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
10515         * reflection.c: align fields rva data so it's faster to load at
10516         runtime.
10518 2007-01-12  Raja R Harinath  <rharinath@novell.com>
10520         Prepare to simplify GenericMethod handling.
10521         * class-internals.h (mono_method_get_context): New accessor function.
10522         * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
10523         rather than directly accessing '->context' field.
10525         * class-internals.h (_MonoGenericParam.method): Move ...
10526         (_MonoGenericContainer): ... here.  Add into union with klass field.
10527         * class.c, icall.c, loader.c, metadata.c, reflection.c:
10528         Update to changes.
10530 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
10532         * Makefile.am, class-internals.h, debug-helpers.c: consolidate
10533         the wrapper type enum and reduce relocations.
10535 2007-01-12  Raja R Harinath  <rharinath@novell.com>
10537         * reflection.c (inflate_mono_method): Reuse method instantiation
10538         from the generic method, if available.
10540 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
10542         * marshal.c (emit_marshal_variant): Fix conv_arg
10543         type in last commit, based on whether parameter is byref.
10544         
10545 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
10547         * marshal.c (emit_marshal_variant): Handle unmanaged->managed
10548         marshalling.
10549         (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
10550         MONO_TYPE_OBJECT back for VARIANT support.
10552 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
10554         * marshal.c, marshal.h, icall-def.h: Implement 
10555         Marshal.ReAllocCoTaskMem.
10557 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
10559         * marshal.c: memory retention fixes: use the proper
10560         image cache for runtime_invoke method lookups.
10562 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
10564         * mempool.c: added code to help debug mempool allocations.
10566 2007-01-11  Dick Porter  <dick@ximian.com>
10568         * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
10569         support (experimenting with faking it with IP_MTU_DISCOVER for
10570         systems that don't have IP_DONTFRAGMENT.)
10571         (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
10572         icall.
10574         * icall-def.h: new System.Net.Sockets.Disconnect icall.
10576         * socket-io.h: Add new fields to MonoSocketAsyncResult
10577         corresponding to the new ones in Socket.cs.
10579 2007-01-11  Raja R Harinath  <rharinath@novell.com>
10581         Fix IronPython regression mentioned in #80249
10582         * metadata.c (do_mono_metadata_parse_generic_class): Clear
10583         'cached_context' field, since it may have been initialized as a
10584         side-effect of metadata parsing.
10586         * class-internals.h (_MonoGenericClass.is_inflated): Remove.
10587         (_MonoGenericClass.cached_class): Move here and rename from lone
10588         remaining field of ...
10589         (_MonoInflatedGenericClass): ... this.  Remove.
10590         * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
10591         to changes.
10593         Fix mcs/tests/test-128.cs regression.
10594         * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
10595         2007-01-10 change below.
10596         [MONO_TYPE_OBJECT]: Recurse into array case.
10598 2007-01-11  Raja R Harinath  <harinath@gmail.com>
10600         * class-internals.h (mono_get_inflated_generic_class): Remove.
10601         * class.c (mono_get_inflated_generic_class): Remove.
10602         (mono_generic_class_get_class): Rename from
10603         mono_class_create_generic.
10604         (mono_class_from_mono_type) [GENERICINST]: Use it.
10605         * reflection.c, metadata.c: Update to changes.  Use
10606         'mono_class_from_mono_type'.
10608 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
10610         * reflection.c: use passed type when encoding an array element
10611         in custom attributes (patch from David Mitchell, dmitchell@logos.com).
10613 2007-01-09  Robert Jordan  <robertj@gmx.net>
10615         * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
10616         result arguments (someDelegate.EndInvoke (unrelatedAres)).
10617         Fixes bug #80392.
10619 2007-01-09  Raja R Harinath  <rharinath@novell.com>
10621         * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
10623         * object.c (set_value): Avoid aliasing between type->data.klass
10624         and type->data.generic_class.
10626         * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
10628 2007-01-08  Raja R Harinath  <rharinath@novell.com>
10630         * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
10631         between type->data.klass and type->data.generic_class.
10633 2007-01-08  Lluis Sanchez  <lluis@ximian.com>
10635         * marshal.c: In MS.NET, StringBuilder objects are not copied by
10636         value in out parameters.
10638 2007-01-08  Raja R Harinath  <rharinath@novell.com>
10640         Simplify invariant for MonoGenericClass::klass field.
10641         * class.c (mono_class_create_generic): Verify 'klass' is null.
10642         * metadata.c (do_mono_metadata_parse_generic_class): Don't
10643         initialize 'klass' field.
10645 2007-01-05  Raja R Harinath  <rharinath@novell.com>
10647         Ongoing work to avoid redundant data and simplify invariants.
10648         * class-internals.h (_MonoGenericMethod.class_inst): Rename from
10649         'generic_class', and change type to a GenericInst.
10650         (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
10651         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
10653 2007-01-05  Atsushi Enomoto  <atsushi@ximian.com>
10655         * class.c : skip io-layer under PLATFORM_WIN32.
10657 2007-01-03  Tor Lillqvist  <tml@novell.com>
10659         Fix #80305: In a bundled executable, look in the bundled exe
10660         assembly to determine the runtime version. Add the possibility to
10661         bundle also the machine.config file.
10662         
10663         * assembly.c (mono_assembly_open_from_bundle): Make
10664         non-static. Allow being called even if we have no bundled
10665         assemblies, and return NULL right away in that case.
10667         * domain-internals.h: Declare mono_assembly_open_from_bundle()
10668         here.
10670         * domain.c (app_config_parse): Take an assembly exe file name as
10671         parameter instead of a config file name. Check for a bundled
10672         config file for that assembly by calling
10673         mono_config_string_for_assembly_file() (see below) before looking
10674         for one in the file system.
10675         (get_runtimes_from_exe): Corrsponding change to call of
10676         app_config_parse().
10677         (get_runtimes_from_exe): Check for bundled assembly exe file first
10678         by calling mono_assembly_open_from_bundle(). If no bundled
10679         assembly exe file is found, call mono_image_open() as before to
10680         look it up in the file system.
10682         * mono-config.c: Add variable bundled_machinec_onfig.
10683         (mono_config_string_for_assembly_file): New function.
10684         (mono_config_for_assembly): Move code snippet that looks for a
10685         bundled assembly .config file into the above new function. Call
10686         it.
10687         (mono_register_machine_config, mono_get_machine_config): New
10688         functions to set and retrieve
10690         * assembly.h: Declare mono_register_machine_config().
10692         * mono-config.h: Declare mono_get_machine_config() and
10693         mono_config_string_for_assembly_file().
10695         * icall.c: No declaration of environ necessary on Win32. It is
10696         declared (as a macro expanding to a function call) in stdlib.h.
10697         (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
10698         New internal mono function. Returns the value of
10699         mono_get_machine_config() as a Mono string.
10701         * icall-def.h: Add get_bundled_machine_config().
10703 2007-01-04  Raja R Harinath  <rharinath@novell.com>
10705         Remove redundant field
10706         * class-internals.h (_MonoGenericContext.container): Remove field.
10707         * loader.c (mono_method_get_signature_full): Don't parse a
10708         "container" for a signature parse when the signature is inflated
10709         immediately.
10710         (method_from_methodspec): Likewise, for a generic_inst.
10711         * class.c, metadata.c, reflection.c: Update to changes.
10713 2006-01-04  Raja R Harinath  <rharinath@novell.com>
10715         * class-internals.h (_MonoGenericClass): Rename 'context' field to
10716         'cached_context', and change semantics -- it starts off NULL, and
10717         is initialized on demand.
10718         * class.c (mono_generic_class_get_context): New accessor to
10719         replace 'context' field accesses.
10720         (mono_class_get_context): New helper.
10721         (*): Update to changes.
10722         * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
10724 2007-01-03  Miguel de Icaza  <miguel@novell.com>
10726         * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
10727         before the memcpy.   Fixes Marshal2 regression.
10729 2007-01-02  Jb Evain  <jbevain@gmail.com>
10731         * blob.h: add a MONO_TYPE_ENUM definition
10732         * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
10733         fix the encoding of arrays of enums in custom attributes.
10735         Fixes #79666.
10737 2007-01-01  Miguel de Icaza  <miguel@novell.com>
10739         * marshal.c (mono_string_to_byvalwstr): Fix this routine.   The
10740         string is null terminated, but only cut the string short if it
10741         overflows the buffer.   
10742         
10743         (mono_string_to_byvalstr): Also fix this routine.   The code here
10744         was not properly terminating a string (it was only terminated
10745         because of the previous catch-all memset). 
10747         I left the memset, because I do not know if applications expect
10748         the runtime to clear this region. 
10750         Fixes #79944.
10752         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
10753         Clear the error before returning to unmanaged code to prevent the
10754         runtime from being confused later on (fixes  80420).
10755         (ves_icall_type_from_name): Always call mono_loader_clear_error
10756         after parsing a type that could have failed.
10757         (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
10759         * loader.c (mono_loader_clear_error): Fix indentation.
10761 2006-12-28  Martin Baulig  <martin@ximian.com>
10763         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
10765 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
10767         * reflection.c: patch from Rolf Bjarne Kvinge to fix
10768         getting a token for an EnumBuilder.
10770 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
10772         * reflection.c: be more careful in case resource generation
10773         fails to create the data array.
10775 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
10777         * sgen-gc.c: write barrier for clone and fix unregister handles.
10779 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
10781         * reflection.c: some fixes needed in the generics code for the moving GC.
10783 2006-12-22  Robert Jordan  <robertj@gmx.net>
10785         * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
10786         account. Fixes bug #80299.
10788 2006-12-21  Raja R Harinath  <rharinath@novell.com>
10790         Fix WaitHandle usage in delegates.
10791         * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
10792         * object.c (mono_wait_handle_new): Use the property set method to
10793         initialize the handle.
10794         (mono_wait_handle_get_handle): New.
10795         * threadpool.c (mono_async_invoke): Use it.
10796         * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
10797         Likewise.
10798         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
10800 2006-12-21  Jonathan Chambers  <joncham@gmail.com>
10802         * marshal.c (emit_marshal): Call emit_marshal_variant and
10803         emit_marshal_com_interface when applicable.
10804         (emit_marshal_variant, emit_marshal_com_interface): Add
10805         methods for this case and remove if's from emit_marshal_object.
10806         
10807 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
10809         * filewatcher.c: updated to use the mono-dl API instead of gmodule.
10811 2006-12-19  Jonathan Chambers  <joncham@gmail.com>
10813         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
10814         ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
10815         and GlobalFree on Windows. Remove FIXME.
10817 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
10819         * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
10820         implementation for managed objects.
10822 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
10824         * object.c: implemented code to be used for checking
10825         that no reference field overlaps with non-references.
10827 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
10829         * threadpool.c: fix queue code to be compatible with the
10830         moving GC.
10832 2006-12-18  Miguel de Icaza  <miguel@novell.com>
10834         * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
10835         in structures by throwing ArgumentNullException.
10837         (emit_marshal_safehandle): Also when they are null parameters.
10839         (emit_marshal_safehandle): Add support for ref
10840         SafeHandles parameters
10842 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
10844         * profiler.c: updated to use the mono-dl API instead of
10845         gmodule.
10847 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
10849         * profiler.c: updated to use the mono-dl dynamic loading
10850         API instead of gmodule.
10852 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
10854         * profiler.c: use readlink, older versions of glib don't have
10855         g_file_read_link ().
10857 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
10859         * profiler.c: try to detect the path to mono if libc fails to provide
10860         a useful name (bug #80286).
10862 2006-12-16  Raja R Harinath  <rharinath@novell.com>
10864         Fix #80242
10865         * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
10866         instance, use the generic type definition instead.
10867         (ves_icall_Type_GetNestedTypes): Likewise.
10868         * class.c (mono_class_create_generic): Always set the
10869         nested_classes of a generic instance to NULL, even if the generic
10870         type definition has nested types.
10872 2006-12-15  Jonathan Chambers  <joncham@gmail.com>
10874         * marshal.c (mono_string_from_bstr): Revert previous Windows change
10875         and fix on Linux.
10876         
10877 2006-12-15  Miguel de Icaza  <miguel@novell.com>
10879         * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
10880         my arguments were in the wrong order.   I also fixed the Windows
10881         version which seems to have had the same issue.
10883         (mono_free_bstr): On Unix, this is g_free.
10884         (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
10885         conversions (for the tests in corlib to pass).
10887 2006-12-14  Miguel de Icaza  <miguel@novell.com>
10889         * marshal.c (emit_ptr_to_object_conv): For now, ignore
10890         MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
10891         exception if a ref SafeHandle in a struct has changed).
10892         
10893         (emit_struct_conv): Do not perform layout checks for classes
10894         derived from SafeHandle, as those are specially handled. 
10896         (emit_object_to_ptr_conv): Add support for
10897         MONO_MARSHAL_CONV_SAFEHANDLE conversion. 
10899         (emit_marshal_safehandle): Implement conversion of return values
10900         of safehandles (MARSHAL_ACTION_CONV_RESULT).
10901         
10902         * threads.c: WaitHandle now is compiled with two different handles
10903         "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
10904         for 2.0.
10905         
10906         (ves_icall_System_Threading_WaitHandle_WaitAll_internal) 
10907         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
10908         these routines to cope with both kinds of fields.
10910 2006-12-12  Miguel de Icaza  <miguel@novell.com>
10912         * metadata.c (mono_type_to_unmanaged): Handle the case where
10913         type->data.klass is a SafeHandle, and in that case, return the
10914         size of a pointer (MONO_NATIVE_INT) and set the conversion to be
10915         MONO_MARSHAL_CONV_SAFEHANDLE. 
10917 2006-12-11  Miguel de Icaza  <miguel@novell.com>
10919         * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
10920         MONO_TYPE_OBJECT cases and check for a SafeHandle here before
10921         calling emit_marshal_object.
10923         (emit_marshal_safehandle): Implement marshalling of
10924         SafeHandle parameters (no ref support yet).
10926         (MarshalAction): Document the defines as I implement
10927         them for SafeHandle.
10929         (emit_marshal_object): indentation police.
10931         * class-internals.h: Define MonoSafeHandle.
10932         Add safehandle_class to MonoDefaults type.
10934         * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
10935         list of classes to check for fields. 
10937         * domain.c (mono_init_internal): Add SafeHandle to the list of
10938         mono_defaults loaded.
10940 2006-12-15  Raja R Harinath  <rharinath@novell.com>
10942         Fix #80253
10943         * reflection.c (mono_reflection_bind_generic_parameters): If the
10944         generic type definition is a type builder, ensure that it is fully
10945         initialized before instantiating it.  Kill some dead code.
10947 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
10949         * object.c: clear the loader_error () before loading
10950         more metadata stuff (bug #80258).
10952 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
10954         * icall.c, icall-defs.h: type modifiers icalls for
10955         parameters and properties.
10957 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
10959         * object.c, icall.c: fixed warnings.
10961 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
10963         * marshal.c: fixed a couple of leaks and coding style in a few places.
10965 2006-12-08  Dick Porter  <dick@ximian.com>
10967         * process.c: Cope with NULL ProcessStartInfo arguments on windows
10968         too.  Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
10969         80173.
10971 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
10973         * process.c: ProcessStartInfo may have only filename set and
10974         arguments can be NULL.
10976 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
10978         * icall.c: fix leak found by Robert Jordan.
10980 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
10982         * marshal.c, marshal.h: generate managed method to access an element
10983         of a multi-dimensional array.
10985 2006-11-30  Paolo Molaro (lupus@ximian.com)
10987         * metadata.c, marshal.c: locking fixes when writing to image->mempool.
10989 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
10991         * icall.c: back out GetFields () fix until the serialization code is
10992         fixed to not depend on the incorrect behaviour.
10994 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
10996         * profiler.c: provide defaults if none are set.
10998 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
11000         * Makefile.am, attrdefs.h: new public header file with
11001         constants for attributes for use by embedders.
11003 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11005         * icall.c: GetFields () fix for bug #80064.
11007 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
11009         * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
11010         removed long unused icalls.
11012 2006-11-27  Jonathan Chambers  <joncham@gmail.com>
11013   
11014         * marshal.c: 
11015                 (mono_marshal_emit_managed_wrapper): Level of indirection for 
11016                 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
11017                 can be generated without a delegate class.
11018                 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
11019         
11020         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
11022 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11024         * console-io.c: add the 'signal' call removed by mistake. Fixes bug
11025         #80069.
11027 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
11029         * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
11030         icall-def.h: added icalls needed by System.GC.
11032 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
11034         * loader.c: ensure the class in catch clauses is handled
11035         correctly for generics methods (fixes bug#79980).
11037 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
11039         * monitor.h, monitor.c: added mono_locks_dump () function
11040         to help debug deadlocks involving managed locks.
11042 2006-11-13  Dick Porter  <dick@ximian.com>
11044         * file-io.c (get_file_attributes): If the file is a symlink try
11045         and get the stat data for the target, but also add the
11046         FILE_ATTRIBUTE_REPARSE_POINT flag.  This is an attempt to follow
11047         the specs for the windows symlink support, but will probably have
11048         to be reworked when I have test data from a vista machine.  Fixes
11049         bug 79887.
11051 2006-11-13  Dick Porter  <dick@ximian.com>
11053         * gc.c (mono_domain_finalize): 
11054         * marshal.c (mono_delegate_begin_invoke): 
11055         * threadpool.c (socket_io_init, mono_thread_pool_init)
11056         (mono_thread_pool_finish): 
11057         * monitor.c (mono_monitor_try_enter_internal): 
11058         * threads.c (mono_thread_resume, mono_thread_init)
11059         (mono_thread_suspend_all_other_threads)
11060         (mono_thread_execute_interruption): 
11061         * appdomain.c (mono_domain_unload): Check for NULL error returns
11062         from CreateThread(), CreateEvent() and CreateSemaphore().  See bug
11063         75733.
11065 2006-11-11  Miguel de Icaza  <miguel@novell.com>
11067         * process.c
11068         (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
11069         Only close the handle if the value of the handle is not
11070         INVALID_HANDLE_VALUE.  This just makes the process a bit more
11071         robust.
11073         Improvement for #75733, so that we do not run into this problem. 
11075         
11076         * assembly.c (check_path_env, check_extra_gac_path_env): Do not
11077         include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
11078         internal variables.  Fixes #79462 
11079         
11081 2006-11-09  Dick Porter  <dick@ximian.com>
11083         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
11084         Use poll() not select().  Fixes bug 79397.
11086 2006-11-09  Raja R Harinath  <rharinath@novell.com>
11088         Fix #79872
11089         * assembly.c (mono_assembly_load_from_full): Check that the given
11090         image has an assembly manifest.
11092 2006-11-09  Ankit Jain  <jankit@novell.com>
11094         * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
11095         (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
11096         (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
11098 2006-11-07  Dick Porter  <dick@ximian.com>
11100         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
11101         Put the old resolver behaviour back for pre-2.0 profiles.
11103 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
11105         * threadpool.c: precise GC and locking fixes.
11107 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
11109         * class.c: don't load types that have an explicit unaligned
11110         managed reference. Provide better info in the TypeLoad exception.
11111         Part of the fix for bug #79744.
11112         * object.c: use the correct check for class type load issues.
11114 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
11116         * class.c: enforce alignment of fields with managed references
11117         even when Pack=1 is forced by the user (bug #77788).
11119 2006-11-03  Dick Porter  <dick@ximian.com>
11121         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
11122         If the address reverse lookup fails, return it as the hostname
11123         anyway.  Fixes bug 79721.
11125 2006-11-03  Dick Porter  <dick@ximian.com>
11127         * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
11128         Fix build on Windows.
11130 2006-11-02  Dick Porter  <dick@ximian.com>
11132         * icall-def.h: 
11133         * object-internals.h: 
11134         * exception.c (mono_get_exception_thread_interrupted): 
11135         * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
11136         Fixes bug 74525.
11138         * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
11139         Check for pending Thread.Interrupt.
11141 2006-10-27  Massimiliano Mantione  <massi@ximian.com>
11142         * loader.c: Fixed bug 79684.
11144 2006-10-27  Dick Porter  <dick@ximian.com>
11146         * file-io.c (get_file_attributes): Force symlinks to directories
11147         to be returned as a regular file.  Fixes bug 79733.
11148 2006-10-26  Dick Porter  <dick@ximian.com>
11150         * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
11151         CreateFile to open a directory then we need to set the
11152         FILE_FLAG_BACKUP_SEMANTICS flag.  Fixes bug 75285.
11154 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
11156         * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
11157         friends.
11159 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
11161         * sgengc.c: small cleanup of timer code.
11163 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
11165         * sgen-gc.c: fix some warnings and start adding support for
11166         complete object removal on domain unload.
11168 2006-10-22  Gert Driesen  <drieseng@users.sourceforge.net>
11170         * assembly.c: build_assembly_name should not consider a version
11171         number without build or revision number invalid. Fixes bug #79715.
11173 2006-10-18  Jonathan Chambers  <joncham@gmail.com>
11175         * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
11176         call kernel32 function OutputDebugString directly.
11177         
11178         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
11179         
11180 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
11182         * reflection.c: small cleanup, using a function to insert a MonoString
11183         in the string heap.
11185 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
11187         * reflection.c: moving GC fixes.
11189 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
11191         * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
11192         all the objects with finalizers belonging to an unloading appdomain.
11194 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
11196         * sgen-gc.c: added ability to allocate even when the nursery is fully
11197         pinned and fixed a couple of bugs.
11199 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
11201         * threads.h: Revert the last change for now.
11203         * threads.h (mono_thread_get_pending_exception): Rename this to
11204         mono_thread_get_undeniable_exception ().
11206 2006-10-15  Gert Driesen  <drieseng@users.sourceforge.net>
11208         * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
11209         BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
11210         when fname does not refer to valid assembly. This result in a more
11211         meaningful error message.
11212         * exception.c: added mono_get_exception_bad_image_format2 which 
11213         constructs a BadImageFormatException using the ctor taking a custom
11214         message and the file name. Passing in a NULL msg results in a default
11215         message.
11216         * exception.h: define mono_get_exception_bad_image_format2 function.
11217         * icall.c: in InternalGetAssemblyName, throw BadImageFormatException 
11218         when file name pointed to an invalid IL image. Use 
11219         mono_get_exception_file_not_found2 to construct FileNotFoundException,
11220         as this results in a more meaningful error message.
11222 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
11224         * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
11225         #79465.
11227 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
11229         * metadata.c (mono_type_size): Change the align parameter to guint32 for
11230         consistency with the other _size functions.
11231         (mono_type_stack_size): Ditto.
11233         * class.c object.c icall.c: Fix warnings caused by the above change.
11235         * class.c (mono_class_get_method_from_name_flags): Fix a typo.
11237         * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
11239         * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
11241 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
11243         * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
11244         process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
11245         socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
11246         threadpool.h, threads-types.h: mark more internal functions.
11248 2006-10-11  Dick Porter  <dick@ximian.com>
11250         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
11251         Fix typo spotted by Robert Jordan in bug 79352 (though I can't
11252         reproduce the bug even before applying the fix.)
11254 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
11256         * reflection.c: allow retrieving attributes for arguments in generic
11257         methods (bug #79241).
11259 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
11261         * debug-mono-symfile.c: properly check fopen () result (found by
11262         coverity).
11264 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
11266         * reflection.c: make error message clearer and fixed two
11267         issuelets found by Coverity.
11269 2006-10-10  Zoltan Varga  <vargaz@gmail.com>
11271         * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
11273 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
11275         * object-internals.h, gc-internal.h, profiler-private.h:
11276         mark internal functions.
11278 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
11280         * reflection.c: put data in the text section.
11281         * icall.c: recognize more types in type_from_typename ().
11282         * process.c, marshal.c: added some GC FIXMEs.
11284 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
11286         * loader.c: check for NULL before initializing.
11288 2006-10-09  Zoltan Varga  <vargaz@gmail.com>
11290         * gc.c (finalizer_thread): Use a non-alertable wait here.
11292         * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
11293         until the correct solution is found.
11295 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
11297         * reflection.c (mono_module_get_object): Avoid an assert when operating on
11298         modules with no metadata. Fixes #79596.
11300         * image.c (load_metadata_ptrs): Put back the error message when
11301         the #- heap is encountered since the support is not complete yet.
11303 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
11305         * gc.c: do not allow the user to SuppressFinalize () a
11306         delegate because it would leak the trampoline if present.
11308 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
11310         * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
11311         PropertyPtr table.
11313 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
11315         * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
11317         * metadata.c (mono_metadata_get_param_attrs): Ditto.
11319         * row-indexes.h: Add definitions for *Ptr tables.
11321         * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
11323         * metadata.c (mono_metadata_translate_token_index): New helper function to
11324         translate table indexes used in uncompressed metadata.
11325         (mono_metadata_decode_table_row): Ditto.
11326         (mono_metadata_decode_table_row_col): Ditto.
11328         * metadata.c: Add table schema for *Ptr tables.
11330         * class.c loader.c: Use the new helper function to access the affected metadata
11331         tables.
11332         
11333         * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
11334         #38532.
11335         
11336 2006-10-04  Zoltan Varga  <vargaz@gmail.com>
11338         * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
11339         sequences which can be unbounded in size. Fixes #79583.
11341 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
11343         * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
11344         static initialization.
11346         * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
11348         * class-internals.h (MonoVTable): Add an 'init_failed' flag.
11350         * domain.c (mono_domain_free): Free up type_init_exception_hash.
11352         * object.c (mono_runtime_class_init): Implement correct semantics when a static
11353         ctor fails, i.e. throw the same exception on subsequent accesses.
11354         
11355 2006-09-0  Jonathan Chambers  <joncham@gmail.com>
11357         * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
11358         * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
11359         Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
11360         Handle marshalling of interfaces and VARIANTs contained in structs.
11361         
11362         Code is contributed under MIT/X11 license.
11363         
11364 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
11366         * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
11367         
11368         * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
11369         mempool.
11371 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11373         * console-io.c: ignore previous SIGINT handler.
11375 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
11377         * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
11378         (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
11379         #79460, #79461, #79485.
11381         * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
11383         * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
11384         #79217.
11386 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
11388         * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
11389         could be generated from it.
11391 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
11393         * rand.c: fix read loop to correctly handle EINTR.
11395 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
11397         * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
11398         internal calls are defined to keep methods closer to the declaring
11399         type and allow a significant reduction in runtime relocations and
11400         memory usage.
11402 2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>
11404         * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
11405         exception message to have FileNotFoundException use the default
11406         assembly load error message. Fixes bug #79426.
11407         * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
11409 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11411         * threadpool.c: (start_thread_or_queue) use the root domain when
11412         creating the thread instead of the async object one.
11414 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
11416         * class.c, object.c, class-internals.h, reflection.c:
11417         for arrays, store element_size inside MonoClass (speedup
11418         for array object creation).
11420 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
11422         * icall.c: fixed CodeBase to use the file name and not the module
11423         name (bug #79365).
11425 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
11427         * mono-debug.c, mono-debug.h: export find_method as
11428         mono_debug_find_method ().
11430 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
11432         * debug-helpers.c, class-internals.h: added a few functions useful
11433         when debugging under gdb.
11435 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11437         * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
11438         characters that need special handling.
11440 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
11442         * mono-config.c: make the os/cpu specification more flexible,
11443         allowing lists and negation.
11445 2006-09-18  Jonathan Chambers  <joncham@gmail.com>
11447         * marshal.c: COM Interop fixes. Handle case where method->klass.
11448         is interface. Handle BSTR/MonoString when null. Use CDECL as 
11449         calling convention on non-windows platforms. This is for
11450         compatibility with XPCOM and MainWin COM.
11451         
11452         Code is contributed under MIT/X11 license.
11453         
11455 2006-09-18  Zoltan Varga  <vargaz@gmail.com>
11457         * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
11458         correctly. Fixes #79217.
11460         * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
11462 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
11464         * mono-config.c: allow both an os and cpu attribute for dllmap
11465         and dllentry elemnets to enable a single config file to be used
11466         for multiple architectures.
11468 2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>
11470         * loader.c: MonoLoaderError was cleared too soon on load failure.
11471         Fixes bug #79424.
11473 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
11475         * icall.c: use the defining class vtable when accessing a
11476         static field, not a pobblibly derived class.
11478 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
11480         * icall.c string-icalls.c: Remove references to unicode.h.
11482         * unicode.h unicode.c Makefile.am: Remove these unused source files.
11484         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
11486         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
11487         indicating the image where custom marshaller types should be looked up.
11488         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
11489         custom marshallers, instead of corlib. Fixes #79425.
11491 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
11493         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
11495 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
11497         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
11498         Implement Environment.ProcessorCount.
11499         
11500         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
11501         Implement Environment.ProcessorCount.
11502         
11503         * icall.c: 
11504         Add Environment.ProcessorCount icall.
11505         
11506         Patch by Jason McFall.
11508 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11510         * assembly.c: don't append .exe/.dll when the filename already contains
11511         one of those extensions.
11513 2006-09-12  Martin Baulig  <martin@ximian.com>
11515         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
11516         to array interfaces.
11518 2006-09-11  Martin Baulig  <martin@ximian.com>
11520         * reflection.c (mono_image_build_metadata): Create the
11521         MethodImpl's after emitting all types and methods, so we don't
11522         need another fixup pass for them.
11524 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
11526         * class.c (mono_class_from_name_case): Fix regression introduced by the last
11527         change.
11529 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
11531         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
11532         unload.
11534 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
11536         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
11537         args is not set. Fixes #78926.
11539 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
11541         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
11543         * image.c (load_class_names): Move this to class.c, and rename it to 
11544         'mono_image_init_name_cache'.
11545         (load_modules): Fix a warning.
11547         * class.c icall.c image.c: Initialize image->name_cache lazily.
11549         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
11550         on its name using information in the AOT file.
11552         * class.c (mono_class_from_name): Use the new hook function.
11554 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
11556         * reflection.c (mono_param_get_objects): Handle enum default parameter values
11557         correctly.
11559         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
11560         Fixes #79289.
11561         
11562 2006-09-06  Martin Baulig  <martin@ximian.com>
11564         * icall.c (mono_lookup_internal_call): Small fix.
11566 2006-09-05  Raja R Harinath  <rharinath@novell.com>
11568         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
11569         double g_free.
11571 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
11573         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
11574         when --debug is specified.
11576 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
11578         * class.c (setup_generic_array_ifaces): Fix a warning.
11580 2006-09-04  Miguel de Icaza  <miguel@novell.com>
11582         * Temporarily remove the patch to assemly.c that checks the
11583         assembly versions as it breaks our gacutil.
11585 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
11587         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
11589         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
11590         a net 1.0 runtime.
11592         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
11593         created using the default ctor. Fixes #79152.
11594         (mono_string_builder_to_utf16): Ditto.
11596 2006-09-01  Martin Baulig  <martin@ximian.com>
11598         Fix handling of the generic array interfaces.
11600         * class-internals.h
11601         (MonoDefaults): Removed `generic_array_class' and added
11602         `generic_ilist' class.
11604         * class.c
11605         (mono_bounded_array_class_get): Add the new generic array interfaces.
11606         (setup_generic_array_ifaces): New static method; create vtable
11607         entries for each method in the generic array interfaces.
11609         * metadata.c
11610         (select_container): Allow "parent-less" generic methods.
11612         * marshal.c
11613         (mono_marshal_get_generic_array_helper): New public method.
11615         * icall.c
11616         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
11617         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
11618         moved the interncall into System.Array.
11620 2006-09-01  Raja R Harinath  <rharinath@novell.com>
11622         A few more cases of avoiding work on types with ->byref set.
11623         Has the real fix for #79238
11624         * icall.c (is_generic_parameter): New helper.
11625         (ves_icall_Type_GetGenericParameterPosition): Use it.
11626         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
11627         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
11628         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
11629         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
11630         reference types.
11631         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
11632         reference types.
11633         (ves_icall_Type_get_IsGenericInstance): Likewise.
11634         (ves_icall_Type_get_IsGenericType): Likewise.
11636 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
11638         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
11639         class if possible.
11641         * mempool.h (mono_mempool_get_allocated): New helper function.
11643         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
11644         change.
11646         * mempool.c: Fix warnings and the calculation of stats.
11648         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
11650         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
11652         * loader.c (mono_get_method_from_token): Update method_count stat.
11654         * class-internals.h (MonoStats): Add some stats.
11656 2006-08-31 Robert Jordan  <robertj@gmx.net>
11658         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
11659         with managed variants.
11660         All code is contributed under the MIT/X11 license.
11661         
11662 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
11664         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
11665         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
11667         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
11669         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
11670         with cycles in classes.
11672         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
11674         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
11675         missing a [MarshalAs] directive. Fixes #79203.
11677         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
11678         klass->marshal_info. Fixes #79217.
11680 2006-08-30  Martin Baulig  <martin@ximian.com>
11682         Committing a patch from Joachim Ante <joe@otee.dk>:
11683         Add support for binary data symbol stores.
11685         * debug-mono-symfile.c
11686         (mono_debug_open_mono_symbol_file): Renamed into
11687         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
11688         arguments.
11690         * mono-debug.c
11691         (mono_debug_open_image): Added `raw_contents' and `size' args.
11692         (mono_debug_init_2_memory): New public function.
11694 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
11696         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
11698 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11700         * appdomain.c: implement support for ShadowCopyFiles.
11702 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
11704         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
11705         when value is NULL (and should remove CID #51).
11707 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11709         * image.c: moved 2 functions to ../utils.
11711 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
11713         * gc.c: cope with the target object of a GC handle being NULL
11714         (bug #78877).
11716 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
11718         * class.c: recursively check parent's explicit implementations
11719         of interface methods (fixes bug #79125).
11721 2006-08-19  Miguel de Icaza  <miguel@novell.com>
11723         * filewatcher.c: Avoid warnings when building, do not redefine
11724         constants that are defined.
11726         Remove warnings.
11728 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11730         * image.c: don't fail when the link points to an absolute path.
11732 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
11734         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
11735         Fix CID #3.
11737 2006-08-17  Miguel de Icaza  <miguel@novell.com>
11739         * image.c (full_path): A new method used to obtain the actual path
11740         of an assembly even in the presence of symbolic links.  
11742         This is necessary for the case where we are running a binary that
11743         has been GACed, but we are using the "published" path name
11744         ($prefix/mono/1.0/blah.exe) which happens to point to the real
11745         file in the GAC.
11747         This was the source of the failure for the `xsp' command with the
11748         recent AppDomain changes, as far as the runtime was concerned,
11749         there were two different assemblies: $prefix/mono/1.0/blah.exe and
11750         $prefix/mono/gac/blah/version/blah.exe.
11752         (do_mono_image_open): use full path
11754 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
11756         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
11758 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
11760         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
11761         domain_id is supplied. Fix CID #241 and corlib's unit tests.
11763 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
11765         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
11766         small structures. Fixes #78990.
11768 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
11770         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
11772         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
11774 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11776         * appdomain.c:
11777         * marshal.c: don't load all the assemblies from a domain into newly
11778         created ones. The new domains might have different rules and load
11779         assemblies from different locations. Fixes bug #76757.
11781         Patch by Lluis. Conflicts resolved by Brian Crowell.
11783 2006-08-16  Alp Toker  <alp@atoker.com>
11785         * socket-io.c: First half of the fix for #79084.
11786         Set sa_size to the length of the content, not that of the struct.
11787         Don't add NULL suffix to the content, this should be done in
11788         managed code if needed.
11790 2006-08-14  Raja R Harinath  <rharinath@novell.com>
11792         Fix part of #79012
11793         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
11794         mono_metadata_parse_type returns NULL.
11796 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
11798         * normalization-tables.h : new file for string normalization data.
11799         * locales.c, locales.h, icall.c :
11800           added load_normalization_resource() for string normalization,
11801           and icall as well.
11802         * Makefile.am : added normalization-tables.h to the sources.
11804 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
11806         * marshal.c: Add more helper functions to reduce code duplication and use them
11807         everywhere.
11809 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
11811         * marshal.c: Fix non-x86 stdcall warnings.
11812         
11813         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
11814         them everywhere.
11816 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
11818         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
11819         type check on multi-dimensional arrays. Fixes #79000.
11821 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
11823         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
11824         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
11825         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
11826         * class-internals.h: add is_com_object to class structure.
11827         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
11828         null checks to COM object marshalling. Fix .ctor call on RCW.
11829         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
11830         
11831         All code is contributed under the MIT/X11 license.
11833 2006-08-09  Dick Porter  <dick@ximian.com>
11835         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
11836         racing mono_monitor_allocator_lock() somewhere, so don't delete
11837         the critical section for now.  Found by running and exiting
11838         monodevelop.
11840 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
11842         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
11843         (ves_icall_System_ComObject_FindInterface): Ditto.
11844         (ves_icall_System_ComObject_CacheInterface): Ditto.
11846         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
11847         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
11849 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11851         * threadpool.c: treat pipes from process asynchronous reads as sockets
11852         when reading from them, so we get select/poll or epoll to wait for
11853         data.
11855 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
11857         * loader.c: Fix a typo (CID #233) in the null check.
11859 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
11861         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
11862         Hopefully fixes #78949.
11863         
11864         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
11865         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
11866         bytes. Fixes #78972.
11868 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11870         * filewatcher.c: we need to set errno here.
11872 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11874         * filewatcher.c: let Win32Exception get the error value.
11876 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11878         * filewatcher.c: translate errno into win32 errors for Win32Exception
11879         to know what happened.
11881 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
11883         * threadpool.c: Fix more warnings.
11885         * assembly.c (search_loaded): Fix warnings.
11887         * threadpool.c (mono_thread_pool_finish): Fix warnings.
11888         (mono_async_invoke): Ditto.
11890 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
11892         * object.c (mono_remote_class_vtable): Need to create proxy vtable
11893         entries for __ComObject type in addition to ComImport types.
11894         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
11895         about hash table.
11896         
11897         All code is contributed under the MIT/X11 license.
11899 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
11901         * image.c: avoid tentative loading of modulerefs that contain
11902         no metadata (P/Invoke library names).
11904 2006-07-28  Dick Porter  <dick@ximian.com>
11906         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
11907         mono_loader_lock() somewhere, so don't delete the critical section
11908         for now.  Found by running and exiting monodevelop.
11910 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11912         * filewatcher.c: define the inotify syscalls when we're building on
11913         linux and have sys/syscall.h. The build system might not have support
11914         for inotify but the target system might have it.
11916 2006-07-26  Miguel de Icaza  <miguel@novell.com>
11918         * domain.c: Documentation updates.
11920         * loader.c (mono_free_method): Do not release the method
11921         information if we are being profiled, as profilers will use this
11922         information at shut down to present some data to the user.
11924         This is needed so that the profiler does not crash, as the
11925         profiler tends to keep MonoMethods around, and they might become
11926         invalid if we free these.
11928         (mono_get_method_constrained): Return the original CIL stream
11929         method as well, so verification can be performed against it.
11931 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11933         * filewatcher.[ch]: support for inotify file system watcher.
11934         * icall.c: add new internal calls for the inotify file system watcher.
11936 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11938         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
11939         #78888.
11941 2006-07-20  Dick Porter  <dick@ximian.com>
11943         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
11944         warning.
11946 2006-07-20  Dick Porter  <dick@ximian.com>
11948         * threads.c (start_wrapper): Do the thread cleanup while we still
11949         hold a reference to its object.  Fixes bug 78123.
11951 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
11953         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
11954         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
11955           "managed-to-managed".
11956         * icall.c: Redirect string constructors that take sbyte* to
11957           ves_icall_System_String_ctor_RedirectToCreateString.
11958         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
11959           to CreateString () methods with matching signature.
11960         * reflection.c: Use original security informations for
11961           MONO_WRAPPER_MANAGED_TO_MANAGED.
11962         * security-manager.c: Use original security informations for
11963           MONO_WRAPPER_MANAGED_TO_MANAGED.
11964         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
11965           that is a placeholder and only its address should be used.
11966         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
11967           that is a placeholder and only its address should be used.
11969 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
11971         Begin implementing COM Interop.
11972         * appdomain.c: Increment corlib version.
11973         * class.c: Set ComImport classes' parent to __ComObject.
11974         * loader.c: Mark cominterop methods as such.
11975         * domain.c: Add __ComObject class to MonoDefaults structure.
11976         * image.c: Add 2 hashtables to the image for COM Interop related methods
11977         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
11978         using the mempool allocator
11979         
11980         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
11981         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
11982         declaration for mono_metadata_type_dup_mp.
11983         
11984         * debug-helpers.c: Added strings for two additional wrapper types
11985         * object.c: Create proxy objects for ComImport classes
11986         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
11987         and added __ComObject class to MonoDefaults structure.
11988         
11989         * object-internals.h: Finish MonoRealProxy definition, and add definition of
11990         MonoComInteropProxy and MonoComObject.
11991         
11992         * marshal.c: Added support for COM Interop
11993         (signature_cominterop): Converts managed signature to corresponding
11994         unmanaged COM signature.
11995         (cominterop_get_function_pointer): gets unmanaged function pointer via
11996         COM object vtable
11997         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
11998         (cominterop_get_method_interface): returns interface type that method is defined on
11999         (mono_mb_emit_cominterop_call): emits native call to function pointer
12000         gotten from vtable
12001         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
12002         that matches signature of unmanaged function.
12003         (cominterop_get_native_wrapper): wrapper around adjusted method call.
12004         (cominterop_get_invoke): forwards call from proxy to __ComObject
12005         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
12006         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
12007         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
12008         
12009         * marshal.h: Added Marshal icall declarations.
12010         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
12011         so we can access them in finalizer
12012         
12013 2006-07-14  Dick Porter  <dick@ximian.com>
12015         * object.c (mono_type_initialization_cleanup): Fix a race
12016         condition by temporarily commenting out the critical section
12017         deletion.
12019 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
12021         * reflection.c (create_custom_attr): Fix some warnings.
12022         (create_custom_attr_data): Ditto.
12023         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
12024         types. Fixes #78855.
12026 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
12028         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
12030         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
12032 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
12034         * reflection.c (resolve_object): Add support for DynamicMethod.
12036         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
12037         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
12039 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
12041         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
12042         don't leak GPtrArray's pdata has we have no use (nor free) for it.
12044 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
12046         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
12047         Fixes #77888.
12049 2006-06-30  Raja R Harinath  <rharinath@novell.com>
12051         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
12052         slightly: remove a shadow local variable.
12054 2006-06-29  Raja R Harinath  <rharinath@novell.com>
12056         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
12057         definition that introduces the virtual function slot.
12058         Also fix Coverity #105.
12060 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
12062         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
12063         for dynamic assemblies. Fixes #78724.
12065 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
12067         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
12068         Fixes #78722.
12070 2006-06-21  Martin Baulig  <martin@ximian.com>
12072         * reflection.c
12073         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
12074         fixes #76484.
12076 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
12078         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
12080 2006-06-20  Raja R Harinath  <rharinath@novell.com>
12082         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
12083         nor TYPEREFs.
12084         * class.c (mono_class_create_from_typespec): Add 'context' argument.
12085         Inflate result if necessary.
12086         (mono_class_get_full): Remove old version.  Rename from
12087         'mono_class_get' and add 'context' argument.  Pass it to
12088         ..._create_from_typespec.
12089         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
12090         (mono_ldtoken): Revert change below.
12092 2006-06-20  Martin Baulig  <martin@ximian.com>
12094         * class.c (mono_ldtoken): Don't pass the generic context to
12095         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
12097 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
12099         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
12100         and later freeing it. Fixes #78638.
12102 2006-06-15  Miguel de Icaza  <miguel@novell.com>
12104         * icall.c (mono_class_get_throw): Revert over-zealous error
12105         throwing, the caller for mono_class_get_throw will cope with
12106         errors when classes are not properly initialized already.
12108         The code still copes with loader exceptions though.
12110         Fixes the regression in reftype1 and reftype3 from the CAS tests.
12111         
12112 2006-06-14  Miguel de Icaza  <miguel@novell.com>
12114         Fixes the `make run1' version of RuntimeAbort (to be commited,
12115         source is in Bugzilla).
12116         
12117         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
12118         FALSE on class loading failure instead of returning true.
12120         * class.c (mono_class_create_from_typedef): It is possible for
12121         mono_metadata_interfaces_from_typedef_full to fail if a class is
12122         not found, cope with this.
12123         
12125 2006-06-14  Dick Porter  <dick@ximian.com>
12127         * socket-io.c: 
12128         * process.c: Fix a bunch of signed/unsigned warnings from gcc
12129         4.1.1
12131 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
12133         * culture-info-table.h : oops, forgot to make it nsync with r61548.
12135 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
12137         * icall.c: Another fix for building mono in Visual Studio.
12139 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
12141         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
12142         
12143 2006-06-09  Martin Baulig  <martin@ximian.com>
12145         * debug-mono-symfile.c: Put this back and really fix it this
12146         time. Sorry for all the trouble.
12148 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
12150         * icall.c (mono_class_get_throw): Fix a warning.
12151         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
12152         ReflectionTypeLoadException if needed. Fixes #78606.
12154         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
12155         (mono_class_init): Ditto.
12157         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
12158         ref_only exceptions.
12159         (mono_loader_clear_error): Make this work even if there is no error.
12161 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
12163         * object-internals.h marshal.c marshal.h icall.c: Implement method 
12164         Marshal.GetComSlotForMethodInfo using internal call.
12166 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
12168         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
12169         a function for signalling it.
12171         * class.c (mono_class_from_typeref): Use the new kind of loader error when
12172         a referenced assembly is not found.
12174         * loader.c (mono_loader_error_prepare_exception): Add support for 
12175         LOADER_ERROR_ASSEMBLY. Fix formatting.
12177 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
12179         * domain.c appdomain.c class-internals.h marshal.c: Add support 
12180         for VARIANT marshalling on windows and increment corlib version
12181         since Variant struct was added.
12183 2006-06-03  Miguel de Icaza  <miguel@novell.com>
12185         * debug-mono-symfile.c: Revert Martin's previous patch which broke
12186         stack trace line information:
12188         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
12189         (Martin) when looking up B which is between A and C, return A not C.
12191         Bug is #78573.
12193         Thanks to Alexander Olk for tracking this down.
12195 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
12197         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
12198         
12199         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
12200         avoid clobbering its value.
12201         (mono_string_to_lpstr): Fix a warning on windows.
12203 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
12205         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
12207         * reflection.c loader.c: Removed references to 'dummy' flag.
12209         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
12211         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
12212         it gets GC tracking.
12214         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
12215         GC tracking.
12216         
12217         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
12219         * marshal.c threadpool.c: Update callers of mono_async_result_new.
12221         * appdomain.c: Bump corlib version.
12223 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
12225         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
12226         CEE_STIND_REF when working with object references.
12228 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
12230         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
12231         Fixes #78539.
12233 2006-05-30  Miguel de Icaza  <miguel@novell.com>
12235         * loader.c (method_from_memberref): Fix argument value for
12236         mono_loader_set_error_method_load (I was passing the MonoClass
12237         instead of the class name char *).
12239 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
12241         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
12242         CEE_STIND_REF when working with object references.
12244 2006-05-30  Martin Baulig  <martin@ximian.com>
12246         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
12247         mono_method_full_name() change and replace the ':' with a '.'
12248         here.
12250 2006-05-30  Martin Baulig  <martin@ximian.com>
12252         * debug-mono-symfile.c
12253         (mono_debug_symfile_lookup_location): Fix the algorithm:
12254         when looking up B which is between A and C, return A not C.
12256 2006-05-29  Martin Baulig  <martin@ximian.com>
12258         * mono-debug.h
12259         (MonoDebugMethodInfo): Make the typedef public.
12260         (MonoDebugSourceLocation): New public struct.
12262         * mono-debug.c
12263         (mono_debug_source_location_from_address): Removed.
12264         (mono_debug_source_location_from_il_offset): Removed.
12265         (mono_debug_il_offset_from_address): Removed.
12266         (mono_debug_address_from_il_offset): Removed.
12267         (mono_debug_lookup_method): New public function.
12268         (mono_debug_lookup_source_location): New public function; replaces
12269         the old mono_debug_source_location_from_*() functions; see the
12270         inline documentation.
12271         (mono_debug_free_source_location): New public function.
12272         (mono_debug_print_stack_frame): New public function; see the
12273         inline documentation.
12275         * debug-mono-symfile.c
12276         (mono_debug_find_source_location): Renamed into
12277         mono_debug_symfile_lookup_location(); only take a
12278         `MonoDebugMethodInfo *' and an `offset' argument; added inline
12279         documentation.
12280         (mono_debug_find_method): Renamed into
12281         mono_debug_symfile_lookup_method().
12283 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
12285         * assembly.c (mono_assembly_open_full): Dont overwrite the status
12286         returned by mono_image_open_full ().
12288         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
12289         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
12290         #78517.
12292         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
12293         #78518.
12295 2006-05-27  Miguel de Icaza  <miguel@novell.com>
12297         * class.c (mono_class_from_typeref): handle missing images
12298         earlier, deals with bug #78418.   Refactor code; 
12300         Fix a warning introduced in my previous commit (some stale code
12301         from before I revisited my patch).
12303         * class.c (mono_class_create_from_typedef): On failure, remove the
12304         class from the MonoImage->class_cache as the class is not
12305         initialized;   Fixes the leak pointed out by Paolo.
12307 2006-05-25  Dick Porter  <dick@ximian.com>
12309         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
12310         DeleteCriticalSections until I figure out which one may still be
12311         sometimes locked when mono_thread_cleanup is called.
12313 2006-05-24  Dick Porter  <dick@ximian.com>
12315         * threads.c (mono_thread_cleanup): Move the threading cleanup out
12316         of mono_thread_manage and back into its own function, so it can be
12317         called after the finalizer thread has finished.
12319         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
12321 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
12323         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
12324         Fixes #78495.
12326         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
12327         with non-blittable elements.
12328         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
12330 2006-05-24  Martin Baulig  <martin@ximian.com>
12332         * mono-debug-debugger.h (MonoDebuggerEvent): Added
12333         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
12335         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
12336         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
12337         `mono_debugger_event_handler' to NULL.
12339 2006-05-24  Martin Baulig  <martin@ximian.com>
12341         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
12343 2006-05-24  Martin Baulig  <martin@ximian.com>
12345         * mono-debug-debugger.h
12346         (mono_debugger_create_notification_function): Added
12347         `MonoCodeManager *' argument.
12349 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
12351         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
12353 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
12355         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
12356         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
12357         implementation.
12359 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
12361         * icall.c: precise GC support: objects can't be stored in unmanaged
12362         memory anymore, even if they are kept alive by other references: since
12363         they can move the GC needs to be able to always find them.
12365 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
12367         * object.c: precise GC support for static fields. Support
12368         for moving GCs: write barriers and pinned allocation for interned
12369         strings.
12371 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
12373         * domain.c, domain-internals.h: precise GC support for the MonoDomain
12374         structure.
12376 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
12378         * class.c, gc.c: sgen and precise GC updates.
12380 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
12382         * marshal.h, marshal.c: added write barrier wrapper and precise type
12383         fixes.
12385 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
12387         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
12388         support.
12390 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
12392         * reflection.c: precise and sgen GC updates.
12394 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
12396         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
12398 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
12400         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
12402 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
12404         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
12405         MONO_TYPE_OBJECT. Fixes #78462.
12407 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
12409         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
12410         and blittable types.
12412 2006-05-17  Miguel de Icaza  <miguel@novell.com>
12414         * class.c (mono_class_get_exception_for_failure): Implement parts
12415         of a TODO: if the loader error is set (instead of the class
12416         error), we return a Loader exception that can be properly thrown
12417         elsewhere.
12419         This was exposed by some Winforms 2.0 code that I tried to run
12420         (Atsushi pointed me to it).
12422 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
12424         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
12425         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
12426         
12427         * marshal.c (emit_marshal_vtype): Add limited support for 
12428         UnmanagedType.LPStruct. Fixes #78427.
12430         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
12431         Applied a patch from kangaroo to fix #77523.
12433 2006-05-17  Martin Baulig  <martin@ximian.com>
12435         * threads.c
12436         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
12437         (debugger_thread_created): Removed.
12438         (debugger_thread_exited): Removed.
12440 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
12442         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12444         * object-internals.h (MonoReflectionResource): Sync with managed version.
12446 2006-05-12  Wade Berrier <wberrier@novell.com>
12448         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
12450 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
12452         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
12453         functions try to allocate from the image mempool.
12455 2006-05-12  Dick Porter  <dick@ximian.com>
12457         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
12459 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
12461         * object.c: The FieldGetter and FieldSetter methods require the full
12462         name of the class, not only the name. Fixes bug #78277.
12464 2006-05-11  Miguel de Icaza  <miguel@novell.com>
12466         * loader.c (method_from_memberref): Do not pass the NULL klass to
12467         mono_loader_set_error_() methods.  Pass the non-NULL value
12468         (class). 
12470 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
12472         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
12473         (mono_assembly_close): Null out assembly->image->references after freeing it.
12475         * image.c (mono_image_close): Free image->references.
12476         
12477         * reflection.c (mono_image_basic_init): Fix a small memory leak.
12479 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
12481         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
12482         before checking if it's NULL (g_assert).
12484 2006-05-10  Martin Baulig  <martin@ximian.com>
12486         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
12487         I thought I already killed that two months ago, but now it somehow reappeared.
12489 2006-05-10  Martin Baulig  <martin@ximian.com>
12491         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
12493 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
12495         * reflection.c: Allocate memory for dynamically created methods in the image
12496         mempools.
12498 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
12500         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
12501         don't use the ad pointer before checking if it's NULL (g_assert).
12503 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
12505         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
12506         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
12508         * marshal.c: Allocate all signatures from mempools.
12510         * marshal.c: Allocate some more signatures from mempools.
12512 2006-05-09  Miguel de Icaza  <miguel@novell.com>
12514         * object.c (mono_load_remote_field): The code used to provide a
12515         temporary variable for returning results if the user did not
12516         provide a result pointer.  But our temporary variable was allocted
12517         on the satck.
12519         Fix calling code to always pass a result area.   Coverity ID 103.
12521 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
12523         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
12524         value, not the old. Fixes #78312.
12525         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
12527         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
12528         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
12529         per-image cache.
12531         * assembly.c (mono_assembly_close): Free image->references.
12533         * assembly.c (mono_assembly_names_equal): Fix a warning.
12534         (mono_assemblies_cleanup): Cleanup more global data.
12536         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
12538         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
12539         ptr_cache and image->modules.
12541         * image.c (mono_image_init): Allocate array_cache lazily.
12542         
12543 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12545         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
12546         behavior was changed recently and has bad side effects.
12548 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
12550         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
12551         
12552         * assembly.c (mono_assembly_close): Remove a debug printf.
12554         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
12556         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
12557         to also allow for temporary references between mono_image_open ()/close ().
12559         * domain.c (get_runtimes_from_exe): Add a FIXME.        
12561 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
12563         * marshal.c: Fix support for dynamic methods.
12565         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
12567         * marshal.c (mono_marshal_cleanup): New cleanup function.
12569         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
12570         image mempools.
12572         * class.c (mono_class_init): Fix leaking class->nested_classes.
12574         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
12576         * image.c (mono_image_init): Initialize the new cashes.
12578         * image.c (mono_image_close): Destroy the new cashes.
12580         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
12582         * mempool.c (mono_mempool_strdup): New helper function.
12584         * class-internals.h: Add prototype for mono_loader_unlock ().
12586         * domain.c (mono_jit_info_table_find): Fix a warning.
12587         (mono_debugger_check_runtime_version): Ditto.
12589         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
12590         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
12591         functions to these modules.
12593         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
12594         metadata modules.
12595         
12596         * marshal.c (mono_free_bstr): Fix a warning.
12598         * assembly.c (mono_assembly_open_full): Fix another small leak.
12600         * object.c: Fix some unload leaks in the remoting code.
12602         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
12603         function.
12605         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
12607         * reflection.c: Fix some unload leaks in dynamic assemblies.
12609 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
12611         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
12612         * marshal.h: Add BSTR support on Win32
12613         * icall.c: Add BSTR icalls
12614         * metadata.h: Add BSTR enums
12616 2006-04-28  Miguel de Icaza  <miguel@novell.com>
12618         Work to catch the crash from #76795 and turn it into an
12619         exception.   As I stubbed out pieces of the VisualBasic support,
12620         I found a number of places where the code was failing and I added
12621         checks to those places. 
12622         
12623         * metadata.c (do_mono_metadata_parse_generic_class): Make this
12624         function return a status code.  If we fail to parse the signature
12625         from mono_metadata_parse_generic_inst, return FALSE.
12627         * loader.c (mono_get_method_from_token): If we fail to load the
12628         method (mono_class_get) return NULL.   
12630         * (method_from_memberref): Return NULL if we are unable to parse
12631         the method signature
12633         (mono_loader_error_prepare_exception): Since we now use the
12634         loader_error flag internally to stop processing, and obtaining
12635         exceptions that might be thrown will walk this code path the
12636         proper way of going from a MonoLoaderError into a
12637         MonoException was convoluted.   This new routine encapsulates the
12638         process of turning the error into an exception and *clearing* the
12639         error afterwards.
12640         
12641 2006-04-27  Miguel de Icaza  <miguel@novell.com>
12643         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
12644         with missing assemblies), and to cope with:
12646                 * Missing fieldref from a non-existing assembly.
12647                 * Missing methodref from a non-existing assembly.
12649         The first batch of work to address *some* of the issues from 76661.
12650         
12651         * object.c (mono_class_create_runtime_vtable): If we fail to
12652         initialize the class raise the exception here. 
12654         * metadata.c (mono_class_get_overrides_full): If any methods fail
12655         to load return the failure to the caller.
12657         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
12658         flagging assemblies that failed to load.   
12660         Do not crash if we are unable to load the assembly.
12662         (mono_assembly_close): Do nothing with REFERENCE_MISSING
12663         assemblies. 
12665         * loader.c (mono_loader_set_error_type_load): Change the
12666         convention to always pass unallocated strings, so we make our own
12667         copies (I know our own code had duplicated strings before, but
12668         this keeps the normal conventions).
12669         (method_from_memberref): Call mono_loader_set_error_method_load
12670         for all possible failures of loading the class. 
12671         Remove assert, turn into a loader error.
12673         (mono_loader_error_to_exception): Move this routine from mini
12674         (mini_loader_error_to_exception) there was no need to have that in
12675         mini. 
12677         * class.c (mono_class_from_typeref): If we were not able to load
12678         the assembly with mono_assembly_load_reference, call the
12679         mono_loader_set_error_type_load to register the problem.
12681         (mono_class_setup_fields): If we fail to load the type from
12682         mono_metadata_parse_type_full, call mono_class_set_failure and
12683         break from the loop.
12685         If class->exception_type is set, we do not layout the fields as
12686         that might crash the runtime, and instead return (from breaking
12687         from the previous loop).
12689         (mono_class_setup_vtable): This now returns a boolean indicating
12690         whether the table was properly setup.   The decision is driven by
12691         mono_class_get_overrides_full which might run into non-existing
12692         methods. 
12693         
12694         (mono_class_init): Returns TRUE on success or FALSE if there was a
12695         problem in loading the type (incorrect assemblies, missing
12696         assemblies, methods, etc).
12698         When we call mono_class_setup_fields we also check for a potential
12699         error inside this call (either a class exception or a general
12700         loader exception).
12702         (mono_class_create_from_typedef): If the parent fails to load
12703         (calling mono_class_get_full) return NULL.
12704         
12705         ** Important **
12707         calls to mono_metadata_parse_type_full should be checked
12708         everywhere and set the mono_class_set_failure
12709         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
12711         The current patch checks the places where my manually constructed
12712         tests show the errors are showing up, but we should do it
12713         everywhere. 
12715         ** Important2 **
12717         mono_class_init return values should be tested everywhere, like
12718         the previous case this is something that we should audit
12719         everywhere and not only on the cases exposed by the tests I
12720         created. 
12722 2006-04-26  Miguel de Icaza  <miguel@novell.com>
12724         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
12725         boolean parameter and instead pass the information on `options'
12726         parameter (FileOptions).
12728         * icall.c: Register the new signature for MonoIO.Open.
12730         * debug-helpers.c (dis_one): Trying to understand how coverity
12731         works.  Fix Run 5, item 78.
12733 2006-04-26  Dick Porter  <dick@ximian.com>
12735         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
12736         dereference.
12738 2006-04-25  Martin Baulig  <martin@ximian.com>
12740         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
12742         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
12743         debugger_thread_created().
12744         (debugger_gc_push_all_stacks): Don't handle the main thread in any
12745         special way.
12746         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
12747         (mono_debugger_finalize_threads): New function; undo the effects
12748         of mono_debugger_init_threads().
12749         (mono_debugger_create_all_threads): Removed.
12751 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
12753         * image.c (mono_image_close): Tidy up trace messages.
12755         * assembly.c (mono_assembly_close): Ditto.
12757         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
12758         no longer references an already freed assembly. Fixes #78168.
12760 2006-04-21  Dick Porter  <dick@ximian.com>
12762         * threads.c (mono_thread_detach): Fix reference counting when
12763         detaching threads.
12765 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
12767         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
12768         #78155.
12770 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
12772         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
12773         (mono_type_to_stind): Ditto.
12775         * marshal.c: Use the new helper functions to simplify code.
12777         * image.c (mono_image_close): Add some code for help debug assembly unloading
12778         problems.
12780         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
12781         image mempool.
12783         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
12784         assembly was already loaded in another appdomain. Fixes #78083.
12786 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
12788         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
12789         referenced assemblies.
12790         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
12792         * domain.c (mono_domain_free): Add a trace message.
12794         * appdomain.c (add_assemblies_to_domain): Ditto.        
12796         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
12797         field.  
12799 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
12801         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
12803 2006-04-12  Martin Baulig  <martin@ximian.com>
12805         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
12806         `USE_INCLUDED_LIBGC'.   
12808 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
12810         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
12811         the patch contains ../ and a small directory name later. Hopefully fixes
12812         #78035.
12814 2006-04-10  Martin Baulig  <martin@ximian.com>
12816         Clean up the debugger's thread-handling code.
12818         The debugger's thread-handling code has been moved from
12819         ../mini/debug-debugger.c to threads.c.  We now iterate directly
12820         over the `threads' hash, keep track of exiting threads and also
12821         use proper locking.
12823         We can now debug XSP and XSP based applications with the debugger.
12825         * object-internals.h (MonoThread): Added `gpointer end_stack'.
12827         * threads.h
12828         (MonoThreadCallbacks): Removed; this was only used by the debugger.
12829         (mono_install_thread_callbacks): Likewise.      
12831         * threads.c (mono_thread_callbacks): Removed.
12832         (debugger_thread_created, debugger_thread_exited): New static functions.
12833         (start_wrapper): Call debugger_thread_created().
12834         (thread_cleanup): Call debugger_thread_exited().
12835         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
12836         (mono_debugger_init_threads): New public function.
12837         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
12838         iterate directly over the `threads' hash and also use proper locking.
12840         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
12842         * mono-debug-debugger.h
12843         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
12845 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
12847         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
12848         argument type=array. Fixes #78057.
12850 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
12852         * culture-info-table.h : regenerated. Fixed bug #69652.
12854 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
12856         * loader.c metadata.c: Reapply a variant r59116.
12857         
12858         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
12860         * class.c (mono_class_setup_interface_offsets): New internal function.
12862         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
12863         interfaces too. Fixes #77398.
12865         * reflection.c (encode_cattr_value): Add support for 
12866         parameter type=object, argument type=array.
12867         (load_cattr_value): Ditto. Fixes #77916.
12869         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
12870         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
12872         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
12873         a byval char array and CharSet is Ansi.
12875         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
12877 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
12879         * metadata.c: Add some locking comments.
12880         
12881         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
12882         mempool.
12883         (mono_metadata_free_method_signature): Don't free the signature itself.
12885         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
12887         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
12888         reference the same MonoImage.
12889         (mono_assembly_load_from_full): Add an assert.
12891 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
12893         * image.c (mono_image_close): Don't put the image we are about to free into the
12894         loaded_images_guid_hash.
12896         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
12897         to reduce code duplication.
12899         * marshal.c: Register the native functions called by this module as icalls, to
12900         somewhat centralize the creation of MonoMethodSignature's.
12902         * loader.c (mono_method_signature): Add a cache for method signatures.
12904         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
12905         the parameter attributes of a method.
12906         (mono_metadata_parse_method_signature_full): Refactored the computation of
12907         parameter attributes into a separate function. Also avoid one allocation in
12908         most cases.
12910         * assembly.c (mono_assembly_close): Ditto.
12912         * image.c (mono_image_close): Log trace messages with INFO level.
12914         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
12916         * image.c reflection.c: Correct reference counting of image modules.
12917         
12918         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
12919         of this function from the image mempool.
12920         
12921         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
12922         to allow more cached types to be used.
12924         * mono-debug.c (mono_debug_add_method): Appled patch from
12925         David S. Miller  <davem@sunset.davemloft.net>: Access 
12926         minfo->lexical_blocks[] entry elements using read32().
12928 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
12930         * loader.c (mono_free_method): No longer free the method header for non-dynamic
12931         methods as it is allocated from the mempool.
12933         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
12934         image mempool.
12936         * metadata-internals.h: Add comments describing the reference counting scheme
12937         used for MonoImage and MonoAssembly.
12939         * image.c assembly.c reflection.c: Rework reference counting of images and 
12940         assemblies so they are freed when the runtime is shut down. Free some 
12941         additional memory structures when an image is unloaded.
12942         
12943 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
12945         * class.c loader.c reflection.c: Allocate more data structures in
12946         the image mempool.
12948 2006-03-31  Miguel de Icaza  <miguel@novell.com>
12950         * icall.c
12951         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
12952         build on pre glib 2.4 systems.
12954 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
12956         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
12958         * icall.c: Fix some warnings.
12960 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
12962         * culture-info-table.h : regenerated.
12964 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
12966         * threads.c, object-internals.h, verify.c: changed the culture caching
12967         code to use a normal MonoArray for storage so the GC can keep track of
12968         them easily. Fixed bits of the cache logic, too and simplified the
12969         code.
12971 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
12973         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
12974         thread for non-Boehm GCs.
12976 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
12978         * domain.c, object.c, domain-internals.h: reduce the amount of memory
12979         needed to keep track of the data for static fields.
12981 2006-03-29  Raja R Harinath  <rharinath@novell.com>
12983         Fix #75172
12984         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
12985         for interface classes.  Use 'num_methods' instead.
12986         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
12987         before using '->vtable_size' field.
12989 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
12991         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
12992         doesn't contain managed pointers, so use a normal hashtable.
12994 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
12996         * reflection.c, class-internals.h, domain.c: fixed handling of types
12997         used as values for objects in custom attributes (bug #77915):
12999 2006-03-24  Martin Baulig  <martin@ximian.com>
13001         * class.c (mono_class_setup_fields): Added support for generic
13002         instances; fixes #77580.
13004 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13006         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
13008 2006-03-24  Dick Porter  <dick@ximian.com>
13010         * file-io.c (get_file_attributes): More stat macro breakage.
13011         Fixes bug 77759.
13013 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
13015         * profiler.c: added the file=filename option in the default profiler
13016         to output the profile data to filename.
13018 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13020         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
13021         bug #77877.
13023 2006-03-22  Martin Baulig  <martin@ximian.com>
13025         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
13026         allocated `MonoClassField *' in `fb->handle'.
13028 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13030         * class.c, image.c, metadata-internals.h: implemented new mechanism to
13031         allocate interface ID to save memory and allow better ID reuse on
13032         appdomain unload. setup_generic_vtable () removal from Martin.
13034 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
13036         * object.h, appdomain.c, domain.c, exception.c, icall.c,
13037         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
13038         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
13039         write barriers for reference stores with managed objects accessed with
13040         C structures in the runtime and in embedding programs.
13042 2006-03-20  Raja R Harinath  <rharinath@novell.com>
13044         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
13045         'interface_id' and 'max_interface_id' fields of MonoClasses
13046         representing open generic types.
13048 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
13050         * object.h, object.c, icall.c: added functions to deal with
13051         storing valuetypes that contain references in managed objects.
13052         * reflection.c, string-icalls.c, threads.c, marshal.c: small
13053         fixes and comments around uses of mono_array_addr ().
13055 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
13057         * object.h, icall.c, monitor.c: object.GetHashCode ()
13058         implementation that supports the moving garbage collector.
13060 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
13062         * icall.c, threads-types.h, threads.c: implemented finalizer for
13063         LocalDataStoreSlot.
13065 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
13067         * metadata.c (mono_type_size): Add a fixme.
13068         (mono_type_stack_size): Ditto.
13070         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
13071         'type_forwarders' field.
13073         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
13074         attribute from net 2.0.
13076         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
13077         from class.c.
13079         * class.c (mono_class_setup_fields): Fix a warning.
13080         
13081         * class.c (mono_class_from_name): Add support for assemblyref entries
13082         in the EXPORTEDTYPE table.
13084         * reflection.c: Add support for handling type forwarders under net 2.0.
13086         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
13087         
13088 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
13090         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
13091         overwriting entries in ModuleBuild->types, also clean up the code
13092         a little. Fixes #77774.
13094 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
13096         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
13097         load friend assembly info when present.
13099 2006-03-14  Raja R Harinath  <rharinath@novell.com>
13101         Fix crasher on gtest-158.cs.
13102         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
13103         the return value if the MonoClass we want is yet in an
13104         inconsistent state.
13105         * class.c (mono_class_create_from_typedef): Add an comment
13106         explaining an order dependency between mono_class_setup_parent and
13107         mono_class_setup_mono_type.
13109 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
13111         * class.c: documentation updates and events bug fix.
13113 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
13115         * class.c: some cleanup, locking fixes.
13117 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
13119         * class.c: fix the generics code to setup nested
13120         type info to the instantiated type (bug #77770).
13122 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
13124         * marshal.c: fixed a few type correctness issues.
13126 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
13128         * loader.c: the Set/Get/Addrtess array methods should be public.
13130 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
13132         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
13133         
13134         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
13135         info->wrapper.
13137 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
13139         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
13141         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
13143         * mempool.c (mono_mempool_alloc): Speed this up a bit.
13144         (mono_mempool_alloc0): Ditto.
13146 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13148         * socket-io.c:
13149         (create_object_from_sockaddr): it was allocating 4 extra bytes
13150         for the AF_UNIX data. Fixes bug #77747.
13152 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
13154         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
13156 2006-03-09  Dick Porter  <dick@ximian.com>
13158         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
13159         Fixes bug 76966 again.
13161 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
13163         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
13164         names from r57532
13165         * appdomain.c: Bumped corlib version to 48 (due to r57532)
13167 2006-03-07  Martin Baulig  <martin@ximian.com>
13169         * object.c
13170         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
13172 2006-03-07  Martin Baulig  <martin@ximian.com>
13174         * class.c
13175         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
13176         regression introduced in r56970; see gtest-252.cs.
13178         * loader.c (mono_get_method_constrained): Correctly handle generic
13179         methods; see gtest-253.cs.
13181 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
13183         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
13185 2006-03-04  Martin Baulig  <martin@ximian.com>
13187         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
13188         compute the parent type at runtime, just like we're already doing
13189         it for interfaces.
13191         * reflection.c
13192         (mono_reflection_bind_generic_parameters): Don't compute the
13193         parent type anymore.
13195         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
13197 2006-03-04  Martin Baulig  <martin@ximian.com>
13199         * mono-debug-debugger.h
13200         (mono_debugger_create_notification_function): Allocate memory at
13201         runtime and return a pointer to it.
13203 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
13205         * assembly.c: Fix windows build.
13206         
13207         * assembly.c: Fix build.
13209         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
13211         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
13212         
13213 2006-03-03  Dick Porter  <dick@ximian.com>
13215         * process.c
13216         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
13217         Check parameters before dereferencing them.  Fixes Aaron's part of
13218         bug 77393.
13220 2006-03-03  Raja R Harinath  <rharinath@novell.com>
13222         Fix performance regression.
13223         * loader.c (find_method_in_class): Add 'from_class' argument.
13224         Rename 'klass' argument to 'in_class'.  The signature is compared
13225         against the method in 'in_class', and the corresponding method is
13226         returned from 'from_class'.
13227         (find_method): Walk both 'in_class' and 'from_class' in parallel.
13228         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
13229         type definition and generic instantiation in parallel.
13230         (mono_get_method_constrained): Update to changes.
13232 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
13234         * threads.c: make sure the domain is correct, too when doing
13235         mono_thread_attach ().
13237 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
13239         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
13240         windows. Fixes #77683.
13242 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
13244         * object.h, *: introduced specific way to set elements of an array
13245         of references to be used as write barrier. Still need to audit the
13246         uses of mono_array_addr.
13248 2006-03-01  Miguel de Icaza  <miguel@novell.com>
13250         * object-internals.h: New field to cache the assmebly name, patch
13251         from Tambet Ingo (tambet@ximian.com)
13253 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
13255         * decimal.h, class-internals.h, metadata-internals.h,
13256         file-io.h: mark a few function declarations as internal, to
13257         reduce the number of PLT entries.
13259 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13261         * file-io.c: fix typo in warning message.
13263 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
13265         * loader.c: on unix, lookup the "*A" version of a function
13266         if charset is auto as a second option before failing.
13268 2006-02-28  Raja R Harinath  <rharinath@novell.com>
13270         * class.h (mono_class_inflate_generic_method): Revert to two
13271         argument version.
13272         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
13273         (mono_class_inflate_generic_method_full): Add.
13274         * class.c (mono_class_inflate_generic_method_full): Rename from
13275         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
13276         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
13277         * loader.c, reflection.c: Update to changes.
13279 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
13281         * icall.c: const fixes and small improvements.
13283 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13285         * threadpool.c: for asynchronous connect(), enable the same workaround
13286         for BSD 6 as for the Mac. Fixes bug #77637.
13288 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
13290         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
13291         formatted classes. Fixes #77524.
13293 2006-02-24  Raja R Harinath  <rharinath@novell.com>
13295         * class.c (inflate_generic_type): Add a couple more
13296         micro-optimizations.
13297         (inflate_generic_context): Don't use the 'gmethod' from
13298         'inflate_with'.
13299         (mono_class_inflate_generic_method): If the method has generic
13300         parameters, but the passed-in context doesn't have a 'gmethod',
13301         create one.  Use the possibly simplified generic instantiation
13302         from the declaring class instead of the one passed in.
13304 2006-02-24  Raja R Harinath  <harinath@gmail.com>
13306         Make generic method signature and method header handling lazy.
13307         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
13308         (inflate_generic_header): Likewise.
13309         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
13310         parameter to avoid inflating types.
13311         (mono_get_inflated_method): Empty out.
13312         * class.h (mono_class_inflate_generic_method): Update to changes.
13313         * loader.c (mono_get_method_from_token): Don't parse signature for
13314         generic methods, nor methods of generic classes.
13315         (mono_method_signature): Rename from 'mono_method_signature'.
13316         Inflate signature on demand.
13317         (mono_method_get_header): Inflate method header on demand.
13318         * reflection.c: Update to changes.
13320 2006-02-23  Raja R Harinath  <rharinath@novell.com>
13322         * metadata.c (mono_metadata_inflate_generic_inst): If the
13323         instantiation is closed, don't bother expanding it in the new
13324         context.
13325         * class.c (inflate_generic_class): If the generic instantiation
13326         doesn't change after inflation, return the argument itself.
13327         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
13328         Add bounds checks.
13329         (inflate_generic_context): If neither the generic class nor the
13330         generic method instantiations change, return the original context.
13331         * reflection.c (mono_method_get_object): Do
13332         'mono_get_inflated_method' before accessing the ->klass field.
13333         (inflate_mono_method): Don't create a MonoGenericMethod unless
13334         necessary.
13335         (inflate_method): Don't pass a constructed type as the declaring
13336         type of a methodbuilder.
13338 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
13340         * object.c: fix memory overwrite.
13342 2006-02-22  Dick Porter  <dick@ximian.com>
13344         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
13345         it doesn't work any more.
13346         (mono_threads_request_thread_dump): Fix unused variable warnings.
13348 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
13350         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
13351         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
13352         the public header file.
13354 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
13356         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
13358 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
13360         * class-internals.h, object.c: reduce the size of MonoVTable
13361         and store the interface_offsets array at negative offsets.
13363 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
13365         * metadata.c: tweak table descriptors data structures to reduce
13366         size and runtime relocations.
13368 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13370         * marshal.c: fix some types and opcodes to be type-safe
13371         in marshaling wrappers.
13373 2006-02-21  Ankit Jain  <jankit@novell.com>
13375         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
13377 2006-02-21  Raja R Harinath  <rharinath@novell.com>
13379         * metadata.c (get_constraints): Relax debugging checks for monodis.
13381 2006-02-21  Ankit Jain  <jankit@novell.com>
13383         * metadata.c (mono_metadata_load_generic_params): Move the code
13384         checking for ambiguous generic params from here to mono/dis/get.c
13385         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
13387 2006-02-21  Raja R Harinath  <harinath@gmail.com>
13389         Fix assertion triggered when compiling nemerle.
13390         * class.c (mono_get_shared_generic_inst): Rename from
13391         get_shared_inst and make non-static.
13392         * loader.c (mono_get_shared_generic_method): New.  Used to create
13393         the MonoGenericContext-equivalent of a MonoGenericContainer.
13394         (mono_get_method_from_token): Initialize the 'context' field of
13395         the created MonoGenericContainer.
13396         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
13397         * metadata.c (get_constraints): Add sanity check.
13398         * class-internals.h: Add new internal methods.
13400         * reflection.c (verify_safe_for_managed_space): New sanity check.
13401         Currently checks that owner-less generic parameters aren't allowed
13402         in managed space.
13403         (mono_type_get_object): Use it.
13404         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
13405         that are now in mono_type_get_object.
13406         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
13408 2006-02-19  Raja R Harinath  <harinath@gmail.com>
13410         * metadata.c (mono_type_create_from_typespec): Rename from
13411         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
13412         argument and caching of types in the generic container.
13413         (unwrap_arrays, find_generic_param): Remove.
13414         * metadata-internals.h: Update.
13415         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
13417 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
13419         * class.c (mono_class_get_exception_for_failure): Fix a warning.
13421         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
13422         return values. Fixes #77581.
13424         * class.c (mono_fnptr_class_get): Switch name and name_space.
13426         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
13427         classes and add support for [In, Out] attributes.
13428         (mono_marshal_free_asany): Ditto. Fixes #77524.
13430 2006-02-18  Raja R Harinath  <harinath@gmail.com>
13432         * class.c (mono_class_from_generic_parameter): Make more robust to
13433         incomplete MonoGenericContainers from monodis.
13435 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
13437         * class-internals.h: added some more exception types.
13438         * class.c, metadata.c: added a few checks to handle missing
13439         types.
13441 2006-02-17  Raja R Harinath  <rharinath@novell.com>
13443         Use owner-less generic-params some more.
13444         * class.c (my_mono_class_from_generic_parameter): Remove.
13445         (mono_class_from_generic_parameter): Handle null image,
13446         param->name and param->owner.
13447         (mono_class_from_mono_type): Update.
13448         (mono_class_create_from_typespec): Remove 'container' parameter.
13449         If that parameter is non-null, the result is always inflated by
13450         'mono_class_get_full' anyway.
13451         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
13452         parameter.
13453         (mono_class_get_full): Update.
13455         * class.c (inflate_generic_type) [GENERICINST]: If the generic
13456         instance is not open, don't bother inflating.
13457         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
13458         parse metadata for inflated classes.
13459         (_mono_class_get): Change GenericContext* parameter to
13460         GenericContainer*.
13461         (mono_class_create_from_typespec): Likewise.  Simplify, and
13462         implement trivially.  All the cases are handled in
13463         mono_class_from_mono_type.  Don't inflate returned class.
13464         (mono_class_get_full): Delegate GENERICINST optimization to
13465         inflate_generic_type.
13466         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
13468 2006-02-16  Dick Porter  <dick@ximian.com>
13470         * socket-io.c (create_object_from_sockaddr): Fix typo.
13471         (create_sockaddr_from_object): Check array lengths before
13472         potentially accessing items off the end.
13473         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
13474         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
13475         (ves_icall_System_Net_Sockets_Socket_Send_internal)
13476         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
13477         length checks to avoid wraparound overflows.
13478         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
13479         contents of the array of sockets
13480         (hostent_to_IPHostEntry2)
13481         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
13482         Check return value of inet_ntop ().
13483         (addrinfo_to_IPHostEntry): Fix typo
13485 2006-02-16  Raja R Harinath  <rharinath@novell.com>
13487         Type metadata parsing doesn't use generic-instantiation information.
13488         * metadata.c (mono_metadata_parse_array_full): Change
13489         MonoGenericContext* parameter to MonoGenericContainer*.
13490         (mono_metadata_parse_type_full): Likewise.
13491         (mono_type_create_from_typespec_full): Likewise.
13492         (mono_metadata_parse_mh_full): Likewise.
13493         (mono_metadata_parse_generic_inst): Likewise.
13494         (do_mono_metadata_parse_generic_class): Likewise.
13495         (do_mono_metadata_parse_type): Likewise.
13496         * metadata-internals.h: Update to changes.
13497         * class.c (mono_class_find_enum_basetype): Likewise.
13498         (mono_class_setup_fields): Likewise.
13499         (mono_class_create_from_typespec): Likewise.
13500         * loader.c (method_from_methodspec): Likewise.
13501         (mono_get_method_from_token): Likewise.
13502         (mono_method_get_header): Likewise.
13504 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13506         * marshal.c: handle additional GENERICINST case (patch from
13507         Thong Nguyen <tum@veridicus.com>).
13508         Fix a few cases where LDIND_I/STIND_I was used for references.
13510 2006-02-16  Raja R Harinath  <rharinath@novell.com>
13512         * reflection.c (mono_reflection_get_token): Remove unused variable.
13514 2006-02-16  Martin Baulig  <martin@ximian.com>
13516         * reflection.c (mono_reflection_get_token): Add support for fields
13517         in instantiated generic types.
13519         * icall.c
13520         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
13522 2006-02-15  Martin Baulig  <martin@ximian.com>
13524         * icall.c
13525         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
13526         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
13527         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
13528         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
13530 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
13532         * class.c, metadata.c, metadata.h, object.c, icall.c,
13533         marshal.c: changed mono_type_get_underlying_type () to do
13534         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
13535         Fixed handling of instantiated generic valuetypes (bug #75479).
13537 2006-02-15  Raja R Harinath  <rharinath@novell.com>
13539         * metadata.c (mono_metadata_decode_signed_value): Simplify.
13540         Delegate to mono_metadata_decode_value, and work on the returned value.
13542         * icall.c (ves_icall_MonoType_GetGenericArguments):
13543         Add consistency check here too.
13544         
13545 2006-02-15  Ankit Jain  <jankit@novell.com>
13547         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
13548         char/short etc.
13550 2006-02-15  Ankit Jain  <jankit@novell.com>
13552         * metadata.c (mono_metadata_decode_signed_value): New function to decode
13553         signed values, used only for representing lower bounds of arrays.
13554         (mono_metadata_parse_array_full): Use new
13555         mono_metadata_decode_signed_value to decode lower bounds.
13557 2006-02-14  Martin Baulig  <martin@ximian.com>
13559         * reflection.c
13560         (mono_reflection_get_token): Support "MonoGenericMethod" and
13561         "MonoGenericCMethod" and allow generic instances / methods.
13563 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
13565         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
13566         to obtain the terminal size using an ioctl.
13568         * object.c (mono_nullable_init): Revert this as nullable reference
13569         types are not valid.
13570         (mono_nullable_box): Ditto.
13572 2006-02-09  Dick Porter  <dick@ximian.com>
13574         * threads.c (mono_thread_detach): Drop a reference to the thread
13575         we're detaching.
13577 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
13579         * object.c (mono_nullable_init): Handle nullable reference types.
13580         (mono_nullable_box): Ditto. Fixes #77446.
13582 2006-02-07  Martin Baulig  <martin@ximian.com>
13584         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
13586 2006-02-07  Ankit Jain  <jankit@novell.com>
13588         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
13589         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
13590         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
13591         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
13592         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
13593         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
13595 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
13597         * class.c (mono_class_create_generic): Set type_token as well.
13599         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
13600         compatible with MS.
13602 2006-02-02  Martin Baulig  <martin@ximian.com>
13604         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
13605         has never been used so far.
13607 2006-02-02  Martin Baulig  <martin@ximian.com>
13609         * mono-debug-debugger.h: Changed comment at the top of this file;
13610         the header is not installed, but it's safe to #include it from
13611         within the JIT.
13613         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
13614         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
13616 2006-02-02  Martin Baulig  <martin@ximian.com>
13618         * mono-debug.h
13619         (MonoSymbolTable): Removed the `metadata_info' field.
13621         * mono-debug.c
13622         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
13624         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
13625         (mono_debugger_add_builtin_types): Removed.
13626         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
13627         (mono_debugger_create_notification_function): We now operate on a
13628         pre-allocated area; take a `gpointer' and return `void'.
13630         * mono-debug-debugger.c
13631         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
13632         (mono_debugger_add_builtin_types): Removed.
13634 2006-02-02  Martin Baulig  <martin@ximian.com>
13636         * threads.c (mono_debugger_create_all_threads): New public method.
13638 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
13640         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
13641         breaks on several platforms.
13643 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
13645         * assembly.c: the VS.NET build doesn't supply default values for
13646         MONO_ASSEMBLIES and MONO_CFG_DIR.
13648 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
13650         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
13651         helper function.
13653         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
13655         * loader.c (method_from_memberref): Fix a warning.
13657         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
13659         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
13660         with explicit layout. Fixes #77433.
13662 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
13664         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
13665         max_interface_id is initialized before using it. Fixes #77398.
13666         (ves_icall_Type_GetInterfaces): Ditto.
13668 2006-01-30  Raja R Harinath  <rharinath@novell.com>
13670         * metadata.c (mono_metadata_parse_method_signature_full): Don't
13671         allocate memory for parameter attributes when parsing memberref
13672         signatures.
13673         * loader.c (mono_loader_set_error_method_load): Don't warn.
13674         (method_from_memberref): Ensure MissingMethodException gets thrown
13675         if method is not found.  Make warning more informative.
13677 2006-01-29  Raja R Harinath  <harinath@gmail.com>
13679         Fix #77397
13680         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
13681         return true if is byref.
13682         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
13683         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
13684         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
13686 2006-01-27  Raja R Harinath  <rharinath@novell.com>
13688         Fix tests/find-method.2.il
13689         * loader.c (find_method, find_method_in_class): Remove is_inflated
13690         argument.  Revert 2006-01-18 change.
13691         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
13692         is generic, search for method in its generic definition.
13693         * class.c (mono_class_setup_vtable_general): Print generic
13694         arguments of generic types in debugging printf.
13696 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
13698         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
13700         * threads.c (mono_threads_request_thread_dump): New helper function.
13702 2006-01-25  Raja R Harinath  <rharinath@novell.com>
13704         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
13706 2006-01-25  Ankit Jain  <jankit@novell.com>
13708         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
13709         move definition to ..
13710         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
13711         
13712 2006-01-25  Ankit Jain  <jankit@novell.com>
13713             Raja R Harinath  <rharinath@novell.com>
13715         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
13716         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
13717         as necessary.
13719 2006-01-25  Martin Baulig  <martin@ximian.com>
13721         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
13722         `MonoDebuggerThread' into debug-debugger.c.
13724 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
13726         * profiler.c: fix printing of data.
13728 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
13730         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
13731           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
13733 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
13735         * object.c: fix deadlock related to string interning.
13737 2006-01-23  Martin Baulig  <martin@ximian.com>
13739         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
13741         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
13743 2006-01-23  Martin Baulig  <martin@ximian.com>
13745         * mono-debug.h: Moved the prototypes of some functions which are
13746         used by the JIT here from mono-debug-debugger.h.
13748 2006-01-21  Martin Baulig  <martin@ximian.com>
13750         * Makefile.am: Don't install mono-debug-debugger.h.
13752 2006-01-21  Martin Baulig  <martin@ximian.com>
13754         * mono-debug-debugger.h: Enforce the private status of this header
13755         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
13756         Moved some stuff from mono-debugger-jit-wrapper.h here.
13758 2006-01-20  Raja R Harinath  <rharinath@novell.com>
13760         * class.c (mono_class_from_typeref): Add a sanity test to help
13761         catch lack of assembly load/search hooks.
13763 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
13765         * marshal.c (emit_struct_conv): Relax the fields with same offset
13766         check even more. Fixes #77230.
13768 2006-01-18  Martin Baulig  <martin@ximian.com>
13770         * loader.c (find_method_in_class): Added `gboolean is_inflated'
13771         argument; if false, we compare the uninstantiated signatures.
13772         (method_from_memberref): Compare the uninstantiated signatures;
13773         fixes #76417.
13775 2006-01-18  Robert Jordan  <robertj@gmx.net>
13777         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
13778         Clear the weak link. Fixes bug #77170.
13780         * gc.c (mono_gchandle_free):
13781         Reflect *-gc.c changes (tiny optimization).
13783 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
13785         * metadata.c (mono_metadata_signature_dup): Applied patch from
13786         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
13787         Fixes #77288.
13789 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
13791         * marshal.c (emit_struct_conv): Allow fields with the same offset when
13792         marshalling from native to managed code. Fixes #77230.
13794 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13796         * threadpool.c: fix problem (Mac only) when more than one asynchronous
13797         connect. Fixes bug #77020.
13799 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
13801         * class.c: fixed id assignement for nested interfaces (bug #77275).
13802         Added also better info for --print-vtable debugging.
13804 2006-01-12  Martin Baulig  <martin@ximian.com>
13806         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
13807         interfaces on-the-fly; fixes #76625.
13809         * class-internals.h
13810         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
13811         don't need that anymore.
13813 2006-01-12  Miguel de Icaza  <miguel@novell.com>
13815         * socket-io.c
13816         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
13817         To avoid initing the nested_classes when not needed I turned the
13818         PeerCredData as a toplevel internal class, as it has to be shared
13819         anyways. 
13821         Fixes the CASA issue.
13823 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
13825         * domain.c: Accessors for MonoJitInfo
13827         * profiler-private.h: Add jitinfo to the end jit hook
13829         * profiler.[ch]: Define new hooks, called after jitting which give
13830         the MonoJitInfo that was compiled
13832 2006-01-10  Martin Baulig  <martin@ximian.com>
13834         * class.c (mono_class_setup_events): Add support for generic
13835         classes; fixes #76440.
13837 2006-01-06  Raja R Harinath  <rharinath@novell.com>
13839         Fix #77160.
13840         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
13841         on passed-in method.
13843 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
13845         * object.c (mono_runtime_invoke_array): Add Nullable support.
13847         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
13849 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
13851         * file-io.c: Don't consider sockets as directory and avoid an endless
13852         loop. Fix bug #76966.
13854 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
13856         * object.c (mono_nullable_init): New helper function.
13857         (mono_nullable_box): Ditto.
13859         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
13861         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
13863         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
13864         
13865 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
13867         * class.c (mono_class_is_assignable_from): Make T assignable to 
13868         Nullable<T>.
13870 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
13872         * appdomain.c: Bump corlib version to 46.
13873         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
13874         serialization purpose) and changed ves_icall_System_Reflection_
13875         Assembly_get_code_base signature to accept a boolean (to escape, or 
13876         not, the assembly code base).
13878 2005-12-23  Dick Porter  <dick@ximian.com>
13880         * icall.c: 
13881         * threads-types.h: 
13882         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
13883         CreateEvent icall now returns "created" boolean parameter.
13885 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
13887         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
13888         #76967.
13890         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
13891         when attr_klass is an interface. Fixes #77045.
13893 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
13895         * marshal.c (emit_struct_conv): Fix previous patch.
13896         
13897         * marshal.c (emit_struct_conv): Add a check for fields with the same
13898         offset.
13900 2005-12-20  Raja R Harinath  <rharinath@novell.com>
13902         Fix regression in Mono.C5.
13903         * class.c (mono_class_create_generic): If 'klass' is an interface
13904         set up the interface offsets.
13905         (mono_class_is_assignable_from): Don't throw away generic arguments.
13907 2005-12-19  Raja R Harinath  <rharinath@novell.com>
13909         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
13910         type parameters.
13912 2005-12-15  Raja R Harinath  <rharinath@novell.com>
13914         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
13915         dead store.
13916         (do_mono_metadata_parse_generic_class): Don't pass the current
13917         generic context when parsing the type being instantiated: it
13918         cannot use it, anyway.
13920         * loader.c (method_from_memberref): Don't inflate a signature if
13921         it doesn't contain any type parameters.
13923 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
13925         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
13927 2005-12-14  Martin Baulig  <martin@ximian.com>
13929         * class.c
13930         (mono_type_get_name_recurse): Don't return null for type
13931         parameters and open generic classes.
13932         (mono_class_setup_methods): Don't exclude generic instances.
13933         (mono_get_unique_iid): Use different IDs for different
13934         instantiations of the same generic type.
13935         (mono_class_setup_vtable): Only use setup_generic_vtable() for
13936         open generic instances; create a normal vtable for closed generic
13937         instances.
13938         (mono_class_setup_vtable_general): We're now also called for
13939         closed generic instances.
13941         * reflection.c
13942         (mono_reflection_bind_generic_parameters): Correctly use
13943         mono_metadata_lookup_generic_inst() everywhere.
13945 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
13947         * object.c (mono_class_create_runtime_vtable): Call 
13948         mono_class_setup_vtable ().
13950         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
13951         function.
13952         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
13953         #76959.
13955         * loader.c (mono_loader_set_error_type_load): Print the type load
13956         warnings to the console so they are more visible to the user.
13957         (mono_loader_set_error_method_load): Ditto.
13959         * reflection.c (ensure_runtime_vtable): Revert the last change as it
13960         is still broken.
13961         
13962         * reflection.c (ensure_runtime_vtable): Fix build.
13964         * reflection.c (ensure_runtime_vtable): Disable an optimization which
13965         doesn't work in all cases.
13967 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
13969         * object.c (mono_array_new_full): Treat a single dimensional array
13970         with 0 lower bounds as an szarray. Fixes #76973.
13972         * reflection.c (custom_attr_visible): Really fix this.
13974 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
13976         * reflection.c (custom_attr_visible): Allow nested public attributes
13977         as well.
13979         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
13980         interface check.
13982 2005-12-12  Raja R Harinath  <harinath@gmail.com>
13984         * class.c (set_generic_param_owner): Delete.
13985         (mono_class_create_from_typedef): Don't set ->owner field of
13986         generic parameters to "param containers" of enclosing classes.
13987         * reflection.c (mono_reflection_initialize_generic_parameter):
13988         Likewise.
13990 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
13992         * reflection.c (custom_attr_visible): Fix build.
13994 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
13996         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
13997         private attributes.
13998         
13999         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
14000         handling of null parameter defaults.
14002 2005-12-09  Raja R Harinath  <rharinath@novell.com>
14004         * class.c (mono_class_from_generic_parameter): Don't set
14005         klass->generic_container.
14006         (my_mono_class_from_generic_parameter): Likewise.
14008 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
14010         * reflection.c (load_public_key): Fix a warning.
14011         (method_encode_code): Fix unaligned accesses.
14013 2005-12-07  Martin Baulig  <martin@ximian.com>
14015         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
14017         * reflection.c
14018         (write_generic_param_entry): Encode our custom attrs.
14020         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
14022 2005-12-07  Martin Baulig  <martin@ximian.com>
14024         * reflection.c (encode_new_constraint): Removed; we don't use the
14025         `NewConstraintAttribute' anymore.
14027 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
14029         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
14030         not fire a TypeResolve event when Assembly.GetType () is called.
14032 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
14034         Beginning of support for nullable types in the runtime. Parts of
14035         this patch are from Martin.
14037         * appdomain.c (MONO_CORLIB_VERSION): Bump
14039         * domain.c (mono_init_internal): get the nullable type
14041         * class.c (mono_class_is_nullable): New method
14042         (mono_class_get_nullable_param): New mehod
14043         (mono_class_create_generic): In types T? set cast_class to T
14045         * class-internals.h (MonoDefaults): new nullable default class
14046         (mono_class_get_nullable_param, mono_class_get_nullable_param):
14047         new methods.
14049 2005-12-05  Raja R Harinath  <rharinath@novell.com>
14051         * metadata.c (select_container): New.  Refactor code to select the
14052         appropriate GenericContainer given the type of generic parameter
14053         we are looking for.
14054         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
14055         not a MonoGenericContext.  Use select_container.  Update parameters.
14056         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
14057         and MONO_TYPE_MVAR.
14058         (unwrap_arrays): Remove duplicate tests.
14059         (find_generic_param): Rename from 'has_same_context'.  Now walks a
14060         generic instantiated class to find any arguments that are generic
14061         parameters.
14062         (mono_type_create_from_typespec_full): Use find_generic_param to
14063         avoid evicting some generic instantiations from the typespec
14064         cache.
14066 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
14068         * reflection.c: fixed writing of doubles on ARM FPA.
14070 2005-12-02  Robert Jordan  <robertj@gmx.net>
14072         * icall.c: Fixed EventInfo.ReflectedType (#76829).
14074 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14076         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
14077         least on SUSE 10 they are not the same (on debian, they are just the
14078         same thing).
14080 2005-12-01  Raja R Harinath  <rharinath@novell.com>
14082         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
14083         DeclaringType for VARs and MVARs.
14084         * class.c (set_generic_param_owner): Fix initialization of owner
14085         fields.
14087 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
14089         * icall.c: fixed Enum.ToObject() to correctly convert the values.
14091 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14093         * threadpool.c: workaround for a bug that shows up on the Mac:
14094         select()+connect() on a blocking socket is not like it should
14095         be, so we proceed to connect() in that case, wasting the I/O
14096         threadpool thread until connect succeedes. Fixes bug #75436.
14098 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14100         * threadpool.c: fix typo when setting file descriptor states.
14102 2005-11-28  Raja R Harinath  <rharinath@novell.com>
14104         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
14105         * metadata.c (mono_metadata_parse_method_signature_full): Don't
14106         create a temporary signature container.
14107         (mono_metadata_parse_generic_param): Update to changes.
14108         (mono_type_create_from_typespec_full): Update to changes.
14109         * loader.c (method_from_memberref): Don't use a
14110         MonoGenericContainer while parsing a memberref signature.
14111         (method_from_methodspec): Remove dead-store of the 'container'
14112         variable.  It's overwritten before use.
14114         * metadata.c (mono_type_create_from_typespec_full): Make debugging
14115         checks tighter.
14116         (mono_metadata_parse_generic_param): Likewise.
14117         * loader.c (find_method_in_class): Does not need a
14118         MonoGenericContainer.  Use 'mono_method_signature' rather than
14119         'mono_method_signature_full'.
14120         (find_method, mono_get_method_constrained, method_from_memberref):
14121         Update to changes.
14123         * metadata.c (mono_type_create_from_typespec_full): Ensure that
14124         owner-less generic-parameters are never evicted from the typespec
14125         cache.
14127         * loader.c (method_from_memberref): Don't use the current context
14128         when parsing signatures.
14129         (method_from_methodspec, mono_get_method_from_token): Update to changes.
14131         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
14132         side-effects in g_assert.
14133         * loader.c (mono_get_method_from_token): Resolve klass earlier so
14134         that we don't potentially lose information.
14136 2005-11-26  Dick Porter  <dick@ximian.com>
14138         * icall.c:
14139         * threads.c: icalls to implement basic (ie, not named)
14140         System.Threading.Semaphore.
14142 2005-11-24  Dick Porter  <dick@ximian.com>
14144         * process.c
14145         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
14146         Use GetProcessId() if it's available.
14148 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
14150         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
14152 2005-11-23  Raja R Harinath  <rharinath@novell.com>
14153             Ankit Jain  <jankit@novell.com>
14155         * loader.c (mono_get_method_from_token): Initialize 'method' field
14156         of all generic parameters before parsing the signature.  Remove
14157         code that "fixed"-up MVAR references.
14159 2005-11-23  Ankit Jain  <jankit@novell.com>
14161         * metadata.c (mono_metadata_has_generic_params):
14162         (mono_metadata_load_generic_param_constraints):
14163         (mono_metadata_load_generic_params): Move duplicate code ...
14164         (mono_metadata_get_generic_param_row): ... here. Returns the
14165         first row-id in GenericParam table for a given owner (token).
14166         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
14167         prototype.
14169 2005-11-23  Raja R Harinath  <rharinath@novell.com>
14170             Ankit Jain  <jankit@novell.com>
14172         * metadata.c (mono_metadata_class_equal): Pass signature_only when
14173         comparing VARs too.
14174         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
14175         type->data.generic_param only if the type is an MVAR.
14176         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
14177         leak owner-less VARs and MVARs into managed space.
14179 2005-11-21  Martin Baulig  <martin@ximian.com>
14181         * class-internals.h
14182         (MonoMethod): Moved the `generic_container' here from
14183         `MonoMethodNormal' since we now also need it for
14184         `MonoMethodPInvoke';
14185         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
14186         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
14187         an union containing both `MonoMethodNormal' and
14188         `MonoMethodPInvoke'.
14190         * loader.c
14191         (mono_get_method_from_token): Allow implementing generic methods
14192         as interncalls.
14194         * threads.c
14195         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
14196         icall.
14198 2005-11-17  Dick Porter  <dick@ximian.com>
14200         * icall.c: 
14201         * process.h: 
14202         * process.c: Split the Process Start_internal icall into
14203         ShellExecuteEx_internal and CreateProcess_internal, which are
14204         called depending on whether UseShellExecute is true.  Fixes bug
14205         76670.
14207         * appdomain.c (MONO_CORLIB_VERSION): Incremented
14209 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
14211         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
14212         'msize' parameters, use the information in 'mspec' instead.
14213         (emit_object_to_ptr_conv): Ditto.
14215         * marshal.c (emit_struct_conv): Handle explicit layout structs with
14216         fields out of order. Fixes #76733.
14218 2005-11-17  Ankit Jain  <jankit@novell.com>
14220         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
14222 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
14224         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
14225           bug #76575.
14227 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
14229         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
14230         for types with non-auto layout. Fixes #76717.
14232 2005-11-16  Ankit Jain  <jankit@novell.com>
14234         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
14235         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
14236         if generic_context is null.
14237           (mono_metadata_generic_param_equal): param->owner can be null.
14238           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
14239         null.
14241 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
14243         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
14244         the correct value.
14246 2005-11-15  Martin Baulig  <martin@ximian.com>
14248         * object.c (set_value): Use mono_class_from_mono_type() instead of
14249         the hack for generic instances; fixes #76136.
14251 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
14253         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
14254         fields.
14256         * image.c (load_metadata_ptrs): Initialize the new fields.
14258         * reflection.c (create_dynamic_mono_image): Ditto.
14260         * reflection.c (build_compressed_metadata): Use the new fields.
14262         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
14263         icall.
14265         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
14266         icall.
14267         
14268 2005-11-15  Ankit Jain  <jankit@novell.com>
14269             Raja R Harinath  <harinath@gmail.com>
14271         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
14272         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
14273         new per-generic_container cache if the cached MonoType's context matches
14274         the current context.
14275           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
14276         to the expected context.
14277           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
14279 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
14281         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
14282         we changed the signature of an icall.
14283         * icall.c: Modify to mono_double_ParseImpl return true/false 
14284         depending on the success, instead of throwing the exception. This will
14285         help us in Double.TryParse methods.
14286         
14287 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
14289         * marshal.c (emit_marshal_object): Throw an exception when
14290         marshalling 'object' instead of crashing. Fixes #76696.
14292 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
14294         * class-internals.h: Add prototype for mono_type_get_full_name ().
14296 2005-11-11  Dick Porter  <dick@ximian.com>
14298         * threads.c (mono_thread_manage): Make sure the main thread has
14299         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
14301 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
14303         * loader.c (mono_loader_set_error_type_load): Log a warning to the
14304         console about the missing type.
14305         (mono_loader_set_error_method_load): Ditto.
14307 2005-11-09  Miguel de Icaza  <miguel@novell.com>
14309         * mono-config.c (mono_get_config_dir): Set the system defaults if
14310         none is specified.
14312         * assembly.c (mono_set_dirs): New API entry point to set the
14313         assembly and the config directory in one call
14315 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
14317         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
14318         the ftnptr was created from a delegate in a domain other than the
14319         current domain. Fixes #75377.
14321         * exception.h exception.c: Add mono_get_exception_not_supported ().
14323 2005-11-08  Martin Baulig  <martin@ximian.com>
14325         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
14327 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
14329         * security-manager.h: Added definitions to deal with strongname key 
14330         pairs bigger (and smaller) than 1024 bits.
14331         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
14332         adjust wrt the public key length being used.
14334 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
14336         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
14337           Windows build (r51396-51397).
14339 2005-11-03  Martin Baulig  <martin@ximian.com>
14341         * class.c (mono_class_setup_vtable_general): Also add generic
14342         methods to the vtable; fixes #76581.
14344 2005-11-01  Miguel de Icaza  <miguel@novell.com>
14346         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
14347         sure that we lookup GetString method from the System.Text.Encoding
14348         class, not the derived class or we get an empty method.
14350         Fixed class #76612.
14352 2005-10-25  Miguel de Icaza  <miguel@novell.com>
14354         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
14355         if it has been previously set (embedders). 
14357         Make mono_set_rootdir available also on Unix.
14359 005-10-24  Robert Jordan  <robertj@gmx.net>
14361         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
14363 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
14365         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
14366         only calls which are made to native code use this flag.
14368         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
14370 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
14372         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
14373         Add support for FieldBuilders.
14375 2005-10-29  Martin Baulig  <martin@ximian.com>
14377         * mono-debug.c
14378         (mono_debug_using_mono_debugger): New public method; returns
14379         whether we're running inside the debugger.
14381 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
14383         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
14384         for Method/Constructor/FieldBuilders.
14386 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
14388         * reflection.c (module_add_cattrs): Save custom attributes for global methods
14389         and fields as well.
14391 2005-10-26  Martin Baulig  <martin@ximian.com>
14393         * mono-debug-debugger.c
14394         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
14396 2005-10-24  Raja R Harinath  <harinath@gmail.com>
14398         * icall.c (base64_to_byte_array): Don't pass an out-of-range
14399         integer to isspace.
14401 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
14403         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
14404         when passing valuetypes byref. Fixes #76502.
14406 2005-10-19  Jackson Harper  <jackson@ximian.com>
14408         * profiler.c: Don't put a . in front of types that are not in a
14409         namespace.
14411 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
14413         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
14415 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
14417         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
14418         #76436.
14419         (mono_marshal_get_ldflda_wrapper): Fix a warning.
14421 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
14423         * assembly.c metadata-internals.h icall.c: Define an additional
14424         parameter for mono_assembly_name_parse_full, so we can avoid creating
14425         S.R.AssemblyName.Version when no version info wasn't passed.
14426         
14427 2005-10-09  Miguel de Icaza  <miguel@novell.com>
14429         * class.c (mono_type_get_full_name): Reimplement method that was
14430         removed. 
14432         * image.c: Some docs
14434 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
14436         * profiler.c (output_newobj_profile): Fix printing of Total memory
14437         on x86.
14439 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
14441         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
14443 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
14445         * threads.c: remove debug output.
14447 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
14449         * threads.c (mono_thread_manage): Fix crashes if more than 64
14450         threads need to be aborted. Hopefully fixes #75899.
14452         * assembly.c (mono_stringify_assembly_name): New helper function.
14454         * class.c: Use mono_stringify_assembly_name instead of the similar
14455         static function.
14457         * assembly.h assembly.c: Add support for calling a postload search 
14458         hook if an assembly cannot be loaded.
14460         * appdomain.c: Register new search hooks which call the AssemblyResolve
14461         events in AppDomain. Fixes #75231
14463 2005-10-07  Martin Baulig  <martin@ximian.com>
14465         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
14466         methods without debug info.
14468 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
14470         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
14471         wrappers.
14473 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14475         * file-io.c: now that we return symlinks, use lstat and, when the file
14476         is a symbolic link, stat, to get the file attributes. Also avoid the
14477         conversion to/from utf16/external.
14479 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
14481         * class.c (mono_class_layout_fields): Compute klass->has_references
14482         correctly if an embedded valuetype is not yet initialized. Fixes
14483         #76331.
14485 2005-10-04  Martin Baulig  <martin@ximian.com>
14487         * metadata.c
14488         (mono_metadata_load_generic_param_constraints): New public
14489         function; splitted the constraints loading out from
14490         mono_metadata_load_generic_params().
14492         * class.c (mono_class_create_from_typedef): Call
14493         mono_metadata_load_generic_param_constraints() after setting up
14494         the type and creating our parent; fixes #75329.
14496 2005-10-04  Martin Baulig  <martin@ximian.com>
14498         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
14499         non-dynamic parent classes.
14501 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
14503         * file-io.c : win32 build fix (ETXTBSY seems not found).
14505 2005-10-04  Martin Baulig  <martin@ximian.com>
14507         * reflection.c
14508         (mono_image_get_methodspec_token): Make the cache actually work;
14509         fixes #75974.
14511 2005-10-04  Martin Baulig  <martin@ximian.com>
14513         * class.c (mono_class_name_from_token): Removed the unneccessary
14514         `MonoGenericContext *' argument.
14516 2005-10-04  Martin Baulig  <martin@ximian.com>
14518         * loader.c
14519         (method_from_methodspec): Make the caching work again; fixes the
14520         performance regression from #76262.
14522 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14524         * file-io.c:
14525         * file-io.h:
14526         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
14527         GetFileSystemEntries that performs the same work but without going
14528         into io-layer, locking, etc.
14530 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
14532         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
14533         ThreadState_Stopped as well. Fixes #76047.
14535 2005-09-29  Martin Baulig  <martin@ximian.com>
14537         * class.c
14538         (inflate_generic_context): If the new context has a `gmethod', set
14539         its `container' that that gmethod's `container'.
14541         * metadata.c
14542         (mono_metadata_parse_generic_param): Simplify things;
14543         `generic_container = generic_context->container;' is just fine.
14545         * loader.c (method_from_methodspec): Code cleanups.
14547 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
14549         * decimal.c: fix warning (and let gcc generate correct
14550         code on ARM with optimizations).
14552 2005-09-28  Martin Baulig  <martin@ximian.com>
14554         * loader.c
14555         (method_from_memberref): Added `MonoGenericContext *class_context'
14556         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
14557         (method_from_methodspec): If we're a memberref, use the enclosing
14558         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
14560 2005-09-28  Martin Baulig  <martin@ximian.com>
14562         * object.c (mono_runtime_invoke_array): Added support for
14563         MONO_TYPE_GENERICINST; fixes #75917.
14565 2005-09-27  Martin Baulig  <martin@ximian.com>
14567         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
14568         `k->byval_arg.type' to determine the actual type.
14570         * loader.c (method_from_methodspec): Removed some hacks.
14572 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
14574         * class-internals.h (mono_field_is_deleted): Do the test for
14575         rtspecialname before we check the actual name of the field. This
14576         prevents us from dereferencing a pointer into the string table,
14577         saving us from accessing a few pages
14579         * *.c: Replace the use of {Enter,Leave}CriticalSection with
14580         macros. This will allow a deadlock debugger to easily be plugged
14581         in.
14583 2005-09-27  Martin Baulig  <martin@ximian.com>
14585         * loader.c (method_from_methodspec): Create a "signature"
14586         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
14588 2005-09-27  Martin Baulig  <martin@ximian.com>
14590         * class.c
14591         (inflate_generic_class): Correctly set the new context's
14592         container.
14594         * loader.c
14595         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
14596         instead of a `MonoGenericContext *'.
14597         (mono_method_signature_full): Take a `MonoGenericContainer *'
14598         instead of a `MonoGenericContext *'.
14600         * metadata.c
14601         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
14602         instead of a `MonoGenericContext *'.
14603         (mono_metadata_parse_method_signature_full): Likewise.
14605 2005-09-26  Martin Baulig  <martin@ximian.com>
14607         * class.c
14608         (mono_class_from_generic_parameter): Set `klass->generic_container'
14609         (mono_class_from_generic_parameter): Likewise.
14610         (mono_bounded_array_class_get): We inherit the generic container
14611         from the element class.
14613         * loader.c
14614         (find_method, find_method_in_class): Take a `MonoGenericContext *'
14615         argument rather than computing it here.
14616         (method_from_memberref): Correctly set the generic context before
14617         parsing the signature.  Fixes #75681.
14619 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
14621         * object.c (mono_class_has_special_static_fields): Fix warnings.
14623 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
14625         * assembly.c: Add parse_public_key function, to
14626         par the public keys. Also added mono_assembly_name_parse_full,
14627         to define it the parsed key should be freed or not.
14628         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
14629         to parse a long format assembly name.
14630         * metadata-internals.h: Keep mono_assembly_name_parse_full as
14631         private, since calling it to preserve the key requires
14632         freeing it manually.
14633         
14634 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
14636         * locales.c : removed HAVE_ICU part.
14638 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
14640         * object.c (mono_class_create_runtime_vtable): Avoid calling 
14641         field_is_special_static if the klass has no special static fields.
14643         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
14644         (MonoCachedClassInfo): Likewise.
14646         * object.c (mono_class_has_special_static_fields): New helper function.
14648 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
14650         * class.c (mono_class_create_from_typedef): Don't call 
14651         interfaces_from_typedef_full for enums.
14652         (mono_class_create_from_typedef): Compute the base types of enums directly
14653         without calling mono_class_setup_fields ().
14654         (mono_class_find_enum_basetype): New helper function.
14656         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
14657         one place inside the string heap.
14658         
14659 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
14661         * class.c: locking fixes, code cleanups, some docs added.
14662         Allocate some data structures in the image mempool.
14664 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
14666         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
14667         the example code.
14668         
14669 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
14671         * class-internals.h, class.c, reflection.c: reduce memory taken by
14672         MonoClass.
14674 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
14676         * metadata.c, metadata.h, loader.h: documentation updates, code and
14677         API cleanups.
14679 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
14681         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
14682         the example code.
14684         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
14685         page faults caused by the runtime while reading metadata.
14687 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14689         * socket-io.c: the field names were changed 3 months ago and no one
14690         realized until bug #76077 got filed!
14692 2005-09-20  Martin Baulig  <martin@ximian.com>
14694         * icall.c (assembly_icalls): Removed some unused debugger icalls.
14696 2005-09-20  Martin Baulig  <martin@ximian.com>
14698         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
14699         write the rank into the class entry.
14701 2005-09-20  Martin Baulig  <martin@ximian.com>
14703         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
14705 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
14707         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14709         * icall.c (custom_attrs_defined_internal): New icall.
14711         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
14712         function.
14713         (mono_custom_attrs_construct_by_type): New helper function.
14715 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
14717         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
14718         terminate the resulting string. Fixes #76123.
14720 2005-09-16  Martin Baulig  <martin@ximian.com>
14722         * mono-debug.c
14723         (mono_debug_add_method): Ignore inflated methods for the moment.
14725 2005-09-14  Martin Baulig  <martin@ximian.com>
14727         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
14729 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
14731         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
14732         return a success/failure indication.
14733         (mono_metadata_interfaces_from_typedef_full): Ditto.
14734         (get_constraints): Ditto.
14736 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
14738         * marshal.c (emit_marshal_array): Fix handling of null arrays.
14739         
14740         * marshal.c (emit_marshal_array): Add support for returning string
14741         arrays from delegates. Fixes #76063.
14743         * marshal.c: Use the emit_ldloc/stloc macros where possible.
14745 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
14747         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
14748         icall.
14750 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
14752         * reflection.c icall.c: Fix after mono_get_exception_type_load
14753         signature change.
14755         * assembly.c (mono_assembly_get_assemblyref): New helper function.
14756         (mono_assembly_load_reference): Use the new helper.
14758         * class-internals.h (MonoLoaderError): New structure containing 
14759         information about type loading errors.
14761         * class-internals.h loader.c: Add APIs to store per-thread loader
14762         error information.
14764         * loader.c class.c: Set the loader error if needed.
14766         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
14768 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
14770         * decimal.c: fixed to handle the broken ARM fp format.
14772 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
14774         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
14775         broken.
14777 2005-09-06  Martin Baulig  <martin@ximian.com>
14779         * domain.c (supported_runtimes): Added v2.0.50727.
14781 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
14783         * culture-info.h: reduce the size of some structures.
14785 2005-09-05  Martin Baulig  <martin@ximian.com>
14787         Reflect latest API changes in the August CTP.
14789         * icall.c
14790         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
14791         ("MonoType.HasGenericArguments"): Removed.
14792         ("MonoMethod.BindGenericParameters"): Renamed to
14793         "MakeGenericMethod".
14794         ("MethodBuilder.BindGenericParameters"): Renamed to
14795         "MakeGenericMethod".    
14797 2005-09-05  Martin Baulig  <martin@ximian.com>
14799         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
14801 2005-09-05  Martin Baulig  <martin@ximian.com>
14803         Applying a patch from Michal Moskal <malekith@nemerle.org>.
14805         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
14806         generic_container is non-NULL.
14808 2005-09-05  Martin Baulig  <martin@ximian.com>
14810         Applying a patch from Michal Moskal <malekith@nemerle.org>.
14812         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
14814 2005-08-29  Michal Moskal  <malekith@nemerle.org>
14816         * reflection.c (encode_locals,
14817         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
14818         for large generic types.
14820 2005-09-05  Martin Baulig  <martin@ximian.com>
14822         Applying a patch from Michal Moskal <malekith@nemerle.org>.
14824         * class.c (mono_dup_array_type): New public method.
14825         (mono_metadata_signature_deep_dup): New public method.
14826         (dup_type): Correctly duplicate array and function types.
14828 2005-09-05  Martin Baulig  <martin@ximian.com>
14830         Applying a patch from Michal Moskal <malekith@nemerle.org>.
14832         * reflection.c (get_default_param_value_blobs): Handle generic types
14833         and generic methods.
14835 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
14837         * class.c: Fixed error reporting (method/class were inversed) for 
14838         inheritance demands.
14839         * security-manager.c|h: Added the AppDomain when calling the managed
14840         System.Security.SecurityManager.InheritanceDemand method.
14842 2005-09-01  Raja R Harinath  <rharinath@novell.com>
14844         * reflection.c (encode_marshal_blob): 'marshaltype' and
14845         'marshaltyperef' are alternate sources for the custom marshaler
14846         name.
14848 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
14850         * class.c: fix creation of array classes with rank == 1
14851         (patch by Ankit Jain <jankit@novell.com>).
14853 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
14855         * object.c: fix check for creating the bound data for arrays vs
14856         szarrays.
14858 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14860         * object.c: configuration file name is now based on the executable name,
14861         not the image name. Fixes bug #75931.
14863 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
14865         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
14866         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
14868 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
14870         * rand.c: Use wincrypt.h instead of WinCrypt.h.
14872 2005-08-24  Ankit Jain  <jankit@novell.com>
14873             Raja R Harinath  <rharinath@novell.com>
14875         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
14876           called by it recursively.
14877           (mono_class_init): Remove special case in pending_init handling, since it's
14878           superseded by the fix to mono_class_from_typeref.
14880 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
14882         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
14883         BROKEN_THREAD_START stuff.
14885 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
14887         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
14888         trampoline.
14890         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
14891         
14892         * object.c (mono_delegate_ctor): Replace the original function address with
14893         a delegate trampoline.
14895 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
14897         * icall.c: add boolean argument to base64_to_byte_array and 
14898         InternalFromBase64String to control whether a whitespace-only string
14899         is allowed (or should casue a FormatException to be thrown). We need
14900         this as the behavior has changed between MS.NET 1.x and 2.0, and we
14901         to match the MS behaviour in both profiles.
14902         * appdomain.c: Bump corlib version.
14904 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
14906         This patch implements a big portion of publisher policy
14907         support, used to bind assembly versions and redirect
14908         one assembly from version A to version B.
14910         * assembly.c:
14911         New GSList loaded_assembly_bindings, for storing the cached
14912         assembly bindings.
14913         (assembly_binding_maps_name): New static function for checking if a 
14914         assembly binding information maps an assembly name.
14915         (mono_assembly_binding_info_free): New function for freeing
14916         assembly binding information resources.
14917         (get_publisher_policy_info): New static function for retrieving 
14918         assembly binding information from a MonoImage.
14919         (compare_versions): New static function for comparing an assembly
14920         binding information data and the version of an assembly name.
14921         (check_policy_versions): New static function for checking if an
14922         assembly binding info mapping an assembly name is valid for it.
14923         (mono_assembly_load_publisher_policy): New static function for
14924         loading the 'policy.major.minor.MyAssembly' image for an assembly
14925         with an assembly name 'aname'.
14926         (mono_assembly_bind_version): New static function for updating
14927         assembly redirection.
14928         (mono_assembly_apply_binding): New static function for applying
14929         assembly binding.
14930         (search_binding_loaded): New static function for searching 
14931         loaded assembly binding infos in the cache domain.
14932         (mono_assembly_load_full): Don't apply assembly binding for
14933         reflection only assemblies.
14935         * metadata-internals.h: Add MonoAssemblyBindingInfo,
14936         which contains information about assembly binding. Also
14937         declare signature for mono_config_parse_publisher_policy ()
14938         function, used to retrieve pub policy info.
14939         
14940         * mono-config.c:
14941         (publisher_policy_start): New static function used to parse publisher 
14942         policy config files.
14943         (publisher_policy_parser): New static MonoParseHandler containing 
14944         the functions used when parsing config files.
14945         (mono_config_parse_publisher_policy): New function for parsing
14946         publisher policy files.
14947         
14948 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
14950         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
14952         * marshal.c (mono_delegate_free_ftnptr): Ditto.
14954         * object.c (mono_get_addr_from_ftnptr): New helper function.
14956         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
14958         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14960 2005-08-19  Dick Porter  <dick@ximian.com>
14962         * threads.c, threads.h, appdomain.c, appdomain.h,
14963         profiler-private.h, monitor.c, object.c, object-internals.h,
14964         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
14965         store the thread ID, so it can hold a 64 bit value if needed.
14967 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
14969         * reflection.c (mono_reflection_create_dynamic_method): Store the
14970         handle class into the method references as well so ldtoken works in
14971         dynamic methods.
14973         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
14974         types.
14976 2005-08-19  Ankit Jain <jankit@novell.com>
14978         Fix #75847.
14979         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
14980           here rather than using the method signature of a arbitrary function
14981           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
14982           two arguments.
14983           Hack done with Harinath.
14985 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14987         * threadpool.c: disable printing stack traces when we get a exception
14988         in a threadpool thread. I need to do more testing to figure out which
14989         cases actually print this. Fixes bug #75828.
14991 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14993         * icall.c: there might be ignored whitespace after the last '='. This
14994         fixes length computation and bug #75840.
14996 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
14998         * assembly.c (mono_assembly_load_full): Consider .exe extension as
14999         well. Fixes #75809.
15001         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
15002         #75784.
15003         
15004         * reflection.c (create_custom_attr_data): Ditto.
15006 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
15008         * locales.c, culture-info.h : removed RegionLCIDMap.
15009         * culture-info-tables.h : regenerated.
15011 2005-08-16  Martin Baulig  <martin@ximian.com>
15013         * class.c (mono_type_get_name_recurse): Small fix.
15015 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
15017         * locales.c : indentation fixie.
15019 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
15021         * object-internals.h,
15022           locales.h,
15023           locales.c,
15024           culture-info.h,
15025           icall.c : added RegionInfo table support.
15026         * culture-info-table.h : regenerated for region support.
15028 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
15030         * reflection.c (resolve_object): handle all kinds of MonoMethod
15031         including generic ones
15033 2005-08-12  Ankit Jain <jankit@novell.com>
15035         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
15036           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
15038 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
15040         * process.c: Don't close a thread handle when it's NULL. This is a
15041         workaround for bug #75733.
15043 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
15045         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
15047 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
15049         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
15051 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15053         * threadpool.c: if a work item in the thread pool has a callback that
15054         catches a exception, don't propagate it after invoking the callback.
15055         Fixes bug #75336.
15057 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
15059         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
15061         * class-internals.h (MonoCachedClassInfo): Add some new fields.
15063         * class.c (mono_class_init): Load field info lazily in the AOT case.    
15065         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
15067 2005-08-03  Ankit Jain  <jankit@novell.com>
15069         Fix #75683.
15070         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
15071           PInvoke calling convention is 0.
15073 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
15075         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
15076         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
15078 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
15080         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
15081         to handle threads not started by the GC (patch by Michael Meeks
15082         <michael.meeks@novell.com>).
15084 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
15086         * reflection.c: Make buffer used in emitting types larger for some
15087         big generic types (patch by Michal Moskal).
15089 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
15091         * mono-debug.c: Fix some (not all) alignment problems.
15093 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
15095         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
15096         Invoke mono_image_load_from_data_full passing the refonly
15097         parameter.
15099         * assembly.c
15100         (mono_assembly_open_from_bundle): Add the refonly argument, 
15101         in order to pass it to other methods it calls to.
15102         (do_mono_assembly_open): Add the refonly argument, in order 
15103         to pass it to other methods it calls to.
15104         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
15105         the refonly parameter to it.
15107         * image.c: Add loaded_images_refonly_hash and
15108         loaded_images_refonly_guid_hash to cache the reflection
15109         only loaded images.
15110         (mono_images_init): Initialize the hash tables used for
15111         caching the reflection only images.
15112         (load_modules): Invoke mono_image_open_full passing the refonly
15113         parameter to load the modules the correct way.
15114         (build_guid_table): Add the refonly argument, to re-build the 
15115         correct hash table.
15116         (do_mono_image_open): Added the refonly argument, in order to
15117         define it for the loaded image.
15118         (mono_image_loaded_full): New function, which receives an
15119         additional parameter to look for the image in the refonly or
15120         non-refonly section.
15121         (mono_image_loaded): Updated, using mono_image_loaded_full.
15122         (mono_image_loaded_by_guid_full): The same case that happens
15123         with mono_image_loaded_full.
15124         (mono_image_loaded_by_guid): Likewise.
15125         (register_image): Use the ref_only variable inside MonoImage
15126         to decide in which hash table store the current image.
15127         (mono_image_open_from_data_full): Rename
15128         mono_image_open_from_data to mono_image_open_from_data_full,
15129         adding the refonly argument, to define the ref_only variable 
15130         inside MonoImage.
15131         (mono_image_open_from_data): Return 
15132         mono_image_open_from_data_full.
15133         (mono_image_open_full): Rename mono_image_open to
15134         mono_image_open_full, receiving the new refonly argument,
15135         to pass it to inner methods.
15136         (mono_pe_file_open): Update this function, to open
15137         a MonoImage as a non-refonly image.
15138         (mono_image_close): Use the refonly variable inside
15139         MonoImage to remove the image from the correct caches.
15141         * image.h: Add the signatures of mono_image_open_full,
15142         mono_image_open_from_data_full, mono_image_loaded_full,
15143         mono_image_loaded_by_guid_full.
15145         * metadata-internals.h: Add the ref_only field to 
15146         MonoImage.
15147         
15148 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
15150         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
15151         Fix the last behavior, which used to load the assemblies and
15152         extract MonoReflectionAssemblyName information, instead of
15153         extract it from the metadata tables. Needed for Reflection
15154         Only assemblies.
15155         
15156 2005-07-29  Martin Baulig  <martin@ximian.com>
15158         * mono-debug-debugger.c
15159         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
15160         not initialized.
15162         * mono-debug.c
15163         (mono_debug_address_from_il_offset): Check whether we have
15164         debugging support before attempting to take the lock.
15165         (mono_debug_source_location_from_address): Likewise.
15166         (mono_debug_source_location_from_il_offset): Likewise.
15167         (mono_debug_il_offset_from_address): Likewise.
15168         (mono_debug_address_from_il_offset): Likewise.
15170 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
15172         * class.c (mono_class_from_name_case): Add support for dynamic images.
15173         Fixes #75650.
15175         * object.c (mono_class_compute_gc_descriptor): Add a workaround
15176         for #75479.
15178 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
15179         
15180         * reflection.c (mono_method_get_object): Fix warning.
15182 2005-07-28  Martin Baulig  <martin@ximian.com>
15184         * mono-debug.c
15185         (mono_debug_add_wrapper): Also write the wrapper type.
15187 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
15189         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
15190         
15191         * class.c (mono_class_init): Avoid reading nested classes if the AOT
15192         data indicates the class has none.
15194 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
15196         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
15197         loader lock with the debugger lock. Prevents deadlocks for beagle.
15199         Beagle can now run on an smp box for a weekend without any
15200         issues. Woohoo!
15202 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
15204         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
15205         in a module. Fixes #75629.
15207 2005-07-26  Martin Baulig  <martin@ximian.com>
15209         * mono-debug.c (mono_debug_add_wrapper): New static method.
15210         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
15211         interncall or a wrapper.
15213         * mono-debug.h (MonoDebugWrapperData): New public typedef.
15214         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
15215         (MONO_DEBUGGER_VERSION): Bump to 51.
15217         * mono-debug-debugger.c
15218         (mono_debugger_add_type): Removed this empty function.
15219         (mono_debugger_add_method): Likewise.
15221 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
15223         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
15224         before accessing method->slot.
15226 2005-07-21  Jb Evain  <jbevain@gmail.com>
15228         * reflection.c (method_encode_clauses/class): Handle filters clauses.
15229         Fixes #75010.
15231 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
15233         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
15234         #75587.
15236 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
15238         * image.h image.c: Add mono_image_get_guid () API function.
15240 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
15242         There were issues when multiple threads tried to load
15243         assemblies. A deadlock was created between assemblies_mutex and
15244         mono_domain_assemblies_lock. This fixes the issue by making the
15245         assembly ref counting be lock free. See bug 75586.
15246         
15247         * image.c (mono_image_close): The add ref function here was using
15248         Interlocked operations while the unref was using a mutex and a
15249         --. I don't think this was ever a bug that would be exposed in a
15250         non-pendantic way (ie, by an embedder doing a ref on one thread
15251         and an unref on another), but for the sake of correctness, this is
15252         now Interlocked.
15254         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
15255         (mono_assembly_load_reference): Call mono_assembly_addref rather
15256         than touching the refcount ourselves.
15257         (mono_assembly_close): Use InterlockedDecrement to unref the
15258         assembly. Don't acquire the lock unless it is actually needed.
15260 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
15262         * class.c (mono_class_layout_fields): Fix calculation of has_references
15263         for generic types.
15265 2005-07-12  Martin Baulig  <martin@ximian.com>
15267         Applying a patch from Michal Moskal <malekith@nemerle.org>.
15269         * metadata.c
15270         (mono_type_hash): Provide better hashing for generic instances.
15271         (mono_generic_inst_hash): Improve hashing.
15272         (mono_generic_class_hash): Likewise.
15274         * reflection.c (mymono_metadata_type_hash): Improve hashing for
15275         generic instances.
15277 2005-07-12  Martin Baulig  <martin@ximian.com>
15279         * reflection.c (mono_reflection_create_runtime_class): Remove the
15280         hack for generic type definitions and non-`Run' assemblies.
15281         (mono_reflection_bind_generic_parameters): Also use
15282         `klass->wastypebuilder' to check for TypeBuilders.
15284 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
15286         * class.c (mono_class_layout_fields): Fix calculation of has_references
15287         for generic types.
15289         * class.c (inflate_generic_class): Fix a leak.
15290         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
15291         for generic types.
15293 2005-07-11  Martin Baulig  <martin@ximian.com>
15295         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
15296         on error.
15298 2005-07-11  Martin Baulig  <martin@ximian.com>
15300         * loader.c (find_method): Also lookup in
15301         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
15303 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
15305         * appdomain.c (mono_domain_unload): Don't free the error message
15306         before passing it to mono_get_exception_...
15308         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
15309         
15310 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
15312         * threads.c: try to better guess an available RT signal (bug #75387).
15314 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
15316         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
15317         and CACHE_OBJECT.
15319 2005-07-07  Martin Baulig  <martin@ximian.com>
15321         * class.c (mono_type_get_name_full): Return NULL for
15322         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
15323         fixes #75408.
15325 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
15327         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
15328         exit the appdomain as well being aborted.
15330         * threadpool.c: Create all threadpool threads inside the root appdomain, and
15331         change back to the root domain after calling managed code. This enables
15332         appdomains using threadpools to be unloaded.
15334 2005-07-07  Martin Baulig  <martin@ximian.com>
15336         * class-internals.h
15337         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
15338         into `MonoDynamicGenericClass' since we only need it for dynamic
15339         types.
15341         * reflection.c (mono_class_bind_generic_parameters): We don't need
15342         to compute the `parent' here.
15344 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
15346         * culture-info-table.h : regenerated.
15348 2005-07-06  Martin Baulig  <martin@ximian.com>
15350         * icall.c
15351         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
15353         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
15355 2005-07-06  Martin Baulig  <martin@ximian.com>
15357         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
15358         we're doing a signature-only comparision; fixes #74945.
15360 2005-07-06  Martin Baulig  <martin@ximian.com>
15362         * class-internals.h (MonoGenericClass): Moved some things out into
15363         a new `MonoInflatedGenericClass' type.  
15364         (MonoInflatedGenericClass): New type; the `klass' of a
15365         `MonoGenericClass' is now computed lazyly in
15366         mono_get_inflated_generic_class().      
15368         * class.c (mono_get_inflated_generic_class): New public function.
15369         (mono_class_inflate_generic_method): Removed the unused
15370         `MonoClass *' argument.
15371         (setup_generic_vtable): Don't call mono_get_inflated_method() on
15372         all the methods.
15373         (mono_class_create_generic): Make this static and merge it with
15374         mono_class_create_generic_2(); we're now called automatically from
15375         mono_get_inflated_generic_class().
15377         * loader.c (mono_method_signature): Call
15378         mono_get_inflated_method() here.
15380 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
15382         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
15383         type of fields with RVA.
15385         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
15386         for this pseudo class.
15387         (my_mono_class_from_generic_parameter): Likewise.
15388         (mono_class_init): Allow interfaces to have cctors.
15390 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
15392         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
15393         lazily for AOT methods.
15395 2005-07-05  Martin Baulig  <martin@ximian.com>
15397         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
15398         returns FALSE for a successful match, not TRUE.
15400 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
15402         * loader.c (mono_method_get_index): Optimize this a bit.
15404 2005-07-04  Martin Baulig  <martin@ximian.com>
15406         * class.c
15407         (class_compute_field_layout): Move the check for generic type
15408         definitions into mono_class_layout_fields().  Fixes #74684.
15409         (mono_class_from_generic_parameter): Correctly compute
15410         `klass->parent'; fixes #75457.
15412         * reflection.c (register_assembly, register_module): Make sure
15413         `domain->rejobject_hash' is already created.
15415 2005-07-02  Martin Baulig  <martin@ximian.com>
15417         * class-internals.h
15418         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
15419         `MonoDynamicGenericClass'.      
15421 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
15423         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
15424         returned by a field getter is null, since null is a valid value.
15426 2005-07-01  Martin Baulig  <martin@ximian.com>
15428         * reflection.c (mono_reflection_generic_class_initialize): Update
15429         the `dgclass->fields [i].parent' to the correct class.
15430         (mono_image_get_fieldref_token): Use the declaring type, not the
15431         reflected type.
15433 2005-07-01  Martin Baulig  <martin@ximian.com>
15435         * loader.c (find_method): Also look in the interfaces; fixes #75429.
15437 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
15439         * threads.c (thread_cleanup): assert that thread != NULL
15440         (wait_for_tids_or_state_change): We were using the wrong variable
15441         when accessing wait->threads. `i' was always out of the bounds of
15442         the array.
15444 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15446         * loader.c: map user32 and kernel32 to libMonoSupportW
15448 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
15450         * appdomain.c (unload_thread_main): Mark this as WINAPI.
15452 2005-06-28  Martin Baulig  <martin@ximian.com>
15454         * loader.c (method_from_methodspec): Fix #75334.
15456 2005-06-28  Martin Baulig  <martin@ximian.com>
15458         Fix #74953 - Arrays now implement the generic IList<T> interface
15459         on the 2.0 platform.
15461         * class-internals.h (MonoDefaults): Added `generic_array_class'.
15463         * reflection.c (mono_class_bind_generic_parameters): New public
15464         function; similar to mono_reflection_bind_generic_parameters(),
15465         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
15467         * domain.c (mono_init_internal): Try to initialize.
15468         `mono_defaults.generic_array_class' here; this'll only succeed if
15469         we're using the 2.0 corlib.
15471         * icall.c
15472         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
15473         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
15474         (mono_lookup_internal_call): Added support for nested classes.
15476         * loader.c
15477         (mono_get_method_from_token): Set `result->signature->pinvoke' if
15478         we're an interncall and have generic arguments.
15480         * class.c
15481         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
15482         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
15483         instance of System.Array.InternalArray<T> for arrays, so they
15484         implement the generic IList<T> interface.
15486 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
15488         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
15489         (chastamar@yahoo.com). Fixes #75374.    
15491 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
15493         * culture-info-table.h: regenerated.
15495 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15497         * icall.c: handle spaces correctly for base64 strings.
15499 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
15501         * *.c: Kill some warnings.
15503 2005-06-23  Duncan Mak  <duncan@novell.com>
15505         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
15506         that this builds on Solaris 10 (x86).
15508 2005-06-23  Martin Baulig  <martin@ximian.com>
15510         * class.c
15511         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
15512         generic type definitions.
15514 2005-06-23  Martin Baulig  <martin@ximian.com>
15516         Fix #75331.
15518         * metadata.c (mono_class_get_overrides): Renamed to
15519         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
15520         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
15521         pass it to mono_get_method_full().
15523 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
15525         * reflection.c (mono_reflection_create_runtime_class): take the
15526         mono_domain_lock in this method. Prevents deadlocks
15528 2005-06-22  Martin Baulig  <martin@ximian.com>
15530         * loader.c (method_from_methodspec): Fix #75330.
15532 2005-06-22  Martin Baulig  <martin@ximian.com>
15534         * reflection.c (type_get_qualified_name): Use
15535         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
15536         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
15537         argument; use it if we don't have an assembly name.
15539 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
15541         * object.c: In mono_message_init, set "copy out" flag for in
15542         parameters with the [Out] flag.
15544 2005-06-21  Martin Baulig  <martin@ximian.com>
15546         * class.c
15547         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
15548         and MONO_TYPE_PTR.
15550 2005-06-21  Martin Baulig  <martin@ximian.com>
15552         * class.c (mono_class_init): Don't initialize `class->fields' for
15553         generic instances since they're initialized again in
15554         compute_field_layout(). 
15555         (compute_field_layout): Set the field's `generic_info' here; fix
15556         #75320. 
15558 2005-06-21  Martin Baulig  <martin@ximian.com>
15560         * class-internals.h
15561         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
15563         * metadata.c (mono_metadata_generic_method_equal): Also
15564         distinguish the `generic_class'; fixes #75334.
15566 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15568         * domain.c:
15569         * appdomain.c:
15570         * domain-internals.h:
15571         * reflection.c: 'domain_assemblies' field is now protected by its own
15572         lock. Don't call into managed code to run the AssemblyLoad event if we
15573         now there are no registered delegates for it.
15575 2005-06-20  Martin Baulig  <martin@ximian.com>
15577         * class.c (mono_class_is_assignable_from): Use a custom version of
15578         mono_class_has_parent() to make things work for generic instances;
15579         fix #75300.
15581 2005-06-20  Martin Baulig  <martin@ximian.com>
15583         * loader.c (method_from_methodspec): Apply a patch from
15584         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
15586 2005-06-20  Martin Baulig  <martin@ximian.com>
15588         * class.c (mono_class_init): Reverted Zoltan's last change; it
15589         breaks generics.
15591 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
15593         * threads.c (wait_for_tids_or_state_change): Add missing locking.
15595 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15597         * socket-io.c: fix the index in the socket array for writable/error
15598         sockets. Fixes bug #75306.
15600 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
15602         * class.c (mono_class_init): Allow interfaces to have static ctors.
15604 2005-06-17  Martin Baulig  <martin@ximian.com>
15606         * loader.c (method_from_methodspec): Use `context->container' when
15607         parsing the `gmethod->inst'.
15609 2005-06-17  Martin Baulig  <martin@ximian.com>
15611         * class.c (mono_type_get_name_recurse): Don't add the assembly
15612         name for type arguments.
15614 2005-06-15  Martin Baulig  <martin@ximian.com>
15616         * reflection.c (mono_image_get_inflated_method_token): Encode
15617         correct klass; fixes #75260.
15619 2005-06-13 Michal Moskal <malekith@nemerle.org>
15621         * icall.c: Make GetCorrespondingMethod/Constructor take
15622         MonoReflectionMethod method not MonoMethod. Removed
15623         MonoType.GetCorrespondingField, and make
15624         MonoGenericType.GetCorrespondingField take name not
15625         MonoClassField.
15627 2005-06-13  Michal Moskal <malekith@nemerle.org>
15629         * reflection.c (field_encode_signature, encode_locals):
15630          Make sizes of buffers for types larger (for big generic types).
15631          (create_generic_typespec,
15632          mono_reflection_sighelper_get_signature_local,
15633          mono_reflection_sighelper_get_signature_field):
15634          Add asserts for too small buffers.
15636 2005-06-15  Martin Baulig  <martin@ximian.com>
15638         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
15639         if our parent is not a dynamic type.
15641 2005-06-15  Martin Baulig  <martin@ximian.com>
15643         * class-internals.h (MonoTypeNameFormat): New enum.
15645         * class.c
15646         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
15647         (mono_type_get_full_name): Removed.
15648         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
15649         argument instead of the boolean's.
15651         * icall.c (ves_icall_System_MonoType_getFullName):
15652         Added `gboolean assembly_qualified'.    
15654         * reflection.h
15655         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
15657         * reflection.c (mono_reflection_parse_type): Parse the new type
15658         name format.
15660 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15662         * icall.c: no need to convert from utf16 to utf8 and then back again
15663         after the call to GetLogicalDrives.
15665 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15667         * icall.c: frombase64. Fix problems exposed by new tests.
15669 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15671         * icall.c: added internal calls for converting char [] and strings in
15672         base64 into byte [].
15674 2005-06-10  Martin Baulig  <martin@ximian.com>
15676         * class.c (mono_class_create_generic_2): Read the nested classes
15677         from the metadata rather than from `gklass->nested_classes' since
15678         `gklass' might not be initialized yet.
15680 2005-06-09  Duncan Mak  <duncan@novell.com>
15682         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
15683         all public headers. Fixes #74919.
15685 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
15687         * domain.c: The key for proxy_vtable_hash is now a pointer
15688         array. Added new GHashFunc and GCompareFunc functions for this.
15690         * class.h: The list of interfaces in MonoRemoteClass is known in
15691         advance and can't grow (we create a new MonoRemoteClass if needed),
15692         so now the interface array can be allocated together with
15693         MonoRemoteClass.
15694         
15695         * object.c: Added a new method create_remote_class_key.
15696         Fixed mono_remote_class so it does not depend on
15697         mono_upgrade_remote_class.
15698         Removed extend_interface_array.
15699         Added new method clone_remote_class(), which makes a copy of a remote
15700         class and adds a new interface or class to it.
15701         mono_upgrade_remote_class() now creates a new remote class (or gets
15702         it from the cache) if an vtable upgrade is needed. In this way
15703         we make sure that other objects sharing the same remote class
15704         don't get the new vtable with unwanted interfaces.
15705         
15706         * object-internals.h:
15707         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
15708         
15709         * marshal.c: Track changes in mono_upgrade_remote_class().
15711 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
15712         * icall.c: Add runtime methods for obtaining members of inflated
15713         class, which were created from supplied non-inflated members. It
15714         is used in internal Get{Method,Constructor,Field} methods in
15715         System.Type
15717 2005-06-09  Martin Baulig  <martin@ximian.com>
15719         * reflection.c
15720         (mono_reflection_bind_generic_method_parameters): Fix #75169.
15722 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
15723         * reflection.c (mono_image_basic_init): Define
15724         Version in MonoDynamicAssembly. 
15725         
15726 2005-06-08  Martin Baulig  <martin@ximian.com>
15728         Fix #75136.
15730         * loader.c
15731         (mono_method_signature_full): New public method; takes a
15732         `MonoGenericContext *'.
15733         (find_method): Use mono_method_signature_full() and pass the
15734         klass'es context to it.
15736         * class.c (mono_class_is_inflated_method): Use
15737         mono_method_signature_full() and pass the context to it.
15739 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
15741         * object.c: add proper locking in mono_remote_class_vtable(),
15742         fixes possible memory corruption.
15744 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
15746         * marshal.c (mono_remoting_marshal_init): set
15747         initialized after initialization.
15749 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
15751         * locales.c : hush.
15753 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
15755         * object.c (extend_interface_array): fix really silly
15756         memory corrupting / comparison bug.
15758 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
15760         * reflection.c: Functions added to support the creation
15761         of CustomAttributeData, which includes Attribute data
15762         used by ReflectionOnly methods.
15764         * reflection.h:  mono_reflection_get_custom_attrs_data and
15765          mono_custom_attrs_data_construct added (functions exposed).
15767          * icall.c: Added mono_reflection_get_custom_attrs_data
15768          as icall.
15769         
15770 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
15772         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
15773         lupus's request.
15775 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
15777         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
15779         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
15780         dynamic DllImportAttribute.
15782         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
15783         dynamic DllImportAttribute.
15785         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
15786         Fixes #75162.
15788 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15790         * threads.c: avoid segfault when an unstarted thread is aborted.
15792 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
15794         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
15795         Returns the name and version of the runtime for reporting.
15797 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15799         * appdomain.c: bump corlib version.
15800         * object-internals.h: new field in MonoReflectionAssembly.
15802 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15804         * object-internals.h: Carlos forgot to add this field.
15806 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
15808         * icall.c: Added create_version to create instances
15809         of Version of MonoReflectionAssemblyName. This change helps
15810         the AssemblyName tests to keep running fine.
15811         
15812 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
15813   
15814         * object.c (mono_method_return_message_restore): A somehow less
15815         intrusive fix for #75138.
15817 2005-06-03  Raja R Harinath  <rharinath@novell.com>
15819         * object.c (mono_method_return_message_restore): Fix computation
15820         of expected number of out args.
15822 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
15824         * reflection.c (mono_image_get_method_info): Fix the case when the
15825         charset is empty.
15827 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
15829         * object.c: Added missing null check in
15830           mono_method_return_message_restore.
15832 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
15834         * reflection.c (mono_image_get_method_info): Handle the case when
15835         dllentry is empty.
15837 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
15839         * object.c: When creating the vtable for a proxy, take into account
15840         all inherited interfaces, not only the ones registered in
15841         iclass->interfaces. This fixs bug #74996.
15842         Also, in mono_method_return_message_restore, verify that the array
15843         of out args has the expected lengh.
15845 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15847         * socket-io.c: update the timeout in Poll when the call is interrupte.
15849 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15851         * socket-io.c: support abort/suspend in Select_internal after last
15852         change.
15854 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15856         * threadpool.c: remove warning.
15858 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15860         * icall.c:
15861         * socket-io.[ch]: Select_internal uses poll() now when available, thus
15862         removing the 1024 limit from select(). Runtime part of the fix for
15863         bug #71203.
15865 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15867         * socket-io.c: when resolving the addresses for the same
15868         host returned by gethostname(), get the local IPs from the interface
15869         list. Loopback addresses are discarded if the are interfaces up with
15870         non-loopback ones. Fixes bug #63265.
15872 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
15874         * appdomain.c, verify.c, object-internals.h, reflection.c:
15875         bumped corlib number to 36, and added new extra_flags field
15876         to ReflectionMethodBuilder and friends.  Fixes #75060.
15878 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
15880         * gc.c: register a new weak link only if the object is non-null
15881         (fixes bug#75047).
15883 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
15885         * culture-info.h : short time pattern too.
15887 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
15889         * culture-info.h : expand long time pattern string length.
15891 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
15893         * culture-info-table.h : update (more French date format; #72788).
15895 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
15897         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
15898         the method is static. Fixes #75029.
15900 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
15902         * reflection.c: Update the table_idx field of method builders after
15903         saving the module, since it can change. This is a workaround for
15904         bug #74914. 
15906 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
15908         * culture-info-table.h : update (additional French date format).
15910 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
15912         * icall.c (ves_icall_type_Equals): Revert last change.
15913         
15914         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
15916         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
15918 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
15920         * class-internals.h: Added executioncontext_class field to 
15921         MonoDefaults structure.
15922         * domain.c: Cache System.Threading.ExecutionContext class in 
15923         mono_defaults.
15924         * object.c: Capture the ExecutionContext for asynchroneous calls in
15925          mono_async_result_new.
15926         * object-internals.h: Added execution_context and original_context 
15927         fields to MonoAsyncResult. Added execution_context to MonoThread.
15928         * security-manager.c|.h: Added mono_get_context_capture_method to 
15929         return the capture method (if required by the security manager or by
15930         the framework version used).
15931         * threadpool.c: Apply capture (if present) ExecutionContext in 
15932         mono_async_invoke and revert to original context after it completes.
15934 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
15936         * culture-info-table.h : updated (real hacky solution for zh-CHT).
15938 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
15940         * culture-info-table.h : zh-CHT related workaround.
15942 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
15944         * marshal.c (emit_marshal_custom): Add some error checking and call the
15945         methods in the ICustomMarshaler interface. Fixes #74875.
15946         
15947         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
15948         native->managed wrappers.
15950 2005-05-12  Martin Baulig  <martin@ximian.com>
15952         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
15953         here and use the loader lock.
15955         * mono-debug.c: Properly lock when the debugger is not attached.
15956         (mono_debug_init): Release the initial lock if we're not running
15957         in the debugger.
15959 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
15961         * marshal.c (emit_marshal_custom): Pass through NULL values without
15962         calling the custom marshalling routines.
15964         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
15965         conversion in structures. Fixes #74882.
15967 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
15969         * culture-info-table.h : zh-* cultures were missing.
15971 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
15973         * threads.c: Added a new event background_change_event which is signaled
15974         when a thread changes its background mode.
15975         Moved here several checks previously done in managed code. The checks
15976         require the thread lock, and using the thread lock in managed code
15977         can result in deadlocks.
15978         Merged Start_internal and Thread_internal into a single method. Now 
15979         Thread_internal does all work of creating and starting a thread.
15980         Added icalls for setting and getting the state of the object. Moved from
15981         managed code to avoid locking there.
15982         Added wait_for_tids_or_state_change() which is called instad of
15983         wait_for_tids when waiting for non-backround threads to end. This method
15984         will return if one of the threads ends or the background_change_event
15985         is signaled.
15986         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
15987         the background mode. This method signals the background_change_event
15988         event.
15989         * icall.c:
15990         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
15991         removed Start_internal.
15992         
15993 2005-05-11  Martin Baulig  <martin@ximian.com>
15995         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
15996         to order of some fields to get proper alignment on 64-bit machines.
15998 2005-05-11  Martin Baulig  <martin@ximian.com>
16000         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
16001         changes as they're broken and completely fuck up the debugger.
16003         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
16005 2005-05-10  Martin Baulig  <martin@ximian.com>
16007         * reflection.c (mono_reflection_generic_class_initialize): Don't
16008         call mono_class_setup_parent() here.
16010 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16012         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
16013         send/receive timeout use an integer in milliseconds. We were using a
16014         struct timeval.
16016 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16018         * locales.c:
16019         (internal_get_cultures): reserve the first slot of the array for the
16020         InvariantCulture, which will be filled in managed code.
16022 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
16024         * reflection.c (mono_image_fill_module_table): Initialize the
16025         GENERATION field as well.
16027 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16029         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
16030         Monitor.Enter on the object.
16032 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
16034         * threads.c: Enable the wait for running threads when exiting.
16035         * icall.c: Suspend all threads before exiting.
16037 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
16039         * assembly.c (mono_assembly_load_reference): Fix warning.
16041 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16043         * threadpool.c: changed the default number of threads per cpu. From now
16044         on, the default will be 20 + (5 * number of cpus) instead of 50.
16046 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
16048         * loader.c (mono_method_get_signature_full): Add locking here.
16050 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
16052         * appdomain.c: Moved methods for parsing and freeing assembly
16053         names to assembly.c.
16054         * assembly.c, domain-internals.h: Created public methods for parsing
16055         assembly names. Fixed mono_assembly_load_with_partial_name:
16056         it now finds the best match, taking into account the version,
16057         token and culture specified in the partial name. Also return
16058         the latest version if no version information is specified.
16060 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
16062         * threadpool.c: replace check for SocketAsyncCall class.
16064 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16066         * threadpool-internals.h:
16067         * Makefile.am: added threadpool-internals.h
16069         * threadpool.c: call mono_unhandled_exception on exceptions not handled
16070         that happen in threadpool threads (tested on MS).
16071         (mono_thread_pool_remove_socket): new function that dispatch any pending
16072         AIO call on a socket that is closing. By now only epoll really needs it,
16073         as select/poll wake up when the socket closes.
16076         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
16078 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
16080         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
16082 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
16084         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
16086 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
16088         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
16089         has an abort request, convert it into a suspend request.
16091 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
16093         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
16094         warning for the usage of `UnmanagedFunctionPointerAttribute' which
16095         is not supported yet.
16097 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16099         * image.c: register assemblies loaded from data (bundles) in the loaded
16100         assemblies hash. Fixes bug #74772.
16102 2005-04-29  Martin Baulig  <martin@ximian.com>
16104         * class.c (mono_type_get_name_recurse): Update to the new naming
16105         schema from the latest .NET 2.x beta2.
16106         (mono_class_setup_vtable_general): If we're a generic instance,
16107         copy the vtable from our generic type definition and inflate all
16108         the methods in it.
16110         * loader.c (find_method): Update to the new naming schema from the
16111         latest .NET 2.x beta2.
16113 2005-04-29  Raja R Harinath  <harinath@gmail.com>
16115         * class.c (mono_class_init): Add a mono_loader_unlock to the
16116         #74734 fix.
16118 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
16120         * icall.c (ves_icall_System_Environment_Exit): Remove the 
16121         suspend_all_other_threads () call for the time being, since it can hang.
16123         * threads.c (mono_thread_manage): Similarly, disable the waiting for
16124         the background threads to exit, since it can also hang.
16126         * class.c (mono_class_init): Applied patch from Ankit Jain 
16127         (radical@gmail.com). Avoid pending init errors when a field refers
16128         to a nested class using a typeref. Fixes #74734.
16130         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
16131         this for dynamic modules.
16133 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16135         * threads.c: don't wait for threads that are in the process of aborting
16136         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
16137         and waiting for background threads to finish. This makes xsp and
16138         mod-mono-server exit without random length delays and/or hangs.
16140 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16142         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
16144 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
16146         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
16147         dynamic types to prevent infinite loops. Fixes #74727.
16149         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
16150         ..._is_assignable_to.
16152 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
16154         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
16156 2005-04-25  Martin Baulig  <martin@ximian.com>
16158         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
16160         * domain.c
16161         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
16163         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
16165         * reflection.c (build_compressed_metadata): Set metadata header
16166         version to 2.0.
16168 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
16170         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
16171         number into an integral and a decimal part. Fixes #70473.
16173         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
16175 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
16177         * culture-info-table.h : reflected the latest locale-builder output.
16179 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16181         * threadpool.c: check for SuspendRequested too when deciding if
16182         mono_thread_interruption_checkpoint should be called.
16184 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16186         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
16187         * threads.c: remove interruption_mutex and use Interlocked instead. When
16188         suspending all the threads, wait for all the suspended events at once.
16189         If we're shutting down and get an APC that is going to be queued,
16190         call mono_thread_execute_interruption immediately, as the thread might
16191         be sleeping on a pthread condition or mutex.
16193         * icall.c: call mono_runtime_set_shutting_down before suspending the
16194         threads.
16196         Fixes bug #74693. And now xsp is happier when exiting.
16198 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
16200         * loader.c (mono_stack_walk): Fix #74690.
16202 2005-04-22  Martin Baulig  <martin@ximian.com>
16204         * mono-debug.h (MonoDebugMethodJitInfo): Added
16205         `MonoDebugMethodJitInfo *jit'.
16207         * mono-debug.c (mono_debug_read_method): Cache the
16208         MonoDebugMethodJitInfo in `address->jit'.
16209         (mono_debug_free_method_jit_info): New public method.
16211 2005-04-22  Martin Baulig  <martin@ximian.com>
16213         * class.c (mono_class_is_assignable_from): Disallow
16214         type parameter -> interface.
16216 2005-04-21  Dick Porter  <dick@ximian.com>
16218         * threads.c (mono_thread_create): Turn an assertion into an error.
16220 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
16222         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
16223         
16224         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
16225         Fix some gcc 4.0 warnings.
16227 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
16229         * file-io.c: fix alt dir separator char on unix systems
16230         and cleanup (fixes bug #71214).
16232 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
16234         * marshal.c: Use CALLVIRT instead of CALL when dispatching
16235         a call to a remote domain, since the method may be an
16236         interface method in the client domain. This fixes bug #74192.
16238 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16240         * threadpool.c: recv/send are now performed before going back to managed
16241         code to save one transition.
16243 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16245         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
16247         * metadata/threadpool.c: removed hack to workaround the bug above.
16249         Fixes bug #74618.
16251 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
16253         * reflection.c reflection.h: Fix handling of parameter defaults in
16254         dynamic methods. Also fixes handling of parameter attributes.
16255         Fixes #74609.
16257         * mono-debug.c (mono_debug_close_image): Fix warning.
16259 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16261         * socket-io.h: replaced old unused field with new 'blocking'.
16262         * threadpool.c: restore socket blocking state on windows(tm).
16264 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
16266         * icall.c: don't return the codebase in the AssemblyName[] returned by
16267         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
16268         * object-internals.h: Removed FIXME (fields were presents) and fixed
16269         versioncompat declaration.
16271 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16273         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
16274         not closed, so don't cleanup when it happens.
16276 2005-04-13  Chris Toshok  <toshok@ximian.com>
16278         * mono-debug-debugger.h: change prototype for
16279         mono_debugger_lookup_type.
16281         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
16282         this function, although it should probably be named
16283         mono_debugger_init_type.
16285 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16287         * threadpool.c: fix non-AIO case.
16289 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
16291         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
16292         the built-in profiler to measure just JIT compilation times.
16294 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16296         * threadpool.c: the epollfd might be closed by another thread at
16297         any time, so ignore EBADF at treat it as a "we're closing" sign.
16299 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16301         * threadpool.c: release the semaphores with a count equals to the number
16302         of working threads in both IO and regular pools. Fixed typo that messed
16303         up the count of IO pool threads. Don't initialize the pipe handles if
16304         we're using epoll.
16306 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16308         * threadpool.c: some systems don't like a NULL when deleting the socket
16309         from epoll.
16311 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16313         * threadpool.c: fix semaphore allocation.
16315 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16317         * threadpool.c: added epoll() based implementation for asynchronous IO
16318         that is used instead of the default poll() when available.
16319         It can be disabled by setting MONO_DISABLE_AIO.
16321 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16323         * threadpool.c: windows needs 'closesocket' and instead of returning
16324         0 when the stream is closed while in select, it returns -1. Fixes bug
16325         #74573.
16327 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
16329         * class.c (class_compute_field_layout): Fix the regression caused by
16330         the previous try.
16332 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16334         * threadpool.c: separate pool for socket async. IO.
16335         * threadpool.h: mono_max_worker_threads is not a global any more.
16337 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
16339         * class.c (class_compute_field_layout): Fix #74549.
16341 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16343         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
16344         use 2 connected sockets instead.
16346 2005-04-08  Miguel de Icaza  <miguel@novell.com>
16348         * mono-config.c: Add new entry point for mkbundle
16349         mono_config_parse_memory. 
16351 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16353         * threadpool.c: removed another unused function.
16355 2005-04-08  Ankit Jain  <radical@corewars.org>
16357         * reflection.c (get_default_param_value_blobs): Add 'types'
16358         parameter to get the types encoded in the constant table.
16359         (mono_param_get_objects): Use the type from the constant table,
16360         not the type of the parameter, when creating default values.
16361         Handle null default values correctly.
16363 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16365         * file-io.c:
16366         * file-io.h:
16367         * threadpool.c:
16368         * threadpool.h:
16369         * icall.c:
16370         * socket-io.c: removed dead code for async IO.
16372 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16374         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
16376         * threadpool.c: intercept socket async. calls and pass them to a thread
16377         that is polling and dispatching the job items to the threadpool as
16378         socket become ready. Fixes bugs #71217, #71933.
16380         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
16381         between char and short/ushort arrays.
16383         * socket-io.c: remove dead code.
16385 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
16387         * locales.c,
16388           icall.c : removed InternalToUpper_Comp() and
16389           InternalToLower_Comp().
16391 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
16393         * char-conversions.h : The tables were incorrectly generated. Should
16394           be generated against invariant culture.
16396 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
16398         * object.c (mono_runtime_invoke_array): Fix return value when 
16399         passing pre-created valuetype objects to ctors.
16401         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
16402         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
16403         Fixes #74338.
16405 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
16407         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
16408         only used with --security and hides the wrong corlib version error.
16410 2005-03-30  Joshua Tauberer  <tauberer@for.net>
16412         * class.c: Changed mono_class_name_from_token so that types
16413         outside of a namespace don't have an initial period.  Improved
16414         the g_warning message used in _mono_class_get when loading
16415         fails.
16416         * assembly.c: In mono_assembly_load_reference, when an assembly
16417         can't be found, "No such file or directory" is misleading and
16418         unhelpful because a few paths were checked for the presence of
16419         the assembly.  When that happens (ENOENT), display a nicer
16420         message indicating the directories that were searched.  In all
16421         cases, the warning is made easier to read for non-hackers.
16423 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
16425         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
16426         project/solution.
16427         * appdomain.h|domain.c: Removed inline from functions.
16428         * appdomain.c: Reduced warnings when compiling on windows.
16429         * icall.c: Fixed output_debug declaration to gunichar2*.
16430         * mono-config.c: Reduced warnings when compiling on windows.
16431         * rand.c: Added missing "windows.h". Added missing return value.
16432         * rawbuffer.c: Added missing winsock2.h for windows.
16433         * sysmath.h: Added mono-compiler.h header to allow/ease 
16434         compilation with non-GCC compilers.
16435         * threads.c: Fixed declarations to compile with VS.NET C compiler.
16436         Removed cast warnings.
16438         Adapted from the work of J Lothian (for VC6).
16440 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
16442         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
16443         from default_path.
16445 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
16447         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
16448         the 2.0 profile.
16450 2005-03-27  Raja R Harinath  <harinath@gmail.com>
16452         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
16453         has to be in $(exec_prefix).  $(prefix) is for arch-independent
16454         stuff, and it would probably use $(prefix)/share rather than
16455         $(prefix)/lib.
16457 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16459         * console-io.c: added 2 includes that might be missing.
16461 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
16463         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
16464         profile.
16466         * reflection.c (create_custom_attr): Allocate the params array using
16467         alloca so it gets GC tracking.
16469 2005-03-23  Chris Toshok  <toshok@ximian.com>
16471         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
16472         out some spew.
16474 2005-03-24  Raja R Harinath  <rharinath@novell.com>
16476         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
16477         changes to pick up any changes in prefix, etc.
16479 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
16481         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
16482         
16483         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
16484         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
16486 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
16488         * class-internals.h object-internals.h class.c reflection.c: Extend the
16489         mono_lookup_dynamic_token () function to return the class of the
16490         token as well. 
16492         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
16493         well. Fixes #73848.
16495 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
16497         * security-manager.c: Skip inheritance checks for intra-corlib
16498         class inheritance and method overrides. This skips a lot of checks
16499         and (anyway) permissions cannot work until corlib is loaded.
16501 2005-03-23  Martin Baulig  <martin@ximian.com>
16503         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
16504         MONO_TYPE_GENERICINST.  
16506 2005-03-23  Martin Baulig  <martin@ximian.com>
16508         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
16510 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
16512         * class.c: added locking comments to some functions.
16513         Cache the interface offsets arrays (saves about 20 KB
16514         of runtime memory in a typical app).
16515         Reduce the time overhead in mono_class_setup_supertypes ().
16517 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
16519         * icall.c: speedup and fix leaks in GetMethodsByName and
16520         GetPropertiesByName.
16522 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
16524         * reflection.c: some locking fixes.
16526 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
16528         * metadata.c: added missing break in case statement.
16530 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
16532         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
16533         typedbyref return values. Fixes #73941.
16535 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
16537         * security-manager.c|h: Added demandunmanaged method and 
16538         suppressunmanagedcodesecurity class to MonoSecurityManager.
16539         Renamed aptc class to allowpartiallytrustedcallers.
16541 2005-03-17  Martin Baulig  <martin@ximian.com>
16543         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
16545 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16547         * file-io.c: disabled file async. IO using aio_*. It uses the
16548         threadpool now. Workaround for bug #73718.
16550 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
16552         * assembly.h, mono-config.c: added code to deal with bundled configs
16553         for bundled assemblies.
16555 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
16557         * *.c, private.h: cleanup, removing old private.h header file.
16559 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
16561         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
16562         and throw_on_unmappable_char attributes.
16564 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
16566         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
16567         _ProcessName_internal.
16569 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
16571         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
16572         #73631.
16574         * icall.c threads.c threads-types.h: Remove slothash icalls as they
16575         are no longer used.
16577 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
16579         * object.c (compute_class_bitmap): Add support for generics. Fixes
16580         #73527.
16582 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
16584         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
16586 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16588         * filewatcher.c: commented out the code for windows watcher, as we don't
16589         use it (we use the managed implementation instead).
16591 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
16593         * object-internals.h (MonoThread): Remove 'unused1' field.
16595         * appdomain.c: Bump corlib version.
16597         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
16599         * reflection.c (mono_reflection_create_runtime_class): Remove the
16600         AssemblyBuilder.Save optimization since it causes too many problems.
16602 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
16604         * exception.c|h: Added mono_get_exception_reflection_type_load to
16605         create a ReflectionTypeLoadException object.
16606         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
16607         to return NULL is a InheritanceDemand fails during reflection. Updated
16608         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
16609         ReflectionTypeLoadException if an InheritanceDemand fails during 
16610         reflection. Added icall mapping for GetLinkDemandSecurity.
16611         * security-manager.c|h: Added ves_icall_System_Security_
16612         SecurityManager_GetLinkDemandSecurity internal call to return the
16613         class and methods permissions set for a LinkDemand. Removed unused
16614         fields in MonoSecurityManager.
16616 2005-03-10  Martin Baulig  <martin@ximian.com>
16618         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
16619         it's a generic instance.
16621 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
16623         * reflection.c (mono_get_object_from_blob): Applied patch from
16624         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
16626         * class.c (mono_class_is_assignable_from): Another try at fixing 
16627         #73469 without breaking anything.
16629 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
16631         * class.c: (mono_class_is_assignable_from): Revert the last changes
16632         since they don't work with generics.
16633         
16634         * class.c (mono_class_is_assignable_from): Fix build bustage.
16636         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
16637         the managed IsAssignableFrom method. Fixes #73469.
16639         * reflection.c (mono_reflection_call_is_assignable_from): New helper
16640         function.
16642 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
16644         * object.c (mono_load_remote_field_new): Fix returning uninitialized
16645         memory when the remoting callback does not sets the out arguments.
16646         Fixes #73007.
16648         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
16649         by mistake.
16651         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
16653         * object-internals.h (MonoStackFrame): Sync with managed object layout.
16655         * appdomain.c: Bump corlib version.
16657 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
16659         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
16660         function.
16662         * threads.c (mono_thread_attach): Detect threads which are not started
16663         by the GC pthread wrappers.
16665 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
16667         * icall.c: Added new icall for RNG.
16668         * rand.c|h: Added new icall to open the RNG. This allows to share a 
16669         single handle on Linux to access /dev/urandom and fix #73183.
16671 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
16673         * object.c: setting the new vtable in a transparent proxy object must
16674         not change the GC descriptor.
16676 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
16678         * object.c: fixed compilation without GCJ support.
16679         * reflection.c: for runtime-created types ensure klass->has_references
16680         is correct (bug #73215).
16682 2005-03-02  Martin Baulig  <martin@ximian.com>
16684         * class.c (mono_class_is_assignable_from): Make this work if
16685         `oklass' is a generic instance; fixes #72831.
16687 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
16689         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
16690         with hasthis set.
16691         
16692         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
16694         * marshal.c: Reorganize native->managed marshalling code to also use
16695         the emit_marshal_... functions.
16697 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
16699         * object.c: typed allocs have issues with bitmap sizes > 30,
16700         so check for max_set >= 30.
16702 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
16704         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
16705         managed code. Fixes #73012.
16707         * metadata.h (MonoMarshalSpec): Add elem_mult field.
16709         * metadata.c reflection.c: Load/Emit elem_mult as well.
16710         
16711         * metadata.h (MonoMarshalSpec): Add comment.
16713         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
16715         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
16716         num_elem to -1 if not given.
16718         * object-internals.h (MonoReflectionMarshal): Add has_size field.
16720         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
16721         given values.
16723 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
16725         * null-gc.c (mono_gc_free_fixed): Was not compilable.
16727 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
16729         * reflection.c (encode_marshal_blob): Encode param_num field as well.
16731         * object-internals.h (MonoReflectionMarshal): Add param_num field.
16733 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
16735         * object.c: generalized the reference bitmap creation
16736         and added hooks for the new GC.
16737         * class-internals.c: removed the gc_bitmap field from MonoClass.
16739 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
16741         * domain.c: help the compiler to produce better code
16742         in mono_jit_info_table_find ().
16744 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
16746         * object.c: make all allocations look typed.
16748 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
16750         * socket-io.c: load Mono.Posix if it's not loaded already
16751         (fixes bug#73033).
16753 2005-02-24  Martin Baulig  <martin@ximian.com>
16755         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
16756         * reflection.c (dup_type): Likewise.
16758 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
16760         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
16761         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
16763 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
16765         * domain.c, threads.c, object-internals.h: make the critical thread
16766         local vars use the fast access mode (even when we're compiled in
16767         a lib). Provide accessors to be used by the jit during codegen.
16769 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
16771         * appdomain.c: Changed hook functios behavior to include
16772         support for the reflection only assemblies. Some icalls were changed
16773         to support the mentioned assemblies too. Signatures of static methods
16774         try_assembly_resolve and real_load now have an additional parameter:
16775         refonly.
16777         * assembly.c: General changes to mono_assembly_ methods to support
16778         reflection only api. Functions mono_assembly_open, mono_assembly_load,
16779         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
16780         suffix, to support an additional gbool parameter to specify whether
16781         the assembli is reflection only or not. Created some new hook functions 
16782         to add support for reflection only assemblies. Signatures of static 
16783         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
16784         have now an additional parameter: refonly.
16786         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
16787         indicating whether the assembly is reflection only or not.
16789         * exception.c: Add mono_get_exception_invalid_operation.
16791         * icall.c: Throw an InvalidOperationException when trying to invoke
16792         a property/method/event, or trying to set/get the value of a field.
16793         Also add an icall to retrieve the ref_only flag to the
16794         MonoReflectionAssembly.
16796 2005-02-23  Chris Toshok  <toshok@ximian.com>
16798         Part of fix for #72827.
16799         * mono-debug.c (mono_debug_add_method): add lexical block data to
16800         the info we write.  Kind of a hack at the moment - we copy the
16801         lexical block info from the MonoDebugMethodInfo to the
16802         MonoDebugMethodJitInfo here, before writing it.
16803         (mono_debug_read_method): read the lexical block info.
16805         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
16807         * debug-mono-symfile.h: add lexical block support.
16809         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
16810         support.
16812 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
16814         * loader.c (mono_lookup_pinvoke_call): Fix warning.
16816         * object.c (mono_runtime_free_method): Call mono_free_method () and
16817         put the TODOs there.
16819         * loader.c (mono_free_method): Free up most memory allocated for 
16820         dynamic methods.
16822 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
16824         * reflection.c: properly flag a Type argument to a
16825         named custom attr value (bug #72248).
16827 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
16829         * reflection.c: reduce code duplication in named custom
16830         attribute encoding.
16832 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
16834         * reflection.c: properly encode custom attrs of type object
16835         (bug #72649).
16837 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
16839         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
16841 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
16843         * socket-io.c: load System.dll if it's not loaded already
16844         (bug #72850 and #70477).
16846 2005-02-21  Martin Baulig  <martin@ximian.com>
16848         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
16849         generic instances.
16851 2005-02-21  Martin Baulig  <martin@ximian.com>
16853         * reflection.c (mono_image_build_metadata): We also need to
16854         "fixup" the MethodImpl table after we computed the final method
16855         indices.  Call fixup_methodimpl() to do that.
16856         (fixup_methodimpl): New private method.
16858 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
16860         * assembly.c: special case mscorlib.dll (bug#72536),
16861         patch from Carlos Alberto Cortez.
16863 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
16865         * threads-types.h threads.c: Fix build bustage.
16867         * threads.c: Use a union for long<->double conversions.
16869         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
16870         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
16872         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
16873         containing the checkpoint call with NOT_TAKEN.
16874         
16875         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
16876         checkpoint before pushing the arguments, so they won't have to be
16877         spilled to stack.
16879 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
16881         * domain.c, assembly.c, domain-internals.h: make some data
16882         const and relocation-free.
16884 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
16886         * object.c, appdomain.c, class-internals.h: introduce the
16887         MonoClassRuntimeInfo structure to hold the info needed to
16888         use a class at runtime. Made mono_class_vtable() lock-free
16889         for all the appdomains.
16891 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
16893         * metadata-internals.h, image.c: introduce a per-image mempool to
16894         be used for memory that has the same lifetime as the image.
16896 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
16898         * domain.c: In mono_init_internal(), instead of selecting the first
16899         runtime version supported by an executable, get a list of all
16900         supported versions and select the one for which an mscorlib exists
16901         (since even if the runtime supports a given version, it doesn't mean
16902         that the framework for that version is installed).
16903         Modified get_runtimes_from_exe to support this behavior.
16904         In supported_runtimes, added information about additional system
16905         assembly versions.
16906         
16907         * assembly.c: Added support for more than one system assembly version
16908         per runtime version. Updated the assembly list.
16909         In mono_assembly_remap_version, removed the initial version check,
16910         since we don't know to which version we need to compare until we
16911         get the version set on which the assembly is based.
16912         Moved the code for loading corlib into the new method
16913         mono_assembly_load_corlib(), so it can be used by the initialization
16914         code.
16915         
16916         * domain-internals.h: Updated data structures and added declaration
16917         for mono_assembly_load_corlib.
16919 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
16921         * reflection.c (resolve_object): Fix the creation of the signature in 
16922         the SignatureHelper case.
16924         * assembly.c (mono_assembly_remap_version): Fix binary search.
16925         
16926 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
16928         * class.c: Added inheritance check when a method is overloaded (from a
16929         virtual method or when implementing an interface) and when a class is
16930         inherited. Added functions to set a failure for a class and to 
16931         retreive the exception from a failure.
16932         * class-internals.h: Added fields to MonoClass to keep the exception
16933         information status for inheritance (or other exceptions) to be thrown
16934         later (i.e. not at load time).
16935         * object.c: Throw the inheritance SecurityException when a type is to 
16936         be created with either class or method inheritance violations.
16937         * reflection.c|h: Fix when getting declsec from a class. Removed 
16938         unrequired code for class. Improved sanity in parameter naming.
16939         * security-manager.c|h: Added functions to check for class and method
16940         inheritance.
16942 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
16944         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
16945         and has_finalize in dynamic types as well.
16947 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
16949         * culture-info-table.h : fixed currency format for en-GB (and so on).
16951 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
16953         * gc.c: ensure the GC handles never have 0 as a value.
16955 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
16957         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
16958         a pointer to a struct to unmanaged code. Fixes #72625.
16960 2005-02-16  Martin Baulig  <martin@ximian.com>
16962         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
16964 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
16966         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
16968 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
16970         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
16972         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
16973         UnmanagedFunctionPointerAttribute, use it for determining calling convention
16974         etc. Fixes #71471.
16976         * reflection.c (mono_custom_attrs_get_attr): New helper function.
16978         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
16980 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
16982         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
16983         changes to make the current context a field in MonoThread.
16985 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
16987         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
16988         the last change.
16989         
16990         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
16991         extracted from mono_marshal_get_native_wrapper.
16993         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
16994         to create wrappers around native functions.
16996         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
16997         delegates for arbitrary function pointers. Fixes #71472.
16999 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
17001         * threads.c: cleaned up the code a little.
17003 2005-02-15  Martin Baulig  <martin@ximian.com>
17005         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
17006         the data table.
17008         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
17009         allocate larger chunks if needed.
17011 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
17013         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
17014         in by mistake.
17016 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
17018         * domain.c: keep the domains in an array and ensure the domain ids
17019         are kept small, so they can be used as indexes to domain-specific data
17020         with a small memory overhead.
17022 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
17024         * icall.c: Handle byref types in Type icalls. Fixes #72544.
17026 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
17028         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
17030 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
17032         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
17034         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
17035         values.
17037         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
17038         
17039 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
17041         * domain-internals.h: add the hashtable here.
17043         * class-internals.h: Remove `info' from MonoMethod
17045         * domain.c: Add a new hashtable, jit_trampoline_hash
17047 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
17049         * object.c: don't set the value of static fields
17050         (fixes bug#72494).
17052 2005-02-11  Martin Baulig  <martin@ximian.com>
17054         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
17055         (mono_debug_add_method): Silently ignore the method if it's too big.
17056         (mono_debug_add_type): Likewise.
17058 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
17060         * threads.c, appdomain.c: remove #ifdefs from the code.
17062 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
17064         * metadata-internals.h: Added flags to MonoAssembly to cache the most
17065         common security informations. This allows us to stay in unmanaged code
17066         when doing LinkDemand and it's special cases (except for the first 
17067         time for initialization). The flags a very much used with --security.
17068         * reflection.c|h: Added code to get declarative security attributes 
17069         for LinkDemand and InheritanceDemand. This required to refactor the
17070         existing code for Demand.
17071         * security-manager.c|h: Added new method fields for the special cases
17072         of LinkDemand.
17074 2005-02-10  Martin Baulig  <martin@ximian.com>
17076         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
17077         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
17079 2005-02-10  Martin Baulig  <martin@ximian.com>
17081         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
17082         debugging code; this is almost a complete rewrite.
17084         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
17086 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
17088         * domain.c, object.h: expose mono_string_equal () and 
17089         mono_string_hash ().
17090         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
17091         it's implemented in managed code.
17093 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
17095         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
17096         lo leak objects between appdomains.
17098 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
17100         * assembly.c: old compilers compilation fix from 
17101         robertj@gmx.net (Robert Jordan).
17103 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
17105         * class-internals.h: Little reminder for the future.
17107         * debug-helpers.c: Fix up wrapper_type_names
17109 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
17111         * image.c, metadata-internals.h: when loading an image from a file,
17112         mmap all of it and use the same codepaths as when using a
17113         in-memory image: the code is simpler and we use less memory
17114         (both writable and readonly).
17116 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
17118         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
17119         API to alloc runtime data structures that need to be tracked by the
17120         GC and contain pointers.
17121         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
17122         make the code more readable and eventually use a different GC.
17124 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
17126         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
17127         for out arguments.
17128         
17129 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
17131         * object.c: In release_type_locks(), don't release the cctor lock
17132         if it has already been released. This fixes a crash in the
17133         thread5 test.
17135 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
17137         * gc.c, marshal.c, icall.c: register a delegate for finalization
17138         only when the native function pointer has been allocated for it.
17140 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
17142         * object.c: cleaned up some code, allocate objects that are
17143         pointer free with the atomic malloc variant. Allocate memory
17144         for static data from the mempool if it's pointer-free.
17145         Allocate the bounds array at the end of the array data, when needed.
17146         * object-internals.h, object.h: move a private function in a private
17147         header.
17148         * class.c: handle missing case in tracking references in fields.
17150 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
17152         * class.c, class-internals.h: keep track if a type has
17153         reference fields in either the instance or static fields.
17155 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
17157         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
17158         and renamed to MonoRuntimeInfo. Added fields to store the expected
17159         framework assembly version. Changed mono_get_framework_version and
17160         mono_get_runtime_version for a single mono_get_runtime_info method.
17161         
17162         * assembly.c: Added method to remap system assembly versions to the
17163         current executing runtime version. Removed old mapping code.
17164         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
17165         
17166         * icall.c, reflection.c: Track api changes.
17168 2005-02-06  Miguel de Icaza  <miguel@novell.com>
17170         * loader.c (method_from_memberref): Improve error reporting,
17171         produce the class name instead of the typeref/typedef index. 
17173 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
17175         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
17177 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
17179         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
17180         stdcall and charset name mangling.  Reorganize the code and add
17181         some tracing stuff.
17183 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
17185         * monodiet.c: More iters!
17187         * marshal.c: Iter usage.
17189         * icall.c: Iter usage.
17191         * object.c: Use iters.
17193         * debug-helpers.c: More iters
17195 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
17197         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
17198         under win32.
17200 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
17202         * mono-debug-debugger.c: use iters
17204         * class.c, class-internals.h: mono_class_setup_events is static
17205         now
17207         * All callers: use iters
17209 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
17211         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
17212         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
17214 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
17216         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
17218         * marshal.h: Add prototypes for ldfld/stfld_remote.
17220         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
17221         this is called during startup.
17222         
17223 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
17225         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
17226         MonoThreadsSync struct private in monitor.c. Changed the way
17227         MonoThreadsSync is allocated so it's faster and there is no
17228         need to keep track of it with a finalizer and it uses less memory.
17229         This also finally allows us to allocate mono objects as ptrfree when
17230         there are no reference fields.
17232 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
17234         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
17235         disappearing link to the GC interface and use them to simplify
17236         the gchandles code.
17238 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
17240         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
17241         stfld_remote which call mono_load/store_field_new. This allows methods
17242         calling ldfld/stfld wrappers to be AOTed.
17244         * console-io.c: Include sys/filio.h under solaris.
17245         
17246         * console-io.c: Include curses.h if needed correctly.
17248 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
17249         
17250         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
17251         method->klass as well.
17253         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
17255         * class.c (mono_class_init): Switch on lazy initialization of 
17256         methods.
17258         * class.c (mono_class_get_finalizer): Handle the case when the 
17259         finalizer is inherited.
17261 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17263         * console-io.c: <curses.h> is needed by term.h on solaris.
17265 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
17267         * icall.c, class-internals.h, monodiet.c, class.c: Remove
17268         mono_class_setup_properties where possible. Remove this ftn from
17269         the header file, and make it static.
17271 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
17273         * loader.c: Add missing setup_... call.
17275         * class.c: Add missing setup_... calls.
17277         * class.c (mono_class_init): Switch on lazy initialization of 
17278         the generic vtable.
17279         
17280         * class.c (mono_class_init): Fix generics broken by the recent changes.
17282         * monodiet.c (handle_type): Add missing setup_... calls.
17284         * class.c: Back out garbage in previous patch.
17285         
17286         * class.c: Add missing setup_... calls.
17288         * class.c (mono_class_get_method_from_name_flags): Avoid calling
17289         mono_class_setup_methods () if possible.
17291         * class-internals.h (MonoClass): Add 'has_cctor' flag.
17293         * class-internals.h (MonoCachedClassInfo): New structure.
17295         * class.c: Initialize properties and events fields of MonoClass lazily.
17297         * class.c: Add infrastructure for lazily initializing the methods and
17298         vtable fields of MonoClass. Not yet used.
17300         * class.c (mono_class_get_finalizer): New helper function.
17302         * class.c: Add infrastructure for loading some class related data from
17303         an AOT file.
17305         * object.c: Add infrastructure for initializing the vtable from data
17306         in the AOT file.
17308         * gc.c (run_finalize): Use mono_class_get_finalizer ().
17310         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
17311         appropriate initialization function before accessing parts of the
17312         MonoClass structure.
17314         * marshal.c: Fix warnings.
17315         
17316         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
17318         * mono-debug-debugger.c (get_exception_message): Use 
17319         mono_class_get_method_from_name_flags ().
17321 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
17323         * reflection.c, appdomain.c: Replace a few manual searches that
17324         Zoltan missed. (Paolo approved this part of my initial patch).
17326 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
17328         * profiler.c: disable recording statistical events at report time.
17330 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
17332         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
17333         to byteswap arrays of enum values, too (bug #72080).
17335 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
17337         * appdomain.c (set_domain_search_path): Allow this to be called if
17338         domain->setup is not yet set.
17340         * loader.c (mono_method_get_index): New helper function.
17342         * loader.c reflection.c: Use mono_method_get_index ().
17344         * class.c (mono_class_get_method_from_name_flags): New helper method.
17346         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
17347         this.
17349         * class.c (mono_class_get_cctor): New helper method.
17351         * string-icalls.c object.c class.c marshal.c reflection.c: Use
17352         mono_class_get_method () to look up methods.
17354 2005-02-01  Miguel de Icaza  <miguel@novell.com>
17356         * console-io.c: Fix the build, this should work on Windows.
17358 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
17360         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
17361         be set to null to keep things valid
17363 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17365         * icall.c: added Console 2.0 icalls.
17366         * Makefile.am: added console-io.[ch]
17367         * console-io.[ch]: internal calls for Console 2.0 API.
17369 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
17371         * class.c: make sure we consider all the interfaces
17372         when calculating max_interface_id (bug found by
17373         Jeroen Frijters running ikvm).
17375 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
17377         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
17378         valuetype fields to null.
17380         * object.c (set_value): Ditto. Fixes #71669.    
17382 2005-01-31  Martin Baulig  <martin@ximian.com>
17384         * metadata.c (mono_metadata_has_generic_params): New public
17385         function; checks whether something is a generic method.
17387 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
17389         * appdomain.c: fix infinite recursion when adding assemblies.
17391 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
17393         * object.c: Fix small typo to return all items for Environment.
17394         GetCommandLineArgs.
17396 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
17398         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
17399         reflection.c: more domain and assembly-unload related fixes
17400         and memory leaks plugs.
17402 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
17404         * 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.
17406 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
17408         * loader.c (mono_method_signature): Make this method lazy
17409         (mono_get_method_from_token): Don't computate the signature here.
17411         Doing this saves quite a bit of memory. I got 90 kb on starting up
17412         monodoc. It should also save some disk reads on startup.
17414         * *: MonoMethod->signature might be NULL now. You *MUST* use
17415         mono_method_signature.
17417 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
17419         * object.c (mono_runtime_get_main_args): Return an array from the
17420         current domain here. Fixes #71938.
17422 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
17424         * monitor.c: formatting changes to comply with the
17425         mono coding style and remove #ifdefs from the code.
17427 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
17429         * metadata.c, private.h: remove some unneeded data
17430         and use a more compact representation for table schemas.
17432 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
17434         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
17435         to get a better distribution in hash tables.
17436         * *.c: use mono_aligned_addr_hash() where appropriate.
17437         * assembly.c: make var static.
17439 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
17441         * domain-internals.h: Put MonoJitInfo on a diet.
17443         * domain.c: Fix a warning.
17445 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
17447         * gc.c: rework the gc handles code to reuse handles
17448         when freed.
17450 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
17452         * domain.c: fixed long standing bug in mono_string_equal() which
17453         was brought to light with the ldstr changes.
17455 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
17457         * reflection.c: Remove warning by adding missing include for marshal.h
17459 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
17461         * domain.c, object.c: change the ldstr_table to hold
17462         MonoString* as keys: makes the runtime isinterned lookup
17463         faster and simplifies memory management.
17465 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
17467         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
17468         possible to add imperative security checks before calling the icall.
17469         * reflection.c: Return security attributes on the original MonoMethod
17470         (and not the wrapped one). This fix permissions on icalls.
17472 2005-01-25  Dick Porter  <dick@ximian.com>
17474         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
17475         the check for mktime() support actually test the mktime() return
17476         value.  "Fixes" bug 71682, though the output is still different to
17477         MS.
17479 2005-01-25  Martin Baulig  <martin@ximian.com>
17481         * class.c (mono_class_is_assignable_from): Make this work for
17482         generic instances.
17484 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
17486         * marshal.c (mono_string_utf8_to_builder)
17487         (mono_string_builder_to_utf16): We might not have ownership of the
17488         string. In thise case, we need to create a new buffer.
17490         * object-internals.h (mono_stringbuilder_capacity): sb->str might
17491         be null, in which case, use the default capacity.
17493 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
17495         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
17496         GC events to the profiler.
17498 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
17500         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
17501         if you don't want the GC to run.
17503 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
17505         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
17506         start providing a GC API and keeping different implementations in
17507         their own file.
17508         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
17510 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
17512         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
17513         mmap rather than allocating a huge buffer.
17514         (mono_debug_close_mono_symbol_file): Free the buffer allocated
17515         above.
17517 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
17519         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
17520         and CheckExecutionRights.
17521         * reflection.c|h: Keep the index of the declarative security to be 
17522         used, instead of the pointer, when AOT compiler is used. Also add 
17523         class initialization when requesting demands.
17524         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
17525         CheckExecutionRights. Both properties are now FALSE by default, and
17526         unmodifiable, unless the --security option is used.
17528 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
17530         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
17531         reflection.c: properly refcount images and assemblies, many leaks fixed.
17533 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17535         * threadpool.c: increase the timeout for threads in the thread pool to
17536         10s.  Fixes bug #67159.
17538 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
17540         * class-internals.h: Sun's compiler insists on explicit
17541         signed on bit fields to handle then correctly.
17543 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
17545         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
17546         Make the size of the array fit only the number of invalid path
17547         chars that we have.
17549         * class.c (_mono_class_get): Improve the error reporting when a
17550         class referenced is not found, to assist debugging. 
17552 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
17554         * threads.c: fix off-by-one error.
17555         * domain.c: free data allocated in the domain.
17557 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
17559         * reflection.c (mono_method_body_get_object): Fill out exception info
17560         as well.
17562         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
17563         structure.
17564         
17565 2005-01-19  Martin Baulig  <martin@ximian.com>
17567         * loader.c (mono_get_method_constrained): Make this work again.
17569 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
17571         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
17572         guint16 to match the managed side.
17574         * reflection.c (mono_reflection_body_get_object): Fill out local
17575         variables array.
17577         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
17578         as well.
17580         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
17581         'local_var_sig_token'.
17583 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
17585         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
17586         System.Drawing.
17588         * reflection.c (mono_method_body_get_object): Handle abstract and
17589         runtime methods.
17591 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
17593         * marshal.c, loader.c, class-internals.h, reflection.c:
17594         store the emthod data for a wrapper in an array instead of a list.
17596 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
17598         * marshal.c: change the code to allocate memory more
17599         conservatively for method wrappers.
17601 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
17603         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
17604         fields from MonoClass to the marshal info structure where they belong.
17606 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
17608         * class.c, object.c, class-internals.h, marshal.c: rearrange
17609         some fields and tweak some types to lower memory usage.
17611 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
17613         * threads.c (signal_thread_state_change): Handle the case when the
17614         target thread is the current thread.
17616         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
17618         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
17619         emit_ptr_to_object_conv. 
17621         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
17622         marshalling. Fixes #71352.
17624 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
17626         * metadata.h, blob.h: move table enum to blob.h so it can be included
17627         in any header.
17628         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
17629         cut the size of MonoImage/MonoDynamicImage.
17631 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
17633         * profiler.c (mono_profiler_install_simple): Fix default arguments.
17635 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
17637         * reflection.c, reflection.h, icall.c: add a function to check
17638         if an attribute type is defined for a metadata object.
17640 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
17642         * object-internals.h: Added some needed fields from StringBuilder class.
17643         * marshal.c: Set the maxCapacity when creating a StringBuilder.
17645 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
17647         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
17648         threads before shutting down the runtime.
17650         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
17652 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
17654         * object-internal.h, threads.c: implement stacksize and 
17655         parameterized thread start functionality (requires
17656         matching corlib). Marked broken code for later removal.
17658 2005-01-12  Martin Baulig  <martin@ximian.com>
17660         * class-internals.h (MonoGenericClass): Moved the `initialized'
17661         flag to MonoDynamicGenericClass, removed `init_pending'.
17662         (MonoGenericInst): Added `is_reference' flag.
17664 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
17666         * reflection.c (mono_image_create_pefile): Only set the pe_offset
17667         inside the MSDOS header. Fixes #71201.
17669         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
17670         gc thread.
17671         (mono_domain_finalize): Ditto.
17673 2005-01-12  Martin Baulig  <martin@ximian.com>
17675         * class.c (mono_get_shared_generic_class): Use the cache for
17676         non-dynamic generic classes.
17678         * class-internals.h (mono_class_create_generic_2): Removed
17679         function prototype, this function is now static inside class.c.
17681         * class.c (mono_class_create_generic_2): Made this static, only
17682         call it from mono_class_init() and mono_class_setup_parent().
17683         (collect_implemented_interfaces_aux): Call mono_class_init() on
17684         the interfaces we collect.
17685         (mono_class_setup_vtable): Call mono_class_init (class->parent).
17687 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
17689         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
17690         it a real thread handle.
17692         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
17693         MonoJitExceptionInfo, since each catch clause needs its own variable.
17694         
17695 2005-01-11  Dick Porter  <dick@ximian.com>
17697         * image.c (mono_pe_file_open): New variant on mono_image_open()
17698         that does not set up the CLI metadata; used for FileVersionInfo so
17699         it can get the data for windows binaries too.
17700         
17701         * process.c (process_read_string_block): Don't read off the end of
17702         the StringTable block.
17704         These both fix bug 70766.
17706 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
17708         * gc.c: set some fields to NULL at GC cleanup time.
17709         * threads.c: if we quit the main thread, call exit ().
17711 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
17713         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
17715 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
17717         * threads.h, threads.c, object.c: added accessor and settor for
17718         main_thread. Handle it specially when exiting from it: wait
17719         for other foreground threads to exit.
17721 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
17723         * process.c, verify.c: remove some bloat.
17725 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
17727         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
17728         the calling convention to cdecl under win32.
17730 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
17732         * object.c (mono_object_get_size): New function to get the size of
17733         an object instance.
17735         * profiler.c (simple_allocation): Use above.
17737 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
17739         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
17740         ves_icall_System_AppDomain_getRootDomain (as it's not required to
17741         get an appdomain by it's id and we can't assume the root's id is 0).
17742         * domain-internals.h: Change the function prototype to match.
17743         * icall.c: Change the icall table for AppDomain.
17745 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
17747         * locales.c (string_invariant_compare_char): Only compute
17748         GUnicodeTypes in the case where we need them.  Test for ordinality
17749         first and return if so.
17751         From the commit:
17753                 /*
17754                  * FIXME: here we must use the information from c1type and c2type
17755                  * to find out the proper collation, even on the InvariantCulture, the
17756                  * sorting is not done by computing the unicode values, but their
17757                  * actual sort order.
17758                  */
17760 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
17762         * loader.c: for P/Invoke methods, allow the "Internal" shared
17763         library name to refer to the calling process symbol namespace.
17765 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
17767         * Makefile.am: Add the security manager to the build.
17768         * security-manager.c|h: New. Initialization of the security manager.
17770 2005-01-07  Dick Porter  <dick@ximian.com>
17772         * threads.c: 
17773         * monitor.c: Update thread state during Monitor and WaitHandle
17774         waits.  Fixes bug 71031.
17776 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
17778         * reflection.c (property_encode_signature): Correctly handle when the
17779         property has no methods.
17781 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
17783         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
17784         
17785         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
17786         fields from mb, not rmb. Fixes #71017.
17788         * marshal.c (emit_ptr_to_str_conv): Add support for 
17789         ByValTStr -> string conversion. Fixes #71015.
17791         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
17793         * mempool.c (mono_mempool_contains_addr): New helper function.
17795 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
17797         * metadata.c (mono_metadata_compute_size): Fix size calculation of
17798         HasSematics encoded fields.
17799         
17800         * metadata.c (mono_type_to_unmanaged): Improve error message for 
17801         invalid string marshalling.
17803         * metadata.c: Fix warnings.
17804         
17805 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
17807         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
17808         profiler support.
17810 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
17812         * domain.c object.c domain-internals.h: Revert part of r38077 since the
17813         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
17814         tests.
17816 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
17818         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
17819         so methods containing these can be AOTed.
17821 2005-01-03  Martin Baulig  <martin@ximian.com>
17823         * loader.c (find_method): Removed the hack for generic instances.
17824         (method_from_memberref): If our parent is a generic instance, pass
17825         its generic type definition to find_method() and then inflate the
17826         method.
17827         (mono_get_method_constrained): Pass the generic type definition to
17828         find_method() and inflate the method later.
17830         * class-internals.h (MonoStats): Added `generic_class_count'.
17832         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
17833         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
17835         * reflection.c (mono_custom_attrs_from_params): Don't ignore
17836         generic type definitions.
17838 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
17840         * loader.c icall.c: Fix warnings.
17842 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
17844         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
17845         blittable types. Fixes #70864.
17847 2004-12-29  Martin Baulig  <martin@ximian.com>
17849         * icall.c
17850         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
17852         * reflection.c (mono_method_get_object): Create a
17853         "System.Reflection.MonoGenericMethod" for inflated methods; don't
17854         call mono_get_inflated_method().
17856         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
17858 2004-12-27  Martin Baulig  <martin@ximian.com>
17860         * class-internals.h (MonoMethod): Added `is_inflated' flag.
17861         (MonoMethodInflated): Added `inflated' field.
17863         * class.c (mono_class_inflate_generic_method): Don't really
17864         inflate the method here; just set the `is_inflated' flag in the
17865         MonoMethod.
17866         (mono_class_get_inflated_method): Actually inflate the method here
17867         if it's not already inflated; we use the MonoMethodInflated's new
17868         `inflated' field as a cache.
17870 2004-12-26  Martin Baulig  <martin@ximian.com>
17872         * class.c
17873         (inflate_generic_class): Moved some code out of inflate_generic_type().
17874         (mono_class_inflate_generic_method): If we're already inflated,
17875         inflate the context and use the declaring method; ie. make sure
17876         the declaring method of an inflated method is always the generic
17877         method definition.
17878         (mono_class_create_from_typedef): Create
17879         `class->generic_container->context->gclass'.
17881 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
17883         * metadata-internals.h, marshal.c, reflection.c: More
17884         MonoGHashTable->GHashTable.
17886         * domain-internals.h, class.c: Change MonoGHashTable's into
17887         GHashTables for some cases where no gc stuff is used
17889         All users: update apis
17891 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
17893         * metadata.c (builtin_types): Make this `const'. Makes this get
17894         put into the shareable section.
17895         (mono_metadata_init): Casts to make gcc happy.
17897 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
17899         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
17901 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
17903         * icall.c: Added an internal call to retrieve the position and length
17904         of assembly-level declarative security attributes (RequestMinimum, 
17905         RequestOptional and RequestRefuse). This is used by the Assembly class
17906         to re-create the corresponding permission sets.
17908 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
17910         * marshal.c: fix the stelemref wrapper to be type correct
17911         (and faster).
17913 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
17915         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
17916         to do key & 0x7fffffff. Hashtable already does this. It just
17917         results in longer code.
17919 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
17921         * appdomain.c: Bump corlib version.
17922         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
17923         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
17924         * reflection.c|h: Add functions to get declarative security infos
17925         (blob position and length) for assemblies, classes and methods.
17927 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
17929         * reflection.c: sort the constant table (bug #70693).
17931 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
17933         * object-internals.h, threads.c, domain.c: add accessors for
17934         the MonoThread and MonoDomain tls keys.
17936 2004-12-18  Martin Baulig  <martin@ximian.com>
17938         * class.c (inflate_generic_type): If we're inflating a generic
17939         instance, set `ngclass->context->container = context->container';
17940         ie. the container we inflated into.
17942         * metadata.c (mono_metadata_parse_generic_param): Reflect above
17943         inflate_generic_type() changes.
17945 2004-12-17  Martin Baulig  <martin@ximian.com>
17947         * class-internals.h
17948         (MonoGenericClass): Replaced `MonoType *generic_type' with
17949         `MonoClass *generic_class'.  Removed `dynamic_info'; if
17950         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
17951         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
17953 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
17955         * exception.c (mono_exception_from_token): New helper function.
17957 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
17959         * assembly.c (mono_assembly_load_with_partial_name): Call 
17960         mono_assembly_loaded before invoking the preload hooks. Fixes
17961         #70564.
17963         * object-internals.h (MonoThread): Change culture_info and 
17964         ui_culture_info into an array.
17966         * threads.c: Cache culture info objects from more than one appdomain.
17968         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
17969         current UI culture.
17971 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
17973         * threads.h threads.c appdomain.c: Clear the culture_info field of
17974         all threads during unloading if they point to an object in the dying
17975         appdomain.
17977 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
17979         * culture-info.h (TextInfoEntry): New struct
17980         * object-internals.h: sync with managed
17981         * locales.c: fill the `text_info_data' field
17982         * culture-info-tables.h: update
17984 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
17986         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
17987         collector.
17989 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
17991         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
17992         (ves_icall_ModuleBuilder_getMethodToken): Ditto
17994 2004-12-12  Martin Baulig  <martin@ximian.com>
17996         * mono-debug-debugger.c (write_type): If we're an enum and the
17997         builtin types have already been initialized, call mono_class_init().
17999 2004-12-11  Martin Baulig  <martin@ximian.com>
18001         * metadata.c (mono_metadata_load_generic_params): Added
18002         `MonoGenericContainer *parent_container' argument; automatically
18003         compute `container->is_method'; pass the correct owner to
18004         get_constraints().      
18006         * reflection.c (compare_genericparam): Sort the GenericParam table
18007         according to increasing owners. 
18009 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
18011         * profiler.c: allow disabling the default profiler.
18013 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
18015         * decimal.c, icall.c: allow disabling System.Decimal support.
18017 2004-12-09  Marek Safar <marek.safar@seznam.cz>
18019         * reflection.c: Add support for null attribute arguments.
18021 2004-12-09  Martin Baulig  <martin@ximian.com>
18023         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
18024         names to get rid of compiler warnings.
18026 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
18028         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
18029         mono_marshal_load_type_info (). Fixes #69625.
18030         (mono_marshal_get_ptr_to_struct): Likewise.
18032 2004-12-08  Martin Baulig  <martin@ximian.com>
18034         * mono-debug.h: Bumped version number to 47.
18036         * mono-debug-debugger.c
18037         (mono_debugger_event_handler, mono_debugger_event): Take two
18038         guint64 arguments insteed of a gpointer and a guint32.  
18040 2004-12-08  Martin Baulig  <martin@ximian.com>
18042         * debug-mono-symfile.h
18043         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
18044         `address' to `native_offset'.
18046 2004-12-08  Martin Baulig  <martin@ximian.com>
18048         * class.c (mono_class_create_from_typespec): Only inflate if we
18049         either have `context->gclass' or `context->gmethod'.
18051 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
18053         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
18055         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
18057         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
18059         * reflection.c (mono_assembly_get_object): Remove the workaround put
18060         in for the release.
18061         
18062         * appdomain.c: Use the corlib_internal field from MonoAssembly.
18064         * appdomain.c: Bump corlib version.
18066         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
18067         be visible in other appdomains.
18069 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
18071         * threads.c: Interlocked inc and dec for longs were messed up,
18072         use a KISS based impl for this. Fixes 70234
18074 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
18076         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
18078 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
18080         * icall.c: fix to follow policy not to allow struct
18081         arguments in icalls.
18083 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18085         * process.c: make the patch that handles spaces in file paths work
18086         on mono/windows too.
18088 2004-12-06  Martin Baulig  <martin@ximian.com>
18090         * class.c (mono_class_create_generic): Call
18091         mono_class_setup_supertypes() if we're dynamic.
18092         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
18094 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
18096         * object-internals.h: Add new fields to MonoThread.
18098         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18100         * icall.c threads-types.h threads.c: Add new icalls.
18102         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
18104         * object-internals.h (MonoReflectionAssembly): Sync object layout with
18105         managed side.
18107         * appdomain.c: Bump corlib version.
18109         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
18110         internal assemblies. Fixes #69181.
18112 2004-12-05  Martin Baulig  <martin@ximian.com>
18114         * class.c (mono_class_inflate_generic_signature): Make this a
18115         no-op if `context' is NULL or we don't have any type parameters;
18116         also copy `sentinelpos'.        
18118 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
18120         * image.c: Add unbox_wrapper_cache.
18122         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
18124         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
18125         function generator.
18126         
18127         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
18128         Fixes #70173.
18130         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
18131         
18132 2004-12-04  Martin Baulig  <martin@ximian.com>
18134         * loader.c (mono_method_get_signature_full): New public function;
18135         like mono_method_get_signature(), but with an additional
18136         `MonoGenericContext *' argument.
18138         * class.c (mono_class_inflate_generic_signature): Formerly known
18139         as inflate_generic_signature(); make this public.
18141 2004-12-04  Martin Baulig  <martin@ximian.com>
18143         * metadata.c
18144         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
18145         instead of a `MonoGenericContainer *'.  
18146         (mono_metadata_parse_array_full): Likewise.
18147         (mono_metadata_parse_signature_full): Likewise.
18148         (mono_metadata_parse_method_signature_full): Likewise.
18149         (mono_metadata_parse_generic_inst): Likewise.
18150         (mono_metadata_parse_generic_param): Likewise.
18151         (mono_metadata_parse_mh_full): Likewise.
18152         (mono_type_create_from_typespec_full): Likewise.
18154 2004-12-03  Martin Baulig  <martin@ximian.com>
18156         * class-internals.h (MonoGenericContainer): Replaced the
18157         `MonoGenericContext * pointer with a `MonoGenericContext'
18158         structure and made it the first element.
18160 2004-12-03  Martin Baulig  <martin@ximian.com>
18162         * class.c
18163         (inflate_generic_type): Set the `context->container' when creating
18164         a new MonoGenericContext.
18165         (mono_class_inflate_generic_method): Likewise.
18166         (mono_class_create_from_typespec): Just use `context->container'
18167         to get the container.
18169         * loader.c (method_from_methodspec): Set `context->parent' from
18170         `context->container' - and if that's a method container, use its
18171         parent.  Also set the `context->container' when creating a new
18172         MonoGenericContext.
18173         (mono_get_method_from_token): Use just `context->container' to get
18174         the container.
18176         * metadata.c (do_mono_metadata_parse_generic_class): Also set
18177         `gclass->context->container'.
18179         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
18180         the `context->container' when creating a new MonoGenericContext.
18182 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
18184         * reflection.c (compare_genericparam): Sort params with identical
18185         owner by their number. Fixes gen-111 on sparc.
18187 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
18189         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
18190         around the domain changes.
18192         * appdomain.c (mono_domain_unload): Handle the case when the thread
18193         calling Unload is itself being aborted during unloading. Fixes #70022.
18195         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
18197         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
18198         checkpoint_func as an icall so it gets a wrapper.
18199         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
18200         in the cross-appdomain wrappers too.
18202         * threads.c (mono_thread_has_appdomain_ref): Make this public.
18204         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
18206         * reflection.c: Fix some memory leaks.
18207         
18208 2004-12-02  Martin Baulig  <martin@ximian.com>
18210         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
18212         * metadata.c (generic_class_cache): New static hashtable.
18213         (mono_metadata_lookup_generic_class): New public method.
18215 2004-12-02  Martin Baulig  <martin@ximian.com>
18217         * class.c (mono_class_create_from_typedef): Call
18218         mono_class_setup_parent() and mono_class_create_mono_type() before
18219         parsing the interfaces.
18221 2004-12-02  Martin Baulig  <martin@ximian.com>
18223         * metadata.c (generic_inst_cache): New static hashtable.
18224         (mono_metadata_lookup_generic_inst): New public function.
18225         (mono_metadata_inflate_generic_inst): New public function.
18226         (mono_metadata_parse_generic_inst): New public function.
18227         (do_mono_metadata_parse_generic_class): Use the new
18228         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
18229         since this'll also use the cache.
18231         * reflection.c (mono_reflection_bind_generic_method_parameters):
18232         Use mono_metadata_lookup_generic_inst() to use the new cache.
18234         * class.c (inflate_mono_type): Use
18235         mono_metadata_inflate_generic_inst() to inflate a generic
18236         instance; this'll also use the new cache.
18238         * loader.c (method_from_methodspec): Use
18239         mono_metadata_parse_generic_inst() and
18240         mono_metadata_inflate_generic_inst() rather than parsing it
18241         manually, so we can use the new cache.
18243 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
18245         * threads.c (wait_for_tids): Do not incorrectly free threads when 
18246         the wait times out.
18248 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18250         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
18251         iter->args based on whether parameters are passed in registers (i.e.
18252         MONO_ARCH_REGPARMS is defined)
18254 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
18256         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
18257         the exception message. Fixes #70070.
18258         (method_from_methodspec): Fix warnings.
18260 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18262         * process.c: (complete_path) return the path quoted
18264 2004-12-01  Martin Baulig  <martin@ximian.com>
18266         * class-internals.h (MonoGenericInst): New structure.
18267         (MonoGenericClass): Replaced `type_argc', `type_argv' and
18268         `is_open' with `MonoGenericInst *inst'.
18269         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
18270         `is_open' with `MonoGenericInst *inst'.
18272 2004-11-30  Martin Baulig  <martin@ximian.com>
18274         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
18276         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
18277         to `generic_class_cache'.
18279         * metadata.c
18280         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
18281         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
18282         (mono_generic_inst_is_valuetype): Renamed to
18283         mono_generic_class_is_valuetype().
18285         * class-internals.h
18286         (MonoGenericInst): Renamed to MonoGenericClass.
18287         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
18288         (MonoClass): Renamed `generic_inst' to `generic_class'.
18289         (MonoGenericContext): Renamed `ginst' to `gclass'.
18291         * object-internals.h
18292         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
18294         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
18295         mono_reflection_generic_class_initialize().
18297         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
18298         now known as "System.Reflection.MonoGenericClass".
18299         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
18301 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
18303         * class-internals.h: Added a flag field to MonoClass to cache the
18304         declarative security attributes actions associated with the class.
18305         * domain-internals.h: Added booleans to MonoJitInfo to cache the
18306         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
18307         applicable to the JITted method.
18308         * reflection.c|h: Added functions to extract (as flags) which security
18309         actions are available (declaratively) for a method, class or assembly.
18310         * metadata.c|h: Added functions to search the declarative security
18311         table in the metadata.
18312         
18313 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
18315         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
18316         EXPORTEDTYPES are already in the class name cache, so there is no
18317         need to add extra code here to look at them. Just removes a bit of
18318         cruft.
18320         (ves_icall_System_Environment_get_TickCount): No need for #if
18321         WINDOWS. We already have the code in io-layer.
18323 2004-11-28  Martin Baulig  <martin@ximian.com>
18325         * loader.c
18326         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
18327         Fixes gen-112.cs.
18329 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
18331         * assembly.c (do_mono_assembly_open): Instead of having a
18332         conditional WITH_BUNDLE, incorporate support for bundles here, by
18333         having a global `bundles' variable holding a pointer to the actual
18334         bundles. 
18336         (mono_register_bundled_assemblies): New API call used by the
18337         bundle code. 
18339         See mkbundle.1 for details.
18340         
18341 2004-11-27  Martin Baulig  <martin@ximian.com>
18343         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
18344         the vtable for generic methods.
18346 2004-11-26  Martin Baulig  <martin@ximian.com>
18348         * metadata.c
18349         (mono_metadata_generic_method_hash): New public function.
18350         (mono_metadata_generic_method_equal): Likewise.
18352         * class-internals.h
18353         (MonoGenericContainer): Added `GHashTable *method_hash'.
18355         * reflection.c (ReflectionMethodBuilder): Added
18356         `MonoGenericContainer *generic_container'.
18357         (reflection_methodbuilder_to_mono_method): Don't create a new
18358         MonoGenericContainer each time we're called.
18359         (mono_reflection_bind_generic_method_parameters): Use
18360         `container->method_hash' to cache the results so we don't create a
18361         different method if we're called several times with the same
18362         arguments.
18364         * loader.c (method_from_methodspec): Use the new
18365         `container->method_hash' here, too.
18367 2004-11-26  Martin Baulig  <martin@ximian.com>
18369         * class.c (inflate_generic_signature): Correctly compute
18370         `res->has_type_parameters'.
18371         (mono_class_vtable): Use the `has_type_parameters' flag to
18372         determine whether we're a generic method.
18374         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
18376 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
18378         * object.c (mono_runtime_run_main): Fix a small memory leak.
18380 2004-11-25  Martin Baulig  <martin@ximian.com>
18382         * class.c (set_generic_param_owner): Fixed the loop.
18384 2004-11-25  Martin Baulig  <martin@ximian.com>
18386         * object.c (mono_class_vtable): Don't create any JIT wrappers for
18387         generic methods.
18389 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
18391         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
18392         names. Fixes #69787.
18394 2004-11-24  Martin Baulig  <martin@ximian.com>
18396         * class.c (mono_class_create_generic_2): If we don't have a
18397         `ginst->parent', inflate `gklass->parent' to get our parent.
18399 2004-11-24  Martin Baulig  <martin@ximian.com>
18401         * reflection.c (compare_genericparam): Correctly sort the
18402         GenericParam table; fixes #69779.
18404 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
18406         * reflection.c: When writing a PE file, don't create a huge
18407         buffer in memory. Just write the arrays we have to the file.
18408         This reduces memory usage.
18410         * metadata-internals.h: MonoDynamicStream pefile is no longer used
18411         globally.
18413 2004-11-17  Martin Baulig  <martin@ximian.com>
18415         * class.c (mono_class_init): Don't setup `class->parent' for
18416         dynamic instances; moved this to mono_class_generic_2().
18417         (mono_class_create_generic): Also set `klass->inited' for dynamic
18418         generic instances.
18419         (mono_class_create_generic_2): Don't do anything for dynamic
18420         generic instances.  Set `klass->parent' here and also call
18421         mono_class_setup_parent() here. 
18423         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
18424         `MonoType *parent' argument; set `ginst->parent' before calling
18425         mono_class_create_generic_2(), so we set the correct parent.
18427 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
18429         * reflection.c: allow getting attributes from ModuleBuilder
18430         (used by ikvm).
18432 2004-11-17  Martin Baulig  <martin@ximian.com>
18434         * class.c (mono_class_create_from_typedef): If a type parameter is
18435         inherited from an outer class, set its owner to that class.
18437 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
18439         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
18440           for (int*) written size. This fixes bug #69592.
18442 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
18444         * icall.c: Added IsAuthenticodePresnet internal call.
18445         * image.c|h: New function that check a MonoImage for an Authenticode
18446         signature in the certificate PE data directory.
18447         * security.c|h: New internal call to ask the runtime if an 
18448         Authenticode signature seems referenced in the PE header.
18450 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
18452         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
18454         * reflection.c (mono_image_create_pefile): Free the assembly streams
18455         after writing out the assembly file.
18457         * object.c (mono_runtime_run_main): Fix small memory leak.
18459         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
18460         property access modifiers. Fixes #69389.
18462 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
18464         * domain.c, object.c, object-internals.h, domain-internals.h,
18465         object.h, marshal.c: keep dynamic code info per domain.
18467 2004-11-15  Martin Baulig  <martin@ximian.com>
18469         * class.c (mono_type_get_name_recurse): Put type arguments in
18470         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
18471         see bug #68387.
18473 2004-11-15  Martin Baulig  <martin@ximian.com>
18475         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
18476         (mono_class_setup_vtable): When computing `the_cname' for a
18477         generic instance, don't include the namespace since we'd otherwise
18478         add it twice.
18480 2004-11-15  Martin Baulig  <martin@ximian.com>
18482         * class.c (mono_class_create_generic): Changed return type to void.
18483         (mono_class_create_generic_2): New public function; setup
18484         `class->method', `class->field' and `class->interfaces' here
18485         instead of in mono_class_init().
18487         * class.h (mono_class_create_generic): Moved to class-internals.h.
18489 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
18491         * reflection.c (mono_image_create_pefile): take a file HANDLE.
18492         rather than writing to memory, write to this file. Right now,
18493         we are just writting into a buffer, and copying that. However
18494         we can avoid the buffer later.
18496         (mono_dynamic_stream_reset): new function
18498         * icall.c, object-internals.h: update for the above.
18500 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
18502         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
18503         have been using gc'd memory. First it is slower, unlikely
18504         the comment in the source code said, secondly, it increases
18505         our footprint to do it in the gc.
18507         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
18508         the method so that it does not have to copy to managed code.
18510 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
18512         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
18514 2004-11-12  Martin Baulig  <martin@localhost>
18516         * reflection.c (mono_image_create_token): Allow generic method
18517         definitions here, since they may appear in an `.override'; see
18518         gen-98/gen-99 for an example.
18520 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
18522         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
18523         #69365.
18525         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
18526         descriptive.
18528 2004-11-11  Martin Baulig  <martin@ximian.com>
18530         * class.c (mono_class_setup_vtable): In an explicit interface
18531         implementation, the method name now includes the arity.
18533 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
18535         * object.c (mono_array_full_copy): Fix warning.
18537 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
18539         * appdomain.c: Removed look_for_method_by_name(). Use the new method
18540         mono_class_get_method_from_name() instead.
18541         
18542         * class-internals.h: Added two new types of wrappers. 
18543         Added MonoRemotingTarget enum. Added new trampoline function type, which
18544         takes an additional MonoRemotingTarget value as parameter, so it is
18545         possible to request a trampoline for a specific target.
18546         
18547         * class.c: Added new mono_class_get_method_from_name() method.
18548         
18549         * class.h: In MonoRemoteClass, we can have now to vtables, one for
18550         general remoting sinks and one specific for cross domain calls.
18551         
18552         * debug-helpers.c: Added new wrapper names.
18553         
18554         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
18555         of a remote class.
18556         
18557         * image.c: Porperly delete value objects form the remoting invoke hashtable.
18558         
18559         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
18560         with several other methods (mono_marshal_get_xappdomain_dispatch,
18561         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
18562         and others) can generate a fast remoting wrapper for cross domain calls.
18563         More information can be found in docs/remoting.
18564         Other changes: Removed mono_find_method_by_name, and used
18565         mono_class_get_method_from_name instead.
18566         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
18567         is stored in the remoting invoke hashtable.
18568         
18569         * marshal.h: published the new method for getting the xdomain wrapper,
18570         and also added a method for getting the adequate wrapper for a given
18571         method and target.
18572         
18573         * object-internals.h, object.c: Added a couple of methods for capying and
18574         cloning arrays.
18575         Modified mono_install_remoting_trampoline, which takes the new remoting
18576         trampoline that has a remoting target as parameter.
18577         mono_class_proxy_vtable now also takes a remoting target as parameter, and
18578         will return the most suitable vtable for the target.
18579         Added mono_remote_class_vtable, which returns the vtable of a remote class
18580         (which can be the normal remoting vtable or the xdomain vtable).
18581         
18582         * threads.c: the xdomain invoke and dispatch wrappers must also be
18583         protected against interruptions.
18585 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18587         * icall.c: use memmove in BlockCopyInternal when the source and
18588         destination arrays are the same.
18590 2004-11-09  Martin Baulig  <martin@ximian.com>
18592         * class-internals.h (MonoGenericContainer): Removed `method' and
18593         `signature', replaced them with `is_method' and `is_signature'
18594         flags.  Added `context'.
18596         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
18597         instead of a `MonoGenericContainer *'.
18599         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
18600         for dynamic type parameters.
18601         (mono_metadata_load_generic_params): Setup `container->context'.
18603         * reflection.c (mono_reflection_setup_generic_class): Setup
18604         `tb->generic_container->context'.
18605         (do_mono_reflection_bind_generic_parameters): Use
18606         mono_class_inflate_generic_type() to correctly inflate types,
18607         rather than using our own hack just for MONO_TYPE_VAR.
18609 2004-11-09  Martin Baulig  <martin@ximian.com>
18611         * class.c (mono_class_inflate_generic_method): Small fix; don't
18612         crash here.
18614         * icall.c
18615         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
18616         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
18617         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
18618         (ves_icall_Type_BindGenericParameters): Likewise.
18619         (ves_icall_Type_get_IsGenericInstance): Likewise.
18620         (ves_icall_Type_GetGenericParameterPosition): Likewise.
18621         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
18622         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
18623         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
18625 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
18627         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
18628         assembly versions and public key tokens. Fixes #69113.
18630 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
18632         * metadata.c: fix bug introduced with the type cache changes
18633         on 2004-11-06.
18635 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
18637         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
18638         the MonoClass pointer instead of the token in exception clauses.
18639         * reflection.c: updates for the above and make the code not depend
18640         on the structure of MonoExceptionClause.
18642 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
18644         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
18645         Add support for dynamic assemblies. Fixes #69114.
18647         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
18649 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
18651         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
18652         since most only those methods use it. the code member of
18653         MonoMethodPInvoke was dead, so that can be removed too. Also,
18654         remove inline_count (again, not used), and move slot so that it
18655         can share bits with some other flags. This saves 8 bytes in the
18656         structure and gives us about 50 kb back for mcs helloworld.cs
18658         * *.[ch]: Do naming changes for the above.
18660         * loader.c (mono_method_get_header): Lazily init the header
18661         on first access.
18662         (mono_get_method_from_token): don't init the header here
18663         (mono_free_method): the header may never be allocated
18665         Overall, this saves 150 kb of unmanaged allocations
18666         for mcs helloworld.cs. That accounts for 10% of the unmanaged
18667         memory at runtime.
18668         
18669         * loader.c, loader.h (mono_method_get_header): new accessor.
18671         * *.[ch]: use the above method. Prepares us to lazily load
18672         the header.
18674         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
18675         three warnings, which are actual bugs (see 69206).
18677         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
18678         unused. Saves a cool 4 bytes / method.
18680 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
18682         * metadata.c (builtin_types): Add types for System.Object here.
18683         (mono_metadata_parse_type_full): Cache MonoType*'s that are
18684         for a class or valuetype from klass->this_arg or klass->byval_arg.
18686         On mcs for a hello world, this gets us down from 21836 MonoType's
18687         to 14560.
18689         (mono_metadata_free_type): Account for the above change.
18691 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
18693         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
18694         exception instead of asserting if name is null.
18695         (ves_icall_System_AppDomain_GetData): Ditto.
18697 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
18699         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
18700         EnumBuilder.
18702         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
18703         Return NULL when the domain does not have entry_assembly set.
18705         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
18706         Add a 'resource_modules' argument.
18707         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
18709         * reflection.c (mono_reflection_create_runtime_class): Move setting
18710         of wastypebuilder here, so mono_get_type_object () returns a MonoType
18711         for enums too.
18713         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
18714         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
18715         Throw an ArgumentNullException if 'ptr' is null.
18717         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
18718         assemblies here. Fixes #69020.
18720 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
18722         * reflection.c (build_compressed_metadata): Fix the previous patch for
18723         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
18724         the stack.
18726 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
18728         * assembly.c (mono_assembly_names_equal): Allow a match if one of
18729         the cultures is false. Fixes #69090.
18731         * reflection.c (build_compressed_metadata): Fix invalid memory read 
18732         detected by valgrind.
18733         
18734         * reflection.c (mono_reflection_get_type): Avoid triggering a 
18735         TypeResolve multiple times for the same type. Fixes #65577.
18737 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
18739         * marshal.c: Avoid using ldftn to call managed functions. It is
18740         much slower than just a call.
18742         * reflection.c (mono_module_get_object): free the basename we
18743         allocate here from glib.
18744         
18745         * reflection.c (ensure_runtime_vtable): make sure to free
18746         overrides.  Also, we were allocating an array of MonoMethod not an
18747         array of MonoMethod*.
18749         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
18751         * image.c (mono_image_close): free image->guid here.
18753 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
18755         * reflection.c: Fix some spec conformance issues with the PE file
18756         structures so mcs compiled apps run on the Net 2.0 beta.
18758 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
18760         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
18761         Implement this. Fixes #67264.
18763         * debug-helpers.h debug-helpers.c marshal.c: Move 
18764         mono_find_method_by_name to debug-helpers.c.
18766 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
18768         * object.c (mono_release_type_locks): type_initialization_hash is
18769         a GHashTable.
18771         * reflection.c object.c object-internals.h: Fix warnings.
18773         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
18774         without accessors. Fixes #61561.
18776         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
18777         application base from the root domain if not set. Fixes #65641.
18778         (mono_runtime_init): Fix warning.
18780 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18782         * appdomain.c: call mono_thread_pool_init.
18783         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
18784         of worker threads based on the number of CPUs and the environment
18785         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
18786         for non-windows (windows) systems.
18788 2004-10-27  Chris Toshok  <toshok@ximian.com>
18790         * mono-debug-debugger.c (write_class): don't call mono_class_init
18791         here, as even with the check for (!klass->init_pending), we get
18792         into a situation where we're hitting cycles in class
18793         initialization.  Fixes #68816.
18795 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
18797         * image.c: Avoid overwriting values in the loaded_images_hash when an
18798         assembly is loaded multiple times. Fixes #61152.
18800         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
18801         so multiple satellite assemblies for the same name can be loaded.
18802         Fixes #68259.
18804         * mono_domain_assembly_preload: Actually return the loaded assembly, 
18805         not NULL.
18807         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
18808         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
18810         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
18811         pending finalizers are not invoked after the appdomain has been 
18812         unloaded. Fixes #67862.
18814 2004-10-22  Martin Baulig  <martin@ximian.com>
18816         * mono-debug-debugger.c
18817         (mono_debugger_runtime_invoke): Don't box valuetypes.
18819 2004-10-22  Chris Toshok  <toshok@ximian.com>
18821         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
18822         don't hide private methods.
18824 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
18826         * icall.c: Allows the runtime to "share" (when known) the public key
18827         token of an assembly. This avoid the need to recalculate the token 
18828         (from the public key) in managed code.
18830 2004-10-21  Chris Toshok  <toshok@ximian.com>
18832         * debug-helpers.c (append_class_name): argh, revert last patch.
18833         
18834 2004-10-21  Chris Toshok  <toshok@ximian.com>
18836         * debug-helpers.c (append_class_name): use '+' as the delimiter,
18837         not '/', so that it matches what the debugger uses to look up
18838         methods.
18840 2004-10-21  Martin Baulig  <martin@ximian.com>
18842         * mono-debug-debugger.c (mono_debugger_throw_exception): New
18843         public method; this is called each time an exception is thrown and
18844         allows the debugger to use exception catch points.
18846 2004-10-21  Martin Baulig  <martin@ximian.com>
18848         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
18849         the stack pointer and the exception object in some struct and pass
18850         that to the debugger.
18852 2004-10-21  Chris Toshok  <toshok@ximian.com>
18854         * mono-debug-debugger.c (do_write_class): add instance/static
18855         event support.  We don't expose "raise" or "other" yet.
18856         (event_is_static): new method.
18858 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
18860         * mono-debug-debugger.c
18861         (mono_debugger_handle_exception): Remove
18862         bogus return value for fussy compilers.
18864 2004-10-20  Martin Baulig  <martin@ximian.com>
18866         * mono-debug-debugger.c
18867         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
18868         (mono_debugger_handled_exception): Likewise.
18870 2004-10-20  Martin Baulig  <martin@ximian.com>
18872         * mono-debug-debugger.h (MonoDebuggerEvent): Added
18873         MONO_DEBUGGER_EVENT_EXCEPTION.
18875         * mono-debug-debugger.c (mono_debugger_handle_exception): New
18876         public function to send the debugger a notification for an
18877         exception and inform it about a catch/finally clause.
18879 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
18881         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
18882         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
18883         fix 2.95 build. 
18885         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
18887 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
18889         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
18890         marshalled as [In,Out]. Fixes #58325.
18892 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
18894         * reflection.c (mono_method_body_get_object): Implement some fields.
18896 2004-10-12  Martin Baulig  <martin@ximian.com>
18898         * reflection.c (mono_reflection_bind_generic_parameters): Small
18899         fix, correctly retrieve our parent from a generic instance.
18901 2004-10-12  Martin Baulig  <martin@ximian.com>
18903         * metadata.c (mono_metadata_generic_param_equal): We always have
18904         an owner.
18906         * class.c
18907         (mono_class_from_generic_parameter): We need to have an owner.
18908         (my_mono_class_from_generic_parameter): Likewise.
18910         * reflection.c (mono_reflection_setup_generic_class): Renamed to
18911         mono_reflection_create_generic_class() and added a new
18912         mono_reflection_setup_generic_class().  
18913         (mono_reflection_initialize_generic_param): If we're a nested
18914         generic type and inherited from the containing class, set our
18915         owner to the outer class.
18917 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
18919         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
18921         * reflection.c (mono_method_body_get_object): New function to create
18922         a MethodBody object.
18924         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
18926 2004-10-11  Martin Baulig  <martin@ximian.com>
18928         * metadata.c (_mono_metadata_type_equal): Renamed to
18929         do_mono_metadata_type_equal() and made static.
18931 2004-10-11  Martin Baulig  <martin@ximian.com>
18933         * appdomain.c: Bump corlib version number to 28.
18935 2004-10-10  Martin Baulig  <martin@ximian.com>
18937         * class-internals.h
18938         (MonoGenericInst): Added `MonoGenericContainer *container'.
18939         (MonoGenericMethod): Likewise.
18940         (MonoGenericContext): Likewise.
18941         (MonoGenericParam): Added `MonoGenericContainer *owner'.
18943         * metadata.c
18944         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
18945         (do_mono_metadata_parse_generic_inst): Likewise.
18946         (mono_metadata_parse_type_full): New public method.  This is the actual
18947         mono_metadata_parse_type() implementation - with an additional
18948         `MonoGenericContainer *' argument.
18949         (mono_metadata_parse_array_full): Likewise.
18950         (mono_metadata_parse_signature_full): Likewise.
18951         (mono_metadata_parse_method_signature_full): Likewise.
18952         (mono_metadata_parse_mh_full): Likewise.
18953         (mono_type_create_from_typespec): Likewise.
18954         (mono_metadata_interfaces_from_typedef_full): New public method;
18955         this is similar to the other _full() methods, but we take a
18956         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
18957         (mono_metadata_parse_generic_param): Take an additional
18958         `MonoGenericContainer *' argument and lookup the MonoGenericParam
18959         from that container.
18960         (mono_metadata_generic_param_equal): New static method to compare
18961         two type parameters.
18962         (_mono_metadata_type_equal): New static method; takes an
18963         additional `gboolean signature_only' argument - if true, we don't
18964         compare the owners of generic parameters.
18965         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
18966         with a TRUE argument - do a signature-only comparision.
18968         * loader.c: Use the new _full() methods and pass the
18969         MonoGenericContainer to them.
18971         * object-internals.h (MonoReflectionTypeBuilder): Added
18972         `MonoGenericContainer *generic_container' field.
18973         (MonoReflectionMethodBuilder): Likewise.
18975 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
18977         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
18978         case initial images of dynamic assemblies.
18980         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
18982         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
18984         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
18985         length of event->other array.
18986         (typebuilder_setup_events): Ditto.
18988         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
18989         'assembly_by_name' and add an 'assemblies' list.
18991         * assembly.h assembly.c: Add a new search hook for determining whenever
18992         an assembly is already loaded. Use this instead of searching in the
18993         loaded_assemblies list.
18995         * domain.c appdomain.c: Implement the new search hook so loaded 
18996         assemblies are now scoped by appdomain. Fixes #67727.
18998 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
19000         * threads.c (mono_thread_attach): Initialize synch_lock field so
19001         mono_thread_detach works again.
19003         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
19004         'lib' too. Fixes #63130.
19006 2004-10-06  Jackson Harper  <jackson@ximian.com>
19008         * culture-info-tables.h: regenerated.
19010 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
19012         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
19013         implemented by other interfaces in the result. Fixes #65764.
19014         
19015         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
19016         Handle unloadable modules without crashing.
19018         * image.c (load_modules): Revert the previous patch since modules must
19019         have a fixed index inside the array.
19020         
19021         * image.c (load_modules): Don't include native modules in the modules
19022         array.
19024 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
19026         * reflection.h: Add param_defaults field.
19028         * reflection.c: Add support for parameter defaults in dynamic methods.
19029         Fixes #64595.
19031         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
19032         an empty string when a type has no namespace. Fixes #64230.
19034 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
19036         * tabledefs.h: Added "internal" security actions to support non-CAS
19037         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
19038         Note: they do not seems to be used anymore in 2.0 (new metadata format)
19040 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
19042         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
19043         constructor of abstract class. Fixes #61689.
19045 2004-10-04  Martin Baulig  <martin@ximian.com>
19047         * class-internals.h (MonoGenericContainer): New type.
19048         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
19049         `MonoGenericContainer *generic_container'.
19050         (MonoClass): Replaced `gen_params' and `num_gen_params' with
19051         `MonoGenericContainer *generic_container'.
19053         * metadata.c (mono_metadata_load_generic_params): Return a
19054         `MonoGenericContainer *' instead of a `MonoGenericParam *';
19055         removed the `num' argument.
19057 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
19059         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
19060         for dynamic images.
19062         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
19063         machine fields.
19065         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
19067         * reflection.c: Save pe_kind and machine values into the generated
19068         image file.
19070         * appdomain.c: Bump corlib version number.
19072         * object-internals.h: Reorganize layout of LocalBuilder.
19074         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
19075         New helper function.
19077         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
19078         created MonoType for dynamic types. Fixes #66180.
19080 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
19082         * threadpool.c: the ares hashtable needs a critical section around it.
19083         this prevents some nasty segfaults
19085 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
19087         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
19088         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
19089         bug 67324).
19090         
19091 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
19093         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
19094         
19095 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
19097         * image.c: Always canonicalize image file names, to avoid loading
19098         the same assembly twice when referenced using a relative path.
19100 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
19102         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
19104         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
19106         * marshal.c: Fix warnings.
19108 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
19110         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
19111         attempting to marshal the delegate_trampoline as the method_addr.
19112         This patch has a static hashtable of marshalled delegates so that 
19113         we can map delegate_trampoline addresses back to delegates.  This
19114         allows a delegate passed to managed code to be passed back into native
19115         code.  Fixes #67039
19117 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
19119         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
19121         * reflection.c (method_encode_code): Align method headers properly.
19122         Fixes #66025.
19124 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
19126         * marshal.c: In the runtime invoke wrapper, reset the abort
19127         exception if it is cached. This avoids the automatic rethrowal of 
19128         the exception after the catch of the wrapper. Also check for pending
19129         interruptions before calling the managed method. This is done using
19130         the new method emit_thread_force_interrupt_checkpoint, since the
19131         normal checkpoint method is ignored when running the invoke wrapper.
19132         * object.c: If the abort exception is rethrown, set the abort_exc
19133         field of the thread, so it will be rethrown aftere every catch.
19134         * threadpool.c: Only run an interruption checkpoint if what has been
19135         requested is a stop of the thread (aborts will be ignored).
19136         * threads.c: By default, a thread will now never be interrumped while
19137         running the runtime invoke wrapper (this ensures that runtime_invoke
19138         will always return to the caller if an exception pointer is provided).
19139         There is a new special method mono_thread_force_interruption_checkpoint()
19140         to force an interruption checkpoint even if running a protected
19141         wrapper, which is used by the same runtime invoke wrapper to do a check
19142         at a safe point.
19144 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
19146         * object.c, object-internals.h: Implemented mono_release_type_locks,
19147         which releases the cctor locks held by a thread.
19148         * threads.c, threads.h: In thread_cleanup, release cctor locks held
19149         by a thread. Added mono_thread_exit() method to be used to safely stop
19150         a thread.
19152 2004-09-28  Raja R Harinath  <rharinath@novell.com>
19154         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
19155         Move null check before dereference.  Avoid indexing beyond the end
19156         of the 'modules' array.
19158 2004-09-28  Raja R Harinath  <rharinath@novell.com>
19160         * metadata-internals.h (MonoImage): Add module_count field.
19161         * image.c (load_modules): Set image->module_count.
19162         (mono_image_load_file_for_image): Use image->module_count.
19163         * reflection.c (mono_image_load_module): Append to image->modules array 
19164         of dynamic assembly.
19165         (mono_module_get_object): Fix loop to actually increment index.
19166         Use image->module_count.
19167         * assembly.c (mono_assembly_load_references): Use image->module_count.
19168         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
19169         Likewise.
19171 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
19173         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
19174         Avoid assert on generic types.
19176 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
19178         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
19180         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
19182         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
19183         function to convert a MarshalSpec structure to its managed counterpart.
19185         * reflection.c: Fix warnings.
19186         
19187         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
19188         field.
19190         * icall.c (mono_create_icall_signature): Fix build.
19192 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
19194         * icall.c: Add MakePointType icall.
19196         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
19197         warnings.
19199 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19201         * threadpool.c: reuse allocated slots in the queue.
19203 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
19205         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
19207         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
19209         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
19210         previous change.
19212         * tabledefs.h: Add constants for pinvoke attributes BestFit and
19213         ThrowOnUnmappableChar.
19215         * icall.c (ves_icall_Type_GetPacking): New icall.
19217 2004-09-24  Martin Baulig  <martin@ximian.com>
19219         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
19221 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19223         * appdomain.c:
19224         (mono_domain_set): allow setting a domain that is being unloaded.
19225         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
19226         being unloaded.
19228 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
19230         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
19231         the GetCustomAttributes icall.
19233 2004-09-23  Martin Baulig  <martin@ximian.com>
19235         * object-internals.h (MonoReflectionGenericParam): Replaced
19236         'has_ctor_constraint', `has_reference_type' and `has_value_type'
19237         with `guint32 attrs'.
19239 2004-09-23  Martin Baulig  <martin@ximian.com>
19241         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
19243 2004-09-23  Martin Baulig  <martin@ximian.com>
19245         * object-internals.h (GenericParameterAttributes): New enum.
19247 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
19249         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
19250         
19251         * class.c (init_events): Fill out event->other field.
19253         * class.c: Fix warnings.
19255         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
19257 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
19259         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
19260         walk which doesn't supply the IL offset.
19262 2004-09-22  Martin Baulig  <martin@ximian.com>
19264         * reflection.c (mono_reflection_setup_internal_class): If we're
19265         System.ValueType, System.Object or System.Enum, set
19266         `klass->instance_size' and create the vtable.
19267         (mono_reflection_create_internal_class): If we're an enum type,
19268         get the base class from our current corlib.
19270 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
19272         * reflection.h (MonoResolveTokenError): New type.
19274         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
19275         icall.
19277         * icall.c: Add an 'error' argument to the ResolveToken icalls.
19279 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
19281         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
19282         Support also calling constructors, but only for already allocated objects.
19284 2004-09-17  Geoff Norton <gnorton@customerdna.com>
19286         * reflection.c (type_get_qualified_name): If the klass is null
19287         return the typename to avoid a NullRefEx.
19288         (encode_cattr_value): Get the qualified name of the boxed type,
19289         not the underlying enumtype.  Fixes #62984.
19291 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
19293         * marshal.c: Fix problems with previous checkin.
19295 2004-09-21    <vargaz@freemail.hu>
19297         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
19298         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
19300         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
19302 2004-09-21  Geoff Norton <gnorton@customerdna.com>
19304         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
19305         should only return a type for pointers, arrays, and passbyref types.
19306         Fixes bug #63841.
19308 2004-09-21  Martin Baulig  <martin@ximian.com>
19310         * domain.c (mono_debugger_check_runtime_version): New public
19311         function.
19313         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
19315 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
19317         * reflection.c: Added missing sort to the declarative security 
19318         attributes table. MS implementation stops seeing the attributes if the
19319         token number regress in the table (as shown by ildasm and permview).
19321 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
19323         * object-internals.h (MonoReflectionModule): Add 'token' field.
19324         
19325         * reflection.c (mono_reflection_get_token): Add support for Module
19326         and Assembly.
19327         (mono_module_get_object): Set 'token' field.
19328         (mono_module_file_get_object): Set 'token' field.
19330         * icall.c: Add new Assembly and Module icalls.
19332         * appdomain.c: Bump corlib version.
19334 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
19336         * loader.h loader.c class.h class.c: Add helper functions for obtaining
19337         tokens of metadata objects.
19339         * reflection.h reflection.c (mono_reflection_get_token): New function
19340         to obtain the token of a metadata object.
19342         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
19344 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
19346         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
19347         
19348         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
19350 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
19352         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
19353         * object-internals.h: Added 3 MonoArray* members to MonoReflection
19354         AssemblyBuilder to access the permissions set in the class lib.
19355         * reflection.c: Added security attributes encoding step in 
19356         mono_image_build_metadata.
19357         * tabledefs.h: Added new security actions defined in 2.0:
19358         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
19360 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
19362         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
19363         macro parameter.
19365 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
19367         * locales.c: nullify the ICU_collator member of CompareInfo when it is
19368           finalized. There where random SIGSEVs at program termination, when
19369           an object being finalized was trying to do a string comparison and
19370           the current culture was already finalized.
19372 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19374         * threads.c: call thread_cleanup before finishing the thread if we get
19375         there.
19377 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
19379         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
19380         assemblies from the parent. Fixes #65665.
19382 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
19384         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
19385         modifiers.
19387 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
19389         * reflection.h: add prototype for mono_get_dbnull_object
19390         * reflection.c: add prototypes for get_default_param_value_blobs 
19391         and mono_get_object_from_blob for fussier compilers
19393 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
19395         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
19396         false deadlock checks in class initialization.
19398 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
19400         * image.c (mono_image_addref): Fix comment.
19402         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
19403         possible.
19405 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
19407         * reflection.c (mono_param_get_objects): Modified to return
19408         ParameterInfo.DefaultValue object.
19410         (get_default_param_value_blobs):
19411         (mono_get_object_from_blob):
19412         (mono_get_dbnull_object): New helper routines. 
19414         * object.c (mono_get_constant_value_from_blob): New helper routine
19415         carved out from get_default_field_value ()
19417         * object-internals.h (mono_get_constant_value_from_blob): Added
19418         function declaration.
19420 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
19422         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
19423         referenced assemblies. Fixes #62135.
19425         * exception.h exception.c (mono_get_exception_file_not_found2): New
19426         helper function.
19428 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
19430         * class.h class.c: Add mono_type_get_underlying_type ().
19432 2004-09-09  Geoff Norton <gnorton@customerndna.com>
19434         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
19435         Fix GetTypes() to support dynamically created assemblies.
19437 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
19439         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
19440         
19441         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
19442         previous patch.
19444         * reflection.h reflection.c loader.c: Allow dynamic construction of
19445         pinvoke methods. Fixes #65571.
19446         
19447         * reflection.c (mono_reflection_get_type): Revert previous change since
19448         it causes regressions.
19450 2004-09-08  Martin Baulig  <martin@ximian.com>
19452         * class.c (class_compute_field_layout): Don't call
19453         mono_class_layout_fields() for open generic instances.
19455 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
19456         * threads.c appdomain.c: fix typo in GC macro
19458 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19460         * threads.c: don't call mono_thread_detach() in start_wrapper(),
19461         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
19463 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
19465         * image.c (mono_image_close): Applied patch from 
19466         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
19467         assembly is loaded multiple times from data.
19468         
19469         * image.c (mono_image_open): Fix warning.
19471 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
19473         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
19474         once. Fixes #58334.
19475         
19476         * reflection.c (mono_reflection_create_runtime_class): Initialize
19477         klass->nested_classes. Fixes #61224.
19479 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
19481         * threads.c: sched_yield() on exit, to allow threads to quit.
19483 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
19485         * object.c (mono_unhandled_exception): Remove leftover debug code.
19487 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
19489         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
19491 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
19493         * marshal.c (emit_marshal_array): Really null terminate string arrays.
19494         
19495         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
19497 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
19499         * marshal.c (emit_marshal_array): Null terminate string arrays.
19500         
19501         * marshal.c (raise_auto_layout_exception): Fix warning.
19503         * reflection.c (mono_param_get_objects): Initialize the default value
19504         with DBNull.Value, not null. Fixes #62123.
19506 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
19508         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
19509         throw an exception with a cute explanation.
19511 2004-09-06  Dick Porter  <dick@ximian.com>
19513         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
19514         Close the new process's thread handle, as we don't use it.  The
19515         handle stays around forever otherwise.
19517 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
19519         * object.c (arith_overflow): Fix warning.
19521         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
19522         calling conventions in method refs. Fixes #65352.
19524         * reflection.c: Fix warnings.
19526 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
19528         * icall.c: Add a new icall for Array.Clear
19530 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
19532         * object.c: When allocating an array, we have to throw
19533         an overflow exception if any of the lengths are < 0.
19535 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
19537         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
19538         properly. Also move implementation of string array marshalling to 
19539         managed code. Fixes #42316.
19541 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19543         * assembly.c: provide more information when loading an assembly fails.
19545 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19547         * filewatcher.c: don't expect the development fam package to be
19548         installed.
19550 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
19552         * marshal.c: Make a copy of the signature cookie since it will be
19553         freed by the caller.
19554         
19555         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
19557         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
19559         * metadata.c (mono_metadata_free_marshal_spec): New function to free
19560         marshal specs.
19562         * marshal.c: More refactoring.
19563         
19564         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
19565         smaller functions.
19567 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
19569         * object.c: In mono_message_invoke, fill the output parameter array after
19570           calling the managed method (it was done before the call). This fixes
19571           bug #59299.
19573 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
19575         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
19576         as well.
19578 2004-09-02  Martin Baulig  <martin@ximian.com>
19580         * class.c (mono_class_instance_size): Don't allow generic type
19581         definitions or open generic instances.
19582         (mono_class_array_element_size): If we're a value type, call
19583         mono_class_instance_size() on the original class.
19585         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
19586         handle generic instances.
19588         * mono-debug-debugger.c (write_type): Handle generic instances
19589         like classes.
19591 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
19593         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
19594         the allocation request fails. Fixes #65089.
19596         * object.c (mono_runtime_free_method): Do not call mono_free_method.
19597         
19598         * object.c (mono_runtime_free_method): New function to free a dynamic
19599         method.
19601         * marshal.c (mono_delegate_free_ftnptr): New function to free the
19602         delegate trampoline.
19604         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
19605         with hasthis as dynamic,
19607         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
19609         * domain.c (mono_jit_info_table_remove): New function to remove an
19610         entry from the jit info table.
19612         * class-internals.h (MonoMethod): Add 'dynamic' field.
19614         * loader.c: Fix warnings.
19616 2004-09-01  Martin Baulig  <martin@ximian.com>
19618         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
19619         instead of mono_debugger_lock() because the latter one is a no-op
19620         unless running in the debugger.
19622 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
19624         * class.c (class_compute_field_layout): Classes with auto-layout or
19625         reference fields are not blittable.
19626         
19627 2004-09-01  Dick Porter  <dick@ximian.com>
19629         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
19630         mono_image_get_filename() to get the assembly location.
19632         * icall.c:
19633         * metadata.h: Fix compile warnings
19635 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
19637         * class.c (class_compute_field_layout): System.Object is blittable.
19639         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
19640         as in/out. Fixes #59909.
19642 2004-09-01  Martin Baulig  <martin@ximian.com>
19644         * metadata.h (MONO_TYPE_ISREFERENCE): Call
19645         mono_metadata_generic_inst_is_valuetype() if we're a generic
19646         instance to check whether our underlying type is a reference type.
19648 2004-09-01  Martin Baulig  <martin@ximian.com>
19650         * metadata.c (mono_type_size): If we're a generic instance, call
19651         mono_class_value_size() for value types.
19653 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
19655         * marshal.c: Implement more custom marshalling functionality. Fixes
19656         #64915.
19658 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19660         * mono-debug.c, debug-mono-symfile.c: add some locking love.
19662 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
19664         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
19666         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
19668         * icall.c: Fix some warnings.
19670         * threads.c (abort_appdomain_thread): Fix unref errors.
19671         (mono_thread_current): Fix THREAD_DEBUG define.
19673 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
19675         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
19677         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
19679 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
19681         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
19682         string arrays.
19684 2004-08-28  Martin Baulig  <martin@ximian.com>
19686         * metadata.c
19687         (mono_metadata_generic_inst_is_valuetype): New public function.
19689         * metadata.h (MONO_TYPE_ISSTRUCT): Call
19690         mono_metadata_generic_inst_is_valuetype() if we're a generic
19691         instance to check whether our underlying type is a valuetype.
19693 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
19695         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
19696         #63768.
19698 2004-08-25  Martin Baulig  <martin@ximian.com>
19700         * loader.c (mono_get_method_from_token): Abstract methods can also
19701         be generic and thus have type parameters.
19703         * metadata-internals.h
19704         (MonoDynamicImage): Added `GPtrArray *gen_params'.
19706         * reflection.c (mono_image_get_generic_param_info): Don't create a
19707         metadata row, just add an entry to the `gen_params' array.
19708         (build_compressed_metadata): Sort the `gen_params' array and then
19709         actually create the metadata.
19711 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19713         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
19715 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
19717         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
19719 2004-08-24  Martin Baulig  <martin@ximian.com>
19721         * class.cs (mono_class_is_subclass_of): Like an interface, a
19722         generic instance also derives from System.Object.
19724 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
19726         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
19727         custom modifiers to be in any order. Fixes #61990.
19729 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
19731         * object.c: Register mono_object_new_fast icall.
19732         
19733         * object.c (mono_class_get_allocation_ftn): Return to calling
19734         mono_object_new_fast, since it seems faster to compute the object 
19735         size in unmanaged code than passing it as a parameter.
19737         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
19739         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
19740         this function with Boehm as the oom handler, so we don't have to check
19741         the result of GC_malloc.
19743         * object.c: Remove checks for oom.
19745         * object.h object.c (mono_class_get_allocation_ftn): New function to
19746         return the icall which can be used to allocate an instance of a given
19747         class. 
19749         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
19751         * class-internals.h: Add 'enabled' field.
19753 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
19755         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
19757 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
19758         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
19759         value 0x0010.
19761 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
19763         * appdomain.c: use the Tls function for appdomain too,
19764         at Zoltan's request. Actually return in mono_context_get
19766         * appdomain.c, profiler.c, threads.c: use __thread
19768 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
19770         * appdomain.c threads.c: Call GC_CreateThread on windows.
19772         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
19773         multiple libraries since this don't work on windows.
19775 2004-08-18  Martin Baulig  <martin@ximian.com>
19777         * class-internals.h
19778         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
19779         MonoMethodHeader.
19781         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
19782         MonoMethodNormal since we also need it for abstract and interface
19783         methods.
19785         * reflection.c
19786         (build_compressed_metadata): Sort the GenericParam table.
19787         (mono_image_create_token): Added `gboolean create_methodspec'
19788         argument; this is false when generating a MethodImpl token.
19789         (reflection_methodbuilder_to_mono_method): Abstract and interface
19790         methods may also have generic parameters.
19792 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19794         * appdomain.c: thread local alloc
19796 2004-08-17  Martin Baulig  <martin@ximian.com>
19798         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
19800         * icall.c
19801         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
19802         argument.
19804         * class.c (mono_type_get_full_name): New public function.
19805         (mono_type_get_name): Don't include the type arguments.
19807 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
19809         * Makefile.am: Build static versions of libmetadata and libmonoruntime
19810         for inclusion into the mono executable.
19812 2004-08-16  Martin Baulig  <martin@ximian.com>
19814         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
19815         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
19817 2004-08-14  Martin Baulig  <martin@ximian.com>
19819         * class.c (dup_type): Also copy the `byref' field.
19821 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
19823         * reflection.c (create_dynamic_mono_image): Revert the last change 
19824         since it breaks bootstrap.
19826 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
19828         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
19830         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
19831         not free them with g_free.
19833 2004-08-11  Martin Baulig  <martin@ximian.com>
19835         * reflection.c (mono_reflection_setup_internal_class): Also call
19836         mono_class_setup_mono_type() if we already have a `tb->type.type'.
19838 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
19840         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
19841         called during default (first) AppDomain creation. Keep track of
19842         Evidence when loading assemblies.
19844 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
19846         * opcodes.c, opcodes.h: reduce runtime relocations.
19848 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
19850         * culture-info.h, locales.c: fixes and chages to sue the new
19851         optimized format of the locale data.
19852         * culture-info-tables.h: regenerated.
19854 2004-08-06  Geoff Norton <gnorton@customerdna.com>
19855         
19856         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
19858 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
19860         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
19861         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
19862         * domain-internals.h: icall declaration.
19863         * icall.c: icall registration.
19864         * object-internals.h: New fields in MonoAssembly for CAS.
19866 2004-08-05  Duncan Mak  <duncan@ximian.com>
19868         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
19869         CEE_LDELEM_ANY.
19871 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
19873         * reflection.c: fix to deal with object[] arrays in custom ctors
19874         (bug #62550).
19876 2004-08-05  Martin Baulig  <martin@ximian.com>
19878         * class.c (mono_class_array_element_size): Added support for
19879         generic instances and correctly handle "recursive" types.
19881 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
19883         * assembly.c: Fix warnings.
19885 2004-08-04  Martin Baulig  <martin@ximian.com>
19887         * class.c
19888         (mono_type_get_name_recurse): Added `gboolean include_arity'
19889         argument specifying whether or not we should include the generic
19890         arity in the type name.
19891         (_mono_type_get_name): New static function.
19892         (mono_class_setup_vtable): If we're a generic instance, don't
19893         include the generic arity in the names of explicit method
19894         implementations.        
19896 2004-08-03  Martin Baulig  <martin@ximian.com>
19898         * class.c (mono_type_get_name_recurse): Enclose the generic type
19899         arguments in `<', '>'.
19901 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
19903         * gc.c: make GC warning messages use the trace API, they are just
19904         noise to most of the users.
19906 2004-08-03  Martin Baulig  <martin@ximian.com>
19908         * debug-mono-symfile.c (read_string): Correctly read the string.
19910 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
19912         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
19913         
19914         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
19915         icalls.
19916         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
19918 2004-07-30  Martin Baulig  <martin@ximian.com>
19920         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
19921         Reflect latest symbol writer changes.   
19923 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
19925         * object.c: always create an object if null is passed
19926         to Invoke() where a valuetype is expected.
19928 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
19930         * marshal.c (mono_marshal_init): make managed
19931         signatures match native ones better for 64bits.
19933 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19935         * appdomain.c: hack to build correctly the private bin path on windows.
19936         Fixes bug #61991.
19938 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
19940         * assembly.c: Load mscorlib from the correct framework directory
19941           (mono/<version>/mscorlib.dll).
19942         * appdomain.h: Added prototypes for new functions.
19943         * internals.h: Added some prototypes.
19944         * domain.c: When initializing the runtime, get from the executable and
19945           the configuration files the runtime version that the app supports.
19946           Added support methods for reading app.exe.config. Added list of versions
19947           supported by the JIT. Added two new methods: mono_init_from_assembly,
19948           which initializes the runtime and determines the required version from
19949           the provided exe file, and mono_init_version, which initializes
19950           the runtime using the provided version.
19951         * icall.c: Get machine.config from version-specific directory.
19952         * reflection.c: When generating an image, embed the version number
19953           of the current runtime.
19955 2004-07-28  Dick Porter  <dick@ximian.com>
19957         * socket-io.c
19958         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
19959         returned sockaddr size before creating the remote address object.
19960         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
19961         61608.
19963 2004-07-28  Dick Porter  <dick@ximian.com>
19965         * locales.c (string_invariant_compare_char): Fix invariant char
19966         compares between upper and lower cases.  Fixes bug 61458.
19968 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
19969         
19970         * marshal.c: actually cache stelem.ref wrappers.
19971         
19972 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
19974         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
19975         sections and remove the mono_cli_rva_map () function.
19977 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
19979         * debug-mono-symfile.c: fix one more endianess issue, from a patch
19980         by Geoff Norton (<gnorton@customerdna.com>).
19982 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
19984         * class.c: fix class loads for pointer types (typeof(int) !=
19985         typeof(int*)).
19987 2004-07-27  Martin Baulig  <martin@ximian.com>
19989         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
19990         reading the debugging information from an external ".mdb" file.
19992 2004-07-24  Martin Baulig  <martin@ximian.com>
19994         * reflection.c (mono_image_get_type_info): Only write a class
19995         layout entry if we actually have a size or a packing size.
19997 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
19999         * reflection.c (type_get_fully_qualified_name): 
20000         insert cast to get type checking of ?: with non-gcc compilers
20002 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
20004         * rand.c: use g_getenv for both lookups of
20005         MONO_EGD_SOCKET
20007 2004-07-17  Martin Baulig  <martin@ximian.com>
20009         * reflection.c (mono_reflection_bind_generic_method_parameters):
20010         Set `gmethod->reflection_info'.
20012 2004-07-17  Martin Baulig  <martin@ximian.com>
20014         * class.c (mono_class_create_from_typedef): Insert the newly
20015         created class into the hash table before computing the interfaces
20016         since we could be called recursively.
20018 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
20020         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
20021         function to implement stelem.ref in managed code
20022         * class-internals.h, debug-helpers.c: a new wrapper type
20023         for the above.
20025 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
20027         * gc.c: allow GC handles to work even when no GC is compiled in.
20028         Fix part of bug #61134 (GetAddrOfPinnedObject).
20030 2004-07-13  Peter Williams  <peter@newton.cx>
20032         * process.c (complete_path): Make sure we don't attempt to execute
20033         directories.
20035 2004-07-12  Geoff Norton <gnorton@customerdna.com>
20037         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
20038           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
20039           and will add/subtract the hour if needed
20041 2004-07-12  Martin Baulig  <martin@ximian.com>
20043         * reflection.c (mono_field_get_object): If we have
20044         `field->generic_info', take the attributes from
20045         `field->generic_info->generic_type'.    
20047 2004-07-12  Martin Baulig  <martin@ximian.com>
20049         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
20050         This function must be called before initializing the runtime.
20051         (mono_debug_init_1): New function; call this after initializing
20052         the runtime, but before loading the assembly.  It tells the
20053         debugger to load corlib and the builtin types.
20055         * mono-debug-debugger.c: Did some larger changes in the debugging
20056         code; support recursive class declarations, make sure we actually
20057         add all classes.
20059 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20061         * debug-helpers.c: undo my previous patch and fixed the real issue in
20062         ../mini/exceptions-x86.c
20064 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20066         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
20067         when no HOME env. variable was set and a NullRef was thrown in a .cctor
20068         called from other .cctors.
20070 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
20072         * loader.c: Removed the mono_loader_wine_init hack now that we are
20073         doing a managed version of Windows.Forms.
20075 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
20077         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
20078         threadpool.c, threads.c: remove static data from rootset.
20080 2004-07-09  Dick Porter  <dick@ximian.com>
20082         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
20083         Don't do any more processing if the matched length was 0.  It was
20084         increasing the size of the string before.  Fixes bug 61167.
20086 2004-07-09  Dick Porter  <dick@ximian.com>
20088         * socket-io.h:
20089         * socket-io.c
20090         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
20091         Add support for SO_PEERCRED if its available.
20093 2004-07-09  Peter Bartok <pbartok@novell.com>
20094         * loader.c: winelib.exe.so error message is now only displayed if
20095         MONO_DEBUG is set. To help us avoid questions when people are trying
20096         out the new Managed.Windows.Forms.
20098 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
20100         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
20101         for isinst and castclass wrappers.
20103         * class-internals.h icall.c: Move registration and lookup of JIT icalls
20104         to libmetadata from the JIT, so they could be used by the marshalling
20105         code and the interpreter.
20107         * marshal.c: Register marshalling related JIT icalls here instead of
20108         in mini.c. Use CEE_MONO_ICALL instead of the family of 
20109         CEE_MONO_PROC<x> opcodes to call marshalling functions.
20111         * metadata.h: Remove unneeded marshalling conversions.
20113         * opcodes.c: Update for new opcodes.
20114         
20115 2004-07-08  Martin Baulig  <martin@ximian.com>
20117         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
20118         (mono_debug_get_domain_data): Make this function static.
20120 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
20122         * gc.c, object.h: add nice GC handle API for embedders.
20124 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
20126         * reflection.c: more changes for the new api
20128         * object.c: When we reflect on a field w/ a constant value, it
20129         will not have a memory location, so we must access metadata. Also,
20130         allow easier reading of strings so that we can read them from
20131         the constant data.
20133         * class.c (mono_class_layout_fields): no need for literal fields here.
20135         * class-internals.h: api changes for const fields
20137         * icall.c (ves_icall_get_enum_info): use new apis for const fields
20139 2004-07-06  Martin Baulig  <martin@ximian.com>
20141         * mono-debug.h: Increment version number to 44.
20143         * mono-debug.c (mono_debug_add_wrapper): The second argument is
20144         now a gpointer, rewrote this whole method.
20146         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
20147         function.  Add information about the wrapper in a new "misc table".
20149         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
20150         for the new misc table.
20152 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
20154         * metadata-internals.h image.c: Add a cache for helper signatures.
20156         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
20158 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
20160         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
20161         delegates from a delegate. Fixes #61033.
20162         
20163         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
20164         marshalling of stringbuilder arrays. Fixes #59900.
20166 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
20168         * icall.c: Add EnumBuilder:setup_enum_type icall.
20170 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
20172         * icall.c: Added a new icall for the property version of
20173         OffsetOfStringData.
20175 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
20177         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
20178         it has a constant size across platforms.
20180         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
20181         stack trace.
20183 2004-06-29  Martin Baulig  <martin@ximian.com>
20185         * mono-debug.c (mono_debug_add_method): Protect the whole function
20186         in mono_debugger_lock(), not just parts of it.
20188 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
20190         * reflection.c: make sure padding bytes in heaps are zeroed.
20192 2004-06-24  David Waite  <mass@akuma.org>
20194         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
20195         image.c, loader.c, locales.c, marshal.c, metadata.c,
20196         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
20197         string-icalls.c, threads.c: change to C90-style comments from C99 /
20198         C++ -style
20200 2004-06-24  Dick Porter  <dick@ximian.com>
20202         * threads.c
20203         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
20204         return createdNew.  Fixes bug 60412.
20206         * threads-types.h: 
20207         * icall.c: Add createdNew parameter to CreateMutex icall
20209 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
20211         * reflection.c, object-internals.h: save default value in params.
20213 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20215         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
20216         no need to build a new path combining that with the application base.
20217         Fixes bug #60442.
20219 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
20221         * reflection.c: fixed minor standard compliance issues.
20223 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
20225         * reflection.c: fixed issue with encoding some custom attributes
20226         (arrays in properties and fields, bug #60411).
20228 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20230         * reflection.c: fix start address when copying the public key token.
20232 2004-06-23  Martin Baulig  <martin@ximian.com>
20234         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
20235         the `exc' object in a static object to put it into the GC's root set.
20237 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
20239         * reflection.c: make mono_reflection_setup_internal_class ()
20240         callable a second time to setup a new parent class.
20242 2004-06-23  Dick Porter  <dick@ximian.com>
20244         * threads.c: Check for WAIT_IO_COMPLETION return values.
20246 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
20248         * appdomain.c: Removed the g_free on the public key token. Now copy 
20249         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
20250         * assembly.c: Added public key token string value when loading 
20251         assemblies. Fix bug #60439.
20252         * icall.c: Added missing informations (like public key) in 
20253         GetReferencedAssemblies. Fix #60519.
20254         * image.h: Changed definition for public key token from const char*
20255         public_tok_value to guchar public_key_token [17];
20256         * reflection.c: Updated for changes to public key token.
20258 2004-06-22  Lluis Sanchez Gual
20260         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
20261         for the field in base classes.
20263 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
20265         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
20266         mark headers as not supported, they are installed only for use by the
20267         debugger.
20269 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
20271         * *.c, *.h: avoid namespace pollution in public headers.
20273 2004-06-21  Martin Baulig  <martin@ximian.com>
20275         * exception.c (mono_get_exception_security): It's in
20276         "System.Security", not in "System".
20278         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
20279         the exception classes.
20281 2004-06-21  Martin Baulig  <martin@ximian.com>
20283         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
20284         Protect the exception object from being finalized.
20286 2004-06-21  Martin Baulig  <martin@ximian.com>
20288         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
20289         public function.
20291 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
20293         * reflection.c: Load the assembly in mono_reflection_type_from_name,
20294         if it was not loaded before. Fix parts of #60439.
20296 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
20298         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
20299         code that was broken since Ben's change: wrappers are now
20300         dependent on the method signature only again.
20302 2004-06-21  Martin Baulig  <martin@ximian.com>
20304         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
20305         added interface support.
20307 2004-06-21  Martin Baulig  <martin@ximian.com>
20309         * class.c (mono_vtable_get_static_field_data): New public method.
20311 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
20313         * filewatcher.c : Windows build fix to be compliant with API changes.
20315 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
20317         * class.h, class.c: more accessors.
20318         * metadata.h, metadata.c: prepare for hiding MonoType and
20319         MonoMethodSignature: people should use the accessors from now on
20320         outside of the tree.
20322 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
20324         * *.c, *.h: more API cleanups.
20326 2004-06-18  Jackson Harper  <jackson@ximian.com>
20328         * assembly.c: Trace loading assemblies.
20329         * loader.c: Trace loading native libraries.
20330         * mono-config.c: Trace loading config files.
20331         
20332 2004-06-18  Dick Porter  <dick@ximian.com>
20334         * locales.c: Tell ICU the lengths of strings, it can cope with
20335         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
20337 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
20339         * image.c: swapped name/filename;
20341 2004-06-18  Martin Baulig  <martin@ximian.com>
20343         * mono-debug-debugger.c (write_class): Write the parent class at
20344         the end of the header.
20346 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
20348         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
20350 2004-06-17  Raja R Harinath  <rharinath@novell.com>
20352         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
20353         (bundle_obj): New conditional define.
20354         (BUILT_SOURCES): Remove.
20355         ($(bundle_srcs)): Make parallel-make safe.
20356         (libmonoruntime_la_LIBADD): Make unconditional.
20357         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
20358         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
20360 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
20362         * culture-info-tables.h: It was inconsistent with the latest
20363           supp info files.
20365 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
20367         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
20368         be loaded.
20370         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
20371         with gcc 2.95.
20373 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
20375         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
20376         cleaned up public header threads.h.
20378 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
20380         * Makefile.am, *.c, *.h: more API cleanups.
20382 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
20384         * Makefile.am: removed monosn from compilation.
20385         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
20386         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
20387         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
20388         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
20389         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
20390         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
20392 2004-06-15  Jackson Harper  <jackson@ximian.com>
20394         * assembly.c: Make locales lower case when searching the GAC for
20395         assemblies. gacutil will always make locales lowercase when
20396         installing so this effectively makes them case insensitive.
20397         
20398 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
20400         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
20401         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
20402           parameter which allows to choose whether the wait can be interrupted or 
20403           not. Also added the method mono_monitor_enter(), which locks the monitor
20404           using an infinite wait and without allowing interruption.
20405           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
20406           interrupted.
20407         * object.h: Added new fields in MonoThread. suspend_event holds the event
20408           used to susped/resume the thread. synch_lock is the lock object to use for
20409           modifying the thread state.
20410         * threads.c: Use the new synch_lock object for locking, instead of "this",
20411           which can generate deadlocks.
20412           Moved thread state change in Thread.Sleep and Thread.Join from managed
20413           to unmanaged code. This avoids a deadlock when the thread was suspended
20414           just after acquiring the thread lock.
20415           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
20416           Implemented Thread.Suspend using an event instead of ThreadSuspend,
20417           which is not fully implemented in the io-layer.
20418         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
20420 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
20422         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
20423         threads-types.h: more API cleanups.
20425 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
20427         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
20428         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
20429         threadpool.c, threads.c: first pass at the exported API cleanup.
20431 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
20433         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
20435 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20437         * icall.c: added internalGetHome.
20439 2004-06-14  Dick Porter  <dick@ximian.com>
20441         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
20442         possible to return successfully when '.' or '..' were the only
20443         entries in a directory, but were skipped.  The MonoIOStat was not
20444         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
20445         Fixes bug 59574.
20447 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
20449         * reflection.c: make binaries run on .Net 1.1 by default.
20451 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
20453         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
20455 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
20457         * marshal.c: keep track of struct size with explicit layout
20458         (bug #59979).
20460 2004-06-12  Martin Baulig  <martin@ximian.com>
20462         * mono-debug-debugger.c: Comment out a debugging g_message().
20464 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
20466         * reflection.c, reflection.h: do not free custom attrs that are cached.
20467         * icall.c: use braces to make code clearer.
20469 2004-06-11  Martin Baulig  <martin@ximian.com>
20471         * class.h (MonoInflatedField): New type.
20472         (MonoClassField): Replaced `MonoType *generic_type' with
20473         `MonoInflatedField *generic_info'.
20475         * icall.c
20476         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
20478 2004-06-11  Martin Baulig  <martin@ximian.com>
20480         * reflection.c (mono_image_create_method_token): Correctly encode
20481         varargs methods.
20483 2004-06-11  Martin Baulig  <martin@ximian.com>
20485         * metadata.c (mono_metadata_parse_method_signature): When parsing
20486         a MethodDef which has VarArgs, also set sentinelpos if we don't
20487         have any parameters.
20489 2004-06-11  Martin Baulig  <martin@ximian.com>
20491         * verify.c (mono_method_verify): In CEE_CALL, use
20492         mono_method_get_signature() to get the method's signature, unless
20493         we're a PInvoke method.
20495 2004-06-10  Jackson Harper  <jackson@ximian.com>
20497         * assembly.c: Use <path>/lib/mono/gac for the extra paths
20498         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
20499         logical name as the supplied path is just a prefix to the gac not
20500         the direct path to it.
20501         
20502 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
20504         * reflection.c: make the token for a created method match
20505         the token of the MethodBuilder it was created from
20506         (IKVM requires this behaviour now).
20508 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
20510         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
20511         reflection.c, socket-io.c: leak fixes.
20513 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
20515         * icall.c: handle sentinel pos in vararg methods in position different
20516         from 0.
20518 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20520         * culture-info-tables.h: freshly generated.
20522 2004-06-09  Martin Baulig  <martin@ximian.com>
20524         * loader.c (mono_get_method_constrained): Call `mono_class_init
20525         (constrained_class)'.   
20527 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
20529         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
20530         any methods. Fixes #59629.
20532 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
20534         * culture-info-tables.h: reflecting locale-builder updates.
20536 2004-06-08  Dick Porter  <dick@ximian.com>
20538         * object.h:
20539         * locales.c: Fixed compile warnings, including a real bug in
20540         CompareInfo_internal_compare.
20541         
20542 2004-06-08  Dick Porter  <dick@ximian.com>
20544         * locales.c
20545         (ves_icall_System_Globalization_CompareInfo_internal_index):
20546         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
20547         Double-check the resuls of usearches, because ICU currently
20548         ignores most of the collator settings here.  Fixes bug 59720.
20549         
20550 2004-06-08  Dick Porter  <dick@ximian.com>
20552         * locales.c
20553         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
20554         Fix memory leak and segfault-causing typo.  No idea how this one
20555         lasted so long without being noticed.
20557 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
20559         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
20560         any methods. Fixes #59629.
20562 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20564         * assembly.c:
20565         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
20566         own the critical section before). Removed dead code (that's done
20567         in the preload hook).
20569         (mono_assembly_load_with_partial_name): call the preload hook.
20571 2004-06-08  Martin Baulig  <martin@ximian.com>
20573         * metadata.c (mono_metadata_signature_alloc): Default
20574         `sentinelpos' to -1.
20576         * reflection.c (mono_image_get_array_token): Likewise.
20578 2004-06-08  Martin Baulig  <martin@ximian.com>
20580         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
20582         * metadata.c (mono_metadata_parse_method_signature): When parsing
20583         a MethodDef which has VarArgs, set sentinelpos.
20585         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
20586         `gint16' since we're using -1 for non-varargs methods.
20588         * reflection.c
20589         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
20590         (method_encode_signature): Added varargs support.
20591         (method_builder_encode_signature): Likewise.
20592         (mono_image_get_varargs_method_token): New static method.
20593         (mono_image_create_method_token): New public method; this is
20594         called via an icall instead of mono_image_create_token() when
20595         calling a varargs method.       
20597 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
20599         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
20601 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
20603         * culture-info-tables.h : Reflecting the latest locale-builder that
20604           fixed empty array representation ({} to {0}).
20606 2004-06-07  Jackson Harper  <jackson@ximian.com>
20608         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
20609         looking up extra gac paths. This allows MONO_GAC_PATH to act
20610         exactly like a prefix.
20611         
20612 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
20614         * reflection.c (mono_reflection_type_from_name): Make a copy of the
20615         type name before modifying it. Fixes #59405.
20617 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
20619         * culture-info.h: added fields for "all datetime patterns".
20620         * locales.c: (  ves_icall_System_Globalization_CultureInfo
20621           _construct_datetime_format ()): fill xxx_patterns fields.
20622         * object.h: added fields for "all datetime patterns" to
20623           MonoDateTimeFormatInfo.
20624         * culture-info-tables.h: reflecting locale-builder updates.
20626 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
20628         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
20629         the event has no add and remove methods. Fixes #59629.
20631 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
20633         * object.c: Fixed possible integer overflow when allocating large
20634         strings.
20636 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
20638         * culture-info-tables.h: reflecting locale-builder updates.
20640 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
20642         * culture-info-tables.h: reflecting locale-builder updates.
20644 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
20646         * culture-info-tables.h: reflecting locale-builder updates.
20648 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
20650         * threads.c: Made Thread.Sleep abortable.
20652 2004-06-02  Martin Baulig  <martin@ximian.com>
20654         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
20656         * debug-mono-symfile.h: Bumped symbol file version number to 37.
20658 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
20660         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
20662 2004-05-30  Jackson Harper  <jackson@ximian.com>
20664         * reflection.c: Do not hardcode assembly versions or public key
20665         tokens anymore. All of this except the corlib section was dead
20666         code anyways.
20667         
20668 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
20670         * object.c (mono_runtime_invoke_array): Automatically create boxed
20671         objects for byref valuetypes if needed. Fixes #59300.
20672         
20673         * object.c (mono_method_return_message_restore): Handle 
20674         MONO_TYPE_OBJECT as well.
20676 2004-05-28  Jackson Harper  <jackson@ximian.com>
20678         * reflection.c: The modified type encoding was causing build
20679         problems. Reverted for now.
20680         
20681 2004-05-28  Jackson Harper  <jackson@ximian.com>
20683         * reflection.c/h: Take an assembly ref so that we dont create
20684         fully qualified names when encoding types in the same assembly as
20685         the custom attribute being emitted.
20686         * appdomain.c: Increment version number.
20687         
20688 2004-05-26  Duncan Mak  <duncan@ximian.com>
20690         * icall.c
20691         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
20692         Set the full version number (major, minor, build, revision).
20694 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
20696         * marshal.c (emit_struct_conv): increment src/dst after blit
20697         (mono_marshal_get_managed_wrapper,
20698         mono_marshal_get_native_wrapper): make sure we have marshalling
20699         info before marshalling params (info computation affects
20700         blittable)
20702         * class.c (class_compute_field_layout): correctly deal with
20703         blittable
20704         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
20705         value types (as per what windows dows by default)
20706         (mono_class_setup_mono_type): System.ValueType is blittable
20707         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
20708         blittable
20710         * marshal.c (mono_marshal_load_type_info): flag types  as
20711         non-blittable if the native layout doesn't match the managed
20712         layout
20714 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20716         * appdomain.c: don't add stuff in the private search path that is
20717         above the application base. If application base is not set, there's
20718         no private search path.
20720 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
20722         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
20723         byref struct arguments in native->managed marshalling.
20725 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
20727         * marshal.c (mono_marshal_get_runtime_invoke): correctly
20728         cache methods using signature (special case for methods
20729         that are value type or string class)
20730         
20731         * image.c (mono_image_close): clean up allocated GSList's
20732         in runtime_invoke_cache.
20734 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20736         * mono-config.c: set the correct path for mono_cfg_dir on windows when
20737         there's no MONO_CFG_DIR environment variable defined.
20739 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20741         * threads.c: windows version must be >= 0x0500 to include OpenThread.
20743 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
20745         * threadpool.c: Really wait for 500ms after the async call, even if the wait
20746           is interrumped.
20747         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
20748           before waiting for it, and call CloseHandle after the wait to unref it.
20749           This will make sure that handles are not disposed too early.
20751 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20753         * appdomain.c:
20754         * appdomain.h:
20755         * icall.c: removed
20756         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
20757         needed now.
20759         * object.c: se the application_base only for the domain that runs
20760         Main. Fixes bug #59216,
20762 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20764         * appdomain.c:
20765         * object.c: only the domain in which Main is run have
20766         SetupInformation.ConfigurationFile set, so moved a few lines from
20767         appdomain.c to object.c.
20769 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20771         * appdomain.c: we tried to load [name].(dll|exe), but according
20772         to bug #57710, we must also try [culture]/[name].(dll|exe) and
20773         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
20774         There's a test case attached to bug #58922.
20776 2004-05-27  Dick Porter  <dick@ximian.com>
20778         * icall.c:
20779         * file-io.c: Implemented icalls for locking and unlocking regions
20780         in a file.
20781         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
20782         FALSE on error (fixes both compiler warning and real bug.)
20784 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
20786         * culture-info-tables.h: reflecting locale-builder updates.
20788           (Added missing ChangeLog entry for 05/26)
20790 2004-05-27  Jackson Harper  <jackson@ximian.com>
20792         * locales.c: Fix some cut and paste errors.
20793         
20794 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20796         * mono-config.c: set the correct path for config. directory on windows.
20798 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
20800         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
20801           on win32.
20803 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
20805         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
20806         from pinvoke functions.
20807         
20808         * marshal.c (mono_ftnptr_to_delegate): Implement this.
20810 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
20812         * culture-info-tables.h: reflecting locale-builder updates.
20814 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
20816         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
20817         #59086.
20819 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
20821         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
20822         * icall.c: Modified icalls for RNG.
20823         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
20824         Windows (CryptoAPI).
20826 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
20828         * locales.c: Fix build.
20830 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
20832         * culture-info-tables.h: reflecting locale-builder updates.
20834 2004-05-25  Jackson Harper  <jackson@ximian.com>
20836         * locales.c: When creating the current culture use the $LANGs
20837         specific culture. So DateTimeFormat and NumberFormat entries are created.
20838         
20839 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
20841         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
20842         a char array as parameter.
20844 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
20846         * image.c: In mono_image_open(), always use an absolute path name to
20847           look for already loaded images.
20849 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
20851         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
20852         missing in the windows build (like older cygwin include files).
20854 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
20856         * icall.c: Fixed check for possible integer overflow in Buffer_
20857         BlockCopy icall. Replaced comments style // by /* */.
20859 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
20861         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
20862         
20863         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
20864         check after MONO_VTADDR. Fixes pinvoke2.exe.
20866         * marshal.h marshal.c metadata.h: Add beginnings of support for
20867         ftnptr -> delegate marshalling.
20869 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
20871         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
20872         * threads.c: Fix warnings.
20874 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
20876         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
20877         * icall.c: Registered icalls for Suspend and Resume.
20878         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
20879           Thread.Abort.
20880         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
20881         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
20882         * process.c: Use WaitForSingleObjectEx.
20883         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
20884           checkpoints.
20885         * threads.c, threads.h: Make use of new Ex wait methods. Improved
20886           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
20887           for Suspend and Resume. Added new mono_thread_stop, used for stoping
20888           background threads. Added basic support for Abort in Windows.
20889           Start new threads using a managed delegate invoke wrapper. This wrapper
20890           has an interruption checkpoint that is needed since an interruption
20891           can be requested before the thread leaves the unmanaged code that starts 
20892           the thread.
20893         * marshal.c: Added interruption checkpoint after every native call, and
20894           also before managed calls for wrappers called from unmanaged code to
20895           go into managed code.
20896         * object.h: Added new field in MonoThread to keep track of interruption
20897           requests.
20899 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
20901         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
20902         calls.
20904 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20906         * appdomain.c:
20907         * assembly.c:
20908         * gc.c:
20909         * locales.c:
20910         * mono-config.c:
20911         * rand.c: getenv -> g_getenv (windows!)
20913         * process.c: complete_path is also used on non-windows platforms.
20915 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20917         * icall.c: new signature for Process_Start.
20919         * process.[ch]: new signature for Process_Start. If we're on windows
20920         and UseShellExecute is false, we have to search for the program by
20921         ourselves if we don't get a full path.
20923 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
20925         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
20926         marshalling and call CleanUpNativeData if needed. Fixes #58646.
20928 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20930         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
20931         Fixes bug #58373.
20933 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20935         * process.c: use double quotes to quote program name and arguments on
20936         windows. Fixes bug #58575.
20938 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20940         * file-io.c: don't return "." and ".." when using windows Find*File.
20942 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
20944         * marshal.c: Don't pass wrappers to message init because method 
20945         addressed used to lookup metadata. part of remoting[2|3] fix.
20947 2004-05-15  Jackson Harper  <jackson@ximian.com>
20949         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
20950         path is essentially the same as MONO_PATH except that it points to
20951         GACs instead of lib directories.
20952         * loader.h: The user gac is gone so we dont need function to
20953         enable/disable it.
20954         * mono-config.c: user gac option is now gone.
20955         
20956 2004-05-15  Jackson Harper  <jackson@ximian.com>
20958         * culture-info.h: Make defines more consistent, add calendar data
20959         to the culture info table.
20960         * culture-info-tables.h: Add basic calendar data. Basically
20961         everyone gets default gregorian until all the data is
20962         updated.
20963         * locales.c: Use the new consistent defines. Set calendar data for
20964         culture info objects.
20965         * object.h: add a field for calendar data to CultureInfo
20966         
20967 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
20969         * image.c: image->runtime_invoke_cache is keyed on signatures now.
20970         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
20971         a signature.
20972         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
20973         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
20974         an extra param that is the pointer of the method to invoke. The IL for
20975         the invoke method is no longer specific to the method, but to the
20976         signature of the method. Thus, we can share the same code for multiple
20977         methods. This reduces the number of methods that have to be compiled.
20979 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
20981         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
20983         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20985         * icall.c: Optimize Buffer.BlockCopy.
20987 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20989         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
20990         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
20991         quote). Changed them to "MMMM yyyy".
20993 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
20995         * rand.c
20996         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
20998 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
21000         * reflection.h: Updated after changes to managed structures.
21002         * appdomain.c: Bump corlib version.
21004 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21006         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
21007         windows.
21009 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21011         * Makefile.am: link to ../os/libmonoos.la on windows.
21013         * assembly.c:
21014                 -If MONO_DEBUG, warn about non-existing directories in
21015                 MONO_PATH.
21016                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
21017                 compile time variable.
21018                 -Removed init_default_path and call mono_set_rootdir from
21019                 libmonoos.a instead (windows only).
21021         * assembly.h: declare mono_assembly_getrootdir().
21023         * domain.c:
21024         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
21026         * loader.c: s/getenv/g_getenv/
21028 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
21030         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
21032         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
21034         * metadata.h: Add new marshalling conversions.
21036         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
21037         function.
21039         * reflection.c (mono_reflection_get_type): Lookup the type in all
21040         modules of a multi-module assembly. Fixes #58291.
21042 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
21044         * threads.c: Before aborting a background, set the StopRequested
21045         state.  This avoids throwing the Abort exception.
21046         In mono_thread_manage, don't continue with the shutdown until all
21047         aborted threads have actually stopped.
21049 2004-05-10  Jackson Harper  <jackson@ximian.com>
21051         * locales.c: Remove the modifier from culture names.
21052         
21053 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21055         * Makefile.am: monosn is not installed any more. It has been deprecated
21056         in favor of sn.
21058 2004-05-07  Jackson Harper  <jackson@ximian.com>
21060         * locales.c
21061         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
21062         Fix array construction, add bailout if the length is 0.
21064 2004-05-07  Dick Porter  <dick@ximian.com>
21066         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
21067         machine doesn't have a DNS entry.  Patch by Urs Muff
21068         (umuff@quark.com), fixes bug 57928.
21070 2004-05-06  Jackson Harper  <jackson@ximian.com>
21072         * reflection.c: Handle null PublicTokens properly. alloc mem for
21073         assembly names culture so we dont crash when freeing it.
21074         
21075 2004-05-06  Jackson Harper  <jackson@ximian.com>
21077         * assembly.c: Check the usergac when loading with partial names.
21078         
21079 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
21081         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
21082         does nothing for now (not required for Linux/Windows) but the class
21083         library can call it (and a newer or modified runtime could need it).
21084         * icall.c: Registred icall.
21086 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21088         * loader.c: prints a message on module loading error we set MONO_DEBUG
21089         environment variable.
21091 2004-05-05  Jackson Harper  <jackson@ximian.com>
21093         * appdomain.c: Handle PublicKeyToken=null properly.
21094         
21095 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
21097         * environment.c|h: Added icall ves_icall_System_Environment_
21098         GetOSVersionString to get the current OS version as a string.
21099         * icall.c: Registred icall.
21101 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
21103         * object.c: in mono_object_get_virtual_method(), take into account that
21104         non-virtual methods don't have a slot in the vtable. Check needed when
21105         the object is a proxy.
21107 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
21109         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
21110         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
21112         * object.c (mono_class_compute_gc_descriptor): Fix warning.
21114         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
21115         passed when a valuetype is expected.
21117         * object.c (mono_unhandled_exception): Only set the exit code if the
21118         exception happens in the main thread. Fixes thread5.exe.
21120         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
21121         invalid names. Fixes #58047.
21123 2004-05-03  Jackson Harper  <jackson@ximian.com>
21125         * assembly.c: This line was committed accidently and is unneeded.
21126         
21127 2004-05-03  Jackson Harper  <jackson@ximian.com>
21129         * icall.c: Add new icall for Assembly::LoadWithPartialName
21130         * assembly.c/.h: new function that probes the GAC to load partial
21131         assembly names by Paolo Molaro.
21132         
21133 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21135         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
21136         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
21137         (type_get_fully_qualified_name): Added PublicKeyToken when building a
21138         full type name.
21140 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21142         * appdomain.c: fixed check for 'neutral' culture and removed warning.
21143         * reflection.c: fix bug when parsing a full type name and Version is not
21144         the last thing in the string.
21146 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
21148         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
21149         crashes when it is freed.
21151 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21153         * assembly.c: print the compat warning to stderr.
21155 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
21157         * assembly.c (mono_assembly_load_references): Add a compatibility
21158         hack to run old applications that might be still referencing the
21159         3300-based assemblies, only do this for System.xxx.
21161 2004-05-01  Jackson Harper  <jackson@ximian.com>
21163         * appdomain.c: If the culture is neutral we set it to "".
21164         
21165 2004-04-29  Jackson Harper  <jackson@ximian.com>
21167         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
21169 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
21171         * string-icalls.c: added low overhead function for copying chars
21172         * icall.c: added needed icall for the above function
21174 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21176         * icall.c: fix return value of get_global_assembly_cache.  Implemented
21177         Environment.GetLogicalDrives.
21179 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
21181         * rand.c: try and talk to egd or prngd
21182         for random bytes if opening devices fail.
21184 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
21186         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
21187         alignment for the type using the native alignment of its members 
21188         instead of using klass->min_align.
21190         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
21192 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21194         * file-io.c:
21195         * socket-io.c: added check for sys/aio.h.
21197 2004-04-28  Dick Porter  <dick@ximian.com>
21199         * threads.c: Don't abort a thread thats already aborting, when
21200         terminating everything.
21202 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21204         * icall.c: added 2 new async calls for Socket.
21206         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
21207         IO on *nix systems.
21209         * threadpool.c: removed unused variable.
21211 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
21213         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
21215 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
21217         * locales.c: put back string_invariant_tolower () and
21218         string_invariant_toupper ().
21220 2004-04-26 David Waite <mass@akuma.org>
21222         * file-io.h:
21223         * socket-io.h:
21224         * threads.h:
21225         * unicode.h: remove comma from end of enumeration declarations
21227 2004-04-26 David Waite <mass@akuma.org>
21229         * debug-mono-symfile.h:
21230         * decimal.c:
21231         * mono_debug.h:
21232         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
21235 2004-04-26  Jackson Harper  <jackson@ximian.com>
21237         * appdomain.c: Increment version number.
21238         
21239 2004-04-26  Jackson Harper  <jackson@ximian.com>
21241         * appdomain.c: Set assembly references public token value when
21242         PublicKeyToken is specified, not the hash_value. Free public token
21243         values when free assembly name data. Previously the public key
21244         token was hex decoded, however we are using hex encoded public key
21245         tokens, so this is not neccasary.
21246         * assembly.c: Lookup assemblies in the gac if their public token
21247         value is set. Add function to allow enabling user gac
21248         lookups. Specify whether or not the assembly was loaded from the
21249         GAC. Compare full assembly names when checking the cache for
21250         assemblies (Temporarily disabled see comment in code). Remove
21251         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
21252         specifies trace-loader they get extra info to stdout on the
21253         loading of assemblies.
21254         * image.h: Add a field for an assembly references public token
21255         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
21256         whether an assembly has been loaded from the GAC.
21257         * image.c: Remove a corlib -> mscorlib name mapping.
21258         * loader.h: Add function to enable/disable the user gac.
21259         * mono-config.c: Check if the usergac is enabled in the config
21260         file.
21261         * icall.c: New icall to determine whether or not an assembly has
21262         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
21263         * tabldefs.h: Add constant for assemblyref flag that specifies a
21264         full public key is used instead of a public token.
21265         * reflection.c: Remove mscorlib -> corlib mappings. Set
21266         PublicTokenValue instead of hash value. This value is a hex
21267         string so it does not need to be expanded.
21269 2004-04-26  Martin Baulig  <martin@ximian.com>
21271         * mono-debug-debugger.c (mono_debugger_initialize): Set
21272         `mono_debugger_initialized' before calling mono_debug_lock().
21274 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
21276         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
21277           InternalToUpper/InternalToLower.
21278         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
21279           removed invariant culture shortcut.  This is now done in managed code.
21280         * locales.c: (string_invariant_toupper/tolower) removed.
21282 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21284         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
21285         Added Poll internal call.
21287         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
21288         call for Poll. Select was too heavy for polling a single socket.
21290         * threadpool.[ch]: added mono_threadpool_cleanup.
21291         * threads.c: use it. Don't use Thread_Abort on windows.
21293 2004-04-23  Martin Baulig  <martin@ximian.com>
21295         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
21297 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
21299         * icall.c: Registred new icalls for key pair protection and added an
21300         icall for Environment.GetFolderPath on Windows.
21301         * security.c|h: Added new icalls for key pair protection.
21303 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21305         * socket-io.c: don't display the non-supported family warning for known
21306         families. Now this is not displayed on windows when checking support
21307         for IPv4/IPv6.
21309 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21311         * class.c: don't display the layout warning for static fields.
21313 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
21315         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
21316         * locales.c, locales.h: Added new icalls for culture-specific
21317         Char.ToLower and Char.ToUpper.
21319 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21321         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
21322         by David Waite.
21324 2004-04-20  Martin Baulig  <martin@ximian.com>
21326         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
21327         of the type name before passing it to mono_reflection_type_from_name().
21329 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
21331         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
21332         encodings here. Fixes #56965.
21334 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
21336         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
21337         fix test on strstr result not that I can see anything that
21338         relies on the result.
21340 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
21342         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
21343         Fixes #57081.
21345         * marshal.c (mono_marshal_get_string_encoding): New helper function.
21347         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
21348         function to determine which marshalling to use for strings. Fixes
21349         #56965.
21351         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
21353         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
21355 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
21357         * icall.c: #include mono-config.h
21359 2004-04-15  Jackson Harper  <jackson@ximian.com>
21361         * culture-info-tables.h: Fix date formats for en-US culture.
21362         
21363 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
21365         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
21366         ThreadPool.SetMinThreads.
21367         * threadpool.c: Implemented ThreadPool.GetMinThreads and
21368         ThreadPool.SetMinThreads.
21370 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
21372         * mono-config.c: also load the .config file in the directory
21373         where the assembly was found.
21375 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
21377         * assembly.c: load per-assembly config files.
21378         * icall.c: decrapified code to get the config dir and moved to
21379         mono-config.c.
21380         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
21381         per-assembly config files. When doing a dll map lookup give precedence
21382         to the per-assembly data.
21384 2004-04-14  Martin Baulig  <martin@ximian.com>
21386         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
21387         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
21388         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
21390         * mono-debugger-debugger.c: While the debugger is locked, remember
21391         whether the symbol tables have changes and send one single
21392         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
21394 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
21396         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
21398         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
21399         function.
21401         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
21402         account when marshalling string arrays. Fixes #56965.
21404 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
21406         * icall.c: Add new icalls mapping for security.
21407         * security.c|h: Add internal calls for WindowsIdentity,
21408         WindowsImpersonationContext and WindowsPrincipal.
21410 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
21412         * class.c: Added comment to ensure the System.MonoDummy class
21413         is removed when no longer necessary
21415 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
21417         * appdomain.c: Pass arguments to the bootstraping exceptions to
21418         minimize JITed methods at boot
21420         * metadata.c (mono_exception_from_name_two_strings): Allow for the
21421         second string to be null.
21423         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
21424         Change the protocol to minimize the JIT methods at startup.  Now
21425         it Returns the internal codepage, if the value of "int_code_page"
21426         is 1 at entry, and we can not compute a suitable code page
21427         number, returns the code page as a string.
21429 2004-04-13  Jackson Harper  <jackson@ximian.com>
21431         * culture-info-tables.h: Fix number of decimal digits for all
21432         english locales.
21434 2004-04-13  Jackson Harper  <jackson@ximian.com>
21436         * icall.c: Clairfy out of sync error message. It is not always
21437         your corlib that is out of sync.
21439 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
21441         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
21442         properties when only the set accessor is overriden. Fixes #55874.
21444 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
21446         * assembly.c (mono_assembly_load_references): Make this thread safe.
21447         Fixes #56327.
21449 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
21451         * monosn.c: Add missing initialization calls.
21453 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
21455         * locales.c:
21456         ves_icall_System_Globalization_CultureInfo_construct_number_format
21457         Fix g_assert so it compiles on fussier compilers re int/ptr
21458         mismatch
21460 2004-04-08  Dick Porter  <dick@ximian.com>
21462         * socket-io.h:
21463         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
21464         53992.  Also rearrange the code so that the internal calls return
21465         an error value and exceptions are thrown from managed code.
21467         * icall.c: Add type info to the socket icalls.
21469 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21471         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
21472         owes me a beer.
21474 2004-04-07  Martin Baulig  <martin@ximian.com>
21476         * class.c (mono_class_from_generic_parameter): Don't default
21477         `klass->parent' to `mono_defaults.object_type'.
21479 2004-04-07  Martin Baulig  <martin@ximian.com>
21481         * reflection.c (mono_reflection_initialize_generic_parameter): Set
21482         `param->pklass->reflection_info'.       
21484 2004-04-07  Jackson Harper  <jackson@ximian.com>
21486         * culture-info-tables.h: Fix date separator symbol.
21487         
21488 2004-04-07  Martin Baulig  <martin@ximian.com>
21490         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
21491         from System.Type to System.MonoType.
21493 2004-04-07  Martin Baulig  <martin@ximian.com>
21495         * reflection.h
21496         (MonoReflectionGenericParam): Added `has_reference_type' and
21497         `has_value_type' fields.
21499         * reflection.c (mono_image_get_generic_param_info): Encode the
21500         correct flags if we have the `class' or `struct' constraint.
21502 2004-04-07  Martin Baulig  <martin@ximian.com>
21504         * reflection.h
21505         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
21507 2004-04-07  Jackson Harper  <jackson@ximian.com>
21509         * appdomain.c: Revert extra patches, just wanted to bump the
21510         version number.
21511         
21512 2004-04-07  Jackson Harper  <jackson@ximian.com>
21514         * Makefile.am: Add culture-info private headers.
21515         * icall.c: Add new icalls for contructing locales.
21516         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
21517         * locales.h: Declare new culture info construction methods.
21518         * object.h: Add new fields used to avoid the CultureMap to
21519         MonoCultureInfo.
21520         * culture-info.h: Definition of structs used in the culture info
21521         tables.
21522         * culture-info-tables.h: Autogenerated tables that contain culture
21523         info data. This file was generated with the locale-builder tool.
21524         * appdomain.c: Incement corlib version number.
21525         
21526 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
21528         * appdomain.c: (mono_runtime_init) move mono_thread_init
21529         to before mono_object_new calls so critical sections
21530         are initialized before use.
21532 2004-04-07  Martin Baulig  <martin@ximian.com>
21534         * icall.c
21535         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
21536         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
21537         (ves_icall_MonoGenericParam_initialize): Removed.
21538         (monogenericparam_icalls): Removed.
21539         (generictypeparambuilder_icalls): Added new table for
21540         System.Reflection.Emit.GenericTypeParameterBuilder.
21542         * reflection.c
21543         (mono_reflection_define_generic_parameter): Removed.
21544         (mono_reflection_initialize_generic_parameter): This is now called
21545         from GenericTypeParameterBuilder's .ctor.
21547 2004-04-06  Martin Baulig  <martin@ximian.com>
21549         * class.c (mono_class_init): Don't inflate nested classes in a
21550         generic instance.
21551         (mono_type_get_name_recurse): Include the generic arguments for
21552         generic instances and generic type declarations.
21553         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
21554         (_mono_class_get_instantiation_name): Removed.
21555         (mono_class_create_generic): Always use `gklass->name' as our name.
21557         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
21559         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
21560         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
21561         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
21562         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
21563         closed generic methods here.
21565         * reflection.c
21566         (mono_reflection_generic_inst_get_nested_types): Removed.
21567         (inflate_mono_method): Copy the generic parameters from the
21568         MonoMethodHeader into out MonoGenericMethod.
21570 2004-04-06  Martin Baulig  <martin@ximian.com>
21572         * row-indexes.h
21573         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
21575         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
21577         * reflection.c (build_compressed_metadata): If we have any entries
21578         in the GenericParam, MethodSpec or GenericParamConstraint tables,
21579         set the header version to 1.1.
21581 2004-04-06  Martin Baulig  <martin@ximian.com>
21583         * class.c (mono_class_init): If we're a generic instance,
21584         initialize our nested classes, too.
21585         (_mono_class_get_instantiation_name): Deal with the new `!%d'
21586         suffix. 
21588 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21590         * process.c: quote the argument passed to the shell on windows.
21592 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
21594         * threads.c (mono_alloc_special_static_data): Allow this to be
21595         called during startup.
21597 2004-04-02  Martin Baulig  <martin@ximian.com>
21599         * icall.c
21600         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
21602 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
21604         * icall.c: Fix build.
21606 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
21608         * Makefile.am: Added security.c|h.
21609         * icall.c: Added icall for get_UserName;
21610         * security.c: New file for security related icalls. Added function
21611         get_UserName for System.Environment (fix #56144).
21612         * security.h: New. Header file for security.c
21614 2004-04-02  Dick Porter  <dick@ximian.com>
21616         * icall.c: Deleted the icalls that were obsoleted some time ago
21617         by the ICU string code, and which were mixed into the icall
21618         rearranging.  Fixes bug 55969.
21620         * string-icalls.h: 
21621         * string-icalls.c: Deleted the code that those icalls reference.
21623 2004-04-01  Martin Baulig  <martin@ximian.com>
21625         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
21627         * class.c (mono_class_from_generic_parameter): Don't set 
21628         TYPE_ATTRIBUTE_INTERFACE.
21629         (my_mono_class_from_generic_parameter): Likewise.
21631 2004-04-01  Martin Baulig  <martin@ximian.com>
21633         * loader.c (find_method): Added an optional `MonoClass *ic'
21634         argument to search in a specific interface.
21635         (mono_get_method_constrained): New public function.
21637 2004-04-01  Martin Baulig  <martin@ximian.com>
21639         * reflection.c (mono_image_get_generic_field_token): Use the
21640         `handleref' cache here.
21642 2004-04-01  Martin Baulig  <martin@ximian.com>
21644         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
21646         * reflection.c (create_generic_typespec): Use the `typespec' hash
21647         here, not the `typeref' one.    
21649 2004-04-01  Martin Baulig  <martin@ximian.com>
21651         * class.c (mono_class_inflate_generic_type): Moved the
21652         functionality into a new static inflate_generic_type() which
21653         returns NULL if it didn't do anything.  Only increment the
21654         `mono_stats.inflated_type_count' if we actually inflated
21655         something.
21656         (mono_class_get_full): Check the classes type to see whether we
21657         need to inflate it; also inflate MONO_TYPE_(M)VAR.
21659 2004-04-01  Jackson Harper  <jackson@ximian.com>
21661         * reflection.c: Set culture for assembly references.
21662         
21663 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
21665         * reflection.[ch], icall.[ch], Fix support for pinning variables.
21667 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21669         * assembly.c:
21670         (do_mono_assembly_open): the critical section also covers
21671         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
21673 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21675         * threads.c:
21676         (mono_manage_threads): abort the background threads when finishing.
21677         Fixes bug #47232.
21679 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21681         * gc.c: only close the done_event handle if there was no timeout.
21682         C-ified comments.
21684 2004-03-30  Martin Baulig  <martin@ximian.com>
21686         * icall.c (icall_entries): It's called "System.Activator", not
21687         "System.Activation".    
21689 2004-03-30  Martin Baulig  <martin@ximian.com>
21691         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
21692         (mono_class_create_from_typespec): Likewise.
21694 2004-03-30  Martin Baulig  <martin@ximian.com>
21696         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
21697         `has_ctor_constraint' and `initialized'.
21699 2004-03-30  Martin Baulig  <martin@ximian.com>
21701         * reflection.c (encode_new_constraint): New static function to add
21702         the constructor constraint attribute to a type parameter.
21703         (encode_constraints): Call encode_new_constraint() if necessary.
21705         * reflection.h
21706         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
21708         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
21709         
21710 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
21712         * reflection.c, icall.c: add support for pinning variables. 
21714 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
21716         * marshal.c (mono_marshal_get_managed_wrapper):
21717         init bool local with zero rather than null.
21719 2004-03-29  Martin Baulig  <martin@ximian.com>
21721         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
21722         the "official" behavior here.
21723         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
21725 2004-03-29  Martin Baulig  <martin@ximian.com>
21727         * icall.c: Reflect latest API changes.
21729 2004-03-29  Martin Baulig  <martin@ximian.com>
21731         * loader.c (mono_get_method_from_token): Also call
21732         mono_metadata_load_generic_params () for abstract and interface
21733         methods; replace the type arguments in the method signature with
21734         the ones which are loaded from the metadata.
21736 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
21738         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
21739         of the lock is not the current thread. MS.NET don't do it, in spite of
21740         what the documentation says. See bug #56157.
21742 2004-03-28  Martin Baulig  <martin@ximian.com>
21744         * class.c (mono_class_init): Don't call init_properties() and
21745         init_events() for generic instances; set `prop->parent' when
21746         inflating properties.
21748         * reflection.c (mono_generic_inst_get_object): Call
21749         `mono_class_init (ginst->klass)'.
21750         (mono_type_get_object): Only create a MonoGenericInst if your
21751         generic type is a TypeBuilder.
21752         (do_mono_reflection_bind_generic_parameters): Only set
21753         `ginst->is_dynamic' if our generic type is a TypeBuilder.
21755 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
21757         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
21758         Fixes #56091.
21760 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21762         * icall.c: added Kill_internal icall.
21763         * process.[ch]: added Kill_internal icall.
21765 2004-03-25  Martin Baulig  <martin@ximian.com>
21767         * class.h (MonoStats): Added `generic_instance_count',
21768         `inflated_method_count', `inflated_type_count' and
21769         `generics_metadata_size'.       
21771 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21773         * reflection.c: no warnings now.
21775 2004-03-25  Martin Baulig  <martin@ximian.com>
21777         * class.c (mono_class_get_full): New public function; does a
21778         mono_class_get(), but also takes a `MonoGenericContext *'.
21780         * loader.c (mono_field_from_memberref): Renamed to
21781         `field_from_memberref', made static and added `MonoGenericContext *'
21782         argument.
21783         (mono_field_from_token): Added `MonoGenericInst *' argument.
21784         (method_from_memberef): Likewise.
21785         (mono_get_method_from_token): Likewise.
21786         (mono_get_method_full): New public function; does a
21787         mono_get_method(), but also takes a `MonoGenericContext *'.
21789         * verify.c (mono_method_verify): Get the method's generic context
21790         and pass it to mono_field_from_token(), mono_get_method_full() and
21791         mono_class_get_full().
21793 2004-03-25  Martin Baulig  <martin@ximian.com>
21795         * class.c (mono_class_inflate_generic_type): Take a
21796         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
21797         `MonoGenericMethod *'.
21799 2004-03-25  Martin Baulig  <martin@ximian.com>
21801         * loader.h (MonoMethodInflated): Store the MonoGenericContext
21802         instead of the MonoGenericMethod here.
21804 2004-03-25  Martin Baulig  <martin@ximian.com>
21806         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
21807         each time we create a new MonoGenericInst, we also create a new
21808         context which points back to us.
21810         * class.c (inflate_method): Use `ginst->context' instead of
21811         creating a new context.
21813         * loader.c (method_from_memberref): Use
21814         `klass->generic_inst->context' instead of creating a new context.
21816 2004-03-25  Martin Baulig  <martin@ximian.com>
21818         * class.h (MonoGenericContext): New struct.
21819         (MonoGenericMethod): Removed `generic_inst'.
21821         * class.c (mono_class_inflate_generic_method): Take a
21822         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
21824 2004-03-25  Martin Baulig  <martin@ximian.com>
21826         * loader.h (MonoMethodInflated): New typedef.
21828         * metadata.h (MonoMethodSignature): Removed `gen_method', make
21829         `generic_param_count' consume just 30 bits, added `is_inflated'
21830         and `has_type_parameters' flags (one bit each).
21832         * class.c (mono_class_inflate_generic_method): Create a
21833         MonoMethodInflated instead of a MonoMethodNormal and set
21834         `is_inflated' in the method signature.
21836         * class.h (MonoGenericMethod): Removed `generic_method'.
21838 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
21840         * image.c: Make sure the name of a MonoImage is always an absolute path.
21841           This fixes bug #54415.
21843 2004-03-24  Martin Baulig  <martin@ximian.com>
21845         * class.c (mono_class_setup_vtable): If we're a generic instance,
21846         use our generic type's vtable size.
21848 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
21850         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
21851         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
21852         problems.
21854 2004-03-23  Martin Baulig  <martin@ximian.com>
21856         * class.h (MonoDynamicGenericInst): Added `int count_events' and
21857         `MonoEvent *events'.
21859         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
21860         (typebuilder_icalls): Added "get_event_info"; calls
21861         mono_reflection_event_builder_get_event_info(). 
21863         * reflection.c (mono_reflection_generic_inst_initialize): Added
21864         `MonoArray *events'.
21865         (mono_reflection_event_builder_get_event_info): New function.
21867 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
21869         * object.h: add mono_type_initialization_init
21871         * object.c (mono_runtime_class_init): 
21872         implement class constructor synchronization rules
21873         to cope with threading issues.  
21874         add mono_type_initialization_init
21876         * appdomain.c (mono_runtime_init): call 
21877         mono_type_initialization_init
21879         * class.h: removing initializing field from MonoVTable
21881 2004-03-23  Martin Baulig  <martin@ximian.com>
21883         * class.c (my_mono_class_from_generic_parameter): Use
21884         `param->name' if it's not NULL. 
21886 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
21888         * class.c: do not insert non-virtual methods in the vtable.
21889         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
21890         that means the method is non-virtual. This never would have
21891         happened before.
21893 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
21895         * profiler.c: Added lock for accessing coverage_hash.
21897 2004-03-22  Martin Baulig  <martin@ximian.com>
21899         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
21900         `method->method->signature->generic_param_count != 0' to make it
21901         work for interface methods.
21903 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21905         * process.c: quote the string passed to the shell using g_shell_quote.
21907 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21909         * threads.c:
21910         (mono_threads_manage): don't remove the finalizer thread and self
21911         from the threads hash table so that mono_thread_manage can be called
21912         more than once.
21914 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21916         * process.c: quote the arguments when UseShellExecute is true. Fixes
21917         bug #55790.
21919 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21921         * threads.c: set mono_thread_detach as a cleanup routine for every
21922         thread. This way it's always executed upon thread termination, either
21923         aborted or finished normally. No more xsp hangs!
21925 2004-03-17  Martin Baulig  <martin@ximian.com>
21927         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
21928         `int count_nested' and a `MonoType **nested'.
21930         * reflection.c (mono_reflection_bind_generic_parameters): Moved
21931         most of the functionality into a new static
21932         do_mono_reflection_bind_generic_parameters() and don't take a
21933         `MonoType *nested_in' argument any more.  Don't compute nested
21934         types here.
21935         (mono_reflection_generic_inst_get_nested_types): New public method
21936         to get nested types.
21938         * class.c (mono_class_create_generic): Set `klass->nested_in' if
21939         we're a nested class.
21941         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
21942         mono_reflection_generic_inst_get_nested_types() to compute the
21943         nested types.
21945 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
21947         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
21948         descriptive error message under windows.
21949         
21950 2004-03-17  Martin Baulig  <martin@ximian.com>
21952         * class.c (dup_type): Added `const MonoType *original' argument;
21953         copy the attrs from the original type.
21955 2004-03-17  Martin Baulig  <martin@ximian.com>
21957         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
21958         `m->generic_inst_cache' here.
21960 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
21962         * exception.h exception.c: Add stack_overflow_exception.
21964 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21966         * threadpool.c:
21967         (overlapped_callback): call SetEvent *after* invoking the callback.
21968         No need to call CloseHandle.
21970 2004-03-16  Martin Baulig  <martin@ximian.com>
21972         * reflection.c (mono_image_get_fieldref_token): Take a
21973         `MonoReflectionField *' instead of a `MonoClassField *' and a
21974         `MonoClass *'; store the `MonoReflectionField *' in the hash.
21976 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21978         * appdomain.c: don't add the culture to the filename we're looking for
21979         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
21981 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21983         * locales.c: don't ignore symbols when doing case insensitive compares.
21984         Thanks Dick! Fixes bug #54046.
21986         * threads.c: surround 'threads' usage with enter/leave in
21987         mono_thread_manage.
21989 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
21991         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
21992         implicitly marshalled as [Out]. Fixes #55450.
21994         (mono_marshal_get_runtime_invoke): Zero out the result if there is
21995         an exception.
21997 2004-03-16  Martin Baulig  <martin@ximian.com>
21999         * class.c (mono_class_from_generic_parameter): Use the actual
22000         parameter name. 
22002 2004-03-16  Martin Baulig  <martin@ximian.com>
22004         * reflection.c (type_get_signature_size): New static function.
22005         Compues the size of the type in a method signature.
22006         (method_get_signature_size): New static function; calls
22007         type_get_signature_size() to compute the actual size of the
22008         method's signature.
22009         (method_encode_signature): Use method_get_signature_size() to get
22010         the signature's size rather than using `nparams * 10'.
22012 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22014         * file-io.h: define here WapiOverlapped on windows. I don't want the
22015         regular OVERLAPPED one.
22017         * file-io.c:
22018         * threadpool.c: somehow, BindIoCompletionCallback is not found.
22019         Disabling AIO on windows.
22021 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22023         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
22024         bug #55385.
22026 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22028         * appdomain.c: upgraded corlib version.
22030         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
22031         and BeginWrite. Allow opening files for asynchrnous operations.
22033         * file-io.h: new struct that maps FileStreamAsyncResult.
22034         * icall.c: added new icalls.
22035         * process.[ch]: support setting child process environment variables
22036         and use the SHELL or COMSPEC when UseShellExecute is true.
22038         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
22039         callback for async. IO is here and also BindHandle.
22041         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
22042         from here.
22044 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
22046         * reflection.c (create_custom_attr): Allow len == 0.
22048         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
22049         computation on big-endian machines.
22051 2004-03-13  Martin Baulig  <martin@ximian.com>
22053         * class.h (MonoGenericInst): Added `int count_ifaces'.
22055         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
22056         `ginst->count_ifaces' instead `klass->interface_count' since we
22057         may get called before the vtable is created.
22059         * loader.c (mono_method_get_param_names): If we're a generic
22060         instance, return and don't initialize the class.
22062         * reflection.c (mono_reflection_setup_generic_class): Don't call
22063         ensure_runtime_vtable().
22064         (mono_reflection_bind_generic_parameters): Set
22065         `ginst->count_ifaces'.
22067 2004-03-11  Jackson Harper <jackson@ximian.com>
22069         * icall.c:
22070         * unicode.c:
22071         * unicode.h: Remove unused System.Char icalls.
22072         
22073 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
22075         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
22076         code when we P/Invoke the first library in Windows.Forms, instead
22077         of when we first open the assembly.
22079         * assembly.c: Drop the lookup from here.
22081 2004-03-10  Martin Baulig  <martin@ximian.com>
22083         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
22084         class for properties, fields and events.  Finally fixes #54945.
22086 2004-03-10  Martin Baulig  <martin@ximian.com>
22088         * metadata.c (mono_metadata_class_equal): New static function;
22089         checks whether two generic instances or two generic parameters are
22090         equal.
22091         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
22092         compare classes.        
22094 2004-03-10  Martin Baulig  <martin@ximian.com>
22096         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
22098         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
22099         argument and write it into the `reflection_info' field.
22101         * icall.c
22102         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
22103         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
22105 2004-03-09  Jackson Harper  <jackson@ximian.com>
22107         * char-conversions.h: use 8 bits for numeric data its all we need
22108         * icall.c: numeric data is only 8 bits now.
22110 2004-03-09  Martin Baulig  <martin@ximian.com>
22112         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
22114         * class.c (init_properties, init_events): Initialize the new
22115         `parent' field.
22117         * reflection.c (typebuilder_setup_properties): Likewise.
22118         (typebuilder_setup_events): Likewise.
22120         * reflection.h (MonoEventInfo): Replaced `parent with
22121         `declaring_type' and `reflected_type'.
22123         * icall.c (ves_icall_get_property_info): Distinguish between
22124         declaring and reflected type.
22125         (ves_icall_get_event_info): Likewise.
22127 2004-03-09  Martin Baulig  <martin@ximian.com>
22129         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
22130         (ves_icall_Type_GetField): Correctly set field->klass.
22132 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
22134         * loader.h: Fix warning.
22136 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
22138         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
22139         library routine if present.  Notice that it will still continue
22140         executing even if its missing, for those working on the Gtk#
22141         edition of Windows.Forms.
22143         * assembly.c (do_mono_assembly_open): If loading the
22144         System.Windows.Forms call mono_loader_wini_init.
22146 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
22148         * class.h: Added MonoRemoteClass struct.
22149         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
22150         function for MonoStrings.
22151         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
22152         Added internal call for getting the proxy type.
22153         * marshal.c: Get the type of transparent proxies from its remote_class.
22154         Added methods that generate the IL for type checks and casts:
22155         mono_marshal_get_isinst, mono_marshal_get_castclass, 
22156         mono_marshal_get_proxy_cancast.
22157         * marshal.h: Declaration of the previous new methods.
22158         * object.c: Added new moethods for creating and updating MonoRemoteClass
22159         instances: mono_remote_class, mono_upgrade_remote_class, 
22160         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
22161         * verify.c: FIx transparent_proxy_fields layout.
22162         * appdomain.c: Bump corlib version.
22164 2004-03-04  Jackson Harper  <jackson@ximian.com>
22166         * icall.c: Add icall to access char conversion tables.
22167         * char-conversions.h: Character conversion tables.
22168         * Makefile.am: Add char-conversions.h private header file.
22169         
22170 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
22172         * appdomain.c (unload_thread_main): Increase unloading timeout to
22173         10 sec as a temporary workaround for Nant problems.
22175 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
22177         * gc.c: Add checks for GC_enable and GC_disable.
22179         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
22180         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
22181         (bug #54988).
22182         
22183 2004-02-27  Martin Baulig  <martin@ximian.com>
22185         * reflection.c (mono_reflection_bind_generic_parameters): Take a
22186         `MonoReflectionType *' instead of a `MonoType *'.
22188 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
22190         * gc.c (run_finalize): Avoid finalizing the object representing the
22191         finalizer thread.
22192         (finalizer_thread): Fix warning.
22194 2004-02-25  Martin Baulig  <martin@ximian.com>
22196         * class.c (_mono_class_get_instantiation_name): Added `int offset'
22197         argument for nested types.
22198         (mono_class_create_generic): Added support for nested generictypes.
22200         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
22201         `GList *nested'.
22203         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
22205         * reflection.c (method_encode_signature): Increase the minimum
22206         value of `size' from 10 to 11.
22207         (mono_reflection_bind_generic_parameters): Take `int type_argc'
22208         and `MonoType **types' arguments instead of the `MonoArray
22209         *types'; added `MonoType *nested_in'.  Recursively instantiate
22210         nested classes. 
22212 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
22214         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
22215         stack_overflow_ex members which are used by exception handling.
22217         * appdomain.c (mono_runtime_init): Initialize the new members.
22219         * gc.c (mono_gc_enable): New helper function.
22220         * gc.c (mono_gc_disable): New helper function.
22222 2004-02-23  Martin Baulig  <martin@ximian.com>
22224         * icall.c: I must have been really stupid - make it actually work
22225         this time ;-)
22227 2004-02-23  Martin Baulig  <martin@ximian.com>
22229         * loader.c (method_from_memberref): Only inflate the method if
22230         it's in another klass.
22232 2004-02-23  Martin Baulig  <martin@ximian.com>
22234         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
22235         (mono_class_init): If we're a generic instance and an interface,
22236         compute `class->interface_id'; also create `class->interfaces'
22237         here and inflate them.
22239         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
22240         `ginst->is_open'.
22241         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
22243         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
22245 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
22247         * reflection.c (method_encode_code): Improved the error message
22248         generated by the exception.
22250 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22252         * icall.c: Martin did not do what he said in the ChangeLog for
22253         2004-02-18, but put back the changes for properties and events.
22254         Commenting those changes out again and adding comment to bug #54518.
22255         
22256         * process.c: removed warning.
22258 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
22260         * marshal.c (emit_struct_conv): Print an error message instead of
22261         asserting when a type does not have the StructLayout attribute.
22263 2004-02-20  Martin Baulig  <martin@ximian.com>
22265         * reflection.c (mono_type_get_object): Also use the cache for
22266         generic instances.
22267         (mono_reflection_bind_generic_parameters): Always compute
22268         `ginst->ifaces'.        
22270 2004-02-20  Martin Baulig  <martin@ximian.com>
22272         * class.h (MonoGenericMethod): Removed `klass'.
22274         * class.c (mono_class_inflate_generic_method): Added `MonoClass
22275         *klass' argument.
22277 2004-02-20  Martin Baulig  <martin@ximian.com>
22279         * reflection.c (method_encode_methodspec): Actually use the
22280         uninflated signature for the memberref.
22282 2004-02-20  Martin Baulig  <martin@ximian.com>
22284         * class.h (MonoGenericMethod): Removed `declaring'.
22286         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
22287         is NULL, compute it here.
22289 2004-02-20  Martin Baulig  <martin@ximian.com>
22291         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
22293         * metadata.c (mono_metadata_generic_inst_hash): New method.
22294         (mono_metadata_generic_inst_equal): New method.
22296         * reflection.c (mono_reflection_bind_generic_parameters): Use the
22297         `klass->image->generic_inst_cache' cache to avoid creating
22298         duplicate MonoGenericInst's.
22300         * class.c (mono_class_inflate_generic_type): Use the cache.
22302 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
22304         * object.c: fixed gc descriptor calculation for embedded valuetypes.
22306 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22308         * icall.c: added Socket.WSAIoctl icall.
22310         * socket-io.[ch]: implemented
22311         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
22313 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
22315         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
22317 2004-02-18  Urs C Muff  <umuff@quark.com>
22319         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
22320         this work on PPC and other big-endian architectures.
22322         * debug-mono-symfile.h: Prepended the names of all the `guint32'
22323         fields with an underscore to make sure they're only accessed by
22324         the read32() macro.
22326 2004-02-18  Martin Baulig  <martin@ximian.com>
22328         * icall.c: Put the klass->refclass changes back for methods and
22329         fields, but not for properties and events.  We're currently not
22330         distinguishing between DeclaringType and ReflectedType for
22331         properties and events, that's what caused the regressions.
22333 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22335         * object.c:
22336         (mono_async_result_new): the handle can be NULL.
22338         * threadpool.c: Use an event instead of a semaphore, don't initialize
22339         it until needed. This saves quite a few semaphores from being created
22340         when using the threadpool.
22342 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
22344         * object.c (mono_string_is_interned_lookup): Fix interning of long
22345         strings. Fixes #54473.
22347         * domain.c (ldstr_equal): Optimize if the two strings are equal.
22349         * icall.c: Revert the klass->refclass changes since they introduce
22350         regressions (bug #54518).
22352 2004-02-18  Martin Baulig  <martin@ximian.com>
22354         * class.c (mono_class_init): If we're a generic instance and don't
22355         come from a TypeBuilder, inflate our members here.
22356         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
22357         (mono_class_create_generic): New public method.
22358         (mono_class_initialize_generic): Removed.
22359         (get_instantiation_name): Renamed to
22360         _mono_class_get_instantiation_name() and made it public.
22362 2004-02-18  Martin Baulig  <martin@ximian.com>
22364         * class.c (mono_class_inflate_generic_type): Clear the new
22365         instance's `nginst->klass' when inflating a generic instance.
22366         (mono_class_is_subclass_of): Added (basic) support for generic
22367         instances.
22369 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
22371         * appdomain.h, domain.c: use a MonoCodeManager instead of a
22372         MonoMempool to hold compiled native code.
22374 2004-02-17  Martin Baulig  <martin@ximian.com>
22376         * class.h (MonoDynamicGenericInst): Added `count_properties' and
22377         `properties'.
22379         * reflection.c (mono_reflection_generic_inst_initialize): Added
22380         `MonoArray *properties' argument.
22382         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
22384 2004-02-17  Martin Baulig  <martin@ximian.com>
22386         * icall.c (ves_icall_Type_GetFields): Renamed to
22387         ves_icall_Type_GetFields_internal() and added a
22388         `MonoReflectionType *rtype' argument; pass it to
22389         mono_field_get_object() to set the field's "reflected" type.
22390         (ves_icall_Type_GetConstructors): Likewise.
22391         (ves_icall_Type_GetEvents): Likewise.
22392         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
22393         argument; pass it to mono_method_get_object() to set the method's
22394         "reflected" type.       
22396 2004-02-17  Martin Baulig  <martin@ximian.com>
22398         * class.h (MonoDynamicGenericInst): New type.
22399         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
22401         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
22402         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
22403         (ves_icall_MonoGenericInst_GetFields): New interncall.
22405         * class.c (mono_class_from_generic): Don't call
22406         mono_class_initialize_generic() if this is a dynamic instance;
22407         ie. it's being created from a TypeBuilder.
22408         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
22409         `class->byval_arg.type'.
22411         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
22412         to `inflate_method' and made static.
22413         (mono_reflection_inflate_field): Removed.
22414         (mono_reflection_generic_inst_initialize): New public method.
22416         * reflection.h (MonoReflectionGenericInst): Removed `methods',
22417         `ctors' and `fields'; added `initialized'.
22419 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
22421         * debug-helpers.c (mono_method_full_name): Fix output for empty
22422         namespaces.
22424 2004-02-12  Martin Baulig  <martin@ximian.com>
22426         * class.h (MonoClassField): Added `MonoType *generic_type'.
22428         * reflection.c (mono_image_get_fieldref_token): Added support for
22429         instantiated generic types.
22430         (field_encode_inflated_field): Removed.
22431         (mono_image_get_inflated_field_token): Removed.
22432         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
22434         * reflection.h (MonoReflectionInflatedField): Removed.
22436 2004-02-12  Martin Baulig  <martin@ximian.com>
22438         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
22439         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
22441         * reflection.c (mono_image_get_methodspec_token): Take a
22442         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
22443         (mono_image_create_token): Check whether we have a
22444         `method->signature->gen_method' and call
22445         mono_image_get_methodspec_token() if appropriate.
22446         (inflated_method_get_object): Removed.
22447         (mono_reflection_bind_generic_method_parameters): Return a
22448         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
22449         (mono_reflection_inflate_method_or_ctor): Likewise.
22451         * reflection.h (MonoReflectionInflatedMethod): Removed.
22453 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
22455         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
22456         for custom valuetype marshalling.
22458         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
22460 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22462         * icall.c: fixed WSAGetLastError_internal name.
22464 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
22466         * threads.c (mono_thread_attach): Allow this to be called multiple
22467         times for a thread.
22468         
22469         * threads.c (build_wait_tids): Do not wait for ourselves.
22471         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
22472         appdomain list is empty.
22474         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
22475         memory returned by mono_string_builder_to_utf16, since it points into
22476         managed memory. Thanks to Bernie Solomon for noticing this.
22478         * icall.c: Add AppDomainSetup icalls.
22480         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
22482         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
22483         types.
22485         * reflection.c (reflection_methodbuilder_to_mono_method): Save
22486         custom attributes to the method_aux struct. Also fix array indexes etc.
22488         * loader.c (mono_method_get_param_names): Make dynamic case work again.
22489         
22490 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
22492         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
22493         (both static and runtime) and reduce startup time.
22495 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
22497         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
22498         AsAny marshalling conversion instead of crashing.
22500         * marshal.c: Fix warnings.
22502 2004-02-09  Martin Baulig  <martin@ximian.com>
22504         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
22506         * reflection.h (MonoReflectionInflatedMethod): Removed the
22507         `declaring' field, it's now in the unmanaged MonoGenericMethod.
22509         * reflection.c (method_encode_methodspec): Removed the `method'
22510         argument; we get it from `gmethod->declaring'.
22511         (inflated_method_get_object): Removed the `declaring' argument.
22513 2004-02-09  Martin Baulig  <martin@ximian.com>
22515         * class.h (MonoGenericMethod): New type.
22516         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
22517         `generic_method'.
22519         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
22520         a `MonoGenericMethod *gen_method' one.
22522         * class.c (mono_class_inflate_generic_type): Take an additional
22523         `MonoGenericMethod * argument.  This is only non-NULL if we're
22524         inflating types for a generic method.   
22525         (mono_class_inflate_generic_signature): Renamed to
22526         inflate_generic_signature() and made static; take a
22527         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
22528         (inflate_generic_header): Take a `MonoGenericMethod *' argument
22529         instead of a `MonoGenericInst *' one.
22530         (mono_class_inflate_generic_method): Likewise.
22532         * reflection.c (encode_generic_method_sig): Take a
22533         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
22534         (method_encode_methodspec): Likewise.
22535         (inflated_method_get_object): Likewise. 
22537         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
22538         field with a `MonoGenericMethod *gmethod' one.  
22540 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
22542         * class.h (mono_class_has_parent): add parens to expansion
22543         so you can ! this.
22545 2004-02-08  Martin Baulig  <martin@ximian.com>
22547         * image.h (MonoImage): Removed `generics_cache'.
22549         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
22550         instead of a `MonoType *' argument; removed the `inflate_methods'
22551         argument.  Don't inflate methods here.
22553         * loader.c (find_method): If it's a generic instance, call
22554         mono_class_init() on the `sclass->generic_inst->generic_type'.
22556         * metadata.c (mono_type_size): Make this work on uninitialized
22557         generic instances; call it on the `ginst->generic_type's class.
22559         * reflection.c (mono_reflection_bind_generic_parameters): Call
22560         mono_class_from_generic() to create the `ginst->klass'.
22562 2004-02-08  Martin Baulig  <martin@ximian.com>
22564         * class.h (MonoClass): Changed type of `generic_inst' from
22565         `MonoType *' to `MonoGenericInst *'.
22567 2004-02-08  Martin Baulig  <martin@ximian.com>
22569         * icall.c (ves_icall_Type_BindGenericParameters): Just call
22570         mono_type_get_object(), this is now creating a `MonoGenericInst'
22571         for MONO_TYPE_GENERICINST.
22572         (ves_icall_MonoGenericInst_GetParentType): Likewise.
22573         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
22575         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
22576         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
22577         (inflated_method_get_object): Added `MonoClass *refclass' argument.
22578         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
22579         and reflected type.
22581         * reflection.h (MonoReflectionInflatedMethod): Removed
22582         `declaring_type' and `reflected_type'.
22584 2004-02-08  Martin Baulig  <martin@ximian.com>
22586         * class.h (MonoGenericInst): Added `MonoType *parent' and
22587         `MonoType **ifaces'.
22589         * reflection.h (MonoReflectionGenericInst): Removed `klass',
22590         `parent' and `interfaces'.
22592         * reflection.c (mono_reflection_bind_generic_parameters): Take a
22593         `MonoType *' argument and return a `MonoType *'.
22595         * icall.c
22596         (ves_icall_MonoGenericInst_GetParentType): New interncall.
22597         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
22599 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
22601         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
22602         valuetype marshalling.
22604 2004-02-06  Martin Baulig  <martin@ximian.com>
22606         * class.c
22607         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
22608         (my_mono_class_from_generic_parameter): Likewise.
22610 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
22612         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
22613         contents of the symbol files lazily.
22615         * object.h (MonoThread): Add 'name' and 'name_len' fields.
22617         * threads.h threads.c icall.c: New icalls for getting and setting the
22618         threads name.
22620 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
22622         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
22623         Raise an exception when the domain is not found.
22625 2004-02-03  Martin Baulig  <martin@ximian.com>
22627         * reflection.c (mono_image_get_methodspec_token): Use the
22628         uninflated signature; fixes gen-33.
22630 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
22632         * gc.c threads.c: Make the finalizer thread a normal managed thread so
22633         the finalizer code can use thread functionality.
22635         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
22636         the finalizer thread.
22638         * threads.c: Make some functions more robust.
22640         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
22642         * metadata.h: Add new marshalling conventions.
22644         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
22645         stringbuilder marshalling. Fixes #53700.
22647         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
22649         * reflection.c (mono_image_get_type_info): Save declarative security
22650         info.
22652         * reflection.c (mono_image_get_field_info): Handle uninitialized 
22653         unmanaged fields as well.
22655         * appdomain.c: Bump corlib version.
22657 2004-02-01  Martin Baulig  <martin@ximian.com>
22659         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
22660         method type arguments.  
22662 2004-01-30  Duncan Mak  <duncan@ximian.com>
22664         * marshal.h: Add prototype for
22665         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
22666         and
22667         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
22668         fix the build.
22670 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
22672         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
22673         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
22675 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
22677         * marshal.c (mono_marshal_get_native_wrapper): Add support for
22678         custom marshalling of valuetypes.
22680         * marshal.c: Fix some warnings.
22682 2004-01-29  Martin Baulig  <martin@ximian.com>
22684         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
22685         for generic method parameters.
22687         * reflection.c (method_encode_methodspec): Write the uninflated
22688         signature into the methodspec table.
22689         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
22690         is always the uninflated method.
22691         (reflection_methodbuilder_to_mono_method): Copy the generic
22692         parameters from the MethodBuilder into `header->gen_params'.
22694 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
22696         * class.c (mono_class_from_generic_parameter): Fix warning.
22698 2004-01-27  Martin Baulig  <martin@ximian.com>
22700         * class.c (mono_class_from_generic_parameter): Don't create
22701         `klass->methods' here.  
22703 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
22705         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
22706         extension since it does not work with libraries named lib<FOO>.dll.so.
22708 2004-01-25  Martin Baulig  <martin@ximian.com>
22710         * class.c (mono_class_inflate_generic_type): Added support for
22711         MONO_TYPE_GENERICINST.
22713         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
22714         inflate methods on open constructed types.      
22716 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22718         * object.c: fire ProcessExit event in the root AppDomain after running
22719         Main. Fixes bug #53299.
22721 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
22723         * socket-io.c: include the new socket-wrappers.h header.
22724         Use the wrappers instead of the unix socket functions to make the code
22725         more clear.
22727 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
22729         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
22731         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
22732         Fixes #22532.
22734 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
22736         * reflection.c (mono_image_create_pefile): Handle the case when the
22737         entry point is not a MethodBuilder.
22739         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
22740         field to ReflectionMethod since it is not allways a builder.
22742         * reflection.c (type_get_fully_qualified_name): New helper function to
22743         return the fully qualified name of a type.
22745         * reflection.c (encode_marshal_blob): Always emit the fully qualified
22746         type name for custom marshallers.
22748         * reflection.c (mono_marshal_spec_from_builder): Ditto.
22750         * class.c (mono_class_setup_vtable): If a parent class already 
22751         implements an interface, use the implementing methods from that class.
22752         Fixes #53148.
22754 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22756         * threadpool.c: just return instead of ExitThread to allow for thread
22757         clean up earlier.
22759 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
22761         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
22762         when closing resource modules.
22764         * reflection.c (mono_image_create_pefile): Handle the case when the
22765         entry point is not a MethodBuilder.
22767         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
22768         field to ReflectionMethod since it is not allways a builder.
22770 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
22772         * marshal.c (mono_marshal_get_managed_wrapper): 
22773         mono_marshal_alloc takes native int so CONV_I
22774         the arg for 64bits.
22776 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
22778         * reflection.c (fixup_cattrs): New function to fixup the methoddef
22779         tokens in the cattr table. Fixes #53108.
22781 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22783         * loader.c: don't trim ".dll" before looking up in the config file.
22784         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
22786 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
22788         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
22789         Return the module which contains the resource as well.
22790         (ves_icall_System_Reflection_Module_Close): New icall.
22792         * appdomain.c: Bump corlib version number.
22794         * image.c (mono_image_addref): New public function.
22796         * assembly.c: Call mono_image_addref.
22798         * reflection.c (mono_module_get_object): Increase reference count of 
22799         the image.
22801         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
22802         Fixes #22532.
22804         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
22805         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
22806         proper exceptions on DllImport problems.
22808 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
22810         * class.c, metadata.c: eliminate CSIZE macro.
22812 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
22814         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
22815         * object.h: Added async_callback field in MonoAsyncResult.
22816         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
22817         * verify.c: Added async_callback in MonoAsyncResult layout.
22819 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
22821         * reflection.c (mono_reflection_get_custom_attrs): Add support
22822         for Modules.
22824 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
22826         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
22827         marshalling.
22828         (mono_marshal_method_from_wrapper): Add null pointer check.
22830 2004-01-16  Martin Baulig  <martin@ximian.com>
22832         * debug-mono-symfile.h: Set version number to 36 and reflect
22833         latest symbol writer changes.
22835 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
22837         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
22838         multi-dimensional arrays.
22839         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
22840         (mono_class_from_mono_type): Use bounded_array_class_get.
22841         
22842         * class.c (mono_bounded_array_class_get): New function which takes
22843         a 'bounded' bool argument to distinguish vectors from one dimensional
22844         arrays.
22846         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
22847         bounded_array_class_get if the array has bounds.
22849         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
22850         Search modules loaded using AssemblyBuilder:AddModule as well.
22852 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22854         * appdomain.c: increased corlib version.
22855         * filewatcher.c: removed g_print.
22856         * icall.c:
22857         (get_property_info): only allocate what is actually requested.
22858         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
22860 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22862         * Makefile.am: added filewatcher.[ch]
22863         * filewatcher.[ch]: FileSystemWatcher runtime support.
22864         * icall.c: added new FSW icalls.
22866 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
22868         * string-icalls.c: fix stringbuilder regression as suggested by
22869         Iain McCoy <iain@mccoy.id.au>.
22871 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
22873         * process.c (process_read_stringtable_block): Recognize '007f' as
22874         a language neutral stringtable block.
22876 2004-01-12  Patrik Torstensson
22878         * object.h (MonoStringBuilder) : Changed layout to support our
22879         new stringbuilder class.
22880         * marshal.c: Change marshalling to support the new layout of 
22881         string builder.
22882         * appdomain.c: increased version number because new layout of
22883         string builder.
22885 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
22887         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
22888         assembly name as an string instead of an AssemblyName, since it is
22889         easier to extract info from it.
22891         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
22892         the culture subdirectories too. Fixes #52231.
22894 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22896         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
22897         It takes 2 new parameters with an optional name for the method to look
22898         for and case ignoring info.
22900         * threadpool.c: removed unused variable.
22902 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22904         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
22905         It takes 2 new parameters with an optional name for the property to look
22906         for and case ignoring info.
22907         Fixes bug #52753.
22909 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
22911         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
22912         Fix #52451.
22914 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22916         * appdomain.c:
22917         * assembly.c: escape the uri before passing it to g_filename_from_uri.
22918         Fixes bug #52630.
22920 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
22922         * reflection.c: Add support for more than one unmanaged resource.
22924         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
22925         in field->def_value, as done in all other cases.
22927         * reflection.c (mono_reflection_get_custom_attrs): Add support for
22928         TypeBuilders.
22930         * reflection.c (mono_reflection_create_runtime_class): Remove 
22931         errorneous assignment to klass->element_class, since it is already
22932         done in mono_reflection_setup_internal_class.
22934 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22936         * gc.c: added missing LeaveCriticalSection.
22937         * icall.c: indented a couple of lines.
22938         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
22939         if we call EndInvoke inside a callback. Fixes bug #52601.
22941 2004-01-07  Martin Baulig  <martin@ximian.com>
22943         * mono-debug-debugger.h
22944         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
22946 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
22948         * appdomain.c: Use messages in NotImplementedException.
22950         * exception.c (mono_get_exception_not_implemented): Now this takes
22951         a message argument.
22953         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
22954         exception instead of g_asserting an aborting when something is not
22955         implemented.
22957         Add some inline docs.
22959 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
22961         * reflection.h: Update after changes to object layout.
22963         * reflection.c: Implement saving of unmanaged aka win32 resources.
22965         * appdomain.c: Bump version number.
22967         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
22968         Handle missing domains gracefully.
22970 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
22972         * file-io.c : On Windows, there are much more invalid_path_chars.
22974 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
22976         * class.h, object.c: prepare for GetType () speedup.
22978 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
22980         * profiler.c: workaround for --profile null reference exception on
22981           cygwin. Patch by Patrik Torstensson.
22983 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
22985         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
22986         make work for unaligned access.
22988 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
22990         * class.c: small cleanup (class->fields [i] -> field).
22991         * image.c: check address of metadata is valid.
22993 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
22995         * assembly.h assembly.c (mono_assembly_loaded): New public function to
22996         search the list of loaded assemblies.
22998         * reflection.c (mono_reflection_type_from_name): Use 
22999         mono_assembly_loaded instead of mono_image_loaded.
23001         * reflection.c: Fix warnings.
23003 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
23005         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
23006         is dynamic. This is needed since an assembly can contain both dynamic and
23007         non-dynamic images.
23009         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
23010         assembly->dynamic.
23012         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
23014         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
23015         to store modules loaded using AddModule.
23017         * reflection.c (mono_image_fill_file_table): Generalize this so it works
23018         on Modules.
23020         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
23022         * reflection.c (mono_image_fill_export_table_from_module): New function to
23023         fill out the EXPORTEDTYPES table from a module.
23025         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
23026         into a separate function. Also handle loaded non-dynamic modules.
23028         * reflection.c (mono_image_basic_init): Fix memory allocation.
23030         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
23032         * assembly.c (mono_assembly_load_references): Make this public.
23034 2003-12-19  Martin Baulig  <martin@ximian.com>
23036         * class.c (mono_class_initialize_generic): Made this static, take
23037         a `MonoGenericInst *' instead of a `MonoClass *'.
23038         (mono_class_from_generic): Call mono_class_initialize_generic()
23039         unless we're already initialized or being called from
23040         do_mono_metadata_parse_generic_inst().
23042         * class.h (MonoGenericInst): Added `initialized' and
23043         `init_pending' flags.
23045         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
23046         `mono_class_init (gklass)' or mono_class_initialize_generic()
23047         here; set `generic_inst->init_pending' while parsing the
23048         `type_argv'.
23050 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
23052         * locales.c: include string.h for memxxx prototypes
23054 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
23056         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
23057         constructor when accessing literal fields.
23059 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
23061         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
23063         * reflection.c (assembly_add_resource_manifest): New function to fill
23064         the MANIFESTRESOURCE table.
23066         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
23068         * reflection.h: Update to changes in class layout.
23070         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
23071         Reenable call to mono_runtime_is_shutting_down ().
23073         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
23074         determine if the runtime is shutting down.
23076 2003-12-16  Jackson Harper <jackson@ximian.com>
23078         * icall.c: comment out call to mono_runtime_is_shutting_down to
23079         fix build.
23080         
23081 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
23083         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
23084         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
23086 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
23088         * reflection.c: move definition of swap_with_size
23089         to before its first call
23091 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
23093         * appdomain.c (mono_runtime_is_shutting_down): New public function.
23095         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
23096         icall.
23098         * object.c: Fix warnings.
23100         * icall.c (ves_icall_Type_Get...): Only consider inherited static
23101         members if FlattenHierarchy is set.
23103         * reflection.c (mono_image_add_decl_security): New function to emit
23104         declarative security.
23106         * reflection.h reflection.c: Add support for declarative security.
23108         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
23109         
23110 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
23112         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
23113         
23114         * appdomain.c verify.c: Moved corlib version checking into its own
23115         function in appdomain.c since it needs to create vtables etc.
23117 2003-12-13  Patrik Torstensson <p@rxc.se>
23119         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
23120         instead of unwrapped server.
23122 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
23124         * verify.c (check_corlib): Fix field index.
23126 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
23128         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
23129         GetGacPath icall.
23131 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
23133         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
23134         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
23135         cope with sizeof(size_t) != sizeof(guint32).
23137 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23139         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
23140         in case of failure.
23142 2003-12-10  Mark Crichton <crichton@gimp.org>
23144         * icall.c: removed the GetNonZeroBytes.  We now handle this case
23145         in managed code.
23147         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
23149 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
23151         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
23152         marked as deleted.
23154 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
23156         * verify.c (check_corlib): Handle the case when the version field is 
23157         initialized by a static constructor.
23159 2003-12-08  Patrik Torstensson  <p@rxc.se>
23161     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
23163 2003-12-08  Martin Baulig  <martin@ximian.com>
23165         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
23166         a MonoReflectionGenericParameter, also take the parameter index
23167         and name as arguments.
23168         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
23169         (ves_icall_MonoGenericParam_initialize): New interncall.
23170         (ves_icall_Type_make_byref_type): New interncall.
23172         * reflection.h (MonoReflectionGenericParam): Derive from
23173         MonoReflectionType, not just from MonoObject.  Added `refobj' and
23174         `index' fields.
23176         * reflection.c (mono_reflection_define_generic_parameter): Create
23177         and return a new MonoReflectionGenericParam; don't initialize the
23178         constraints here.
23179         (mono_reflection_initialize_generic_parameter): New public method;
23180         initializes the constraints and creates the `param->pklass'.
23182 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
23184         * reflection.h reflection.c: Use the new fields 'num_types', 
23185         'num_fields' and 'num_methods' to track the number of types etc.
23187         * verify.c (check_corlib): Check corlib version number.
23189 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
23191         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
23192         function works on all methods.
23194 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
23196         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
23197         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
23198         the custom_type_info flag of the transparent proxy.
23199         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
23200         objects that supports IRemotingTypeInfo.
23201         * object.h: Added custom_type_info field in transparent proxy.
23203 2003-12-06  Martin Baulig  <martin@ximian.com>
23205         * class.c (mono_class_create_from_generic): Removed.
23206         (mono_class_from_generic): Check `ginst->klass' before doing
23207         anything else.  This is important to fully support "recursive"
23208         generic types.
23210         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
23211         empty `generic_inst->klass' before doing anything else.
23213 2003-12-06  Dick Porter  <dick@ximian.com>
23215         * verify.c: 
23216         * object.h:
23217         * icall.c:
23218         * locales.c: Use C structs to access class fields.  Don't do a
23219         conversion between MonoString and UChar because both are
23220         platform-endian UTF-16.  Compare now takes startindex and count
23221         parameters.  Add a char overload for IndexOf.  Speed up the
23222         invariant string IndexOf.
23224 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
23226         * Makefile.am (monosn_LDADD): Fix parallel build.
23228 2003-12-04  Martin Baulig  <martin@ximian.com>
23230         * icall.c
23231         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
23232         (ves_icall_Type_make_array_type): New interncall.       
23234 2003-12-04  Martin Baulig  <martin@ximian.com>
23236         * locales.c: also change it in the !HAVE_ICU case.
23238 2003-12-04  Dick Porter  <dick@ximian.com>
23240         * icall.c:
23241         * locales.c: construct_compareinfo is now in CompareInfo, not
23242         CultureInfo.
23244 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
23246         * image.c (mono_image_load_file_for_image): Cache loaded images in the
23247         image->files array.
23249         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
23250         table as well.
23252         * assembly.c (mono_assembly_load_references): Only load references
23253         once.
23255         * class.c (mono_class_from_name): Avoid linear search of the 
23256         EXPORTEDTYPE table.
23258         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
23260 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
23262         * image.h (MonoImage): Add 'field_cache' field.
23264         * loader.c (mono_field_from_token): Cache field lookups.
23265         
23266         * reflection.c (mono_module_get_object): Fix name property.
23268         * icall.c (ves_icall_get_enum_info): Update after changes to 
23269         mono_metadata_get_constant_index ().
23271         * icall.c: Get rid of get_type_info icall, use a separate icall for
23272         each type property to avoid needless memory allocations. Fixes #51514.
23274         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
23275         to avoid needless binary searches.
23277         * class.c (class_compute_field_layout): Move the initialization of
23278         field->def_value to mono_class_vtable ().
23280         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
23281         non-corlib types.
23283         * object.c (mono_object_allocate): Make it inline.
23285         * object.c (mono_object_allocate_spec): Make it inline.
23286         
23287 2003-12-02  Dick Porter  <dick@ximian.com>
23289         * locales.c (create_NumberFormat): NumberFormatInfo construction.
23290         Patch by Mohammad DAMT (mdamt@cdl2000.com).
23292 2003-12-01  Dick Porter  <dick@ximian.com>
23294         * threads.c: Fix signature and call in CreateMutex and
23295         CreateEvent.
23297 2003-12-01  Dick Porter  <dick@ximian.com>
23299         * icall.c: 
23300         * locales.c: Implement string compares and searching
23302         * object.h: Add extra Thread field
23304 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
23306         * reflection.c (fixup_method): Add support for MonoCMethod.
23308 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
23310         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
23312         * reflection.c (assembly_name_to_aname): Allow extra characters in
23313         assembly names. Fixes #51468.
23315 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
23317         * exception.c (mono_exception_from_name_domain): New helper function.
23319         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
23320         exception object in the correct domain.
23322         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
23323         formatting + make a copy a the input data.
23325         * loader.c (mono_get_method_from_token): Methods which contain
23326         native code do not have entries in the ImplMap.
23328         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
23329         Thanks to Gonzalo for spotting this.
23330         
23331         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
23332         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
23334         * assembly.h (mono_assembly_load_from): Split the second part of 
23335         assembly loading into a new public function.
23337         * exception.h (mono_get_exception_bad_image_format): New function.
23339 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
23341         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
23342         Enumerate all modules inside a dynamic assembly. Fixes #51293.
23343         
23344         * icall.c: Add new icall for creating dynamic methods.
23346         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
23348         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
23350         * reflection.c (mono_reflection_create_dynamic_method): New icall to
23351         create a dynamic method.
23353         * reflection.c (resolve_object): New helper function.
23355         * reflection.c: Generalize ReflectionMethodBuilder and the functions
23356         which manipulate it so they can also work on dynamic methods.
23358         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
23359         creating the MonoReflectionMethodAux structure if it is not needed.
23360         
23361         * reflection.h verify.c: Update after changes to object layout.
23363         * reflection.c (method_builder_encode_signature): Fix compilation on
23364         gcc 2.95.x.
23366 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
23368         * appdomain.h: Added support for context static fields. Added static_data
23369           field to MonoAppContext and renamed thread_static_fields to a more
23370           generic special_static_fields in MonoAppDomain, since it can now contain
23371           context static fields.
23372         * domain.c: Updated hashtable name.
23373         * object.c: Replaced field_is_thread_static() for a more generic
23374           field_is_special_static() which also checks for context static attribute.
23375           In mono_class_vtable(), added support for static context fields.
23376         * threads.c: Changed methods that manage thread static fields to more
23377           generic methods so they can be reused both for thread and context static
23378           data.
23379         * threads.h: Declared some new methods.
23381 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
23383         * reflection.h: Update after changes to the managed types.
23385         * reflection.c (encode_custom_modifiers): New helper function.
23387         * reflection.c (method_encode_signature): Emit custom modifiers.
23389         * reflection.c (field_encode_signature): Emit custom modifiers.
23391 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
23393         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
23395         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
23396         implementation.
23398         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
23399         icall.
23401         * object.c (mono_field_get_value_object): New function.
23403         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
23404         specific.
23406 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
23408         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
23409         return a preallocated out-of-memory exception instance.
23411         * object.c (out_of_memory): Use the new function.
23413         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
23414         flag is before the custom modifiers. Fixes #49802.
23416 2003-11-16  Martin Baulig  <martin@ximian.com>
23418         * class.c (mono_class_is_open_constructed_type): Implemented the
23419         MONO_TYPE_GENERICINST case.
23421 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
23423         * assembly.c (mono_assembly_fill_assembly_name): New function to
23424         fill out the MonoAssemblyName structure.
23425         (mono_assembly_open): Use the new function.
23427         * icall.c (fill_reflection_assembly_name): New helper function.
23429         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
23430         new function.
23432         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
23434 2003-11-15  Martin Baulig  <martin@ximian.com>
23436         * class.c (mono_class_is_open_constructed_type): New public
23437         function; checks whether a type is an open constructed type,
23438         ie. whether it still contains type parameters.
23439         (mono_class_inflate_generic_type): If we're a type parameter and
23440         the inflated type is also a MONO_TYPE_(M)VAR, return the original
23441         type.
23443         * class.h (MonoGenericInst): Added `guint32 is_open'.
23445         * loader.c (method_from_methodspec): Check whether we're an open
23446         or closed constructed type and set `ginst->is_open'.
23448         * reflection.c (mono_reflection_bind_generic_parameters): Check
23449         whether we're an open or closed constructed type and set
23450         `ginst->is_open'.
23451         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
23452         from open constructed types.
23454 2003-11-15  Martin Baulig  <martin@ximian.com>
23456         * reflection.c (mono_reflection_bind_generic_parameters): If we're
23457         a generic instance (instead of a generic type declaration) with
23458         unbound generic parameters, bind them to our actual types.
23460 2003-11-14  Martin Baulig  <martin@ximian.com>
23462         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
23464         * reflection.c (mono_reflection_bind_generic_parameters): If we're
23465         an interface type, populate `res->interfaces' with instantiated
23466         versions of all the interfaces we inherit.
23468 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
23470         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
23471         when MONO_PATH is set but doesn't contain the install dir.
23473 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23475         * icall.c:
23476         (ves_icall_Type_GetInterfaces): don't return an interface twice when
23477         it's also implemented in base classes. Fixes bug #50927.
23479 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
23481         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
23482         if this method is called from a finalizer. Fixes #50913.
23484 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
23486         * threads.c: Implement VolatileRead/VolatileWrite
23488         * icall.c: Add new icalls for VolatileRead/VolatileWrite
23490 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
23492         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
23493         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
23494         2.95.3.
23496         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
23497         from Peter Ross (pro@missioncriticalit.com).
23498         
23499 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
23501         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
23503 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
23505         * assembly.c (mono_assembly_load_references): Disable check because it
23506         triggers on older corlibs which lots of people have.
23508 2003-11-12  Jackson Harper  <jackson@ximian.com>
23510         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
23511         load corlib.dll if mscorlib.dll is not found.
23512         * assembly.h: Remove corlib name define.
23513         * class.c:
23514         * domain.c:
23515         * image.c: Change corlib name to mscorlib.
23516         
23517 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
23519         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
23521 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
23523         * appdomain.h: Added loader_optimization here to sync with the C#
23524         code, and add disallow_binding_redirects field.
23526 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
23528         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
23530         * reflection.c (mono_image_build_metadata): Fix crash on modules
23531         with no types.
23533         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
23535         * icall.c (ves_icall_get_method_info): Return callingConvention as
23536         well.
23538         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
23539         namespaces from the EXPORTEDTYPE table as well.
23541         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
23542         from all modules inside the assembly.
23543         
23544 2003-11-11  Martin Baulig  <martin@ximian.com>
23546         * reflection.c (mono_reflection_bind_generic_parameters): Make
23547         this work for interfaces.
23549 2003-11-11  Martin Baulig  <martin@ximian.com>
23551         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
23553 2003-11-11  Martin Baulig  <martin@ximian.com>
23555         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
23556         "MonoInflatedMethod" and "MonoInflatedCtor".
23558 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
23560         * reflection.c (resolution_scope_from_image): Use the assembly table
23561         from the manifest module, since other modules don't have it.
23563         * debug-helpers.c (mono_type_full_name): New helper function.
23565         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
23567         * image.c (mono_image_load_file_for_image): New public function which
23568         is a replacement for the load_file_for_image in class.c.
23570         * assembly.c (mono_assembly_load_module): A wrapper for the function
23571         above which does assembly association and reference loading too.
23573         * class.c (mono_class_from_name): Call mono_assembly_load_module.
23575 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23577         * appdomain.c: not all of the attributes for the full assembly name
23578         are required and the order doesn't matter. Fixes bug #50787.
23580 2003-11-10  Dick Porter  <dick@ximian.com>
23582         * locales.c: Use platform-endian UTF16
23584 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
23586         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
23587         
23588 2003-11-10  Martin Baulig  <martin@ximian.com>
23590         * metadata.c
23591         (mono_metadata_load_generic_params): Make this actually work.
23593         * reflection.c (mono_reflection_bind_generic_parameters): If our
23594         parent is a generic instance, pass all the `types' to it, no
23595         matter whether it has the same number of type parameters or not.
23597 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
23599         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
23601         * assembly.c (mono_assembly_load_references): Move the image<->assembly
23602         assignment code to this function so it gets called recursively for all
23603         modules.
23605         * image.c (load_modules): Remove the assembly assignment since it is
23606         now done by mono_assembly_load_references.
23607         
23608         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
23609         Add 'module' argument.
23610         (mono_module_get_types): New helper function.
23611         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
23613 2003-11-08  Martin Baulig  <martin@ximian.com>
23615         * class.c (mono_class_inflate_generic_method): Interface method
23616         don't have a header.
23618         * reflection.c (mono_image_get_methodspec_token): Take an
23619         additional `MonoGenericInst *' argument instead of reading it from
23620         the header; this is necessary to support interfaces.
23621         (mono_image_create_token): Pass the `MonoGenericInst *' from the
23622         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
23623         (inflated_method_get_object): Take an additional `MonoGenericInst *'
23624         argument.
23626         * reflection.h (MonoReflectionInflatedMethod): Added
23627         `MonoGenericInst *ginst'.
23629 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
23631         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
23633 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
23635         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
23637 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
23639         * reflection.c 
23640         (reflection_methodbuilder_from_method_builder):
23641         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
23642         initialize a ReflectionMethodBuilder structure.
23643         (mono_image_get_methodbuilder_token):
23644         (mono_image_get_ctorbuilder_token): New functions to emit memberref
23645         tokens which point to types in another module inside the same assembly.
23647         * reflection.c: Use the new helper functions.
23648         
23649         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
23651         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
23652         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
23654         * reflection.c (resolution_scope_from_image): Emit a moduleref if
23655         neccesary.
23657         * reflection.c (mono_image_build_metadata): Emit metadata only for the
23658         current module. Emit the manifest only for the main module.
23660         * reflection.c (mono_image_create_token): Add assertion when a 
23661         memberref needs to be created.
23663         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
23665         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
23666         larger buffer for the custom attribute blob. Fixes #50637.
23667         
23668 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23670         * threadpool.c: notify listener on async processing handles after
23671         invoking the async callback. Thanks to Zoltan.
23673 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
23675         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
23676         avoid code duplication.
23678         * reflection.h (MonoDynamicImage): New type which is currently unused,
23679         but will be used through the ref.emit code in place of 
23680         MonoDynamicAssembly.
23682         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
23683         object layout.
23685         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
23686         a MonoDynamicImage instead of just a MonoImage.
23687         
23688         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
23689         icalls to ModuleBuilder but keep their semantics, so they will work
23690         with moduleb->assemblyb. This will change later.
23691         
23692 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
23694         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
23695         object layout.
23697         * reflection.c (mono_image_build_metadata): Avoid creation of a default
23698         main module, since it is now done by the managed code.
23700 2003-11-03  Martin Baulig  <martin@ximian.com>
23702         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
23703         `ginst->klass' here.
23704         (method_encode_methodspec): Don't use the `ginst->generic_method's
23705         klass if it's a generic instance, use `ginst->klass' in this case.
23707 2003-11-03  Martin Baulig  <martin@ximian.com>
23709         * reflection.c (mono_image_get_generic_method_param_info):
23710         Removed, use mono_image_get_generic_param_info() instead.
23711         (mono_image_get_type_info): Write the GenericParam table before
23712         the Method table.  This is neccessary because in the GenericParam
23713         table, type parameters of the class (ie. '!0' etc.) must come
23714         before the ones from its generic methods (ie. '!!0' etc).
23716 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
23718         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
23720 2003-11-02  Martin Baulig  <martin@ximian.com>
23722         * reflection.c (create_generic_typespec): Take a
23723         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
23724         the generic parameters from it.
23726 2003-11-02  Martin Baulig  <martin@ximian.com>
23728         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
23729         instead of a `MonoClassField *' since we just need the type.
23730         (create_generic_typespec): New static function.  Creates a
23731         TypeSpec token for a generic type declaration.
23732         (mono_image_get_generic_field_token): New static function.
23733         (mono_image_create_token): If we're a FieldBuilder in a generic
23734         type declaration, call mono_image_get_generic_field_token() to get
23735         the token.
23737 2003-11-02  Martin Baulig  <martin@ximian.com>
23739         * reflection.h
23740         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
23741         `MonoReflectionGenericInst *declaring_type' and
23742         `MonoReflectionGenericInst *reflected_type' fields.
23744         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
23745         `MonoReflectionGenericInst *declaring_type' and a
23746         `MonoReflectionGenericInst *reflected_type' argument instead of a
23747         single `MonoReflectionGenericInst *type' one.  Set
23748         `res->declaring_type' and `res->reflected_type' from them.
23749         (mono_reflection_inflate_field): Likewise.      
23751 2003-11-02  Martin Baulig  <martin@ximian.com>
23753         * class.c (mono_class_setup_vtable): Don't store generic methods
23754         in the vtable.  
23756 2003-11-02  Martin Baulig  <martin@ximian.com>
23758         * reflection.h (MonoReflectionGenericInst): Added
23759         `MonoReflectionType *declaring_type'.
23761         * reflection.c (mono_reflection_bind_generic_parameters): Use
23762         `if (tb->parent)' instead of `klass->parent'.
23764 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
23766         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
23767         with an empty ASSEMBLY table.
23769         * reflection.c (mono_image_build_metadata): Avoid using the same loop
23770         variable in the inner and outer loops.
23772 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
23774         * metadata.h (mono_metadata_make_token): Put parentheses around macro
23775         argument.
23777         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
23778         
23779         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
23780         icalls. Instead, do everything in managed code. This is needed since
23781         it is hard to restore the original domain etc. in unmanaged code in the
23782         presence of undeniable exceptions.
23784         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
23785         New icalls to push and pop appdomain refs.
23787 2003-10-31  Martin Baulig  <martin@ximian.com>
23789         * class.c (inflate_generic_type): Renamed to
23790         mono_class_inflate_generic_type() and made it public.
23792         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
23793         New interncall.
23795         * loader.c (mono_field_from_memberref): Also set the retklass for
23796         typespecs.
23798         * fielder.c (mono_image_get_inflated_field_token): New static
23799         method; creates a metadata token for an inflated field.
23800         (mono_image_create_token, fixup_method): Added support for
23801         "MonoInflatedField".
23802         (fieldbuilder_to_mono_class_field): New static function.
23803         (mono_reflection_inflate_field): New public function.
23805         * reflection.h
23806         (MonoReflectionGenericInst): Added `MonoArray *fields'.
23807         (MonoReflectionInflatedField): New typedef.     
23809 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
23811         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
23812         for Solaris and other platforms without s6_addr16
23814 2003-10-30  Martin Baulig  <martin@ximian.com>
23816         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
23817         argument instead of two.
23818         (mono_class_inflate_generic_signature): Likewise.
23819         (inflate_generic_header): Likewise.
23820         (mono_class_inflate_generic_method): Likewise.  In addition, if
23821         `ginst->klass' is set, it becomes the new `method->klass'.
23823         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
23824         field.
23826         * reflection.c (encode_generic_method_sig): Write a 0xa as the
23827         first byte. [FIXME]
23828         (method_encode_methodspec): If we have generic parameters, create
23829         a MethodSpec instead of a MethodRef.
23830         (fixup_method): Added support for "MonoInflatedMethod" and
23831         "MonoInflatedCtor".
23832         (mono_image_create_token): Added support for "MonoInflatedMethod"
23833         and "MonoInflatedCtor".
23834         (inflated_method_get_object): New static function; returns a
23835         managed "System.Reflection.MonoInflatedMethod" object.
23836         (mono_reflection_bind_generic_method_parameters): Return a
23837         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
23838         (mono_reflection_inflate_method_or_ctor): Likewise.
23839         (mono_image_get_generic_method_param_info): Initialize unused
23840         fields to zero.
23841         (mono_image_get_generic_param_info): Likewise.
23843         * reflection.h (MonoReflectionInflatedMethod): New public
23844         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
23845         "S.R.MonoInflatedCtor" classes.
23847         * loader.c (method_from_memberref): If we're a TypeSpec and it
23848         resolves to a generic instance, inflate the method.
23850 2003-10-28  Dick Porter  <dick@ximian.com>
23852         * object.c (mono_runtime_run_main): Convert command-line arguments
23853         into utf8, falling back to the user's locale encoding to do so.
23855 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
23857         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
23858         at this time.
23860         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
23862         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
23863         up icalls at method definition time. Partially fixes #33569.
23865 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
23867         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
23868         marshalling of arrays. Fixes #50116.
23870         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
23872         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
23873         points to a vtable in the dying appdomain.
23875         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
23876         listeners into unmanaged code inside the lock.
23878         * object.c (mono_class_vtable): Turn off typed allocation in non-root
23879         domains and add some comments.
23881 2003-10-25  Martin Baulig  <martin@ximian.com>
23883         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
23885         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
23887         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
23888         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
23889         currently parsing.  Create the generic class and store it in
23890         `generic_inst->klass' before parsing the type arguments.  This is
23891         required to support "recursive" definitions; see mcs/tests/gen-23.cs
23892         for an example.
23893         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
23894         to support recursive typespec entries.
23896         * class.c (mono_class_setup_parent): If our parent is a generic
23897         instance, we may get called before it has its name set.
23898         (mono_class_from_generic): Splitted into
23899         mono_class_create_from_generic() and mono_class_initialize_generic().
23901 2003-10-25  Martin Baulig  <martin@ximian.com>
23903         * icall.c (ves_icall_Type_BindGenericParameters): Return a
23904         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
23905         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
23906         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
23908         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
23909         (create_typespec): Likewise.
23910         (mono_reflection_bind_generic_parameters): Return a
23911         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
23912         (mono_reflection_inflate_method_or_ctor): New public function.
23914         * reflection.h (MonoReflectionGenericInst): New typedef.        
23916 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
23918         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
23919         inside the domain lock. Fixes #49993.
23920         
23921         * object.c (mono_class_vtable): When typed allocation is used, 
23922         allocate vtables in the GC heap instead of in the mempool, since the
23923         vtables contain GC descriptors which are used by the collector even
23924         after the domain owning the mempool is unloaded.
23926         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
23928         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
23929         reflect what it does. Also invalidate mempools instead of freeing
23930         them if a define is set.
23932         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
23933         of the appdomain.
23934         
23935         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
23936         hold the finalizable objects in this domain.
23938         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
23939         appdomain.
23941         * appdomain.c (mono_domain_set): New function to set the current
23942         appdomain, but only if it is not being unloaded.
23944         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
23945         appdomain which is being unloaded.
23946         
23947         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
23948         unloading of the root appdomain.
23950         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
23951         icall to execute a method in another appdomain. Intended as a 
23952         replacement for InternalSetDomain, which can confuse the code 
23953         generation in the JIT.
23955         * appdomain.c (mono_domain_is_unloading): New function to determine
23956         whenever an appdomain is unloading.
23958         * appdomain.c (mono_domain_unload): New function to correctly unload
23959         an appdomain.
23961         * assembly.c (mono_assembly_load_references): Check that an assembly
23962         does not references itself.
23964         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
23965         domain manually, it asks the finalizer thread to do it, then waits for
23966         the result. Also added a timeout.
23968         * icall.c: Register the new icalls.
23970         * threads.h threads.c: Export the mono_gc_stop_world and 
23971         mono_gc_start_world functions.
23972         
23973         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
23974         function to fill out the mempool with 0x2a.
23976 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
23978         * reflection.h (MonoReflectionMethodAux): New structure to store
23979         information which is rarely used, thus is not in the MonoMethod
23980         structure.
23982         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
23983         store the aux info.
23985         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
23986         and marshalling info into the aux structure.
23988         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
23989         from the aux structure.
23991         * loader.c (mono_method_get_param_names): Retrieve the param names from
23992         the aux structure.
23993         
23994 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
23996         * exception.h exception.c: Add AppDomainUnloadedException && fix 
23997         warning.
23999 2003-10-21  Dick Porter  <dick@ximian.com>
24001         * socket-io.c
24002         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
24003         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
24005 2003-10-21  Martin Baulig  <martin@ximian.com>
24007         * reflection.c (mono_reflection_bind_generic_parameters):
24008         `klass->parent' is NULL for interfaces.
24010 2003-10-21  Martin Baulig  <martin@ximian.com>
24012         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
24014 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
24016         * exception.c (mono_exception_from_name_msg): New helper function for
24017         creating exceptions and initializing their message field.
24019         * exception.c: Simplify functions using the new helper.
24021         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
24022         New function.
24024         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
24025         mono_raise_exception, since otherwise gcc doesn't generate the function
24026         epilog for raise_exception, confusing the stack unwinding in the JIT.
24027         Fixes #45043.
24029         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
24030         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
24031         Fixes #49499.
24033 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24035         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
24036         utf8.
24038 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
24040         * icall.c: Removed GetUninitializedObject method because
24041           AllocateUninitializedClassInstance does the same.
24043 2003-10-18  Martin Baulig  <martin@ximian.com>
24045         * class.c (inflate_generic_signature): Renamed to
24046         mono_class_inflate_generic_signature() and made it public.
24047         (my_mono_class_from_generic_parameter): New static function; if we
24048         don't already have the generic parameter's MonoClass, create a
24049         very simple one which is just used internally in the runtime and
24050         not passed back to managed code.
24052         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
24054         * metadata.h (MonoMethodSignature): Moved the
24055         `MonoGenericParam *gen_params' to the MonoMethodHeader.
24056         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
24058         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
24059         ves_icall_MonoMethod_GetGenericArguments(); this is now an
24060         interncall on the MonoMethod class, not on MethodInfo.
24061         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
24062         calling mono_reflection_bind_generic_method_parameters() directly.
24064         * loader.c (mono_method_get_signature): If this is a MethodSpec;
24065         return the already computed `method->signature'.
24066         (method_from_methodspec): New static function to load a method
24067         from a MethodSpec entry.
24068         (mono_get_method_from_token): Call the new method_from_methodspec()
24069         for MethodSpec tokens.  
24070         (mono_get_method_from_token): If we're a generic method, load the
24071         type parameters.
24073         * reflection.c (mono_image_get_memberref_token): Allow
24074         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
24075         table.
24076         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
24077         (mono_image_create_token): First check whether it's a generic
24078         method (so we'd need to create a MethodSpec), then do the other
24079         two alternatives.
24080         (mono_reflection_bind_generic_method_parameters): Return a
24081         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
24082         called directly from the interncall.
24084 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
24086         * reflection.c (load_public_key): Move loading of the public key
24087         into managed code.
24089         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
24091         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
24092         fields.
24094         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
24095         culture, hash_alg and public_key. Fixes #49555.
24097 2003-10-17  Martin Baulig  <martin@ximian.com>
24099         * class.h (MonoGenericInst): Moved this declaration here and added
24100         `MonoMethod *generic_method'.
24102         * icall.c
24103         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
24104         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
24106         * metadata.c (mono_metadata_type_equal): Two types of
24107         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
24108         index; ie. don't compare the address of the `MonoGenericParam'
24109         structure.
24110         (mono_metadata_load_generic_params): Removed the `MonoMethod
24111         *method' argument.
24113         * metadata.h (MonoGenericInst): Moved declaration to class.h.
24114         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
24116         * reflection.c (method_encode_signature): Encode the number of
24117         generic parameters.
24118         (encode_generic_method_sig): New static function.
24119         (method_encode_methodspec): New static function; creates an entry
24120         in the MethodSpec table for a generic method.
24121         (mono_image_get_methodspec_token): New static function.
24122         (mono_image_create_token): Call mono_image_get_methodspec_token()
24123         for generic methods.
24124         (mono_reflection_bind_generic_method_parameters): New public
24125         function.  Instantiates a generic method.
24127 2003-10-16  Martin Baulig  <martin@ximian.com>
24129         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
24130         *gen_params' here from MonoMethodHeader.
24132         * metadata.c (mono_metadata_parse_method_signature): If we have
24133         generic parameters, initialize `method->gen_params' and then set
24134         the correct `type->data.generic_param' in all the parameters.
24136 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
24138         * threads.c (mono_threads_get_default_stacksize): New function to 
24139         return the default stacksize.
24141         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
24142         termination of the finalizer thread, since the previous method had
24143         race conditions. Fixes #49628.
24145         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
24146         as for the other managed threads.
24148 2003-10-16  Martin Baulig  <martin@ximian.com>
24150         * class.c (inflate_generic_signature): Copy `generic_param_count'
24151         and `gen_params'.
24153         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
24154         New interncall.
24156         * metadata.c (mono_metadata_parse_method_signature): Actually set
24157         the `method->generic_param_count' here.
24158         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
24160 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
24162         * object.h: Add a new field to TypedRef to simplify the implementation
24163         of the REFANY opcodes in the JIT.
24165         * icall.c: Make use of the new field.
24167         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
24168         dynamically.
24170 2003-10-15  Martin Baulig  <martin@ximian.com>
24172         * class.c (mono_class_from_gen_param): Renamed to
24173         mono_class_from_generic_parameter() and moved most of the
24174         functionality from mono_reflection_define_generic_parameter()
24175         here; ie. we create a "real" class here.
24176         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
24177         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
24178         previously been called.
24180         * class.h (MonoGenericParam): Moved the declaration of this struct
24181         here from metadata.h and added `MonoMethod *method'.
24183         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
24184         interncall.
24186         * loader.c (mono_get_method_from_token): If we have any generic
24187         parameters, call mono_metadata_load_generic_params() to read them
24188         from the MONO_TABLE_GENERICPAR.
24190         * metadata.c (mono_metadata_load_generic_params): Added
24191         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
24193         * metadata.h (MonoMethodSignature): Replaced
24194         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
24195         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
24197         * reflection.c (mono_reflection_define_generic_parameter): Moved
24198         most of the functionality into the new
24199         mono_class_from_generic_parameter(); set the `method' field if
24200         we're a method parameter.       
24202 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
24204         * marshal.c (emit_struct_conv): if native size is 0
24205         emit no code.
24207 2003-10-14  Martin Baulig  <martin@ximian.com>
24209         * icall.c: The generics API has changed in the spec since it was
24210         added to System.Type; these modifications make it match the spec
24211         again.
24212         (ves_icall_Type_GetGenericParameters): Renamed to
24213         `ves_icall_Type_GetGenericArguments'.
24214         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
24215         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
24216         `ves_icall_MonoType_get_HasGenericArguments'.
24217         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
24218         `ves_icall_MonoType_get_IsGenericParameter'.
24219         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
24220         this is no interncall anymore.
24221         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
24222         `ves_icall_TypeBuilder_get_IsGenericParameter'.
24224 2003-10-14  Martin Baulig  <martin@ximian.com>
24226         * reflection.c (mono_reflection_bind_generic_parameters): Also
24227         inflate generic methods if we're reading the class from IL.
24229 2003-10-13  Martin Baulig  <martin@ximian.com>
24231         * reflection.c (mono_reflection_define_generic_parameter): This
24232         method isn't called directly from the icall anymore; take a
24233         `MonoReflectionAssemblyBuilder *' so we can use this for type and
24234         method generic parameters.
24235         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
24236         (method_builder_encode_signature): Encode generic parameters.
24237         (mono_image_get_method_info): Write generic params to the
24238         MONO_TABLE_GENERICPARAM table.
24240         * reflection.h (MonoReflectionMethodBuilder): Added
24241         `MonoArray *generic_params'.
24243         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
24245         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
24246         wrapper for mono_reflection_define_generic_parameter().
24247         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
24249 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
24251         * marshal.h: Add missing function to fix build.
24253         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
24254         the SetLastError pinvoke attribute.
24256         * marshal.c (mono_marshal_set_last_error): New helper function called
24257         by the generated code.
24258         
24259         * marshal.c (mono_mb_emit_branch): New helper function.
24261         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
24263         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
24264         classes as parameters and return values of delegates. Fixes #29256. 
24266 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
24268         * locales.c: use gint32 in non HAVE_ICU case
24270 2003-10-11  Martin Baulig  <martin@ximian.com>
24272         * mono-debug.c (mono_debug_add_method): Added a workaround for
24273         bug #48591.
24275 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
24277         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
24278         delegates passed to native code must use the STDCALL calling 
24279         convention. Fixes #35987.
24281 2003-10-10  Martin Baulig  <martin@ximian.com>
24283         * class.c (inflate_generic_type): If we're inflating for a generic
24284         type instance (and not for a generic method), return
24285         MONO_TYPE_MVAR unchanged.
24287 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24289         * string-icalls.c: Join ignores null strings in the source array.
24290         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
24291         * threads.c: GetAvailableTheads is slightly more accurate.
24293 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
24295         * threads.h threads.c : add mono_threads_set_default_stacksize
24296         and pass default to CreateThread calls.
24298 2003-10-09  Dick Porter  <dick@ximian.com>
24300         * icall.c:
24301         * locales.h:
24302         * locales.c: Internal calls for constructing CultureInfo and
24303         related objects from libicu (if its available.)
24305 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
24307         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
24309 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24311         * threadpool.c: added an argument to async_invoke_thread that is the
24312         item to process, pass the MonoAsyncResult to the thread start function
24313         when creating a new thread. This way we don't need to acquire any lock
24314         when we're creating a new thread. Readded a semaphore for faster
24315         response times (instead of that Sleep i added).
24317 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
24319         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
24320         get daylight change dates better on Windows, fix handling
24321         of platforms without tm_gmtoff.
24323 2003-10-06  Martin Baulig  <martin@ximian.com>
24325         * class.c (inflate_generic_method): Renamed to
24326         mono_class_inflate_generic_method() and made public.
24327         (mono_class_init): Don't inflate the generic methods here.
24328         (mono_class_from_generic): Added `gboolean inflate_methods'
24329         argument.  Inflate the methods here.
24331         * loader.c (mono_method_get_param_names): Ignore instances of
24332         generic types for the moment.
24334         * reflection.c (fixup_method): Added support for inflated methods.
24335         (mono_image_create_token): Use mono_image_get_methodref_token()
24336         for inflated methods.
24337         (mono_custom_attrs_from_param): Ignore instances of generic types
24338         for the moment.
24339         (mono_reflection_bind_generic_parameters): New public function.
24340         Moved all the functionality from
24341         ves_icall_Type_BindGenericParameters() here and added support for
24342         dynamic types.
24343         (mono_reflection_define_generic_parameter): Initialize
24344         `klass->methods' here.
24346         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
24347         functionality into mono_reflection_define_generic_parameter().
24348         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
24349         TypeBuilder, return that TypeBuilder.
24351 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24353         * appdomain.c: removed mono_delegate_semaphore.
24355         * threadpool.c:
24356         (mono_thread_pool_add): moved hash table creation inside and the thread 
24357         creation outside of the critical region.
24358         (mono_thread_pool_finish): removed obsolete code.
24359         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
24360         continue or exit the thread depending on the queue.
24362 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
24364         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
24365         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
24366         handle more bool marshalling options
24368 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
24370         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
24371         arrays of structs. Also add a more descriptive error message when
24372         a structure member is marshalled as LPArray.
24374 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
24376         * marshal.c (mono_marshal_get_native_wrapper): Add support for
24377         marshalling arrays of complex types. Fixes #29098. Also remove an
24378         usused and incomplete function.
24380 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
24382         * gc.c: report heap_size - free_bytes as total memory allocated
24383         (bug#49362).
24385 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
24387         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
24388         fix timezone handling problems on Windows.
24389         
24390         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
24391         asserts when the year is outside the range handled by ms the functions.
24393         * class.c (setup_interface_offsets): If the class is an interface,
24394         fill out its interface_offsets slot.
24396 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24398         * threadpool.c: mark threadpool threads as background.
24400 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
24402         * decimal.c - define DECINLINE to nothing if not using GCC
24404 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
24406         * assembly.c: More refcount fixes.
24408 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24410         * string-icalls.c: if we're not trimming, return the same string.
24411         When not splitting, don't create a new string.
24413 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24415         * image.c:
24416         (mono_image_open): increment the ref_count inside the critical section.
24418 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
24420         * image.c (mono_image_open): Fix reference counting bug.
24422 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
24424         * marshal.c (mono_marshal_type_size) struct alignment changed for 
24425         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
24426         64bits. Avoid leak in mono_marshal_get_native_wrapper when
24427         mono_lookup_pinvoke_call throws.        
24429 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
24431         * reflection.c (mono_reflection_parse_type): Fix #49114.
24433         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
24434         temporary workaround for cygwin header problem.
24436         * object.c (mono_object_isinst): Synchronize this with the code
24437         generated by the JIT for casts.
24439 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
24441         * reflection.c (encode_type): Fix #38332.
24443 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
24445         * marshal.c (mono_marshal_method_from_wrapper): New function to return
24446         the original method from the wrapper method.
24448 2003-09-25  Martin Baulig  <martin@ximian.com>
24450         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
24451         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
24452         (ves_icall_Type_get_IsGenericInstance): New interncall.
24454 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
24456         * object.c: fix cast warning in big endian code.
24458 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
24460         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
24461         
24462 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24464         * assembly.c: don't call check_env from mono_assembly_load. It's
24465         already done once in mono_assemblies_init and may cause headaches when
24466         multiple threads are loading assemblies.
24468 2003-09-19  Martin Baulig  <martin@ximian.com>
24470         * reflection.c (mono_reflection_define_generic_parameter): Don't
24471         allocate `klass->methods', set `klass->flags' to
24472         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
24474 2003-09-18  Martin Baulig  <martin@ximian.com>
24476         * class.c (mono_class_init): Don't create `class->methods' if it's
24477         already initialized.
24479         * metadata.c (mono_metadata_load_generic_params): Make this
24480         actually work.
24482         * reflection.c (mono_reflection_define_generic_parameter): Set
24483         parent class and interfaces from the constraints.
24485         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
24486         to keep this struct in sync with the declaration in TypeBuilder.cs.
24488 2003-09-17  Martin Baulig  <martin@ximian.com>
24490         * metadata.h (MonoType): Replaced the data's `int type_param'
24491         field with `MonoGenericParam *generic_param'.
24492         (MonoGenericParam): Added `MonoClass *klass'.
24494         * class.c (mono_class_from_gen_param): Removed the
24495         `MonoImage *image' and `int type_num' arguments.
24497         * metadata.c (mono_metadata_parse_generic_param): New static
24498         method; creates a MonoGenericParam which just contains the index.
24499         (do_mono_metadata_parse_type): Call
24500         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
24501         MONO_TYPE_MVAR.
24503         * reflection.c (mono_image_typedef_or_ref): Generic type
24504         parameters may be in the same assembly, but never use a typedef
24505         for them.
24506         (mono_reflection_define_generic_parameter): We're now creating a
24507         "real" class for the type parameter; it's now safe to call
24508         mono_class_from_mono_type() on the class'es type, it'll do the
24509         right thing.
24511 2003-09-16  Martin Baulig  <martin@ximian.com>
24513         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
24514         `symfile->range_entry_size' and `symfile->class_entry_size' here;
24515         the `symfile' data structure must be fully initialized before it
24516         gets added to the table.
24518 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
24520         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
24522         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
24523         class init trampolines.
24525 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
24527         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
24528         to the built-in profiler to turn off time and allocation profiling
24529         respectively.
24531 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
24533         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
24534         g_direct_equal.
24536         * debug-helpers.c (mono_method_full_name): Print the wrapper type
24537         in human readable form.
24539 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
24541         * reflection.c icall.c: Fixed warnings.
24543         * image.c (load_class_names): Use a temporary hash table to hold the
24544         namespaces in order to avoid doing many string comparisons.
24546         * image.h: Fix typo.
24548         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
24549         Pass NULL instead of g_direct_equal to the GHashTable constructor 
24550         since the NULL case is short-circuited inside g_hash_table_lookup, 
24551         leading to better performance.  
24553         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
24554         obtain the first custom attribute for a given index. Depends on the
24555         CustomAttribute table being sorted by the parent field.
24557         * reflection.c (mono_custom_attrs_from_index): Use the new function 
24558         for better performance.
24560 2003-09-07  Martin Baulig  <martin@ximian.com>
24562         * class.c (mono_class_init): If we're a generic instance, inflate
24563         all our methods instead of loading them from the image.
24564         (mono_class_from_generic): Set `class->methods = gklass->methods'.
24566 2003-09-07  Martin Baulig  <martin@ximian.com>
24568         * mono-debug-debugger.c: Added support for constructors.
24570 2003-09-06  Martin Baulig  <martin@ximian.com>
24572         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
24573         New interncall.
24575         * reflection.c (mono_reflection_setup_generic_class): Call
24576         ensure_runtime_vtable() to create the vtable.
24578 2003-09-05  Martin Baulig  <martin@ximian.com>
24580         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
24581         MONO_TYPE_MVAR.
24583 2003-09-04  Martin Baulig  <martin@ximian.com>
24585         * reflection.c (mono_reflection_define_generic_parameter): Generic
24586         parameters start with zero.
24588 2003-09-04  Martin Baulig  <martin@ximian.com>
24590         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
24592         * reflection.h (MonoReflectionGenericParam): New typedef.
24593         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
24594         the generic parameters from the managed TypeBuilder.
24596         * reflection.c (mono_reflection_define_generic_parameter): New function.
24597         (mono_reflection_create_runtime_class): Encode generic parameters.
24598         (mono_reflection_setup_generic_class): New function; this is
24599         called after adding adding all generic params to the TypeBuilder.
24600         (encode_type): Added MONO_TYPE_VAR.
24602 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
24604         * class.h class.c (mono_class_needs_cctor_run): Moved this method
24605         here from the JIT.
24607         * assembly.h assembly.c: Moved the AOT loading code into an assembly
24608         load hook.
24610 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
24612         * reflection.h reflection.c class.h class.c: Delete duplicate 
24613         definition of mono_type_get_name () from reflection.c and export the
24614         one in class.c.
24616         * class.c: Class loading fixes from Bernie Solomon 
24617         (bernard@ugsolutions.com).
24619         * reflection.c: Endianness fixes from Bernie Solomon 
24620         (bernard@ugsolutions.com).
24621         
24622 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
24624         * assembly.h assembly.c: Define a file format version for AOT
24625         libraries.
24626         
24627         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
24629         * appdomain.h (MonoJitInfo): New field to determine whenever the
24630         code is domain neutral.
24631         
24632 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
24634         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
24636 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
24638         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
24639         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
24640         Avoid caching the result since strings must be domain specific. Fixes
24641         #48050.
24643 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
24645         * marshal.c (mono_marshal_init): Make this callable multiple times
24646         since it is hard to find a correct place to call it.
24648         * object.c (mono_runtime_class_init): Execute static constructors in
24649         the correct appdomain.
24651         * image.c (build_guid_table): Handle the case when multiple images have
24652         the same GUID.
24654 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24656         * icall.c: added a couple of icalls for System.Web.
24658 2003-08-28  Martin Baulig  <martin@ximian.com>
24660         * icall.c (ves_icall_Type_BindGenericParameters): Use
24661         `klass->generic_inst' instead of `&klass->byval_arg' in the
24662         mono_type_get_object() call.  The returned type must be
24663         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
24665 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
24667         * NOTES: New file.
24669         * object.c (mono_class_proxy_vtable): Make it thread safe.
24671         * pedump.c: Fix warning.
24673         * object.c appdomain.h: Get rid of metadata_section. 
24674         It is no longer needed and it was causing deadlocks with domain->lock.
24676         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
24678 2003-08-26  Martin Baulig  <martin@ximian.com>
24680         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
24682 2003-08-26  Martin Baulig  <martin@ximian.com>
24684         * pedump.c (main): Call mono_metadata_init(),
24685         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
24686         and mono_loader_init().
24688 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
24690         * loader.h: Add missing include to fix build.
24692         * image.h: mono_image_load_references is no more.
24694         * assembly.c: Reworked assembly loading to make it really thread safe.
24695         After these changes, the assembly returned by mono_assembly_open is
24696         fully initialized, i.e. all its references assemblies are loaded.
24698         * assembly.c (mono_image_load_references): Renamed to 
24699         mono_assembly_load_references, and made private, since clients no
24700         longer need to call it.
24702         * class.c: Removed calls to mono_assembly_load_references, since it was
24703         a source of deadlocks.
24705         * loader.h loader.c class.h class.c: Protect data structures using a 
24706         new lock, the loader lock.
24708         * class.c (mono_class_setup_vtable): Create temporary hash tables and
24709         GPtrArrays only when needed.
24711         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
24712         into empty structures by mcs. Fixes pinvoke7.cs.
24713         
24714         * domain.c (mono_init): Call a new initialization function.
24716         * appdomain.c (mono_runtime_init): Call the new initializer function
24717         of the marshal module.
24719         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
24720         inserted into empty structures by mcs. Fixes pinvoke7.cs.
24722         * marshal.h marshal.c: Added locks around the wrapper caches to make
24723         this module thread safe.
24725         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
24726         this argument. Fixes pinvoke1.exe.
24728 2003-08-25  Lluis Sanchez <lluis@ximian.com>
24730         * object.h: Added call_type field to MonoMethodMessage and the corresponding
24731         enumeration of values. Removed fields to store remote call output values in
24732         MonoAsyncResult. Not needed any more.
24733         * object.c: Initialize call_type and async_result fields in mono_message_init.
24734         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
24735         dispatching the message.
24736         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
24737         async call to finish. To do it use a message with EndInvoke call type.
24739 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
24741         * loader.h loader.c (mono_method_hash_marhal_info): New function which
24742         determines whenever a method has marshalling info.
24744 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24746         * assembly.c: fix the build on windows.
24748 2003-08-22 Lluis Sanchez <lluis@ximian.com>
24750         * object.cs: Fixed bug #47785.
24752 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
24754         * string-icalls.c (StringReplace): If their are no occurances of
24755         the old string found return a reference to the supplied
24756         string. This saves some memory and matches MS behavoir.
24757         
24758 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24760         * socket-io.c: fixed compilation for systems that define AF_INET6
24761         and don't define SOL_IP/SOL_IPV6.
24763 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
24765         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
24766         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
24768         * rawbuffer.c rawbuffer.h: Make this module thread safe.
24770         * domain.c: Make this module thread safe.
24772         * domain.c (mono_init): Call new initialization function.
24774         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
24775         reference types too. Fixes #38812.
24777         * image.c (mono_image_init): Fixed warnings.
24779         * class.c (mono_class_from_typeref): Handle assembly load failure
24780         correctly.
24782         * appdomain.c (add_assemblies_to_domain): Handle the case when
24783         the references of an assembly are not yet loaded.
24785         * metadata.c image.c assembly.c: Moved initialization of global
24786         variables to a separate function called at startup since lazy 
24787         initialization of these variables is not thread safe.
24788         
24789         * image.c assembly.c: Made this module thread safe by adding locks in 
24790         the appropriate places.
24792         * domain.c (mono_init): Call the new initialization functions of the
24793         three modules.
24795 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
24797         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
24798           make a direct call. It is proxy's work to make the call asynchronous.
24799           mono_delegate_end_invoke(): If the targe is a proxy, just collect
24800           the return values.
24801         * object.cs: mono_method_call_message_new(): read AsyncResult and
24802           state object from parameters list, if this info is requested.
24803         * object.h: Added fields to store remote call output values in
24804           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
24806 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
24808         * object.h: add needed fields to MonoThread.
24809         * threads.c, threads.h: allow registering a function to cleanup data
24810         allocated per thread by the JIT.
24812 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24814         * loader.h: portability fix by Bernie Solomon
24815         * <bernard@ugsolutions.com>.
24817 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
24819         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
24820         return a MonoArray. This simplifies the code and also ensures that
24821         the cache allways contains an object reference as a value.
24823         * icall.c (ves_icall_get_parameter_info): Simplified using the new
24824         function.
24826 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24828         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
24829         fixes a problem with byte ordering when getting the address family for
24830         a socket.
24832 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
24834         * .cvsignore: Added monosn.
24836         * reflection.h reflection.c loader.c: Added support for parameter
24837         marshalling to dynamically created types. Fixes #47295.
24839 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
24841         * rand.c: remove useless warnings.
24843 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
24845         * class.c: implemented ldtoken for methods and fieldrefs.
24847 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24849         * threadpool.c: when mono_async_invoke was called, no one took care of
24850         monitoring the queue. So if the method invoked took some time and we
24851         got new async invoke requests after 500 ms (the thread created waited
24852         that long in WaitForSingleObject), the new async invoke was not called
24853         until the previous one finished.
24855         This is fixed now. Thanks to Totte for helping with it.
24857 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24859         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
24861 2003-08-11  Martin Baulig  <martin@ximian.com>
24863         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
24865 2003-08-06  Martin Baulig  <martin@ximian.com>
24867         * mono-debug-debugger.c: Added support for static fields,
24868         properties and methods.
24870 2003-08-06  Martin Baulig  <martin@ximian.com>
24872         * mono-debug-debugger.c: Don't store the MonoString's vtable to
24873         make this work for applications with multiple application domains.
24875 2003-08-04  Martin Baulig  <martin@ximian.com>
24877         * mono-debug-debugger.c: Completely reworked the type support; the
24878         most important thing is that we're now just using one single
24879         `MonoType' instance per type.
24881 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
24883         * mono-endian.h, mono-endian.c, icall.c: Added icall
24884         ves_icall_System_Double_AssertEndianity to assert double word endianity
24885         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
24887 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
24889         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
24890         support, icalls and fixes.
24892 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
24894         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
24895         classes that are a punctuation character in .NET is not the same a
24896         g_unichar_ispunct.
24898 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24900         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
24902 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
24904         * icall.c: Add new MemCopy internalcall.
24905         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
24906         Simplified code; It is not necessary to handle all the cases here,
24907         as the C# code takes care of it.  Only handle the case of the name
24908         resource embedded into the assembly.
24910         Changed signature to return the data pointer and the size of the
24911         data. 
24913 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
24915         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
24916         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
24918 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
24920         * socket-io.c: ignore EINTR error in select.
24922 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
24924         * class.h, class.c: removed unused subclasses field in MonoClass.
24926 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
24928         * icall.c: improve fix of get_base_definition(). If the parent class
24929           doesn't have the mehod, look at the parent of the parent.
24930         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
24931           to check if a parameter is an in or out parameter
24932           (PARAM_ATTRIBUTE_IN is not set by default).
24933           mono_method_return_message_restore(): Use mono_class_value_size to
24934           get the size of a value type. mono_type_stack_size (parameterType)
24935           does not return the correct value if parameterType is byRef.
24936           mono_load_remote_field(), mono_load_remote_field_new(),
24937           mono_store_remote_field(), mono_store_remote_field_new():
24938           raise exception if the remote call returns an exception.
24940 2003-07-28  Martin Baulig  <martin@ximian.com>
24942         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
24943         method.  This is a wrapper around mono_runtime_invoke() which
24944         boxes the instance object if neccessary.
24946 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
24948         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
24949         metadata.h, row-indexes.h, verify.c: first cut of generics support.
24951 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
24953         * icall.c: disable mcs bug workaround.
24955 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
24957         * object.c (mono_runtime_class_init): Take the metadata_section
24958         mutex before obtaining the domain mutex.
24960         * appdomain.h: Added definition of metadata_section mutex here. 
24962         * object.c: define metadata_mutex here.
24964 2003-07-24  Ravi Pratap  <ravi@ximian.com>
24966         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
24967         fixed.
24969 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
24971         * reflection.c: Fix bug #46669
24973 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24975         * exception.c:
24976         * exception.h:
24977         * icall.c:
24978         * object.h: fill in the type name for TypeLoadException.
24980 2003-07-23  Ravi Pratap  <ravi@ximian.com>
24982         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
24983         relationship between TypeBuilders while compiling corlib) and bug
24984         45993 (Array types returned from the runtime while compiling
24985         corlib were from the loaded corlib).
24987 2003-07-22  Martin Baulig  <martin@ximian.com>
24989         * mono-debug-debugger.c: Reworked the type support a bit more;
24990         distinguish between types and classes.
24992 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
24994         * icall.c: add IsArrayImpl icall.
24996 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
24998         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
24999         initializing real_size only once. Also fix bug #46602.
25001 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
25003         * object.c: Renamed mono_metadata_section to metadata_section.
25005 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
25007         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
25008           empty array if the type is an array. Fixed.
25009           ves_icall_MonoMethod_get_base_definition: if the base method
25010           is abstract, get the MethodInfo from the list of methods of
25011           the class.
25012         * reflection.c: ParameterInfo.PositionImpl should be zero-based
25013           and it was 1-based. Fixed in mono_param_get_objects.
25015 2003-07-20  Martin Baulig  <martin@ximian.com>
25017         * mono-debug.h: Set version number to 31.
25018         (mono_debug_init): Added `MonoDomain *' argument.
25020         * mono-debug-debugger.c: Reworked the type support; explicitly
25021         tell the debugger about builtin types; pass the `klass' address to
25022         the debugger.
25024 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
25026         * image.c: Allow new metadata tables to be loaded without a
25027         warning. Also update the warning message to give the new constant value.
25028                 
25029 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
25031         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
25032         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
25033         array type representation changes.
25035 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
25037         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
25038         on Environment.Exit () call.
25040 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
25042         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
25043         requires a matching corlib.
25045 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
25047         * Changelog: My editor decided to add a CR to each line. Sorry about that.
25048           Committed again without the CRs.
25049         
25050 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
25052         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
25053           getting it from the "this" socket instance. Did not work
25054           if the socket is a subclass of Socket.
25055           Also fixed bug #35371.
25057 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
25059         * metadata.c: fixed size for TypedByRef.
25060         * loader.c: when searching for a method, consider the vararg amrker.
25061         * unicode.c, decimal.c: constify some arrays.
25063 2003-07-15  Dick Porter  <dick@ximian.com>
25065         * socket-io.c: Fixed compilation for gcc < 3.2.
25067         Fixed compilation for machines that don't have AF_INET6 (thanks to
25068         Bernie Solomon <bernard@ugsolutions.com> for that part.)
25070         Fixed compile warnings.
25071         
25072         Fixed formatting and line endings.
25074 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
25076         * socket-io.h:
25077         * socket-io.c: Added IPv6 support.
25079 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
25081         * class.c (mono_class_is_assignable_from): New function to implement
25082         the is_assignable_from logic. Used by mono_object_isinst, 
25083         Type::IsAssignableFrom () and the interpreter.
25085         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
25086         Object, even interfaces.
25087         
25088         * object.c (mono_object_isinst): Implement in terms of 
25089         is_assignable_from.
25091         * icall.c (ves_icall_type_is_assignable_from): New icall.
25093 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
25095         * domain.c (foreach_domain): fix compiler warning.
25097 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
25099         * image.c (load_metadata_ptrs): use g_strndup because strndup is
25100         not available on all plattforms
25102 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
25104         * image.h image.c: Store the metadata version string in MonoImage.
25105         * icall.c: New icall to retrieve the image version.
25106         * reflection.c (create_dynamic_image): Fill in the image version field
25107         * reflection.c (build_compressed_metadata): Use the image version
25108         from the image structure.
25110 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25112         * appdomain.c: modified comment.
25113         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
25114         That will be its last iteration when mono_gc_cleanup is called from
25115         mono_runtime_cleanup and before the domain is unloaded.
25117         Fixes bug #45962.
25119 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
25121         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
25122         attributes.
25124 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
25126         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
25127         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
25128         Bernie Solomon <bernard@ugsolutions.com>.
25130 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
25132         * object.c, object.h: provide mono_object_new_fast() for faster
25133         allocation in some special cases.
25135 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
25137         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
25138         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
25140 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
25142         * threadpool.c: fix leaks.
25144 2003-07-01  Dick Porter  <dick@ximian.com>
25146         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
25147         using MonoGHashTables.  Fixes threadpool bug posted to list.
25149 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
25151         * image.h, image.c: added support to load an assembly from a byte array.
25152         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
25153         assembly bundle support.
25155 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
25157         * threadpool.c (mono_thread_pool_add): keep a reference to the
25158         AsyncResult to prevent GC
25160 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
25162         * class.c: leak fix.
25164 2003-06-25  Dick Porter  <dick@ximian.com>
25166         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
25167         for the async object, the WaitHandle object will close the handle.
25168         Fixes bug 45321.
25170 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
25172         * class.c: in mono_array_class_get (), lookup from the hash with the
25173         same type we insert: this works around a bug in
25174         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
25175         lluis. The real fix will have to wait for after the release.
25177 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
25179         * icall.c: fix memory leak when getting type members.
25181 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
25183         * reflection.c: added more pubtoken special cases.
25185 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
25187         * class.c: handle field offset correctly when class size
25188         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
25190 2003-06-20  Martin Baulig  <martin@ximian.com>
25192         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
25193         *image' field.
25195 2003-06-20  Martin Baulig  <martin@ximian.com>
25197         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
25199 2003-06-20  Martin Baulig  <martin@ximian.com>
25201         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
25202         just distinguish between variables in registers and variables at
25203         an offset relative to a register.
25205 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25207         * icall.c: #ifdef out latest changes until mcs is fixed.
25209 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
25211         * icall.c: return members in metadata order.
25213 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
25215         * icall.c: avoid infinite loop in GetTimeZoneData.
25217 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
25219         * icall.c: added Marshal.Prelink/All icalls.
25221 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
25223         * object.c, object.h: fix warnings and do some overflow checking
25224         when creating arrays.
25226 2003-06-17  Dick Porter  <dick@ximian.com>
25228         * file-io.h:
25229         * file-io.c: File attributes need to be tweaked slightly when
25230         passed from the managed to the w32 world.
25232 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
25233         * profiler.h profiler-private.h profiler.c: Rework last patch
25234         based on suggestion by Paolo.
25235         
25236 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
25238         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
25239         instruction level coverage data collection.
25240         * profiler.h profiler.c (: Added new callback function which can be
25241         used by the profiler to limit which functions should have coverage
25242         instrumentation.
25243         * profiler.c (mono_profiler_load): Call g_module_build_path to
25244         generate the file name of the profiler library.
25246 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
25248         * profiler.c, profiler.h, profiler-private.h: added basic block 
25249         coverage profiling API.
25251 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
25253         * reflection.c (mono_reflection_create_runtime_class): Add support
25254         for events in dynamically generated code.
25256         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
25257         not allocated.
25259 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
25261         * icall.c: when getting timezone info, return reasonable values if we
25262         can't get the actual data.
25264 2003-06-14  Dick Porter  <dick@ximian.com>
25266         * threads.c (start_wrapper): Remove the reference to the thread
25267         object in the TLS data, so the thread object can be finalized.
25268         This won't be reached if the thread threw an uncaught exception,
25269         so those thread handles will stay referenced :-( (This is due to
25270         missing support for scanning thread-specific data in the Boehm GC
25271         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
25273 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
25275         * reflection.c: ensure streams and tables are first allocated with
25276         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
25278 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
25280         * icall.c: fixed GetElementType for byrefs (bug# 44792).
25282 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
25284         * reflection.c (mono_reflection_create_runtime_class): Add support for
25285         properties to dynamically created classes.
25286         * reflection.c: Fix a few places where non-MonoObjects were inserted
25287         into the tokens hashtable.
25289 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
25291         * object.c: some support to handle out of memory exceptions.
25293 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
25295         * marshal.c (mono_marshal_get_native_wrapper): support reference
25296         return types
25298 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
25300         * object.h, object.c: more portability stuff from Bernie Solomon.
25301         Unexport mono_object_allocate(). Added mono_object_unbox ().
25302         Set exitcode when an unhandled exception is thrown.
25304 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
25306         * marshal.c (mono_marshal_get_native_wrapper): use custom
25307         marshaler for return types.
25309 2003-06-10  Dick Porter  <dick@ximian.com>
25311         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
25312         ip_mreq is available
25314 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
25316         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
25317         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
25318         by Bernie Solomon <bernard@ugsolutions.com>.
25320 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
25322         * gc.c (mono_gc_init): Avoid error message on shutdown when
25323         GC_DONT_GC=1 is used.
25325         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
25326         New icall to return the GUID of a module.
25328 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
25330         * class.c: ensure instance size always includes the parent's size
25331         even whem class size is set explicitly (fixes bug#44294).
25333 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
25335         * profiler.h, profiler.c: made the simple profiler thread-safe,
25336         get more accurate timing info. Allow the loading of an
25337         externally-developed profiler module.
25339 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
25341         * marshal.c (mono_marshal_get_native_wrapper): improved
25342         class/byref arguments.
25343         (mono_marshal_get_native_wrapper): better string marshaling support.
25345 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
25347         * class.c: ensure .pack and .size are handled correctly and
25348         simplified layout of static fields.
25350 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
25352         * appdomain.c
25353         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
25355         * loader.c (mono_lookup_pinvoke_call): look for modules in the
25356         current directory (fix bug 44008)
25358 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
25360         * marshal.c (mono_marshal_get_native_wrapper): started support for
25361         custom marshalers.
25362         (mono_delegate_to_ftnptr): consider marshalling specifications
25364 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
25366         * reflection.c, reflection.h: emit custom marshal info.
25368 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25370         * object.c: free the GError.
25371         * icall.c: added CloseEvent_internal.
25372         * threads.[ch]:
25373         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
25374         call.
25376 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
25378         * loader.c (mono_method_get_signature): Add support for dynamic
25379         assemblies.
25381 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
25383         * reflection.c: fixed bug #43905.
25385 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
25387         * class.c, domain.c, icall.c, metadata.h, object.h: support for
25388         handling TypedReference and ArgIterator.
25389         * loader.c, loader.h: added function to get signature at call site.
25391 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
25393         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
25394         data readonly. Buglets and warning fixes. Some MethodSpec support.
25396 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
25398         * class.h, class.c, object.c: remove relative numbering support.
25400 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
25402         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
25403         free the string, until we get a chance to fix Gtk#
25405 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25407         * marshal.c: revert last patch.
25409 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
25411         * icall.c: updates for new mono_class_vtable() not calling
25412         the type constructor anymore.
25414 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
25416         * object.h, object.c: separate vtable creation from type
25417         initialization. Make running the .cctor thread safe.
25419 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
25421         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
25423 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
25425         * loader.c (mono_get_method): consider calling convention
25427 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
25429         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
25430         to return the invisible global type for a module.
25432         * reflection.c (mono_image_build_metadata): Emit global fields too.
25434 2003-05-20  Peter Williams  <peterw@ximian.com>
25436         * loader.c (mono_lookup_internal_call): Add a few newlines.
25438 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
25440         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
25441         literal strings.
25443         * appdomain.c (set_domain_search_path): Recalculate search path when
25444         AppDomainSetup.PrivateBinPath changes.
25446         * object.c (mono_class_compute_gc_descriptor): It turns out some
25447         parts of the class libs (like System.Thread) holds pointers to
25448         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
25449         to treat native int a pointer type here.
25450         
25451 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
25453         * appdomain.h, domain.c: add hashtable for jump target resolution.
25455 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
25457         * reflection.h reflection.c icall.c: Added new icalls 
25458         GetManifestResourceInfoInternal, GetModulesInternal and support
25459         infrastructure.
25461 2003-05-16  Dick Porter  <dick@ximian.com>
25463         * icall.c:
25464         * file-io.h:
25465         * file-io.c: Implement System.IO.MonoIO::GetTempPath
25467 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
25469         * object.c: mono_store_remote_field: little fix to previous patch.
25471 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
25473         * class.c: add constructors to array classes.
25474         * icall.c: special case array construction for InternalInvoke (),
25476 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
25478         * class.h class.c reflection.c object.c: Added support for field
25479         defaults in dynamically generated classes.
25481 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
25483         * reflection.c: properly encode charset for ddlimport.
25485 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
25487         * threads.c: allow compiling without GC.
25489 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
25491         * appdomain.h, object.c, object.h, threads.c, threads.h: added
25492         handling of thread static data.
25494 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
25496         * reflection.h, reflection.c: added mono_custom_attrs_free ().
25498 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
25500         * class.c (mono_array_class_get): always set the serializable flags
25501         (mono_array_class_get): always set the SEALED attribute for array types
25503 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
25505         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
25506         attributes (fix for bug 42021).
25508 2003-05-12  Dick Porter  <dick@ximian.com>
25510         * gc.c: Don't run finalizers when the finalizer thread is
25511         finishing up, because the default domain has already been
25512         destroyed.
25514 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
25516         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
25517         value is null, we should throw an exception.   This is slightly
25518         different than the other conventions used for the constructor.
25520 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25522         * socket-io.c: fixed windows build.
25524 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25526         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
25528 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
25530         * object.c (mono_string_new_wrapper): Compatibility fix for MS
25531         compilers.
25533 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
25535         * class.c (mono_class_layout_fields): Add experimental GC aware
25536         auto layout facility. Requires class library changes to work correctly.
25538         (mono_class_setup_vtable): Avoid overriding explicit interface
25539         method implementations. Fixes iface3.exe test.
25541         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
25542         object reference.
25543         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
25544         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
25546         * metadata.h: Add new type classification macro which determines
25547         whenever the type holds an object reference.
25549 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
25551         * marshal.c (mono_marshal_get_native_wrapper): cleanups
25553 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
25555         * gc.c (finalizer_thread): Work around a GC bug.
25557 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
25559         * marshal.c (emit_struct_conv): allow unions
25561         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
25563 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
25565         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
25567 2003-05-06  Martin Baulig  <martin@ximian.com>
25569         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
25571 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25573         * socket-io.c:
25574         (Select_internal): allow NULLs, don't create arrays if not needed.
25575         Coupled with Socket.cs changes.
25577         * threadpool.c:
25578         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
25579         register a finalizer for it that will close the semaphore handle. This
25580         fixes the leak and make Lupus' test run with > 4080 loops.
25582 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
25584         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
25585         Jerome Laban (bug #42287)
25587 2003-05-02  Martin Baulig  <martin@ximian.com>
25589         * debug-mono-symfile.h
25590         (MonoSymbolFile): Moved declaration into mono-debug.h.
25591         (MonoDebugMethodJitInfo): Likewise.
25592         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
25593         argument.
25594         (_mono_debug_address_from_il_offset): Take a
25595         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
25597         * mono-debug.h
25598         (MonoDebugDomainData): New struct.
25599         (mono_debug_get_domain_data): New function.
25600         (mono_debug_add_method): Take an additional `MonoDomain *'
25601         argument.
25602         (mono_debug_source_location_from_address): Likewise.
25603         (mono_debug_il_offset_from_address): Likewise.
25604         (mono_debug_address_from_il_offset): Likewise.
25606 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
25608         * reflection.c: one more check for null type in custom attrs.
25610 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25612         * reflection.c: avoid warning (comparison is always false due to limited
25613         range of data type).
25615 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25617         * icall.c: throw an exception in Type.GetField if the argument 'name'
25618         is NULL.
25620 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
25622         * reflection.c: fixed handling of enums in named arguments to custom
25623         attributes (bug #42123).
25625 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
25627         * reflection.c: use the right array element type and handle
25628         a null for a Type argument, too.
25630 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
25632         * reflection.c: handle arrays as arguments to custom attributes.
25634 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
25636         * reflection.c: handle a string value in a custom attr
25637         ctor that takes an object.
25639 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
25641         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
25642         (fix bug #42063)
25644 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
25646         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
25648 2003-04-27  Martin Baulig  <martin@ximian.com>
25650         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
25651         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
25652         MONO_DEBUGGER_EVENT_BREAKPOINT.
25653         (mono_breakpoint_trampoline_code): Removed.
25654         (mono_debugger_event_handler): The last argument is now a
25655         `guint32'.
25656         (mono_debugger_insert_breakpoint_full): Removed the
25657         `use_trampoline' argument.
25658         (mono_debugger_method_has_breakpoint): Likewise.
25659         (mono_debugger_trampoline_breakpoint_callback): Renamed to
25660         mono_debugger_breakpoint_callback(); take the method and
25661         breakpoint number as arguments.
25663 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
25665         * metadata.c: fix off by one when loading parameters attributes.
25667 2003-04-24  Martin Baulig  <martin@ximian.com>
25669         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
25671 2003-04-24  Martin Baulig  <martin@ximian.com>
25673         * mono-debug-debugger.c: Moved all code which interacts with the
25674         Mono Debugger here.
25676         * debug-mono-symfile.c: This code now just deals with the symbol
25677         file itself, the debugger code is now in mono-debug-debugger.c.
25679 2003-04-23  Martin Baulig  <martin@ximian.com>
25681         * mono-debug.c (mono_debug_source_location_from_il_offset):
25682         New method; like mono_debug_source_location_from_address(), but
25683         takes an IL offset instead of a machine address.
25685 2003-04-23  Martin Baulig  <martin@ximian.com>
25687         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
25688         `line' field; this is now computed by the debugger.
25690 2003-04-23  Martin Baulig  <martin@ximian.com>
25692         * mono-debug.[ch]: New files.  This is the new debugging interface.
25694         * mono-debug-debugger.[ch]: New files.  Moved all code which
25695         interacts with the Mono Debugger here.
25697 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
25699         * domain.c (mono_init): initialize mono_defaults.monitor_class
25701 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
25703         * reflection.c (method_encode_code): Add a spicy exception to help
25704         future compiler authors.
25706 2003-04-21  Martin Baulig  <martin@ximian.com>
25708         * icall.c
25709         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
25710         Make this work with relative pathnames; g_filename_to_uri() needs
25711         an absolute filename.
25713 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
25715         * icall.c: Track name changes in Object and ValueType.
25717 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
25719         * metadata.c (mono_type_stack_size): size should be a multiple of
25720         sizeof (gpointer)
25722 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25724         * gc.c:
25725         (internal_domain_finalize): moved into mono_domain_finalize. No need
25726         to create another thread because the finalizers will be run in the
25727         finalizer thread.
25728         
25729         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
25730         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
25731         to be run (MS does this too).
25733 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
25735         * object.c (mono_class_compute_gc_descriptor): Update comment.
25737         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
25739         * image.h: Add synchronized wrapper cache.
25741         * image.c (do_mono_image_open): Initialize cache.
25743         * reflection.c (create_dynamic_mono_image): Initialize cache.
25745 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25747         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
25748         ves_icall_System_Buffer_ByteLengthInternal.
25750 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
25752         * reflection.c: setup klass->nested_in earlier. Allow
25753         a dash in the assembly name.
25755 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
25757         * metadata.c (mono_type_to_unmanaged): dont access
25758         type->data.klass for MONO_TYPE_OBJECT
25759         (mono_type_to_unmanaged): consider System.Delegate class
25761 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
25763         * class.c: just setup supertypes in the proper place instead of
25764         initializing the full element class for arrays.
25766 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
25768         * class.c: ensure the element class of arrays is initialized.
25769         Setup the supertype info for array classes, too.
25771 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
25773         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
25775 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25777         * Makefile.am: re-added -m option when running cygpath. This way,
25778         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
25779         separator.
25780         * mono-config.c: same codepath for locating mono config file for WIN32
25781         and the rest.
25782         * assembly.c: if mono_assembly_setrootdir is called, don't override
25783         the value set.
25785 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25787         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
25788         MONO_ASSEMBLIES variable.
25790 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
25792         * icall.c: added Assembly::GetNamespaces() icall.
25794 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25796         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
25798 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
25800         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
25801         * object.c: fixed bug in the construction of vtable for proxies
25803 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
25805         * object.c (mono_array_new): Mark mono_array_new as an icall.
25807 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25809         * class.c: fixed test for public method when overriding interfaces.
25810         Closes bug #40970.
25812 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
25814         * appdomain.h, domain.c: added mono_domain_foreach() to
25815         be able to access the currently loaded appdomains.
25816         * object.c: make string interning work across sppdomains.
25817         Mark some functions for use as icalls.
25819 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
25821         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
25823         * reflection.h reflection.c: Allocate long living data using 
25824         GC_MALLOC_ATOMIC so the collector does not need to scan it.
25826         * reflection.c: Double the allocation size in streams instead of
25827         increasing it, to prevent unneccesary copying on large assemblies.
25828         
25829         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
25830         creation if the assembly does not have the Run flag set.
25832 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
25834         * class.h: avoid the C++ keywords in header files (Jerome Laban
25835         spotted and fixed this).
25837 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25839         * object.c:
25840         (mono_unhandled_exception): fill in the arguments for the
25841         UnhandledException event. Only trigger that event for the default
25842         domain (as MS does).
25844 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
25846         * object.c: Improve typed allocation stuff based on suggestions from
25847         Paolo. Also turn it on if the GC library supports it.
25849 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
25851         * object.c object.h class.h: Added experimental typed allocation
25852         facility using the interfaces in gc_gcj.h.
25854         * os/gc_wrapper.h: Added new include files.
25855         
25856 2003-04-03  Martin Baulig  <martin@ximian.com>
25858         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
25859         which is not yet enabled by default.
25861         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
25862         functions.
25863         (mono_gc_lock, mono_gc_unlock): New static functions.
25865         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
25866         functions; stop/start the world for the garbage collector.  This
25867         is using the windows API; we need to complete the SuspendThread()/
25868         ResumeThread() implementation in the io-layer to make this work on Unix.
25869         (mono_gc_push_all_stacks): New public function; tells the garbage
25870         collector about the stack pointers from all managed threads.
25872 2003-04-03  Martin Baulig  <martin@ximian.com>
25874         * object.h (MonoThread): Added `gpointer stack_ptr'.
25876         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
25878 2003-04-03  Martin Baulig  <martin@ximian.com>
25880         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
25882 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
25884         * reflection.c (typebuilder_setup_fields): Initialize field.first and
25885         field.last.
25887 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
25889         * loader.c (mono_lookup_internal_call): Report the corlib that is
25890         out of sync.
25892 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
25894         * icall.c (ves_icall_type_GetTypeCode): fixed check for
25895         System.DBNull (it's class not valuetype).
25897 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
25899         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
25900         if the array method was already assigned a token (fixes bug#40646).
25902 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
25904         * reflection.c (mono_reflection_get_type): Attempt type resolve even
25905         if no assembly is given.
25907 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
25909         * metadata.h: Added the new tables.
25911         * row-indexes.h: Added definitions for new tables.
25913         * metadata.c: Add schemas for new tables, and add support for
25914         computing the sizes of them.
25916         * class.c: Update for handling the new type cases.
25918 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
25920         * metadata.h (MONO_TYPE_IS_VOID): new macro
25922 2003-03-31  Martin Baulig  <martin@ximian.com>
25924         * threads.h (MonoThreadCallbacks): Added `thread_created'.
25926         * threads.c (mono_thread_new_init): Call `thread_created' in the
25927         mono_thread_callbacks.
25929 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
25931         * loader.h: added marshalbyrefobject_class to mono_defaults
25932         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
25933         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
25934           generation of output parameters.
25935           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
25936         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
25937           contextbound and the target object belongs to the context of the caller.
25938         * object.h: added context and unwrapped_server variables in MonoRealProxy.
25939         * object.c: Implemented support for interfaces and abstract classes
25940           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
25941           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
25943 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
25945         * class.h class.c (mono_class_is_subclass_of): New function.
25946         
25947         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
25948         routines for most common case (calls from ArrayList::ToArray).
25950         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
25951         routine so programs which call Environment::Exit() can be profiled.
25953         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
25954         Added MONO_ARCH_SAVE_REGS.
25956         * icall.c (ves_icall_type_is_subtype_of): Use new function.
25958 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
25960         * blob.h: Add a couple of new MonoType types definitions.
25962         * tabledefs.h: Add a couple of new call convs.
25964 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
25966         * reflection.h (MonoReflectionDynamicAssembly): track changes in
25967         the layout of the class.
25969         * reflection.c (alloc_table): double the size on overflow to avoid
25970         unnecessary copying.
25972         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
25973         avoid filling out metadata tables and blobs. Also set mb->ilgen to
25974         null so it can be garbage collected.
25975         
25976 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
25978         * reflection.c (mono_reflection_get_type): Return the resolved type
25979         only if it is in the assembly we searched.
25981         * reflection.c (ensure_runtime_vtable): Initialize method slots.
25983         * class.c (mono_class_setup_vtable): Set the slot of the overriding
25984         method.
25986 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25988         * appdomain.c:
25989         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
25990         the right one is 'file:///blah', but MS allows it.
25991         * assembly.c:
25992         (mono_assembly_open): allow 'file://blah'
25994         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
25996 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
25998         * socket-io.c: fixes bug #40310.
26000 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
26002         * reflection.c (mono_reflection_parse_type): handle deeply nested
26003         types correctly.
26005         * reflection.c (mono_image_create_token): Use unique token values
26006         since they will be put into a hash table.
26008         * class.c (mono_class_setup_vtable): If a method occurs in more than
26009         one place in the vtable, and it gets overriden, then change the
26010         other occurances too.
26012         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
26013         object as return type.
26015 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
26017         * icall.c: Deleted "ToString" implementation for double and float
26018         because they are full implemented in managed code.
26020 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
26022         * reflection.c, reflection.h: implemented and exported functions
26023         to retrieve info about custom attributes.
26025 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26027         * appdomain.c: moved Uri handling to assembly.c
26028         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
26029         work when using a file Uri in *nix and windows.
26031         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
26032         GetReferencedAssemblies.
26034 2003-03-18  Dick Porter  <dick@ximian.com>
26036         * icall.c: Rename a couple of internal calls
26038         * threads.c: Set the thread state to Stopped when a thread exits.
26039         Fixes bug 39377.
26041 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
26043         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
26044         New icall.
26046         * object.c (mono_class_vtable): fix warning.
26048 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
26050         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
26052         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
26053         memory.
26054         (method_encode_clauses): Create exception info structures in the right
26055         order.
26056         (mono_reflection_setup_internal_class): Initialize supertypes field.
26058         * class.c object.c: Handle interfaces which implement other interfaces 
26059         correctly.
26061         * class.h class.c: Move the supertypes array initialization code into 
26062         a separate function so it can be used for dynamic types too. Also call
26063         it earlier, in mono_class_init(), since it can be used before the
26064         type is initialized.
26066 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26068         * Makefile.am:
26069         * assembly.c:
26070         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
26072         * appdomain.c:
26073         * appdomain.h:
26074         * marshal.c:
26075         * object.c: remove warnings.
26077 2003-03-13  Martin Baulig  <martin@ximian.com>
26079         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
26080         (MonoDebugLexicalBlockEntry): New types.
26082         * debug-mono-symfile.c
26083         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
26085 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26087         * process.c: ret can be any non-zero value accroding to MS doc.
26089 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
26091         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
26092         fixing a warning for a miss-used prototype, would have cause
26093         random memory corruption.
26095 2003-03-07  Martin Baulig  <martin@ximian.com>
26097         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
26098         getting really annoying ....
26100 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
26102         * reflection.c (fixup_method): added support for array methods.
26104 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
26106         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
26107         (pointed out by Michael Adams).
26109 2003-03-04  Dick Porter  <dick@ximian.com>
26111         * icall.c: Temporarily reverted the Double and Single ToString()
26112         change, because it broke nunit.
26114 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
26116         * object.h, threads.h: make include files compatible with C++
26117         (patch by Jerome Laban <jlaban@wanadoo.fr>).
26119 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
26121         * icall.c: Erased ToString helper functions for Double and Single.
26122         Now, that implementations ar all in managed code (Double and Single
26123         Formatters).
26125 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
26127         * appdomain.c: Added method for initializing the default context of
26128         a domain. Added internal call for getting the default context.
26129         * appdomain.h: Added context variable in MonoDomain struct.
26130         * domain.c: mono_domain_set also sets the default context of the domain
26131         * icall.c: Mapped internal method InternalGetDefaultContext.
26132         * object.c: mono_object_get_virtual_method returns always a remoting
26133         wrapper if the object is a transparent proxy.
26134         mono_runtime_invoke_array: when creating an object by calling the
26135         constructor, if the created object is a proxy, then the constructor should
26136         be called using the a remoting wrapper.
26138 2003-03-03  Dick Porter  <dick@ximian.com>
26140         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
26141         variable so it compiles on solaris.  Problem spotted by
26142         Christopher Taylor <ct@cs.clemson.edu>
26144 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26146         * appdomain.c:
26147         (get_info_from_assembly_name): don't leak value.
26149         * icall.c:
26150         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
26151         result.
26153 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
26155         * assembly.c: export mono_image_load_references ().
26156         * class.c: handle function pointers. mono_class_from_name() now
26157         supports nested type names directly.
26159 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
26161         * reflection.h reflection.c: Encode already created dynamic methods 
26162         and fields correctly as a DEF instead of a REF.
26164         * reflection.c: Get rid of the force_ref argument to 
26165         mono_image_typedef_or_ref since it was wrong in the first place.
26167         * string-icalls.c: add error checking to string constructors according
26168         to the MSDN docs.
26170         * reflection.c: Emit types in the order their TypeBuilders were 
26171         created. Previously, a new table index was assigned to each type before
26172         the tables were emitted. This was wrong because the signature blob
26173         might already refer to a type by its original table index.
26175 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
26177         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
26178         change.
26179         
26180 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26182         * Makefile.am: make assemblies dir have \ instead of / on windows.
26184 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
26186         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
26187         iterate over the NESTEDCLASS table using a linear search since the
26188         table is not guaranteed to be sorted by the secondary key.
26190         * class.c (mono_class_create_from_typedef): fixed up call to
26191         mono_metadata_nesting_typedef.
26192         
26193 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
26195         * marshal.c (mono_string_to_byvalstr): clear the memory as
26196         suggested by Jerome Laban <jlaban@wanadoo.fr>
26198 2003-02-26  Dick Porter  <dick@ximian.com>
26200         * process.c: Cope with padding in .rsrc blocks
26202 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
26204         * metadata.h: reverted the filter_len change, it breaks reflection
26205         
26206 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
26208         * metadata.h: added a new field to store the filter_len
26209         
26211 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
26213         * reflection.c: handle custom attributes for types and members
26214         created with Reflection.Emit (bug#38422).
26216 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
26218         * reflection.c: define RTSpecialName automatically for constructors for
26219         compatibility with MS.NET.
26221         * reflection.c (mono_reflection_create_runtime_class): initialize
26222         nested_in field of dynamically created classes.
26224 2003-02-22  Martin Baulig  <martin@ximian.com>
26226         * debug-mono-symfile.h: Incremented version number.
26228 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
26230         * object.h icall.c process.c: fix warnings.
26232 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
26234         * appdomain.h appdomain.c:
26235         (mono_domain_try_type_resolve): split the 
26236         name_or_tb argument into a name and a tb argument.
26237         (mono_domain_has_type_resolve): new function to check whenever the
26238         application has registered a TypeResolve event handler.
26239         
26240         * icall.c reflection.h reflection.c: move the type resolve logic into
26241         mono_reflection_get_type () so it will be invoked when 
26242         Assembly::GetType () is called.
26244         * reflection.c:
26245         (mono_reflection_get_type): renamed to get_type_internal.
26246         (mono_reflection_get_type): fixed type name generation so it works 
26247         for nested types too.
26248         (mono_reflection_get_type): call has_type_resolve () to avoid the 
26249         costly type name generation if there is no resolve event handler.
26251 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
26253         * class.c, image.c: load exported types from file references.
26255 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
26257         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
26258           used to cache the managed methods used to create proxies and make 
26259           remote invocation of methods.
26260         * class.h: Added in MonoVTable a flag to indicate that a class needs 
26261           to be remotely created.
26262         * object.c: Modified the method mono_class_vtable(). It now initializes 
26263           the remote flag of the vtable. Modified mono_object_new_specific(), 
26264           so now it checks the remote flag.
26265         * icall.c: Added a couple of internal methods, one for enabling instance 
26266           creation interception for a type, and one for creating objects bypassing
26267           the remote check.
26269 2003-02-18  Martin Baulig  <martin@ximian.com>
26271         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
26272         New interncall to get a method's metadata token.
26274         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
26275         New interncall for the debugger.
26277 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
26279         * class.c (mono_class_setup_vtable): allocate supertype array
26281 2003-02-18  Martin Baulig  <martin@ximian.com>
26283         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
26285 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26287         * reflection.c:
26288         (assembly_name_to_aname): jump over unknown properties (i've found
26289         something like: 'type, assembly, version=xxx, custom=null, public...',
26290         so now will ignore custom=null and still get the rest of the values).
26292 2003-02-17  Dick Porter  <dick@ximian.com>
26294         * threads.c: Have Thread.Start() wait for a semaphore to signal
26295         that the thread has set up all its local data.  This fixes bug
26296         34323, where Abort() raced the new thread's TLS data.
26298         Also removes the handle_store() call from start_wrapper, because
26299         threads are now always created suspended and there is no longer a
26300         race between the parent and child threads to store the info.
26302 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
26304         * image.c: explain the #- heap issue in a message, hopefully
26305         avoiding FAQs on mono-list.
26307 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26309         * icall.c:
26310         (GetEntryAssembly): if the domain has not invoked
26311         AppDomain.ExecuteAssembly yet, return the assembly of the default
26312         AppDomain.
26314 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
26316         * class.c (mono_ldtoken): make it work in dynamic assemblies.
26318 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
26320         * metadata.c, reflection.c: simple speedup to type hash
26321         and equals code.
26323 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
26325         * image.c, image.h, class.c, assembly.c: move module loading
26326         to MonoImage. When loading metadata, consider alignemnet from
26327         the start of metadata, not from the metadata address in memory.
26329 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
26331         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
26332         AssemblyBuilder objects. Factored out custom attribute creation into
26333         a separate function.
26334         (create_custom_attr): new function to create custom attributes.
26336 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
26338         * Makefile.am: Got tired of typing the full pathname to pedump.
26339         Until there is another option, am installing this.
26341 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
26343         * class.c (class_compute_field_layout): always set field->parent 
26344         (mono_ldtoken): use mono_defaults.fieldhandle_class;
26346 2003-02-11  Dick Porter  <dick@ximian.com>
26348         * threads-types.h:
26349         * monitor.c: Rewrote Monitor, making lock much faster and
26350         Pulse/Wait work as specified.  Also uses much fewer handles, and only
26351         creates them as needed.
26353         * exception.c: Added SynchronizationLockException
26355         * threads.c: Deleted old Monitor implementation.  The new one is
26356         in a new file.
26358 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
26360         * class.c: handled TypedReference type code. Set the correct size for
26361         class data. Setup interface_offsets for interface classes, too.
26363 2003-02-09  Martin Baulig  <martin@ximian.com>
26365         * debug-mono-symfile.h: Reflect latest symbol writer changes.
26367 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
26369         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
26370         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
26371         * object.c: fixed mono_object_get_virtual_method () for interfaces.
26372         * verify.c: check for code that runs after the end of the method.
26374 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
26376         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
26377         "System.Math::Round2".
26378         * sysmath.h: Added Floor, Round and Round2 definitions.
26379         * sysmath.c: Modified certain functions that were not 100% compliant
26380         with MS.NET (math precision) and added the implementation of Floor,
26381         Round and Round2.
26383 2003-02-07  Martin Baulig  <martin@ximian.com>
26385         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
26387 2003-02-07  Martin Baulig  <martin@ximian.com>
26389         * debug-mono-symfile.c: Reflected latest symwriter changes.
26390         (mono_debug_create_mono_symbol_file): Removed.
26391         (mono_debug_open_mono_symbol_file): Take an argument which
26392         specifies whether to create a dynamic symbol file.
26394 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
26396         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
26398 2003-02-05  Martin Baulig  <martin@ximian.com>
26400         * reflection.c (mono_image_build_metadata): Make this public,
26401         protect it against being called multiple times, don't create
26402         resources and don't build the compressed metadata here.
26403         (mono_image_create_pefile): Do this here.
26405         * icall.c
26406         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
26408 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26410         * socket-io.c: fixed bug #36322.
26412 2003-02-06  Piers Haken <piersh@friskit.com>
26414         * appdomain.[ch]:
26415         * class.h:
26416         * debug-mono-symfile.c:
26417         * icall.c:
26418         * loader.c:
26419         * mono-config.c:
26420         * monosn.c:
26421         * reflection.c:
26422         * socket-io.c: warning cleanups
26424 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
26426         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
26427         function. works like remoting invoke, but does a check for the Proxy first.
26429 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
26431         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
26433 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
26435         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
26436         array of pointers.
26437         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
26438         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
26440         * object.c (mono_store_remote_field_new): used by the new jit
26441         instead of mono_store_remote_field
26442         (mono_load_remote_field_new): used by the new jit
26443         instead of mono_load_remote_field
26445 2003-02-05  Patrik Torstensson
26447         * appdomain.c: changed unload to take the domain id instead
26448         of domain
26449         
26450         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
26453 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26455         * appdomain.c: don't look for assemblies in ApplicationBase if
26456         PrivateBinPathProbe is set.
26458 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26460         * object.c: make the first argument in main_args contain the absolute
26461         path to the assembly. Fixes bug #37511.
26463 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26465         * icall.c: get correct UTC offset for countries not using daylight
26466         time saving. Fixes bug #30030.
26468 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26470         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
26471         and 1 are the family).
26473 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
26475         * icall.c (ves_icall_InternalExecute): removed wrong assertion
26477         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
26479 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
26481         * reflection.c: added support for SignatureHelper tokens, which is
26482         needed by the Calli opcode.
26484         * reflection.h: track changes to SignatureHelper class.
26486         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
26488 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26490         * appdomain.c: fixed loading assemblies from PrivateBinPath.
26492 2003-02-03  Patrik Torstensson
26493         * appdomain.[c|h], domain.c : 
26494          - Added support for getting a domain via domain id
26495          - Support for setting and getting domain from System.AppDomain 
26496            (used in cross appdomain channel)
26497          - Added support for get/set for a MonoAppContext on a thread 
26498            (Context class in System.Runtime.Remoting.Contexts),
26499          - Removed hack in Get/SetData and ExecuteAssembly.
26500         
26501         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
26502         the managed world to get control when a proxy is created.
26504         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
26505         
26506 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
26508         * icall.c
26509         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
26510         Populate the codebase field as well.
26512 2003-02-02  Martin Baulig  <martin@ximian.com>
26514         * debug-mono-symfile.c
26515         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
26516         (mono_debug_symfile_add_method): Allow interncalls.
26518 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26520         * icall.c: throw parse exception if strtod fails or the string is empty.
26522 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
26524         * marshal.c: handle object type separately from defined
26525         class types.
26527 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
26529         * marshal.c: handle NATIVE_LPSTR for strings when it's
26530         explicitly specified.
26532 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
26534         * reflection.c, reflection.h, icall.c: setup the reflection
26535         handle cache for ModuleBuilders and AssemblyBuilders.
26537 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
26539         * reflection.c (reflection_methodbuilder_to_mono_method): set
26540         pinvoke flag
26542 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26544         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
26546 2003-01-29  Dick Porter  <dick@ximian.com>
26548         * threads.c: No need for the fake_thread kludge now that Thread
26549         doesn't run a class constructor
26550         
26551 2003-01-29  Dick Porter  <dick@ximian.com>
26553         * threads.c: Use g_direct_hash instead of the rather bogus
26554         g_int_hash
26556 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
26558         * marshal.c (mono_marshal_get_native_wrapper): add check for null
26559         (fix pinvoke12.exe)
26560         (mono_marshal_get_struct_to_ptr): generate valid IL code
26561         (mono_marshal_get_ptr_to_struct): generate valid IL code
26562         (*): correctly set sig->pinvoke, we need to memdup the signature
26563         to do that
26565 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
26567         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
26568         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
26570 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
26572         * profiler.c: provide more callers information.
26574 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
26576         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
26578         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
26580         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
26582 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
26584         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
26585         exception instead of going into an infinite loop on dates which it 
26586         can't yet handle.
26588         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
26589         out-of-range exception if needed.
26591         * class.c (mono_class_setup_vtable): allow a virtual method to provide
26592         an implementation for an interface method and to override an inherited
26593         method at the same time. 
26594         Imagine a scenario when a virtual method is used to override a
26595         virtual abstract method in a parent class, and this same method 
26596         provides an implementation for an method inherited from an interface. 
26597         In this case, the interface resolution code will set im->slot, which 
26598         means that the virtual method override pass will skip this method 
26599         which means a pointer to the abstract method inherited from the parent
26600         will remain in the vtable of this non-abstract class.
26602         * class.c: (mono_class_setup_vtable): continue search for a real 
26603         method if only an abstract method is found.     
26605 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
26607         * reflection.c: add size to encoding for ByValStr and ByValArray
26608         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
26610 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
26612         * class.c (mono_class_setup_vtable): pass the override info as an
26613         argument.
26615         * class.c (mono_class_setup_vtable): set the slot of overriding methods
26616         correctly.
26617         
26618         * reflection.c (ensure_runtime_vtable); add support for method 
26619         overrides.
26620         
26621 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
26623         * reflection.c (resolution_scope_from_image): Hack to work to work with
26624         dynamic assemblies.
26626         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
26627         added a 'force_ref' argument to force this function to allways return 
26628         a TypeRef. This is needed by mono_image_get_memberref_token ().
26629         
26630 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
26632         * reflection.c (mono_image_get_type_info): interfaces really don't have
26633         a parent.
26635         * reflection.c (mono_image_basic_init): fill out missing fields of
26636         image structure.
26638         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
26639         dynamic assemblies. This is required so dynamic assemblies show up in
26640         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
26641         Type::GetType() etc. This is consistent with MS behaviour.
26643         * image.c image.h reflection.c: add newly created classes to the name 
26644         cache so mono_class_get () will find them.      
26646 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
26648         First part of changes to get IKVM.NET running under mono.
26649         
26650         * appdomain.h, appdomain.c: added new function 
26651         mono_domain_try_type_resolve() which will emit TypeResolve events. 
26652         This function will call AppDomain::DoTypeResolve to do the actual work.
26654         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
26655         moved existing code dealing with dynamic tokens to a new function 
26656         called mono_reflection_lookup_dynamic_token (). This function will 
26657         raise TypeResolve events when appropriate. Since reflection.c is not 
26658         part of libmetadata, a new hook function called 
26659         mono_lookup_dynamic_token() is added to class.c which will call this.
26661         * assembly.h assembly.c: make the invoke_load_hook function public,
26662         so it can be called for dynamic assemblies.
26664         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
26666         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
26667         type isn't found.
26669         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
26670         MonoGHashTable, since it contains pointers to objects which the GC 
26671         needs to track.
26673         * assembly.c (search_loaded): remove unused variable.
26674         
26675 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
26677         * object.c: fixed issue exposed by gcc-generated IL programs
26678         that use RVA data for pointers.
26680 2003-01-25  Martin Baulig  <martin@ximian.com>
26682         * threads.c (start_wrapper): Moved the initialization of
26683         `start_func' above the mono_new_thread_init() call to which we
26684         pass it as argument.
26686 2003-01-24  Martin Baulig  <martin@ximian.com>
26688         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
26689         the MonoThread pointer.
26691 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
26693         * icall.c: Rename `PowImpl' to Pow.
26695 2003-01-23  Dick Porter  <dick@ximian.com>
26697         * threads.c (start_wrapper): Create a Thread object if needed, so
26698         the Main() thread can do the class initialisation in a subthread
26699         that has been set up to allow managed code execution.
26701         Pass the thread ID instead of the MonoThread pointer to the thread
26702         start and attach callbacks.  This change is required, because the
26703         jit thread start callback must be called _before_ the Thread
26704         object can be created.
26705         
26706         (mono_thread_init): Removed much object creation code that is no
26707         longer needed.  No managed code is called from here now.
26709         * object.c (mono_runtime_exec_managed_code): Create a subthread
26710         for Main, and call back to the runtime to use it.
26711         Set the exit code when Main exits.
26713         * gc.c: Make sure domain finalisation happens in a subthread.
26714         Re-enable threaded GC, fixing bug 31333 (again).
26716         * environment.c: System.Environment internall calls (so far just
26717         ExitCode is here, the others are still in icall.c)
26719         * appdomain.c (mono_runtime_cleanup): All threads running managed
26720         code should have finished before mono_runtime_cleanup() is
26721         reached, so no need to clean up threads.
26723 2003-01-22  Martin Baulig  <martin@ximian.com>
26725         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
26726         `gpointer func' arguments.      
26727         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
26728         but added `MonoThread *thread' argument.
26729         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
26731         * threads.c (mono_new_thread_init): Added `gpointer func' argument
26732         and pass it to the mono_thread_start_cb callback.
26733         (mono_install_thread_callbacks): New public function to install a
26734         set of callbacks which are set by the debugger.
26735         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
26737 2003-01-22  Martin Baulig  <martin@ximian.com>
26739         * Makefile.am: Install debug-mono-symfile.h.
26741 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
26743         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
26745 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
26747         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
26748         * class.c (mono_ptr_class_get): correctly set access levels of pointers
26749         (mono_array_class_get): correctly set access levels of arrays
26751 2003-01-20      Patrik Torstensson
26752         * image.h (MonoAssemblyName): changed major, minor, build, revision
26753         from signed to unsigned.
26755 2003-01-20  sean kasun <skasun@azstarnet.com>
26757         * reflection.c (load_cattr_value): Now this handles
26758         MONO_TYPE_SZARRAY.  Fixes bug #35629
26760 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
26762         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
26763         integer value
26765 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26767         * decimal.c: fixed bug #26056.
26769 2003-01-17  Martin Baulig  <martin@ximian.com>
26771         * gc.c: Raise an ExecutionEngineException instead of using g_error().
26773 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26775         * exception.[ch]:
26776         (mono_get_exception_type_initialization): new function.
26778         * object.c: throw a TypeInitializationException when an exception is
26779         thrown invoking the class constructor.
26781 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26783         * reflection.c: fixed attribute reading.
26785 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26787         * icall.c:
26788         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
26789         provided, look for the type in the calling assembly and then in
26790         mscorlib; if the assembly name is provided, only try that one.
26792 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
26794         * object.c: register the vtable before there is a chance it's
26795         queried again recursively.
26797 2003-01-13  Duncan Mak  <duncan@ximian.com>
26799         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
26800         gc-internal.h. 
26801         
26802 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
26804         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
26806 2003-01-11  Martin Baulig  <martin@ximian.com>
26808         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
26809         this to 20 for the release.
26811 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
26813         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
26815         * loader.c (mono_method_get_marshal_info): bug fix
26817         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
26818         structures with explicit layout
26820 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
26822         * profiler.c: made the output more readable (and sorted). 
26823         Added caller information for the allocation profiler.
26825 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
26827         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
26829 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26831         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
26832         to get value types.
26833         
26834 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
26836         * object.c, profiler.h, profiler.c, profiler-private.h:
26837         Added object allocation profiler.
26839 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
26841         * reflection.h, reflection.c: handle global methods.
26842         Compress blob entries.
26844 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
26846         * marshal.c: fix compilation.
26848 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
26850         * loader.c (mono_method_get_marshal_info): impl.
26852         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
26854 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26856         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
26857         for reference types.
26859 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
26861         * loader.c: fixed off by one error in loaded parameter names.
26863 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
26865         * marshal.c (mono_marshal_get_icall_wrapper): like
26866         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
26867         instead of a MonoMethod.
26869 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26871         * decimal.c: fixed bug #36537.
26873 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
26875         * marshal.c: throw a missing method exception if a
26876         P/Invoke method is not found.
26878 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
26880         * icall.c: allow a null this for constructors.
26882 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
26884         * icall.c: raise the proper exceptions if the arguments to the
26885         internal Invoke are incorrect.
26887 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
26889         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
26891 2003-01-03  Martin Baulig  <martin@ximian.com>
26893         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
26895 2002-12-31  Martin Baulig  <martin@ximian.com>
26897         * debug-mono-symfile.c: Completely rewrote the type section.
26898         Instead of using individual malloc()ed fields, we use one big
26899         continuous memory area and offsets into this area.
26900         See the comments in the source code for details.
26902 2002-12-30  Martin Baulig  <martin@ximian.com>
26904         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
26906 2002-12-30  Martin Baulig  <martin@ximian.com>
26908         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
26909         line number table in this data blob instead of using an external
26910         pointer.
26912 2002-12-28  Martin Baulig  <martin@ximian.com>
26914         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
26916 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
26918         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
26919         as a boxed return type.
26921 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
26923         * appdomain.c
26924         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
26925         g_build_filename to properly get separators on the filename created.
26927         * object.h: Small change, introduce MonoMarshalByRefObject to
26928         track the layout of that structure in the C# universe as we make
26929         changes there.
26931 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
26933         * object.c: removed assert to allow static fields on interfaces.
26934         * loader.c: a TypeSpec may be used for any type, not just arrays.
26936 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
26938         * class.c, class.h: added mono_class_array_element_size ().
26939         Ignore static methods in interfaces.
26941 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26943         * threads.c: fixed the build under cygwin.
26945 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
26947         * reflection.c: handle nullref constants. Allocate keys for
26948         reflection handles with the GC.
26950 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
26952         * threads.c, threads.h: added mono_thread_get_abort_signal()
26953         to get a suitable signal for thread abort.
26955 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
26957         * metadata.c: fix handling of ExportedType table.
26959 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26961         * icall.c: added WriteWindowsDebugString internal call.
26963 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26965         * reflection.h: added fields to match C# implementation.
26967 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26969         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
26971 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
26973         * gc.h, gc-internal.h: Rename header for GC internal calls to
26974         gc-internal.h from gc.h as to not clash with Boehm GC having its
26975         header installed as <gc.h> in outside include paths.
26976         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
26977         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
26979 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26981         * icall.c: assign minor, build and revision in FillName.
26983 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
26985         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
26986         Added support for running code generated by Reflection.Emit.
26988 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26990         * appdomain.c: check for NULL argument in LoadFrom.
26992 2002-12-10  Dick Porter  <dick@ximian.com>
26994         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
26996 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26998         * appdomain.c: fix buglet when building exe file name.  Handle full
26999         assembly name (needed after latest changes to AssemblyName).
27000         * image.c:
27001         (mono_image_close): free some hashtables.
27003 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
27005         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
27006         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
27007         on some systems (redhat 7.3) 
27009 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
27011         * threads.c: delete the critical section of a sync block,
27012         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
27014 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
27016         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
27018 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27020         * appdomain.[ch]: handle the assembly preload event to try loading the
27021         assemblies using the paths we have in the current domain.
27023         * assembly.[ch]: created an assembly preload hook that is called to try
27024         loading the assembly by other means that the ones provided here.
27026         * domain.c: initialize the domain search path.
27028         From now on, assemblies (TODO: except corlib and System) are loaded
27029         according to these rules when using mono_assembly_load ():
27031                 1. It tries to load the assembly from the ApplicationBase
27032                 of the current domain appending .dll and .exe (TODO: have to
27033                 try loading from name/name.dll and name/name.exe).
27035                 2. It tries the search path specified in PrivateBinPath for the
27036                 current domain (if any).
27038                 3. Previous behavior.
27040 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
27042         * icall.c: implemented GetInterfaceMap() related icall.
27043         * domain.c, loader.h: load MethodInfo in mono_defaults.
27045 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
27047         * gc.c: disable the finalizer thread for now, untill all the issues
27048         with it are resolved.
27050 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
27052         * string-icalls.c: handle embedded nulls in string ctor when the
27053         length is specified.
27055 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
27057         * class.c: look for explicit interface implementation in parent
27058         classes, too.
27060 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
27062         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
27064 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
27066         * gc.c: protect handles with a critical section.
27068 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27070         * icall.c:
27071         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
27072         parameters. If no assembly specified, try getting the type from all
27073         the assemblies in the current domain, else, load the assembly and get
27074         the type from it.
27076 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27078         * marshal.c: applied patch from Aleksey Demakov that fixes
27079         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
27081 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27083         * icall.c: fixed get_location.
27085 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
27087         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
27088         declarations to make it work with older gcc. 
27090         * loader.c (mono_get_method): set signature->pinvoke for native calls
27092 2002-11-20  Dick Porter  <dick@ximian.com>
27094         * threads.c (mono_thread_init): Set the main thread's handle
27096 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
27098         * gc.c: allow compilation without GC support. Changed to match the
27099         mono coding style.
27101 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
27103         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
27105 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
27107         * reflection.c: set a public key token on the core assemblies.
27109 2002-11-18  Dick Porter  <dick@ximian.com>
27111         * threads.c: Split out some thread initialisation so that other
27112         files can set the start callback function.
27114         * gc.c: Run finalisers in a separate thread, to avoid stack
27115         overflow.  Fixes bug 31333.
27117         * appdomain.c: Set up GC finalisation thread.
27119         * reflection.c: 
27120         * object.c: 
27121         * domain.c: Use gc.h macros for GC_malloc
27122         
27123 2002-11-15  Dick Porter  <dick@ximian.com>
27125         * threadpool.c: 
27126         * threads.c:
27127         * appdomain.c: Removed mono_runtime_init_with_attach(),
27128         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
27129         merging the extra parameter with the existing function.  Removed
27130         unneeded code in mono_thread_attach().
27132 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
27134         * image.c (mono_image_loaded_by_guid): a method to get loaded
27135         images by guid. 
27136         (load_metadata_ptrs): we store the guid as string.
27138 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
27140         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
27142         * metadata.c (mono_guid_to_string): imported method form Zoltan
27143         Varga (slightly modified)
27145         * assembly.c (mono_assembly_open): load precompiled code
27147         * loader.h (MonoMethod): we store the method token for use in the
27148         aot compiler. 
27150 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27152         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
27153         the hook function called when an assembly is loaded.
27154         
27155         * domain.c: Modified file.
27156         (mono_domain_assembly_load): removed hash table insertion of assemblies.
27158         Fixes bug #33196.
27160 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
27162         * reflection.c: Map PEFileKind to the value expected by the WinNT
27163         image loader. 
27165 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27167         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
27168         Read until the buffer is filled completely.
27170 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27172         * icall.c: implemented MonoType.InternalGetEvent ().
27174 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27176         * appdomain.c: implemented InitAppDomainSetup. Delayed
27177         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
27178         the entry_assembly.
27180         * assembly.c: base_dir is now an absolute path ending with
27181         G_DIR_SEPARATOR.
27183         * icall.c: modified get_location according to the above changes.
27185         * object.c: init AppDomain.SetupInformation for the default domain after
27186         we have the entry assembly.
27188         * domain.c: when unloading a domain, setup = NULL.
27190 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
27192         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
27194 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
27196         * object.h, object.c: introduced mono_object_get_virtual_method ()
27197         to lookup the method invoked on an object when a callvirt is done on
27198         a method.
27199         * icall.c: make MethodInfo::Invoke() always do a virtual call.
27201 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27203         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
27204         current domain when loaded an assembly and failed to load it.
27206         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
27208 2002-10-31  Dick Porter  <dick@ximian.com>
27210         * icall.c: 
27211         * file-io.h: 
27212         * file-io.c: Return the error status in a parameter, as the
27213         GetLastError() value has long since been blown away if we try and
27214         look it up in a subsequent internal call invocation.  Delete the
27215         GetLastError() internal call, because it's useless.
27217 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
27219         * class.[ch]: added cast_class to fix bug 29517
27221 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
27223         * marshal.c: create valid IL code in the filter clause:
27224         the new JIT is less forgiving:-)
27226 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27228         * icall.c: removed get_property internal call.
27230 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
27232         * appdomain.h domain.c: Added an ID to appdomains.
27233         
27234         * threads.c threads.h icall.c: Implement icall
27235         Thread:GetDomainID(), and remove unused icall 
27236         CurrentThreadDomain_internal.
27238 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27240         * icall.c: Don't recurse through the base types in GetConstructor.
27241         Fixes bug #32063. 
27243 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
27245         * mempool.h, mempool.c: added mono_mempool_empty() and
27246         mono_mempool_stats().
27248 2002-10-23  Dick Porter  <dick@ximian.com>
27250         * file-io.c: 
27251         * file-io.h: 
27252         * icall.c: Added MonoIO.GetFileType internal call
27254 2002-10-17  Dick Porter  <dick@ximian.com>
27256         * appdomain.c (mono_runtime_cleanup): Don't signal the async
27257         delegate semaphore before waiting for all threads to finish,
27258         because new threads can also call async delegates.  Fixes bug
27259         32004.
27261         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
27262         of 3 seconds, in case another async job is queued.  (This part is
27263         needed because the bug fix reintroduced the 3s exit lag.)  This
27264         makes the mono_runtime_shutdown flag superfluous.
27266 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
27268         * reflection.c: include ehader size in method section headers.
27269         Really check for suplicated modules entries.
27271 2002-10-17  Martin Baulig  <martin@gnome.org>
27273         * debug-mono-symfile.c: Added back support for locals.
27275 2002-10-14  Martin Baulig  <martin@gnome.org>
27277         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
27278         MONO_TYPE_VOID.
27280 2002-10-14  Martin Baulig  <martin@gnome.org>
27282         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
27283         mono_class_get() instead of looking in the class cache. 
27285 2002-10-13  Martin Baulig  <martin@gnome.org>
27287         * debug-mono-symfile.c: Set version number to 28, include the
27288         signature in method names.
27290 2002-10-13  Martin Baulig  <martin@gnome.org>
27292         * debug-mono-symfile.h: Set version number to 27.
27294 2002-10-11  Martin Baulig  <martin@gnome.org>
27296         * gc.c: Don't register/unregister NULL pointers as disappearing links.
27298 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
27300         * metadata.c, metadata.h: added helper function to allocate signatures.
27302 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27304         * icall.c: added internal call to get the location of machine.config.
27306 2002-10-08  Martin Baulig  <martin@gnome.org>
27308         * debug-mono-symfile.c: Ignore classes with a pending init for the
27309         moment.
27311 2002-10-03  Dick Porter  <dick@ximian.com>
27313         * threads.c: Freebsd pthread_t is a pointer
27315 2002-10-03  Dick Porter  <dick@ximian.com>
27317         * socket-io.c: Implemented GetHostName_internal
27319 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27321         * mono-config.c:
27322         (mono_config_parse_file): don't leak the text.
27324 2002-10-02  Martin Baulig  <martin@gnome.org>
27326         * debug-mono-symfile.c: Added support for methods.
27328 2002-10-01  Martin Baulig  <martin@gnome.org>
27330         * debug-mono-symfile.c: Don't emit methods and line numbers for
27331         the dynamic symbol file, just write the type table.  We can easily
27332         have an external helper program which creates a symbol file for an
27333         IL file.        
27335 2002-10-01  Dick Porter  <dick@ximian.com>
27337         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
27338         Only add the handle to the cleanup array when we're about to
27339         launch the thread.  Bug 31425 deadlocked when the test was run on
27340         mono under w32.
27342 2002-10-01  Martin Baulig  <martin@gnome.org>
27344         * debug-mono-symfile.c: Added support for properties.
27346 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
27348         * reflection.c: unaligned store fix from Mark Crichton
27349         <crichton@gimp.org>.
27351 2002-09-27  Martin Baulig  <martin@gnome.org>
27353         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
27354         New interncall.
27356 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
27358         * assembly.h, assembly.c: use a sane API to hook into the assembly
27359         loading process instead of a useless special-purpouse hack
27360         (ngen needs a hook, too, for example).
27362 2002-09-27  Dick Porter  <dick@ximian.com>
27364         * threads.c (mono_thread_init): Call GetCurrentProcess() so
27365         io-layer can set up some process handle info.  Not needed on w32,
27366         but doesn't hurt either.
27368         * process.c: Pass the program name in the second parameter to
27369         CreateProcess, so the path is searched.  Include the working
27370         directory. Implemented process name, process enumeration, and some
27371         process detail internal calls.
27372         
27373         * icall.c: Added internal calls for process lookup, and some
27374         process details
27376 2002-09-26  Martin Baulig  <martin@gnome.org>
27378         * assembly.c (mono_install_open_assembly_hook): New global
27379         function to install a function to be invoked each time a new
27380         assembly is loaded.
27381         (mono_assembly_open): Run this callback function if set.
27383         * debug-mono-symfile.c: Put back line numbers for the dynamic
27384         symbol file and also record the .il file as source file.  This
27385         allows us to install the temporary symbol file as `file.dbg' just
27386         like a compiler-generated one.
27388 2002-09-26  Nick Zigarovich <nick@chemlab.org>
27390         * Corrected typo in gc.c (BOHEM vs BOEHM).
27392 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27394         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
27395         GetProperties. Also avoid calling g_slist_length in GetProperties and
27396         GetMethods.
27398 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
27400         * reflection.c: avoid unaligned stores (bug spotted by
27401         Mark Crichton  <crichton@gimp.org>).
27403 2002-09-25  Martin Baulig  <martin@gnome.org>
27405         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
27406         instead of guint64 for addresses and added prologue/epilogue info.
27408 2002-09-25  Martin Baulig  <martin@gnome.org>
27410         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
27411         store line number info.  For the dynamic symbol file, we only need
27412         to provide the JIT generated dynamic line number info for the dynamic
27413         symbol file.
27415 2002-09-25  Martin Baulig  <martin@gnome.org>
27417         * debug-mono-symfile.h: Incremented version number.
27419 2002-09-24  Martin Baulig  <martin@gnome.org>
27421         * class.c (mono_debugger_class_init_func): New global function
27422         pointer variable.
27423         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
27424         call it.
27426         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
27427         function.  This is called via the mono_debugger_class_init_func
27428         hook to add all types to the dynamic type table.
27429         (ves_icall_MonoDebugger_GetType): New interncall to get a class
27430         from its metadata token.
27432         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
27433         New interncall for the debugger.
27435 2002-09-24  Nick Drochak <ndrochak@gol.com>
27437         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
27438         before using it in case it is null.
27439         
27440 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27442         * metadata.c: allow custom modifiers in local var signatures
27443         (bug spotted by Zoltan Varga).
27445 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
27447         * class.c: deal with the <Module> class that may have a NULL vtable.
27448         Eliminate warnings.
27450 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
27452         * image.c, image.h: more strong name helpers.
27453         * monosn.c: more work: convert pem keys to cryptoapi format.
27455 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
27457         * string-icalls.c: speedup IndexOf.
27459 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
27461         * icall.c: updates from Zoltan.2.Varga@nokia.com.
27463 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
27465         * icall.c: cleanup: use mono_object_domain ().
27467 2002-09-23  Martin Baulig  <martin@gnome.org>
27469         * debug-mono-symfile.c: Improved type support.
27471 2002-09-22  Martin Baulig  <martin@gnome.org>
27473         * debug-mono-symfile.c: Added support for reference types and strings.
27475 2002-09-22  Martin Baulig  <martin@gnome.org>
27477         * debug-mono-symfile.c: Started to work on the type table.
27479 2002-09-21  Martin Baulig  <martin@gnome.org>
27481         * debug-mono-symfile.c: Largely reworked the symbol table format.
27482         The symbol table is now incrementally updated each time a new
27483         method is added.  We're now also using our own magic and version
27484         so that you don't need to recompile all your classes if the
27485         dynamic table changes.
27486         (mono_debug_update_mono_symbol_file): Removed.
27487         (mono_debug_symfile_add_method): New function to add a method.
27489 2002-09-21  Martin Baulig  <martin@gnome.org>
27491         * icall.c
27492         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
27493         New interncall.
27495         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
27496         New interncall to get a method from its metadata token.
27498 2002-09-21  Martin Baulig  <martin@gnome.org>
27500         * debug-mono-symfile.c: Create type table.
27502 2002-09-20  Martin Baulig  <martin@gnome.org>
27504         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
27506 2002-09-20  Martin Baulig  <martin@gnome.org>
27508         * debug-mono-symfile.c: Provide information about params and locals.
27510 2002-09-20  Martin Baulig  <martin@gnome.org>
27512         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
27513         New interncall.
27515         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
27516         interncall to get a method from its metadata token.
27518 2002-09-20  Martin Baulig  <martin@gnome.org>
27520         * debug-mono-symfile.c: Added a few checks for method->header
27521         being non-NULL.  This should never happen, but for the moment
27522         let's use a g_warning() rather than a g_assert().
27524 2002-09-19  Mark Crichton  <crichton@gimp.org>
27526         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
27527         even if support for it isn't present.  Added an #ifdef to fix this.
27529         * socket-io.c: Added checks back for Solaris support.
27531 2002-09-19  Martin Baulig  <martin@gnome.org>
27533         * debug-mono-symfile.c (read_string, write_string): Reflect latest
27534         changes in the symbol file format.
27536 2002-09-18  Martin Baulig  <martin@gnome.org>
27538         * debug-mono-symfile.c: Set version number to 21.
27540 2002-09-18  Dick Porter  <dick@ximian.com>
27542         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
27543         on netbsd.  Fixes bug 30051.
27545 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27547         * reflection.c:
27548         (set_version_from_string): little fix.
27550 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
27552         * monosn.c, Makefile.am: added strong name utility.
27553         * reflection.h, reflection.c: implemented delayed signing,
27554         locale, version and hash id assembly attributes.
27556 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
27558         * loader.c, metadata.c: load param attributes in signatures.
27560 2002-09-16  Martin Baulig  <martin@gnome.org>
27562         * debug-mono-symfile.c: Added string table with all method names.
27564 2002-09-14  Martin Baulig  <martin@gnome.org>
27566         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
27567         fast method lookup.
27569 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
27571         * reflection.c: record the public key token of referenced assemblies.
27573 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
27575         * image.c, image.h: added functions to get the strong name and the
27576         public key of an assembly.
27577         * pedump.c: use them.
27579 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
27581         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
27583 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
27585         * marshal.c (mono_marshal_get_managed_wrapper): Added
27586         MONO_TYPE_BOOLEAN 
27588 2002-09-11  Martin Baulig  <martin@gnome.org>
27590         * gc.c: Call GC_unregister_disappearing_link() on all links when
27591         finalizing them, this is necessary to aviod a crash in boehm's
27592         finalize handler.
27594 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
27596         * gc.c: handle GetTarget for finalized objects spotted and fixed by
27597         nick@chemlab.org.
27599 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
27601         * icall.c: implemented MonoType::Module.
27602         * reflection.c, reflection.h: mono_module_get_object () from
27603         Tomi Pakarinen <tomi.pakarinen@welho.com>.
27605 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
27607         * icall.c: ignore overridden methods in GetMethods ().
27608         Fix for FieldInfo::SetValue().
27609         * object.c: handle float/double in runtime invoke.
27611 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
27613         * object.c: allow a constructor to be called again on an object.
27615 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
27617         * class.h, class.c: move field layout code to it's own function and
27618         export it. Get an interface id earlier. Move fields in MonoClass
27619         so they are more cache friendly and align the bitfields.
27620         * loader.c: temporary handle get_param_names() for a runtime method.
27621         * reflection.c, reflection.h: more code to handle runtime creation of
27622         types.
27624 2002-09-09  Martin Baulig  <martin@gnome.org>
27626         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
27627         signature with the pinvoke field being set for the actual call.
27629 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
27631         * icall.c: removed some unused icalls. Start of map of glib charsets
27632         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
27634 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
27636         * debug-helpers.c: break infinite loop (found and fixed by
27637         Holger Arnold <harnold@gmx.de>).
27639 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
27641         * icall.c: target may be null in create_delegate.
27643 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
27645         * marshal.c: handle a boolean return type.
27647 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
27649         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
27651 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
27653         * gc.c: fix weakreferences.
27655 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
27657         * icall.c: added icall to get default codepage.
27659 2002-09-03  Dick Porter  <dick@ximian.com>
27661         * threads.h: 
27662         * threads.c: Use MonoThread instead of MonoObject where
27663         apropriate.
27665         Store running thread objects in a hash table, so that we have all
27666         the info to hand when waiting for them to finish
27667         (means we don't need OpenThread() any more, so mingw builds should
27668         be fully functional again.)
27670         * verify.c:
27671         * object.h: Added thread ID to MonoThread
27673 2002-09-03  Martin Baulig  <martin@gnome.org>
27675         * icall.c (System.Reflection.Assembly::get_location): New interncall.
27677 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27679         * icall.c: fixed leak in get_temp_path. Thanks lupus.
27681 2002-09-03  Martin Baulig  <martin@gnome.org>
27683         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
27684         argument to store the end address of the disassembled instruction.
27686         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
27687         here from debug-symfile.h.
27688         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
27689         JIT into this struct.
27690         (MonoSymbolFile): Added `char *image_file' field.
27691         (MonoDebugGetMethodFunc): Removed.
27692         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
27693         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
27694         (mono_debug_find_method): New method.
27696         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
27697         create a full symbol file.
27698         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
27699         and static symbol files.
27700         (mono_debug_find_method): The symbol file keeps an internal method hash,
27701         call this to get a MonoDebugMethodInfo from a MonoMethod.
27703         * debug-symfile.[ch]: Removed.
27705 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
27707         * image.c (do_mono_image_open): Remove linker version check.
27709 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
27711         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
27712         wrappers for instance methods.
27713         
27714 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27716         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
27718 2002-08-28  Dick Porter  <dick@ximian.com>
27720         * Makefile.am: Export HOST_CC for w32 builds
27722 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
27724         * file-io.c process.c: MonoString are null terminated, no
27725         need for mono_string_to_utf16() anymore.
27727 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
27729         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
27731 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
27733         * icall.c, reflection.h: speedup System.MonoType.
27735 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
27737         * reflection.c: allow null as the value of a string argument in
27738         custom attributes constructors.
27740 2002-08-27  Martin Baulig  <martin@gnome.org>
27742         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
27743         `trampoline_address' field.
27745 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
27747         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
27748         check (fixes bug #29486) 
27750 2002-08-27  Martin Baulig  <martin@gnome.org>
27752         * debug-mono-symfile.c: Changed the file format in a way that allows us
27753         open it read-only and to use a specially malloced area for all the
27754         dynamic data.  We can now also generate a symbol file on-the-fly if we're
27755         debugging IL code and there is no MCS generated symbol file for it.
27757 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
27759         * object.c: added a define for a good string and array
27760         creation speedup (not enabled by default because we need to deal with
27761         the synch stuff).
27763 2002-08-26  Martin Baulig  <martin@gnome.org>
27765         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
27766         function to create a dynamic symbol file.  This is used by the
27767         debugger to create a symbol file for IL code on-the-fly.
27769 2002-08-26  Martin Baulig  <martin@gnome.org>
27771         * loader.c (mono_lookup_pinvoke_call): Include the error message
27772         from g_module_error() in the error message.
27774 2002-08-24  Martin Baulig  <martin@gnome.org>
27776         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
27777         function to update the symbol file.  The symbol file is mmap()ed
27778         writable, but private.  This allows us to install the symbol file
27779         together with the assembly.
27781 2002-08-24  Martin Baulig  <martin@gnome.org>
27783         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
27784         but they can read the new symbol file format which mcs is now creating.
27786         * debug-symfile.c (mono_debug_find_source_location): Moved to
27787         debug-mono-symfile.c; this is now operating on the new symbol file.
27789 2002-08-23  Martin Baulig  <martin@gnome.org>
27791         * debug-helpers.c (mono_method_desc_from_method): New function to get
27792         a MonoMethodDesc from a MonoMethod.
27794 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
27796         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
27797         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
27799 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
27801         * string-icalls.[ch]: make helper methods static.
27803 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27805         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
27806         types to it and to SetValueInternal.
27808         * object.c: Moved handle_enum label to its proper place. This was the
27809         f... bug! ;-)
27811         This time i compiled mcs and gtk-sharp and they both work.
27813 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27815         * icall.c: reverted partially my previous patch until 
27816         object.c:set_value handles enums correcly.
27818 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27820         * icall.c:
27821         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
27822         (ves_icall_System_Environment_get_MachineName): removed warning when
27823         compiling under cygwin.
27825 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
27827         * object.c: fixed field_get_value() for reference types.
27829 2002-08-22  Dick Porter  <dick@ximian.com>
27831         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
27832         Don't free a buffer while it's still needed.  Patch from Jonathan
27833         Liger <Jonathan.liger@wanadoo.fr>
27835 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
27837         * icall.c (ves_icall_System_Environment_get_Platform): Add new
27838         internal call.
27840 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
27842         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
27843         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
27845         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
27846         we call unmanaged code which throws exceptions.
27848 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
27850         * appdomain.h: added per-domain entry_assembly.
27851         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
27852         arguments.
27853         * icall.c: Assembly::GetEntryAssembly icall.
27854         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
27855         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
27857 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
27859         * appdomain.h, gc.c: added mono_domain_finalize ().
27861 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27863         * object.c:
27864         (mono_print_unhandled_exception): changed g_warning by g_printerr
27865         because g_log has a 1024 characters limit (yeah, i got a big stack
27866         trace). Don't print exception name, that should be in ToString 
27867         returned string.
27869 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27871         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
27872         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
27874 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27876         * object.c:
27877         (mono_print_unhandled_exception): after previous commit, i realized
27878         that MS calls ToString on the exception. I changed this function to
27879         do that. This way we get stack_trace for free.
27881 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27883         * object.c:
27884         (mono_print_unhandled_exception): invoke Message property instead of
27885         getting 'message' field from Exception. Don't allocate memory for
27886         'trace' and 'message' if not needed.
27888 2002-08-18  Dick Porter  <dick@ximian.com>
27890         * unicode.c: Fix asserts to match Encoder.cs checks
27892 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
27894         * marshal.c: fix unaligned store issue and a few wrong
27895         opcode argument types.
27897 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27899         * icall.c: added GetUninitializedObjectInternal internal call.
27901 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
27903         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
27904         to the right domain.
27906 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
27908         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
27910         * class.c (class_compute_field_layout): set blittable to false for Strings
27912         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
27914 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
27916         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
27917         first chunk of code to create types at runtime. Code to
27918         handle ReflectedType/DeclaringType. Make reflection handles
27919         domain specific.
27921 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
27923         * class.c: set correct name in arrays.
27925 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
27927         * appdomain.c (mono_domain_transfer_object): make it work with
27928         valuetypes. bug fixes.
27930 2002-08-12  Dick Porter  <dick@ximian.com>
27932         * object.h: Rename some parameters to avoid c++ keywords (Patch
27933         from Joseph Wenninger <kde@jowenn.at>)
27935 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
27937         * icall.c: added icall to implement Assembly.GetFile*.
27939 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
27941         * reflection.h, reflection.c: code to embed managed resources.
27943 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
27945         * class.c: move all the type size stuff into
27946         class_compute_field_layout().
27948 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
27950         * class.c: ensure enums have always the correct instance size.
27951         * unicode.c: remove wrong assert.
27953 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
27955         * assembly.c: fix mem corruption issue.
27956         * image.h, image.c: added mono_image_get_resource () to access
27957         managed resources.
27958         * icall.c: implemented Assembly.EntryPoint property and some
27959         Managed Resources related internalcalls.
27962 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
27964         * image.c, image.h: impemented mono_image_get_entry_point ().
27965         * appdomain.c: use mono_image_get_entry_point.
27967 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
27969         * reflection.c: support the object type argument when loading
27970         custom attributes.
27972 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
27974         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
27975         String as return type.
27977 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
27979         * reflection.c: fix encoding of named args for custom attrs to match
27980         the ms implementation. Read them back when instantiating custom
27981         attributes.
27983 2002-08-02  Radek Doulik  <rodo@ximian.com>
27985         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
27986         by Dietmar as quick fix
27987         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
27988         16 as stack size, used on more places as quick fix before Dietmar
27989         will fix it properly
27991 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
27993         * object.h, object.c: added accessors for fields and properties.
27995 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
27997         * class.c, class.h: made mono_class_get_field_from_name ()
27998         loop on parent types.
27999         Added mono_class_get_property_from_name ().
28001 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
28003         * class.c, class.h: move the code to setup the type vtable in its own
28004         function so that it can be reused also for types created at runtime.
28005         Eliminate the "class" identifier from the header file.
28006         * reflection.c: setup the vtable for enums so that we can create
28007         objects for use in SetConstant ().
28009 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
28011         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
28012         instead of the delegate itself as this pointer (bug #28383)
28014 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
28016         * marshal.c (mono_marshal_get_managed_wrapper): added return type
28017         conversions.
28019 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
28021         * loader.c: don't set the pinvoke bit on icalls.
28023 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
28025         * debug-helpers.c (mono_method_full_name): only print a number to
28026         indicate wrapper type (so that the output is more readable in traces).
28028 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
28030         * class.c (mono_class_init): include method override patch from Paolo
28032 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
28034         * icall.c: fixed GetTypeCode().
28036 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
28038         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
28039         use real delegate invoke function to make it work with multicast
28040         delegates (fix bug# 28291).
28042 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
28044         * object.c: load constant strings.
28046 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
28048         * reflection.c: no magic numbers.
28049         * tabledefs.h: security action enum.
28051 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
28053         * assembly.c: fix possible memory corruption.
28055 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
28057         * reflection.h, reflection.c: added support for linking resources.
28058         * verify.c: check we have an updated corlib.
28060 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
28062         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
28063         string arrays.
28064         (mono_marshal_string_array): null terminate unmanaged string arrays.
28065         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
28067 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
28069         * icall.c: Type.GetType () can now return also types from the
28070         calling assembly.
28072 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
28074         * loader.h, loader.c: stack walking support.
28075         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
28076         GetCallingAssembly.
28078 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
28080         * marshal.c: added optimisations for blittable types 
28082         * class.c (mono_array_class_get): do not set blittable attribute on arrays
28083         (mono_class_setup_mono_type): set blittable attribute for single
28084         and double.
28086         * marshal.c (mono_string_utf8_to_builder): impl.
28087         (mono_string_builder_to_utf8): impl.
28088         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
28090 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
28092         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
28093         (mono_marshal_get_managed_wrapper): impl. byref types
28095 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28097         * icall.c:
28098         (search_method): don't display debug message. 
28100 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
28102         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
28104 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
28106         * appdomain.c: set the missing filename when throwing exception.
28108 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
28110         * metadata.c (mono_type_size): code cleanup
28111         (mono_type_stack_size): removed some test code
28113 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
28115         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
28116         mono_get_exception_file_not_found now.
28118         * exception.c (mono_exception_from_name_two_strings): New version
28119         that will call a constructor with two string arguments. 
28120         (mono_get_exception_file_not_found): New helper routine, used to
28121         report file-not-found errors.
28123 2002-07-20  Dick Porter  <dick@ximian.com>
28125         * process.h:
28126         * process.c: Pass file handles to CreateProcess
28127         
28128         * icall.c:
28129         * file-io.h:
28130         * file-io.c: Implemented CreatePipe
28132 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
28134         * metadata.c (mono_get_param_info): set alignment for value types
28136 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
28138         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
28139         Constify mono_domain_assembly_open().
28140         * loader.c: handle null namespace in icalls.
28142 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
28144         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
28145         (emit_str_to_ptr_conv): marshal object as structs
28147         * metadata.c (mono_type_to_unmanaged): marshal object as structs
28149         * marshal.c (mono_marshal_get_runtime_invoke): support value types
28151 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
28153         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
28154         (mono_marshal_get_native_wrapper): we an now return value types
28156 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
28158         * verify.c: more checks implemented.
28160 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
28162         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
28163         (fix bug #27695)
28164         (mono_marshal_get_native_wrapper): allow byref arguments
28165         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
28166         impl. PtrToStringXXX methods
28167         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
28168         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
28169         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
28170         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
28171         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
28173 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
28175         * reflection.c: fix buglet in parsing an assembly name.
28177 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
28179         * marshal.c (emit_ptr_to_str_conv): first impl.
28181 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
28183         * object.c, class.h: cache the vtable in the class as suggested by
28184         vargaz@freemail.hu (Zoltan Varga).
28186 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
28188         * class.h, loader.c: added mono_field_from_token().
28189         * verify.c: first cut of type checking code.
28191 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
28193         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
28195 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
28197         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
28198         (fix bug #27782)
28199         (mono_marshal_get_remoting_invoke): impl.
28200         (mono_delegate_begin_invoke): impl.
28201         (mono_mb_emit_save_args): impl.
28202         (mono_delegate_end_invoke): impl.
28203         (mono_marshal_get_delegate_begin_invoke):
28204         (mono_marshal_get_delegate_end_invoke):
28205         (mono_marshal_get_delegate_invoke): generate a special name for
28206         those methods (including the signature) and associate them whith
28207         the delegate class. 
28209 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
28211         * reflection.[ch]: 
28212         (mono_reflection_type_from_name): now it has a MonoImage parameter
28213         which is used as the default image to search the type in. If the image
28214         is NULL or getting the type from it fails, it defaults to corlib.
28216         * icall.c: changed 1 call to mono_reflection_type_from_name to match
28217         new parameter.
28219 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
28221         * reflection.c: update the parameter table index.
28223 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
28225         * domain.c: don't include the mark byte in the string hash.
28227 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
28229         * icall.cs: icall for Type.GetTypeCode ().
28230         * verify: a couple of fixes and disabled local initialization checks.
28232 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
28234         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
28236         * debug-helpers.c (mono_method_full_name): print the type of the
28237         runtime wrapper
28239         * metadata.c (mono_signature_hash): a hash function for signatures
28240         (mono_signature_hash): better hash algorithm
28242         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
28244         * debug-helpers.c (mono_method_full_name): this can now generate
28245         method names with signatures
28247         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
28248         method dont have this pointers.
28250 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
28252         * reflection.c: fixup typebuilder tokens.
28253         * image.c: fix buglet.
28254         * marshal.h: remove whitespace.
28255         * metadata.h, metadata.c: reinstate code that was removed.
28256         * verify.c: handle catch directives and fix another couple of bugs.
28258 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
28260         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
28261         (mono_marshal_get_native_wrapper): make it comp. with the old code
28262         (mono_marshal_get_native_wrapper): support boolean
28263         (mono_marshal_get_managed_wrapper): support more types
28265 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
28267         * class.c (class_compute_field_layout): compute class->blittable attribute.
28269 2002-07-09  Dick Porter  <dick@ximian.com>
28271         * threads.c: Make the thread cleaning up cope with threads that
28272         call ExitThread()
28274 2002-07-08  Radek Doulik  <rodo@ximian.com>
28276         * reflection.c (method_encode_code): use non-translated values to
28277         compute finally_start, this fixes exception handling on ppc, yay!
28279         * decimal.h (struct signscale): fix endianess
28281 2002-07-07  Radek Doulik  <rodo@ximian.com>
28283         * reflection.c: swap box_val and not val
28285 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
28287         * reflection.c, reflection.h: handle full assembly info in type name.
28288         Handle Type arguments when loading custom attributes.
28289         * icall.c: updated to use new mono_reflection_type_from_name () method.
28291 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28293         * loader.c:
28294         (method_from_memberref): also print assembly name when method not found.
28296 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28298         * icall.c:
28299         (ves_icall_TypeGetProperties): fixed bug #27473. 
28301 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28303         * reflection.c: display image name and token when cannot find the
28304         .ctor for an attribute.
28306 2002-07-05  Martin Baulig  <martin@gnome.org>
28308         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
28310 2002-07-04  Dick Porter  <dick@ximian.com>
28312         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
28313         compile on mingw.  This will cause mingw builds to not wait for
28314         subthreads to terminate after the main thread does.  I've lodged a
28315         bug with the mingw developers for them to wrap OpenThread().
28317 2002-07-03  Dick Porter  <dick@ximian.com>
28319         * threads.c: Store thread IDs instead of handles, because
28320         GetCurrentThread() returns a pseudohandle and therefore stores
28321         useless values.  mono_thread_cleanup() continues checking the
28322         array of threads until it is empty, to cope with subthreads
28323         spawning new threads after the main thread has finished.
28325         * profiler.h:
28326         * profiler.c:
28327         * profiler-private.h: Pass the thread ID to thread profiler
28328         functions, instead of a handle
28330 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
28332         * verify.c: fixes to make it more usable.
28333         * pedump.c: added --verify code to verify IL code in an assembly.
28335 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
28337         * reflection.c: turn errors into warnings to allow compiling corlib.
28339 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
28341         * reflection.c: add special cases to compile corlib.
28343 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
28345         * reflection.c: handle properties with only a set method.
28347 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
28349         * opcodes.h: add enum with opcodes in opval order.
28351 2002-07-01  Dick Porter  <dick@ximian.com>
28352         
28353         * object.h:
28354         * object.c (mono_runtime_run_main): Removed unneeded argument
28356 2002-06-28  Martin Baulig  <martin@gnome.org>
28358         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
28360 2002-06-27  Dick Porter  <dick@ximian.com>
28362         * threads.c: Store the handle in both the parent thread and in the
28363         subthread, to minimise the time between starting a new thread and
28364         storing its ID.
28366 2002-06-26  Dick Porter  <dick@ximian.com>
28368         * appdomain.c (mono_runtime_cleanup): Close the socket library
28369         after all the threads have finished, not before
28371 2002-06-26  Martin Baulig  <martin@gnome.org>
28373         * debug-symfile.c (mono_debug_find_source_location): Added
28374         `guint32 *line_number' argument.  If it's not NULL, store the line number
28375         there and return the file name without the line number.
28377 2002-06-25  Dick Porter  <dick@ximian.com>
28379         * icall.c:
28380         * process.h:
28381         * process.c: Process forking and other support functions
28383 2002-06-25  Dick Porter  <dick@ximian.com>
28385         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
28386         things dont happen when the image is closed.
28387         (mono_image_lookup_resource): Walk the resource section looking
28388         for a particular entry
28390         * cil-coff.h: PE resource section decoding
28392 2002-06-25  Dick Porter  <dick@ximian.com>
28393         
28394         * assembly.h:
28395         * assembly.c: 
28396         (mono_assembly_foreach): Accessor functions to walk the list of
28397         loaded assemblies
28398         (mono_assembly_set_main):
28399         (mono_assembly_get_main): Process methods need to know which
28400         assembly is the "main" one
28402         * object.c (mono_runtime_run_main): Record the main assembly
28404         * debug-helpers.c: Fix typo
28406 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
28408         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
28409         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
28411 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
28413         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
28415 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
28417         * image.c (do_mono_image_open): Initialize reference count,
28418         otherwise we leak the MonoImage.
28420 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
28422         * reflection.c: small tweak to handle self-hosting.
28424 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
28426         * reflection.c: fix type name parse code.
28428 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
28430         * reflection.c: break out of the loop.
28431         * image.c: special case corlib.
28433 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
28435         * reflection.c: add all the custom attrs at the end to ensure the
28436         ctors have been properly initialized when the attributes are defined
28437         in the current assembly.
28439 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
28441         * reflection.c: handle correctly multiple-nested types.
28443 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
28445         * row-indexes.h: fix typos.
28446         * reflection.c: adjust for typos and fix method_def_or_ref
28447         encoding in MethodImpl table.
28449 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
28451         * reflection.c: fix entry point patching (thanks Serge!).
28453 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
28455         * verify.c: add check for System.Exception
28457 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
28459         * image.c, class.c: minifix for code just c&p'ed.
28460         * reflection.c: warning fix.
28461         * object.h, loader.h, domain.c: load also StringBuilder.
28463 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
28465         * marshal.h, marshal.c: some support code to handle complex marshaling.
28467 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
28469         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
28470         Better signatures with vtable error dump.
28472 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
28474         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
28476 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
28478         * icall.c (ves_icall_Type_GetField): impl.
28480 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
28482         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
28483         to retrieve a marshal description blob for a field or param.
28485 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
28487         * reflection.h, reflection.c: change order of nested type emission
28488         to avoid table corruption. The NestedTypes table is sorted.
28489         * icall.c: change order of GetConstructor results to workaround mcs bug.
28491 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
28493         * reflection.h, reflection.c: handle field and param marshal
28494         information.
28496 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
28498         * icall.c, marshal.c marshal.h: more Marshal class implementation.
28500 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
28502         * reflection.c: fix call convention.
28504 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
28506         * reflection.h, reflection.c: mono_image_get_memberref_token()
28507         takes a type instead of a class, now. Added
28508         mono_image_get_array_token() to create tokens for the special
28509         multi-dim array methods.
28511 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
28513         * assembly.c: handle modules (no assembly table). Split
28514         loading references in its own function.
28515         * class.c: handle moduleref resolution scope.
28516         * image.c, image.h: cache module name in image.
28518 2002-06-07  Martin Baulig  <martin@gnome.org>
28520         * reflection.c (mono_image_get_type_info): Only add a class layout entry
28521         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
28523 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
28525         * icall.c: more signature fixes that used uint instead of int.
28527 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
28529         * reflection.c: fixed signature of field refs.
28531 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
28533         * class.c, reflection.c: handle typerefs of nested types
28534         (both on read and when writing files).
28536 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
28538         * icall.c: fix method signatures that tried to workaround the previous
28539         typo, d'oh!
28541 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
28543         * debug-helpers.c: fix typo.
28545 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
28547         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
28548         rewrote the PE/COFF writing code (our programs are understood by the
28549         ms runtime, now).
28551 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
28553         * gc.c, gc.h, icall.c: weakreference support.
28555 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
28557         * Makefile.am, mono-config.c: use $(sysconfdir).
28559 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
28561         * icall.c: changed default precision of Double.ToString() to 15.
28562         Fixed memory leak. Unified with Single.ToString.
28564 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
28566         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
28568 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
28570         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
28571         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
28572         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
28573         and myself.
28575 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
28577         * debug-symfile.c, sysmath.c: yet more compilation fixes.
28579 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
28581         * reflection.c, socket-io.c: more compilation fixes.
28583 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
28585         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
28586         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
28587         unicode.c: warning and compiler compatibility fixes.
28589 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
28591         * class.h, metadata.c: fixed warnings/compilation errors.
28593 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
28595         * Makefile.am, mono-config.c, mono-config.h: configuration file
28596         support routines.
28597         * loader.c, loader.h: make Dll mapping configurable at runtime in the
28598         config file. Export methods to insert and lookup mappings.
28600 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
28602         * reflection.c: handle types and boxed objects in custom attr
28603         constructors.
28605 2002-05-30  Martin Baulig  <martin@gnome.org>
28607         * debug-symfile.c
28608         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
28610 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
28612         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
28613         to lookup the implmap row for a P/Invoke method.
28614         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
28615         P/Invoke method from the runtime on an as needed basis.
28617 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
28619         * metadata.c (mono_metadata_parse_signature): impl.
28621 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
28623         * class.c: handle .pack directive.
28625 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
28627         * object.c: initialize static fields with RVA data.
28629 2002-05-25  Martin Baulig  <martin@gnome.org>
28631         * debug-symfile.c
28632         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
28634 2002-05-24  Martin Baulig  <martin@gnome.org>
28636         * debug-symfile.c
28637         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
28638         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
28639         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
28641 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
28643         * object.c: special case string ctros in invoke.
28644         * gc.c: silly whitespace changes.
28646 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
28648         * threadpool.[ch]: impl. a threadpool that can
28649         be used by mint and mono.
28651 2002-05-22  Martin Baulig  <martin@gnome.org>
28653         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
28654         The first argument is now a `MonoReflectionModuleBuilder *', the return
28655         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
28656         `methods' field to get the method builder.  The `token' argument is the
28657         unfixed token.
28659         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
28660         invalid characters instead of g_assert_not_reached()ing.  This seems
28661         to be the behaviour of mscorlib.
28663 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
28665         * object.c (mono_runtime_invoke_array): applied patch from Rachel
28666         Hestilow to fix bug #25104
28668 2002-05-21  Martin Baulig  <martin@gnome.org>
28670         * debug-symfile.c (mono_debug_find_source_location): New function.
28671         Looks up an IL offset in the line number table and returns the source
28672         location as a string.
28674 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28676         * icall.c:
28677         (mono_double_ToStringImpl): changed %f by %g until we have something
28678         better.
28680 2002-05-21  Nick Drochak  <ndrochak@gol.com>
28682         * icall.c : Use different name for Math.Pow's icall.  Needed to check
28683         parameters first in C#.
28685 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
28687         * icall.c, reflection.h: added icall to get info about an event.
28689 2002-05-20  Radek Doulik  <rodo@ximian.com>
28691         * object.c (mono_value_box): don't use memcpy for boxing on BIG
28692         endian
28693         (mono_value_box): don't use memcpy for small sizes on
28694         architectures with unaligned access
28696 2002-05-20  Martin Baulig  <martin@gnome.org>
28698         * reflection.c (mono_reflection_setup_internal_class): Don't crash
28699         if `tb->parent == NULL'.
28700         (mono_reflection_create_internal_class): New function.  This is
28701         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
28702         for enum types.
28704         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
28705         New interncall.
28707 2002-05-19  Martin Baulig  <martin@gnome.org>
28709         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
28710         argument to get the length, don't default to the array length.
28712 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
28714         * assembly.c (mono_assembly_setrootdir): New function used to
28715         override the MONO_ASSEMBLIES directory.
28717 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
28719         * icall.c: ValueType_GetHashCode() initialize local var.
28721 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
28723         * reflection.c: sort custom attributes table.
28725 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
28727         * reflection.c: support named args in custom attributes (write support).
28729 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
28731         * reflection.c: fix finally position calculation.
28733 2002-05-15  Radek Doulik  <rodo@ximian.com>
28735         * reflection.c: fixed endianess at many places
28737         * icall.c (ves_icall_InitializeArray): comment out debug msg
28739 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
28741         * object.c (mono_unhandled_exception): new function to handle
28742         unhandled exceptions.
28743         (mono_unhandled_exception): call the UnhandledException event.
28744         (mono_runtime_delegate_invoke): impl.
28746 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
28748         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
28749         returns the RVA, not the direct pointer to the data. Handle the case
28750         when the class size is fixed.
28752 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
28754         * reflection.c: fix some endianess issues.
28756 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
28758         * object.c (mono_runtime_invoke): is now able to catch exceptions.
28760         * threads.c (mono_thread_init): added a callback which is invoked
28761         at thread start.
28763 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
28764         
28765         * icall.c: make GetHashCode return non-negative values.
28767 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
28769         * object.c, icall.c, gc.c: revert to address-based hashcode.
28771 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
28773         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
28775 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
28777         * icall.c, class.c: special case <Module>.
28779 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
28781         * icall.c: fix bug in GetNow().
28783 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
28785         * object.c (mono_runtime_class_init): make sure that we call all
28786         static class constructors.
28788 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
28790         * reflection.c: sort methodsemantics table.
28792 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
28794         * reflection.h, reflection.c: honour init locals setting.
28796 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
28798         * icall.c: copied Double ToStringImpl for Single ToStringImpl
28800 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
28802         * reflection.c: support ContructorBuilders in attribute blob creation.
28804 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
28806         * reflection.c: some changes to build a binary that can be run
28807         directly in windows.
28809 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
28811         * loader.c: print a big message when an icall can't be found.
28813 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28815         * string-icalls.c: fix bug 24248.
28817 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
28819         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
28820         icall.c, reflection.h: separate assembly loading by pathname and by
28821         assembly name. Use the MONO_PATH env var to search for assemblies.
28823 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
28825         * assembly.c, image.h: add some support for assemblies
28826         with multiple modules.
28827         * class.c, class.h: export mono_class_from_typeref().
28828         * loader.c: remove duplicated code and use mono_class_from_typeref(),
28829         instead.
28831 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
28833         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
28834         documentation says (the ECMA one is correct).
28836 2002-05-02  Dick Porter  <dick@ximian.com>
28838         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
28839         Don't name the synchronisation mutex.
28841 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
28843         * rand.c
28844         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
28845         Make the prototypes match.
28846         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
28847         Same.
28849         * icall.c
28850         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
28851         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
28852         all systems have tm.tm_zone, so use strftime() with %Z to print
28853         the timezone abreviation into a temp string.
28855         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
28856         rather than mono_array_addr() on a MonoString on Big Endian
28857         machines.
28859 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
28861         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
28862         fix bug 24041
28864 2002-04-30  Dick Porter  <dick@ximian.com>
28866         * socket-io.c: Cope with SOCKET being an integer rather than a
28867         pointer now.
28869         * threads.c: Added Thread_free_internal, to deal with thread
28870         handle cleanup.  Moved calls to handle_store() and handle_remove()
28871         to start_wrapper(), so each can only be called once.  Allocate
28872         synchronisation blocks with GC_malloc(), and use GC finalisation
28873         to close the handles.
28875         * icall.c: added System.Threading.Thread::Thread_free_internal
28877 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
28879         * icall.c: support Environment.Exit, CommandLineArgs().
28881 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
28883         * object.c, object.h: added mono_runtime_run_main () and
28884         mono_runtime_get_main_args () for use in System.Environment.
28886 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
28888         * gc.c: fix thinko, enable actual finalization since the jit is now
28889         fixed.
28891 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
28893         * gc.c, object.c: take into account that an object may be offset wrt the address
28894         returned by GC_malloc().
28896 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
28898         * image.c: handle files without entries in the assembly table (modules).
28900 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
28902         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
28903         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
28904         allowed to be null when it's System.Object class setup.
28906 2002-04-27  Martin Baulig  <martin@gnome.org>
28908         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
28909         if `tb->parent == NULL' rather than crashing.
28911 2002-04-28  Nick Drochak  <ndrochak@gol.com>
28913         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
28914         calling acos() where asin() should have been called.
28916 2002-04-26  Martin Baulig  <martin@gnome.org>
28918         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
28919         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
28920         there's a subdirectory called `System', but we don't want to read that
28921         subdirectory as an assembly.
28923 2002-04-25  Martin Baulig  <martin@gnome.org>
28925         * debug-symfile.c: Reflect latest MonoString changes.
28927 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
28929         * rand.c, rand.h: instance method icalls need to have an explicit
28930         this pointer as first argument in the C implementation.
28932 2002-04-25  Nick Drochak <ndrochak@gol.com>
28934         * icall.c: Fix typo in map for GetNonZeroBytes
28936 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
28938         * string-icalls.c : String does now passes unit tests without any 
28939         errors, the following changes has been made:
28940         
28941         Implemented replace methods.
28942         Renaming of methods to (try) follow the standard.
28943         Fixed compare ordinal
28944         Made all memory allocated directly to function instead of via icall function.
28945         Small performance fix in is_in_array function
28946                         
28947  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
28949         c (mono_string_Internal_ctor_charp_int_int):
28950         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
28951         sindex < 0, throw ArgumentOutOfRangeException instead of
28952         ArgumentNullException.
28954         Added new check for length == 0, however
28955         I need to make it return String.Empty from the C code.
28956         
28957         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
28958         that calculate the length for us here.
28959         
28960         (mono_string_Internal_ctor_sbytep_int_int): Replaced
28961         mono_string_new_utf16 with mono_string_new, since value is utf8.
28963 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
28965         * object.c: register the object for finalization if needed.
28966         Allocate one more char in the string for the terminating 0 char.
28968 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
28970         * class.c, class.h, image.c: check if a type implemenst a destructor.
28971         Use the proper key for array class lookups.
28972         * icall.c: register the icalls in the System.GC class.
28973         * gc.c, gc.h: GC-related functions and icalls.
28975 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28977         * icall.c:
28978         * socket-io.c:
28979         * unicode.c: free some strings gotten from mono_string_to_utf8 and
28980         changed a couple of free () by g_free ().
28982         * decimal.c: one-liner in the comments for decimal2string ().
28984 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
28986         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
28988 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
28990         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
28991         * object.c (mono_runtime_invoke_array) : handle null in params
28993 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
28995         * string-icalls.c: fixed bug in split (one off bug)
28997 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
28999         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
29000         * icalls.c: added String::Equals as internal method
29002 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
29004         * threads.c: fixed bug in the double interlocked functions
29006 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
29008         * threads.c: implemented all of the new interlocked icalls.
29009         * string-icalls.c: fix a bug in insert.
29010         * icalls.c: added the icalls for interlocked, removed old string functions.
29011         
29012 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
29014         * loader.c: fix off-by-one error when reading argument names.
29016 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
29018         * profiler.c: win32 counter implementation (untested).
29019         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
29020         (the latter needs testing and more complete impl. from win32 folks).
29022 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
29024         * object.c: mono_array_new_full workaround mono_array_class_get
29025         problem.
29027 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
29029         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
29030         * object.h (mono_string_chars): Changed casting type.
29032 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
29034         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
29035                            method signatures to use gunichar2 instead of gint16.
29037 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
29039         * object.h, object.c: domain-specific versions of mono_object_new and
29040         mono_array_new.
29042 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
29044         * object.c: changed String layout
29046         * string-icalls.c (mono_string_Internal_ctor_chara): added
29047         internal string constructors.
29049 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
29051         * threads.c: pass 'this' to the thread start routine.
29053 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29055         * string-icalls.c: fix IndexOf and LastIndexOf. Now
29056         InternalCompareStr don't call twice mono_string_cmp_char for the last
29057         character. Improved performance in mono_string_cmp_char.
29059 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
29061         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
29062         code into its own library: libmonoruntime.
29064 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
29066         * object.h, object.c: changed array format so that szarrays do not
29067         require a bounds structure.
29068         * icall.c, appdomain.c: support for new szarray format.
29070 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
29072         * metadata.c: compare also the retuns type when comparing signatures:
29073         we didn't do this as an optimization since really overloaded methods
29074         must differ also in the arguments, but this doesn't work with
29075         low-level IL code (or when using explicit conversion operators: see
29076         bug#23498 for an example).
29078 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
29080         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
29082 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
29084         * icall.c: make MonoType::GetElementType its own icall.
29086 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
29088         * icall.c: remove MonoMethod_get_Name().
29089         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
29090         object.
29092 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
29094         * string-icalls.c: optimized a few methods.
29096 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
29098         * icall.c: added all new string internal calls
29099         * string-icalls.c: added, new string internal call implementation.
29100         * object.c: added mono_string_new_size for allocating a string a size
29102 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
29104         * object.c (mono_object_isinst): use the same code as in the
29105         optimized x86 version.
29107 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
29109         * profiler.c: TSC-based timer code (faster and more accurate).
29110         Not hooked up in configure, yet (set USE_X86TSC to 1).
29112 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
29114         * profiler.c, profiler.h: track time spent compiling methods.
29115         * threads.c: track thread creation/destruction.
29117 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
29119         * profiler.c, profiler.h, profiler-private.h: profiling interface
29120         and sample implementation. Moved here so that it can be used also by
29121         the jit.
29123 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
29125         * reflection.c, reflection.h: keep types and other handles separate in
29126         the hash tables for referred tokens. Add guid for modules.
29128 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
29130         * assembly.c: fix bugs found with valgrind.
29131         * metadata.h, metadata.c: added mono_metadata_guid_heap().
29133 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
29135         * threads: added icall support for getting current domain for
29136                    the thread.
29138 2002-04-13  Martin Baulig  <martin@gnome.org>
29140         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
29141         (MonoDebugVarInfo): Added `index' field for register based addresses.
29142         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
29143         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
29144         `MonoDebugVarInfo *params' and `guint32 this_offset' with
29145         `MonoDebugVarInfo *this_var'.
29147         * debug-symfile.c (relocate_variable): New static function to write
29148         a location description for a local variable or method parameter.
29150 2002-04-12  Martin Baulig  <martin@gnome.org>
29152         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
29153         stack offset and begin/end scope address of a local variable.
29154         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
29155         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
29156         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
29158         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
29159         Added new relocation types for start/end scope of a local variable.
29161 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
29163         * object.h: add mono_object_domain() macro.
29164         * reflection.c: handle typespecs.
29165         * icall.c: MonoMethod::get_Name() implementation.
29167 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
29169         * icall.c: String::GetHashCode() icall implementation.
29171 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
29173         * icall.c: String::IndexOfAny icall.
29174         * object.c, object.h: make array->max_length more useful.
29175         Intrduced mono_object_class() and mono_string_length() macros.
29177 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29179         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
29180         instead of g_unichar_isdigit.
29182 2002-04-11  Nick Drochak  <ndrochak@gol.com>
29184         * icall.c: Implement a simple Double.ToString().
29186 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
29188         * appdomain.h: only io-layer.h is supposed to be included.
29189         * icall.c: explicitly import environ. Fix warning.
29191 2002-04-10  Nick Drochak  <ndrochak@gol.com>
29193         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
29194                 return true even if it's not Daylight Savings time.
29195                 Only return false for the case where the function isn't
29196                 implemented for a plaform (read Windows).
29198 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
29200         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
29201         data with a mutex.
29203 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
29205         * mempool.c (mono_mempool_alloc): only use g_malloc when
29206         absolutely necessary.
29208 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
29210         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
29212         * class.c (mono_class_vtable): use domain mempool to allocate vtable
29213         (mono_class_proxy_vtable): use domain mempool
29215 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
29217         * appdomain.h, appdomain.c: split initialization that requires the
29218         execution engine support into mono_runtime_init().
29220 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
29222         * class.c (mono_class_init): don't include vtable inside MonoClass
29223         to save some memory, gather some statistics.
29224         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
29226 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
29228         * icall.c: internalcall implementation for ValueType.Equals().
29230 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
29232         * object.c (mono_message_init): moved 
29233         (mono_runtime_exec_main): new arch. independent impl.
29234         (mono_runtime_invoke_array): new method - like
29235         mono_runtime_invoke, but you can pass an array of objects.
29236         (mono_remoting_invoke): new arch. independent impl.
29237         (mono_message_invoke): new arch. independent impl.
29238         (mono_runtime_class_init): new arch. independent impl.
29239         (mono_runtime_object_init): new arch. independent impl.
29241 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
29243         * metadata.c, object.c, reflection.c: documented the exported
29244         functions.
29246 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
29248         * icall.c: simpler code to pass the assembly builder data to corlib.
29249         Implement GetNestedTypes() internalcall.
29251 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
29253         * class.c: warn if a type can't be loaded.
29255 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
29257         * image.h: typedef MonoImageOpenStatus
29258         * types.h: removed unused file
29259         
29260 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
29262         * icall.c: Enum_ToObject accepts enum value arguments.
29264 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
29266         * class.c: move initialization of properties, events and nested
29267         classes, so that they happen for interfaces, too.
29269 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
29271         * icall.c: cleanup some ugly casts in Array_SetValue*.
29273 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
29275         * icall.c: the values array fro enums is of the correct type, now.
29276         Implement (correctly) getFullName instead of assQualifiedName for
29277         MonoType.
29278         * reflection.h, reflection.c: added mono_type_get_name ().
29280 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
29282         * assembly.c, image.h: for each MonoImage, record from wich assembly
29283         it was loaded.
29284         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
29285         Make Type.Assembly work.
29287 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
29289         * debug-symfile.h: use char* instead of gpointer to avoid
29290         unnecessary casts.
29292         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
29294         * icall.c (ves_icall_InternalExecute): impl. FielSetter
29295         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
29297 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
29299         * icall.c (mono_message_init): impl. (code cleanup)
29300         (ves_icall_InternalExecute): impl. FieldGetter
29302         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
29303         defined we call all (non-static)methods through the vtable. 
29305 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
29307         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
29308         finalizer even though the memory is still referenced (and the chunk of
29309         memory is not freed).
29311 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
29313         * assembly.c: fix brokeness.
29315 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
29317         * class.c: kill some warnings. Check explicit interface method
29318         implementation also without considering the namespace.
29319         Load also literal strings in static class data.
29321 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
29323         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
29324         (default_assembly_name_resolver): Make the resolver take the
29325         "base" directory where the assembly was originally defined, so we
29326         can load DLLs that are in the same directory as the assembly that
29327         is being referenced.
29329 2002-03-28  Dick Porter  <dick@ximian.com>
29331         * file-io.h: 
29332         * file-io.c:
29333         * socket-io.c: 
29334         * unicode.h: 
29335         * unicode.c: Warning cleanups
29337 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
29339         * object.h, reflection.h: use the correct type instead of MonoObject.
29341 2002-03-28  Martin Baulig  <martin@gnome.org>
29343         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
29344         (mono_debug_update_symbol_file): Initialize classes if necessary.
29346 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
29348         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
29349         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
29351 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
29353         * assembly.h: fix function prototype.
29354         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
29355         * mono-endian.h: use const cast.
29357 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
29359         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
29361 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
29363         * loader.c: don't assert when a typeref can't be loaded, give
29364         a chance to the runtime to trow an exception instead.
29365         * loader.h: fix warning.
29367 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
29369         * class.c (mono_class_proxy_vtable): added proxy support
29371 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
29373         * icall.c: removed last of PAL calls, added System.Environment
29374         * file-io.h, file-io.c: MonoIO implementation
29375         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
29377 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
29379         * appdomain.c: do not use the byte marker in ldstr table lookup.
29380         * debug-helpers.c: allow two ':' to separate class and method name.
29381         * object.c: allocate arrays bounds with the GC, too.
29382         * verify: add a few more checks.
29384 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
29386         * reflection.c: output also literal strings. Allocate parameter data
29387         with GC_malloc() (thanks, Martin, for catching this!).
29389 2002-03-26  Martin Baulig  <martin@gnome.org>
29391         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
29392         include the `this' offset in the `param_offsets'.
29394 2002-03-25  Martin Baulig  <martin@gnome.org>
29396         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
29397         mono_debug_get_class() function to get the classes. Added new
29398         relocation types for arrays and strings.
29399         (mono_debug_get_class): New static function to search in all
29400         referenced assemblies for a metadata token.
29402         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
29404 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
29406         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
29407         hold gc-allocated objects. Make the string heap a stream like the
29408         others. Removed duplicated code when writing stream info.
29409         Added asserts to catch possible buffer overflows. Set the sorted map
29410         for tables that need sorting. Added some documentation.
29412 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
29414         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
29415         for interned strings and vtables.
29417 2002-03-24  Martin Baulig  <martin@gnome.org>
29419         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
29420         it in the array since it was created with g_slist_prepend().
29422 2002-03-24  Martin Baulig  <martin@gnome.org>
29424         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
29425         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
29426         (mono_debug_method_from_token): Renamed to
29427         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
29428         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
29430         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
29431         relocation types.
29433         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
29435 2002-03-24  Martin Baulig  <martin@gnome.org>
29437         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
29438         (mono_debug_method_from_token): New func.
29440         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
29441         New interncall, calls mono_debug_local_type_from_signature().
29442         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
29443         calls mono_debug_method_from_token().
29445 2002-03-23  Martin Baulig  <martin@gnome.org>
29447         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
29448         specifies the number of bytes to be converted, not the array size.
29449         Return the number of chars, not the number of bytes.
29450         (ves_icall_iconv_get_chars): The `byteCount' argument
29451         specifies the number of bytes to be converted, not the array size.
29453 2002-03-23  Martin Baulig  <martin@gnome.org>
29455         * reflection.h (MonoReflectionSigHelper): New type.
29457         * reflection.c (mono_reflection_sighelper_get_signature_local),
29458         (mono_reflection_sighelper_get_signature_local): New functions.
29460         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
29461         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
29462         interncalls.
29464 2002-03-23  Martin Baulig  <martin@gnome.org>
29466         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
29467         is_writeable is set.
29468         (mono_raw_buffer_update): New function to write the modified map
29469         back to disk.
29471         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
29473         * debug-symfile.c (mono_debug_update_symbol_file): Call
29474         mono_raw_buffer_update() when done writing.
29476 2002-03-23  Martin Baulig  <martin@gnome.org>
29478         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
29480         * debug-symfile.c: Added support for arguments and local variables.
29482 2002-03-23  Dick Porter  <dick@ximian.com>
29484         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
29485         protected by ifdefs, hence breaking the w32 build.
29487 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
29489         * object.c: implement is_interned() the right way.
29491 2002-03-21  Martin Baulig  <martin@gnome.org>
29493         * debug-symfile.[ch]: New files to handle debugging information
29494         files. There's also support to dynamically update these symbol
29495         files to include machine dependent information.
29497 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
29499         * threads.c (mono_thread_create): new function to create thread
29500         from C
29502 2002-03-20  Martin Baulig  <martin@gnome.org>
29504         * icall.c (ves_icall_InternalInvoke): Create a new object if the
29505         method is a constructor.
29506         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
29507         points to ves_icall_InternalInvoke().
29509 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
29511         * file-io.c: Flush shouldn't throw exceptions.
29513 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
29515         * file-io.c: FileStream flush support; FileSetLength now
29516         restores file pointer.
29518 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
29520         * class.c: set image for pointer classes.
29522 2002/03/19  Nick Drochak <ndrochak@gol.com>
29524         * sysmath.c: Forgot one.
29526 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
29528         * sysmath.c: Avoid redefining existing names.
29530 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
29532         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
29533         handled by runtime as icall rather than dllimport from libm.so
29534         * file-io.c, file-io.h: fixed handle argument type.
29536 2002-03-18  Dick Porter  <dick@ximian.com>
29538         * reflection.c (mono_image_get_type_info): rename interface to
29539         iface, because of "#define interface struct" on windows.
29541 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
29543         * class.c, class.h: rename and export mono_ptr_class_get().
29544         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
29545         * reflection.c, reflection.h, icall.c: better/saner type name
29546         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
29547         method signatures.
29549 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
29551         * class.c (mono_class_init): removed hardcoded GHC_SLOT
29553         * icall.c (ves_icall_InternalInvoke): impl.
29555 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
29557         * reflection.c: output the interface map table, too.
29559 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
29561         * class.c (class_compute_field_layout): separate computation of 
29562         static field layout
29564 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
29566         * icall.c: added System.Buffer support.
29567         * file-io.c: moved file icalls from PAL to FileStream.
29569 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
29571         * icall.c (ves_icall_System_Object_GetHashCode): impl.
29573 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
29575         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
29577 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
29579         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
29581 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
29583         * debug-helpers.{c,h}: moved here from monograph some useful functions
29584         to locate a method by name/signature in a class or image. Included
29585         also a small and flexible IL disassembler.
29587 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
29589         * reflection.c: fixup tokens in methods with small header size, too.
29591 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
29593         * object.c (mono_string_to_utf8): remove assert(!error), instead
29594         print a warning. 
29596 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
29598         * icall.c: update to the new mono_Array_class_get interface.
29600 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
29602         * appdomain.c, object.c: Boehm-GC enable.
29603         * icall.c: make get_data_chunk() support split data requests.
29604         Ensure a class is initialized in more cases. Return only the first
29605         property found in GetProperties() or the compiler gets confused. 
29606         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
29607         * reflection.h, reflection.c: add fixup mechanism for field and method
29608         tokens. Initialize assembly->typeref in a single place. Output
29609         properties after events. Support custom attributes for events, too.
29610         Typo fix for paramter custom attrs.
29612 2002-03-07  Martin Baulig  <martin@gnome.org>
29614         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
29616 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
29618         * class.c (mono_array_class_get): fix. for multi. dim. arrays
29620 2002-03-06  Martin Baulig  <martin@gnome.org>
29622         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
29623         non-zero lower bounds. See testcases #F10-#F13.
29625 2002-03-05  Martin Baulig  <martin@gnome.org>
29627         * exception.c (mono_get_exception_argument_out_of_range): New exception.
29629         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
29630         ves_icall_System_Array_GetValue(), only calculate the absolute array position
29631         here.
29632         (ves_icall_System_Array_SetValue): Likewise.
29633         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
29634         as argument and does the actual work. This function is used when copying a
29635         multi-dimensional array.
29636         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
29637         now do all the widening conversions of value types.
29638         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
29640 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
29642         * class.c: remove some magic numbers and use the smbolic names,
29643         instead. Added init_events() to load event info at class init time.
29644         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
29645         and mono_metadata_methods_from_event().
29646         * reflection.h, reflection.c: added support for writing out the evnets
29647         related information.
29649 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
29651         * reflection.h, icall.c: use a different method (GetInterfaces)
29652         to gather interface info and add isbyref, isprimitive and
29653         ispointer to the ves_icall_get_type_info() return value.
29655 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
29657         * class.h: stared adding support for events.
29658         * icall.c: split find_members implementation. Added debug icall to get
29659         the address of an object.
29660         * reflection.c: handle TypeBuilders in mono_type_get_object().
29662 2002-03-01  Martin Baulig  <martin@gnome.org>
29664         * icall.c (ves_icall_System_Array_GetLength): This must throw an
29665         ArgumentOutOfRangeException(), not an ArgumentException().
29666         (ves_icall_System_Array_GetLowerBound): Likewise.
29667         (ves_icall_System_Array_GetValue): Improved argument checking.
29668         (ves_icall_System_Array_SetValue): Improved argument checking.
29670 2002-03-01  Martin Baulig  <martin@gnome.org>
29672         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
29673         called with invalid arguments rather than just dying with g_assert().
29674         (ves_icall_System_Array_SetValue): Likewise.
29675         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
29676         raise a NotImplementedException instead.
29677         (ves_icall_System_Array_GetLength): Added argument checking.
29678         (ves_icall_System_Array_GetLowerBound): Added argument checking.
29680 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
29682         * object.h (mono_assert): new macros mono_assert and
29683         mono_assert_not_reached
29685 2002-02-28  Martin Baulig  <martin@gnome.org>
29687         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
29688         and "System::String::IsInterned" to "System::String::_IsInterned".
29690 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
29692         * icall.c: remove hacks for typebuilder. Added icall to create a
29693         modified type from a tybebuilder.
29694         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
29695         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
29696         to create a backing MonoClass for a TypeBuilder.
29698 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
29700         * class.c, class.h: more refactoring of class init.
29701         Export mono_class_setup_mono_type() and mono_class_setup_parent().
29703 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
29705         * marshal.c, marshal.h: start of marshaling interface.
29707 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
29709         * icall.c: fix order in assembly qualified name icall.
29711 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
29713         * class.c: do not free str, since we store it in the hash table.
29714         * reflection.h: add label field to MonoILExceptionInfo.
29715         * reflection.c: handle references to more than one assembly. Handle
29716         case when there isn't a module created in the assembly.
29718 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
29720         * class.c: Fix typo. Start refactoring of class init code.
29722 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
29724         * appdomain.c: exit with 1 on error.
29725         * class.c: we already have the name in MonoClassField.
29726         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
29727         MonoStreamHeader instead of an offset of image->raw_metadata.
29729 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
29731         * appdomain.c (mono_init): Be even more descriptive about the error.
29733 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
29735         * appdomain.c: give the user an informative message when corlib can't
29736         be loaded.
29738 2002-02-26  Martin Baulig  <martin@gnome.org>
29740         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
29741         New icall to get the time zone data.
29743 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
29745         * reflection.c: set virtual and raw size of section correctly.
29746         * threads.c: transfer domain information to newly created threads.
29748 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
29750         * class.c: when instancing a class in a domain, load the default
29751         vaules for static fields from the constant table. Fix System.Enum to
29752         not be an enum.
29753         * icall.c: implement Object::GetType() internalcall. Implemented
29754         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
29755         Fixed checking of binding flags in find_members().
29756         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
29757         * reflection.c: handle enumerations when writing to the constant
29758         table. Use a different object cache for types.
29761 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
29763         * object.c (mono_object_isinst): fix for arrays
29765         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
29767 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
29769         * object.c: don't use mprotect ()  and fix intern pool hash table
29770         lookup for big endian systems.
29772 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
29774         * icall.c: change type_is_subtype_of () signature.
29776 2002-02-21  Mark Crichton  <crichton@gimp.org>
29778         * rand.c, rand.h: Added random number generator for
29779         System.Security.Cryptography classes.
29781         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
29783         * icall.c: Added System.Security.Cryptography calls.
29785 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
29787         * class.c, icall.c, metadata.c: better support for pointer types.
29788         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
29789         * reflection.c: Add support for getting custom attrs for properties
29790         and simplify some code.
29792 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
29794         * icall.c: change getToken () and add custom attribute GetBlob()helper
29795         method.
29796         * reflection.h: add custom attrs array to the reflection builder structures.
29797         * reflection.c: encode and emit custom attributes for all the relevant
29798         reflection objects. Cache fieldref and methodref tokens. Change
29799         mono_image_create_token() interface to take a MonoDynamicAssembly.
29800         More complete custom attributes decoder. Load custom attributes for
29801         Assembly, Field, Method and Constructor objects, too. Make the
29802         returned array an Attribute[] one, not object[]. Added
29803         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
29804         custom attribute constructor.
29806 2002-02-20  Dick Porter  <dick@ximian.com>
29808         * icall.c:
29809         * rawbuffer.c:
29810         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
29811         problem code out for now).
29813 2002-02-19  Radek Doulik  <rodo@ximian.com>
29815         * object.c (mono_ldstr): use hash table to avoid multiple swapping
29817 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
29819         * icall.c: register the GetCustomAttributes method.
29820         * object.c, object.h: add mono_string_new_len ().
29821         * reflection.h, reflection.c: added mono_runtime_invoke(),
29822         mono_install_runtime_invoke(). Added
29823         mono_reflection_get_custom_attrs () to load custom attributes and
29824         create the attribute objects.
29826 2002-02-19  Dick Porter  <dick@ximian.com>
29827         * threads-dummy-types.c:
29828         * threads-dummy-types.h:
29829         * threads-dummy.c:
29830         * threads-dummy.h:
29831         * threads-pthread-types.c:
29832         * threads-pthread-types.h:
29833         * threads-pthread.c:
29834         * threads-pthread.h:  Deleted obsolete files
29836 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
29838         * class.c (mono_class_vtable): runtime init the class when we
29839         allocate static class data.
29841         * icall.c (ves_icall_System_Array_SetValue): check for null values.
29843         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
29844         and String - but we will need generic marshalling support in the
29845         future. 
29846         (mono_init): set the domain name in a ms compatible way
29848         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
29849         String[].
29851 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
29853         * object.c (mono_array_clone): use alloca() instead of g_malloc  
29854         for sizes
29856         * appdomain.c (mono_domain_unload): impl.
29858 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
29860         * appdomain.c, object.c: fix intern pool implementation.
29861         * class.c: fix alignment code.
29863 2002-02-16  Radek Doulik  <rodo@ximian.com>
29865         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
29866         and s2 > s1, just copy lower bytes to be compatible with little
29867         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
29868         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
29870         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
29871         force big_endian to be 1 for big endian machines 
29872         (ves_icall_iconv_new_decoder): ditto
29874 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
29876         * socket-io.c (convert_sockopt_level_and_name): If the system
29877         doesn't define SOL_IP or SOL_TCP, get them by hand using
29878         getprotobyname() and caching the values (because this could be a
29879         slow operation).
29880         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
29881         Use the appropriate struct when the system does support it. Ie,
29882         not all systems have struct ip_mreqn so use struct ip_mreq when
29883         appropriate.
29885 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
29887         * reflection.c: handle finally clauses.
29889 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
29891         * socket-io.c: use g_snprintf() instead of snprintf.
29893 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
29895         * reflection.c (mono_param_get_objects): Cast second argument to
29896         mono_method_get_param_names to a const char** to silence the
29897         compiler warning.
29899         * appdomain.c (mono_domain_assembly_open): Put parens around the
29900         truth statement in the for-loop.
29902         * unicode.c (iconv_convert): Got rid of a compiler warning about
29903         int i being unused when the system has a new iconv.
29904         (iconv_get_length): Same.
29906         * image.c (load_class_names): Cast the second argument to
29907         g_hash_table_insert() to char* to hush compiler warnings about the
29908         arg being a const.
29909         (mono_image_open): Same here.
29911         * socket-io.c: Don't conditionally include sys/filio.h or
29912         sys/sockio.h here anymore since we now get them from
29913         io-layer/io-layer.h
29914         (inet_pton): If the system doesn't support inet_aton, implement
29915         using inet_addr and also #define INADDR_NONE if it isn't defined
29916         by the system.
29918 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
29920         * metadata.c, metadata.h: added function to get packing and size info
29921         of a typedef.
29922         * reflection.h, reflection.c: handle field RVA data. Save info about
29923         the table layout if needed. Assign typedef indexes to all the types
29924         before dumping the info about them to avoid forward reference problems.
29926 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
29928         * socket-io.c (convert_sockopt_level_and_name): ifdef
29929         SO_ACCEPTCONN because it is not defined on my system (old debian)
29931 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
29933         * opcode.c: use stddef.h to get NULL.
29935 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
29937         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
29938         for FIONBIO, FIONREAD and SIOCATMARK.
29939         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
29940         define INADDR_NONE and besides, inet_addr() is deprecated and
29941         should not be used. Use inet_pton() instead - it also has the
29942         added bonus that it can easily handle IPv6 addresses as well.
29943         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
29945 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
29947         * decimal.c: remove _MSC_VER conditional.
29949 2002-02-13  Dick Porter  <dick@ximian.com>
29951         * socket-io.c: 
29952         * icall.c: Internal calls for Blocking, Select, Shutdown,
29953         GetSocketOption and SetSocketOption
29955 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
29957         * assembly.cs: better resolver: use it instead of some kludgy
29958         code.
29960 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
29962         * reflection.c: the best way to speed-up the compiler is to avoid
29963         infinite loops.
29965 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
29967         * class.c (mono_class_vtable): changed the object layout
29968         (obj->vtable->class). 
29969         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
29971 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
29973         * assembly.c: look for assemblies in the assembly dir, too.
29975 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
29977         * class.c: fix thinko in mono_class_from_type().
29979 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
29981         * exception.h, exception.c: added TypeLoadException.
29982         * object.h, object.c: added mono_array_clone ().
29983         * icall.c: handle throwOnError in AssemblyGetType().
29984         Added Array.Clone().
29985         * opcode.h, opcode.c: use a single value for the opcode val.
29986         Compile fix for non-gcc compilers.
29988 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
29990         * opcodes.c, opcodes.h: export interesting info about opcodes.
29992 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
29994         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
29995         icalls. 
29997         * class.c (class_compute_field_layout): set element_class for enums
29998         (mono_class_create_from_typedef): set element_class for normal classes
30000         * icall.c (ves_icall_System_Enum_get_value): impl.
30002         * class.c (mono_class_create_from_typedef): do not set valuetype
30003         flag for System.ValueType and System.Enum
30005 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
30007         * unicode.c (iconv_convert): fix big endian problem.
30009 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
30011         * class.c: add asserts if we are ever going to scribble over memory.
30012         * socket-io.c: not all systems have AF_IRDA defined.
30014 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
30016         * class.c (class_compute_field_layout): do not consider static
30017         fields to compute alignment
30019 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
30021         * appdomain.c (mono_appdomain_get): impl.
30022         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
30024 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
30026         * icall.c: ignore "file://" prefix when loading an assembly.
30028 2002-01-23  Dick Porter  <dick@ximian.com>
30030         * socket-io.c:
30031         * icall.c:
30032         * Makefile.am: Added socket support
30034 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
30036         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
30037         code back.  This should return the assemblies that are loaded by
30038         the runtime on behalf of an application domain. 
30040         The current implementation is still broken, it just returns every
30041         assembly loaded, but until we get real applications domain this
30042         will do.
30044 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
30046         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
30047         AppDomain object.
30049 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
30051         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
30052         the mono_class_from_name lookup.
30053         (ves_icall_get_parameter_info): ditto.
30054         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
30055         method.
30056         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
30058 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
30060         * class.c: load also nested classes on class init.
30061         System.ValueType instance methods gets passed boxed
30062         values, unless methods in derived classed that get a pointer to the
30063         data.
30064         * icall.c: use better name parsing code in GetType().
30065         * image.c, image.h: add mono_image_loaded ().
30066         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
30067         * reflection.c, reflection.h: added mono_reflection_parse_type().
30069 2002-01-22  Veronica De Santis <veron78@interfree.it>
30071         * icall.c : Added mapping of internal calls for Manual and Auto reset events
30072         * threads.c : Added the implementation of internal calls for events
30073         * threads.h : Added prototypes of internal calls for events
30074         
30075 2002-01-21  Radek Doulik  <rodo@ximian.com>
30077         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
30079 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
30081         * class.c (mono_class_init): set min_align to 1 (instead of 0)
30082         (mono_class_value_size): use min_align
30084 2002-01-20  Dick Porter  <dick@ximian.com>
30086         * threads.h:
30087         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
30088         so it compiles on w32.
30090 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
30092         * metadata.c (mono_type_stack_size): impl.
30094         * class.c (mono_class_get_field): impl. memberref token
30096 2002-01-16 Veronica De Santis <veron78@@interfree.it>
30098         * icall.h : Added the internal calls mapping for CreateMutex_internal
30099                     and ReleaseMutex_internal.
30100         * threads.h : Added the prototype of mutexes internal calls.
30101         * threads.c : Added the implementations of mutexes internal calls.
30103 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
30105         * metaparse.h: removed unused file.
30106         * reflection.c, reflection.h: added stream_data_align () function 
30107         to align data in streams and keep stream aligned. Add support for
30108         exception support in method headers.
30110 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
30112         * unicode.c: make iconv_convert () return the number of bytess written
30113         in the output buffer.
30115 2002-01-15  Dick Porter  <dick@ximian.com>
30116         * threads.c: Make the runtime's idea of infinite timeouts coincide
30117         with the class library's
30119         Fix a particularly egregious bug in mono_thread_cleanup(). That
30120         code was so utterly bogus it must have been written on a Monday.
30122 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
30124         * reflection.h: add subtypes field to TypeBuilder.
30125         * reflection.c: encode constants for literal fields.
30126         Handle subtypes. Fix user string token (and add a zero byte)
30127         at the end.
30128         
30129 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
30131         * class.c (mono_class_init): bug fix: assign slot numbers for
30132         abstract methods.
30134 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
30136         * reflection.c: don't try to output a code RVA for abstract methods.
30137         Small fixes for method header format. Output parameter info to the
30138         ParamDef table. Save method overriding info to MethodImpl table.
30139         Fix property support. Allow typedef.extends to be a type in the
30140         building assembly.
30141         * verify.c: fix off-by-one error.
30143 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
30145         * class.c: fix mono_class_from_mono_type () for szarray types.
30146         Remove unused cache check in mono_class_from_type_spec().
30147         * icall.c: *type_from_name () functions handle simple arrays and byref.
30148         * reflection.c: handle byref and szarray types. Handle methods without
30149         body (gets P/Invoke compilation working). Handle types and fields in
30150         get_token ().
30151         * reflection.h: add rank to MonoTypeInfo.
30153 2002-01-10  Dick Porter  <dick@ximian.com>
30155         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
30156         internal calls
30158 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
30160         * icall.c: initialize class in type_from_handle ().
30161         Loop also in parent classes for get_method ().
30162         * reflection.c: properly encode class and valuetype types.
30163         Start on encoding TypeBuilder types. Handle fieldrefs.
30164         Use correct length when registering a user string.
30165         Handle ConstructorBuilder and MonoMethod in get_token ().
30166         Make mono_type_get_object () aware of cached types.
30167         * object.c: back out change to mono_string_new ().
30169 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
30170         * object.c: mono_string_new should return a NULL when the string 
30171         passed in is NULL -- not try to deference it.
30172         
30173 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
30175         * icall.c: hack to make IsSubType work for TypeBuilders.
30176         * reflection.c: emit constructors before methods.
30177         Retrieve param names in mono_param_get_objects().
30179 2002/01/05  Nick Drochak  <ndrochak@gol.com>
30181         * Makefile.am: fix list of headers and sources so automake 1.5
30182         doesn't complain. Removed \# at end of list.
30184 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
30186         * reflection.c: get token for a method ref. Set return type of
30187         constructor to void.
30188         * loader.c: debug message.
30189         * class.c: typo fix.
30191 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
30193         * icall.c: fix array init with rank > 1. FindMembers
30194         loops in parent class as well.
30195         * image.c: do not insert nested types in name cache.
30196         * reflection.c: warning fix.
30197         * reflection.h: add override method (for interface impl).
30199 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
30201         * metadata.c: fix customattr decoding.
30203 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
30205         * rawbuffer.cs: Added native Win32 implementation, avoids using
30206         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
30208 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
30210         * class.c: make the low-level routines handle the cache.
30212 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
30214         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
30216 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
30218         * class.c: fix mono_array_element_size() for objects.
30219         * class.h, class.c: add properties to MonoClass and load them
30220         at init time.
30221         * icall.c: check with isinst() when assigning a value to an array
30222         instead of requiring the classes to match exactly.
30223         Implemented icall for System.Type::GetType().
30224         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
30225         enums. Handle bindingflags when looking for methods and fields.
30226         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
30227         and mono_metadata_methods_from_property().
30228         * reflection.h, reflection.c: added structures for propreties,
30229         parameters and enums. Implemented mono_property_get_object() and
30230         mono_param_get_objects().
30232 2001-12-18  Dick Porter  <dick@ximian.com>
30234         * file-io.c: Use mono_string_to_utf16() instead of
30235         mono_string_chars()
30237         * object.c: Added mono_string_to_utf16(), which copies the non
30238         NULL-terminated MonoString into a new double-null-terminated
30239         buffer.
30241 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
30243         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
30245 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
30247         * file-io.c: raise exceptions if handle is invalid.
30249 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
30251         * assembly.c: yet another check for mscorlib.
30252         * class.c, class.h: load nesting info for classes.
30253         * icall.c: many new functions to support the Reflection classes.
30254         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
30255         * reflection.h, reflection.c: mono_image_create_token(),
30256         mono_assembly_get_object(), mono_type_get_object(),
30257         mono_method_get_object(), mono_field_get_object(): methods to return
30258         objects that parallel the C representation of assemblies, types,
30259         methods, fields.
30261 2001-12-11  Dick Porter  <dick@ximian.com>
30263         * icall.c:
30264         * file-io.c: Internal calls for file IO.
30266 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
30268         * tabledefs.h: missing FileAttributes.
30269         * verify.h, verify.c: use is_valid_string () to simplify and check for
30270         valid strings more correctly. Fix warnings and speeling.
30271         Check more tables: Filed, File, ModuleRef, StandAloneSig.
30272         Check code: branches, maxstack, method calls.
30274 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
30276         * object.c (mono_object_allocate): removed static, so that the jit
30277         can allocate value types.
30279         * icall.c (ves_icall_System_DateTime_GetNow): impl.
30281 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
30283         * class.c: init enum types right away and register the
30284         token->MonoClass map in mono_class_create_from_typedef ().
30285         * verify.h, verify.c: first cut of the verifier.
30286         * pedump.c: add --verify switch to verify metadata tables.
30287         * tabledefs.h: add some missing enums.
30289 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
30291         * class.c (mono_install_runtime_class_init): impl.
30292         (mono_class_init): renamed mono_class_metadata_init to
30293         mono_class_init, also removed the metadata_inited flag
30295         * object.c (mono_object_isinst): use faster algorithm
30297 2001-11-30  Radek Doulik  <rodo@ximian.com>
30299         * mono-endian.h: reverted last change
30300         added function prototypes
30302         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
30303         add mono-endian.c back
30305         * mono-endian.c: returned back, as Paolo pointed out, it's needed
30306         for unaligned access, I've mistaked it with endianess. I am
30307         sorry.
30308         (mono_read16): fix reverted endianess
30309         (mono_read64): ditto
30310         (mono_read32): ditto
30312 2001-11-30  Dick Porter  <dick@ximian.com>
30314         * exception.c: Implement mono_exception_from_name()
30316 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
30318         * metadata.h, metadata.c: remove params_size and locals_size and their
30319         calculation from the metadata code: they are only usefult to the
30320         interp.
30322 2001-11-29  Radek Doulik  <rodo@ximian.com>
30324         * object.c (mono_ldstr): swap bytes here, it's probably not the
30325         best place, but works for me now, I'll redo it once I know mono
30326         better, also note that I add PROT_WRITE and don't reset back, also
30327         note that it's only affects big endians, so x86 should be OK
30329         * mono-endian.h (read16): use just glib macros for both endians
30331         * mono-endian.c: removed as glib macros are used in in
30332         mono-endian.h so we don't need to care about endianess for read
30333         macros as glib does that for us already
30335 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
30337         * class.h, class.h: take minimum alignment into consideration so
30338         that the fields of a class remain aligned also when in an array.
30340 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
30342         * loader.h, loader.c: add mono_method_get_param_names().
30343         * class.c: 0-init class fields.
30345 2001-11-26  Dick Porter  <dick@ximian.com>
30347         * icall.c:
30348         * threads-types.h:
30349         * threads.c: New file that handles System.Threading on all platforms
30351         * object.c: 
30352         * object.h: Remove the synchronisation struct from MonoObject,
30353         replace it with a pointer that gets initialised on demand
30355         * Makefile.am: Replace all the system-specific threading code with
30356         a single file that uses the new wrapper library
30358 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
30360         * class.c, class.h: add mono_install_trampoline() so that the runtime
30361         can register a function to create a trampoline: removes the ugly
30362         requirement that a runtime needed to export arch_create_jit_trampoline.
30363         * object.h, object.c: added mono_install_handler() so that the runtime
30364         can install an handler for exceptions generated in C code (with
30365         mono_raise_exception()). Added C struct for System.Delegate.
30366         * pedump.c: removed arch_create_jit_trampoline.
30367         * reflection.c: some cleanups to allow registering user strings and
30368         later getting a token for methodrefs and fieldrefs before the assembly
30369         is built.
30370         * row-indexes.h: updates and fixes from the new ECMA specs.
30372 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
30374         * class.h, class.c: add enum_basetype field to MonoClass.
30375         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
30376         to get index in the constant table reated to a field, param or
30377         property.
30378         * reflection.h, reflection.c: handle constructors. Set public-key and
30379         version number of the built assembly to 0.
30380         * row-indexes.h: update from new ECMA spec.
30382 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
30384         * class.h, class.c: add a max_interface_id to MonoClass.
30385         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
30386         since it's used to do that. Added mono_type_type_from_obj().
30387         Make GetType() return NULL instead of segfaulting if the type was not
30388         found. Handle simple arrays in assQualifiedName.
30389         * object.h: add a struct to represent an Exception.
30390         * reflection.c: output call convention in method signature.
30391         Add code to support P/Invoke methods and fixed offsets for fields.
30393 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
30395         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
30396         the value.
30397         * icall.c: use mono_array_addr instead of array->vector: fixes the
30398         reflection image writing.
30399         * reflection.c: init call convention byte to 0 in method signature.
30400         Encode the property signature. Don't output property-related methods
30401         twice. Really process the properties for a type (don't cast a field to
30402         a property, my mom always told me that).
30403         Fix 64 bit issues in pointer alignment in a different and more
30404         readable way.
30406 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
30408         * loader.h: Removed type class from MonoDefaults, added monotype
30410         * loader.c: Loaded MonoType, removed loading of Type
30412         * icall.c (my_mono_new_object): Now returns a System.MonoType,
30413         and fills in System.Type._impl with a RuntimeTypeHandle rather
30414         than the actual MonoClass *
30416         (ves_icall_type_from_handle): change from type_class to
30417         monotype_class
30419         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
30420         implemented
30422         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
30423         implemented
30425         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
30427         (ves_icall_System_Reflection_Assembly_GetType): implemented
30429         (ves_icall_System_MonoType_assQualifiedName): implemented
30431         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
30433 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
30435         * assembly.c (mono_assembly_open): Implement a cache for the
30436         assemblies. 
30438         (mono_assembly_close): only destroy the assembly when the last
30439         reference is gone.
30440         
30441 2001-11-09  Dick Porter  <dick@ximian.com>
30443         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
30445 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
30447         * class.c (mono_class_metadata_init): bug fix: compute the right slot
30449 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
30451         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
30452         from Martin Weindel.
30453         * object.h: add mono_string_chars ().
30455 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
30457         * reflection.c (build_compressed_metadata): Eliminates warnings
30458         and uses 64-bit clean code.
30460         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
30461         (mono_type_equal): Change signature to eliminate warnings.
30463 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
30465         * icall.c, loader.c: remove the internalcall array constructors.
30466         Changes to match the new MonoArray structure.
30467         * object.h, object.c: an array object doesn't allocate an extra
30468         vector. Add mono_array_new_full () to create jagged arrays easily.
30470 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
30472         * metadata.h, metadata.c: add mono_metadata_field_info () to
30473         retreive all the info about a field from vairous tables.
30474         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
30475         * class.h, class.c: augment MonoClassField with more info.
30476         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
30477         policy and load a field's RVA if needed.
30479 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
30481         * class.c (mono_class_metadata_init): create a trampoline for all
30482         virtual functions instead of actually compiling them.
30484 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
30486         * class.h, class.c: include name in MonoClassField.
30487         * class.c: fix fundamental type of System.Object and System.String.
30488         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
30489         tokens in ldtoken.
30490         * icall.c: remove internalcalls for the Reflection stuff that is now
30491         done in C# code.
30492         * loader.c: mono_field_from_memberref () implementation.
30493         * mono-endian.c: thinko (s/struct/union/g).
30494         * object.c, object.h: make the mono_string_* prototypes actually use
30495         MonoString instead of MonoObject.
30496         * reflection.c, reflection.h: updates for changes in the reflection
30497         code in corlib: we use C structures that map to the actual C# classes.
30498         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
30499         fat method header if needed and use the info from the ILGenerator for
30500         methods. Handle fields in types. Misc fixes.
30502 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
30504         * class.c (mono_class_metadata_init): bug fix: always allocate
30505         space for static class data
30507 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
30509         * class.c (mono_compute_relative_numbering): use relative
30510         numbering to support fast runtime type checks.
30512 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
30514         * class.c (mono_class_create_from_typeref): added debugging output
30515         to print class name when MonoDummy is returned instead of real class
30517 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
30519         * class.c (mono_class_metadata_init): interface offset table now
30520         contains pointers into the vtable - this is more efficient for the jit
30522 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
30524         * class.c (mono_class_metadata_init): use a temporary vtable (the
30525         old algorithm only worked for the interpreter, but not for the jit)
30527 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
30529         * loader.c (method_from_memberref): use mono_class_get to get the
30530         class of an array instead of using System.Array directly.
30531         (mono_get_method): also add MEMBERREF methods to the method cache
30532         which usefull for arrays.
30534 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
30536         * pedump.c (arch_compile_method): added to compute vtable entry
30538         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
30539         number of interfaces.
30540         
30541         * class.h: merged MonoArrayClass into MonoClass
30543         * class.c (mono_class_create_from_typedef): compute the vtable size and
30544         allocate space to include the vtable inside MonoClass
30545         (mono_class_metadata_init): initialize the vtable
30547 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
30549         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
30550         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
30551         * image.c: endian fixes by Laurent Rioux.
30552         * object.h, object.c: rename MonoStringObject to MonoString and
30553         MonoArrayObject to MonoArray. Change some function names to conform to
30554         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
30555         guint16* as first argument, so don't use char*.
30556         Provide macros to do the interesting things on arrays in a portable way.
30557         * threads-pthread.c: updates for the API changes and #include <sched.h>
30558         (required for sched_yield()).
30559         * icall.c: updates for the API changes above.
30560         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
30561         platforms that need them.
30563 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
30565         * class.c: set the correct type for all the fundamental
30566         type when loading the class.
30568 2001-10-05  Dick Porter  <dick@ximian.com>
30570         * threads-pthread.c (pthread_mutex_timedlock): Simple
30571         compatibility version for C libraries that lack this call.
30573 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
30575         * class.c: MonoTypes stored in MonoClass are stored as
30576         fundamental MonoTypes when the class represents a
30577         fundamental type (System.Int32, ...).
30578         The TypeHandle return by ldtoken is a MonoType*.
30579         * icall.c: ves_icall_get_data_chunk () write out all the
30580         PE/COFF stuff. Implement ves_icall_define_method (),
30581         ves_icall_set_method_body (), ves_icall_type_from_handle ().
30582         * image.c: properly skip unknown streams.
30583         * loader.h, loader.c: add type_class to mono_defaults.
30584         * metadata.c, metadata.h: export compute_size () as
30585         mono_metadata_compute_size () with a better interface.
30586         Typo and C&P fixes.
30587         * pedump.c: don't try to print the entry point RVA if there is no entry point.
30588         * reflection.c, reflection.h: many cleanups, fixes, output method
30589         signatures and headers, typedef and typeref info, compress the metadata
30590         tables, output all the heap streams, cli header etc.
30591         * row-indexes.h: typo fixes.
30593 2001-10-04  Dick Porter  <dick@ximian.com>
30595         * object.h: Add a synchronisation mutex struct to MonoObject
30597         * object.c (mono_new_object): Initialise the object
30598         synchronisation mutexes
30600         * icall.c: System.Threading.Monitor internal calls
30601         
30602         * threads-pthread.h:
30603         * threads-pthread.c: System.Threading.Monitor internal calls
30605         * threads-types.h: New file, includes the system-specific thread
30606         structures
30607         
30608         * threads-pthread-types.h:
30609         * threads-pthread-types.c: New files, handle pthread-specific
30610         synchronisation types
30612         * threads-dummy-types.h: 
30613         * threads-dummy-types.c: New files of dummy support for
30614         thread-specific types
30616         * metadata.c:
30617         * image.c:
30618         * pedump.c: include mono-endian.h not endian.h
30619         
30620         * Makefile.am: More threads files.
30621         Name mono-endian.h not endian.h
30623 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
30625         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
30626         stuff and implement a few more bits.
30627         * icall.c: a field needs to be dereferenced twice. Do not use the same
30628         name for two variables in the same scope.
30629         * image.c, image.h: cleanups.
30631 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
30633         * class.c (mono_class_metadata_init): bug fix: compute the right size
30635 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
30637         * icall.c: implemented some of the Reflection internalcalls.
30638         * image.c, image.h: start writing out the PE/COFF image.
30639         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
30640         that does the reverse than decode_blob_size ().
30641         * object.c: use mono_metadata_encode_value (). Move here
30642         temporary implementation of mono_string_to_utf8 ().
30643         * rawbuffer.c: make malloc_map static.
30645 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
30647         * metadata.c: fix type comparison for arrays.
30648         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
30649         Added a couple of new classes to monodefaults.
30650         * icall.c: added a couple of Reflection-related internalcalls.
30651         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
30652         Added a byval_arg MonoType to MonoClass.
30654 2001-09-28  Dick Porter  <dick@ximian.com>
30656         * icall.c:
30657         * threads-pthread.h: 
30658         * threads-pthread.c: Implemented internal calls for
30659         LocalDataStoreSlot operations.  Applied mutexes around all shared
30660         data.  Reworked the thread creation and Start() operations to
30661         avoid a race condition.
30662         
30663         * threads-dummy.h:
30664         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
30666 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
30668         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
30670 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
30672         * class.c, loader.c: warn and return NULL instead of erroring out.
30673         * icall.c: added System.AppDomain::getCurDomain().
30674         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
30676 2001-09-25  Dick Porter  <dick@ximian.com>
30678         * threads-pthread.h:
30679         * threads-pthread.c: Implemented timed thread joining and added
30680         System.Threading.Thread::Join_internal internal call
30682         * icall.c: Added System.Threading.Thread::Join_internal internal call
30684         * threads-dummy.h:
30685         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
30687 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
30689         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
30690         mono_string_intern () to implement the semantics of the ldstr opcode
30691         and the interning of System.Strings.
30692         * icall.c: provide hooks to make String::IsIntern and String::Intern
30693         internalcalls.
30695 2001-09-23  Dick Porter  <dick@ximian.com>
30697         * threads-dummy.c: 
30698         * threads-dummy.h: New files of dummy threading routines
30700         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
30701         support code based on system specifics
30703         Rename PTHREAD_LIBS to THREAD_LIBS
30704         
30705 2001-09-23  Dick Porter  <dick@ximian.com>
30707         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
30708         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
30709         internal calls.
30710         (mono_thread_init): Set up a Thread object instance to return when
30711         the main thread calls Thread.CurrentThread
30712         (mono_thread_cleanup): Wait for all subthreads to exit
30714         * icall.c: New internal calls for System.Threading.Thread::Sleep
30715         (including Schedule) and CurrentThread
30717         * threads.h: New file, to insulate thread-specific stuff from the
30718         rest of the code
30720 2001-09-21  Dick Porter  <dick@ximian.com>
30722         * threads-pthread.h: 
30723         * threads-pthread.c: New file, for handling pthreads-style
30724         threading support.  Start() now starts a new thread and executes
30725         the ThreadStart delegate instance.
30727         * icall.c: Added the internalcall for
30728         System.Threading.Thread::Start_internal
30730         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
30732 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
30734         * loader.c: work around the different signatures for delegates
30735         constructors csc generates in compiled code vs the ones compiled in mscorlib.
30737 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
30739         * class.h, class.c: add mono_class_get_field_from_name ().
30740         * *: Fix C comments and other ANSI C issues.
30742 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
30744         * endian.h, assembly.c: fix some endianness issues.
30746 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
30748         * loader.h, load.c: add delegate_class to mono_defaults.
30749         Handle runtime provided methods in mono_get_method ().
30751 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
30753         * loader.c (mono_get_method): use pinvoke for internal call
30755         * icall.c: use pinvoke for internal call
30757         * loader.c (method_from_memberref): set the method name
30759 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
30761         * metadata.c: help the compiler generate better code for
30762         mono_class_from_mono_type ().
30764 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
30766         * class.c (mono_class_metadata_init): delayed computing of the
30767         class size to mono_class_metadata_init ()
30769 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
30771         * class.c, class.h: add an interfaces member to MonoClass.
30772         * image.c, image.h: add assembly_name field to MonoImage
30773         from the assembly table.
30774         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
30776 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
30778         * class.c: Handle Array in mono_class_from_mono_type ().
30779         * metadata.c, pedump.c: some endian fixes.
30781 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
30783         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
30784         * metadata.c: fix small problem introduced with the latest commit.
30786 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
30788         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
30789         We don't need a MonoMetadata pointer anymore to compare signatures in
30790         mono_metadata_signature_equal (), update callers.
30791         Reduced memory usage an number of allocations for MonoMethodHeader and
30792         MonoMethodSignature.
30794 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
30796         * metadata.c: added compare for szarray.
30798 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
30800         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
30801         and add a couple more types to it and mono_defaults. Give an hint on
30802         classes that need implementing in our corlib and are referenced
30803         in mscorlib.
30805 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
30807         * class.h, class.c: keep track if a class is also an Enum.
30808         * loader.c: Implement a couple more types for use in libffi
30809         marshalling. Gives better diagnostics when failing to dlopen
30810         a library. Set method->klass for P/Invoke methods, too.
30812 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
30814         * class.c, class.h: add a MonoType this_arg to MonoClass that
30815         represents a pointer to an object of the class' type that
30816         can be used by the interpreter and later the type cache.
30817         Add best guess alignment info for valuetype objects.
30819 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
30821         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
30822         into MonoType: one less level of indirection and allocation and
30823         simplifies quite a bit of code. Added cache for MonoTypes that are
30824         used frequently, so that we don't need to allocate them all the time.
30826 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
30828         * class.c (mono_class_create_from_typedef): System.Enum is also a
30829         value type, although it does not derive from System.ValueType
30830         (maybe a bug in the ms compiler?)
30832         * metadata.c (mono_type_size): return the right size for value types
30834         * loader.c (mono_get_method): only initialize method header if not abstract
30836         * class.c (mono_class_from_mono_type): use mono_default values. 
30838 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
30840         * *: use MonoClass pointers instead of <type_tokens>
30841         
30842         * class.h: new flag: metadata_inited.
30844         * class.c (mono_class_metadata_init): impl.
30845         (mono_class_instance_size): impl.
30846         (mono_class_data_size): impl.
30848 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
30850         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
30851         MonoClass now has the name and name_space fields. 
30852         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
30853         mono_get_method () takes and optional MonoClass as argument.
30854         Removed mono_typedef_from_name() and added mono_class_token_from_name()
30855         instead that takes advantage of a map from class names to typedef
30856         tokens in MonoImage.
30858 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
30860         * metadata.c: zero is not a valid alignment boundary.
30861         Merge MONO_TYPE_VOID in default decoding code.
30863 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
30865         * image.h: merged MonoMetadata into MonoImage
30867         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
30868         identify the type of elements.
30870 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
30872         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
30873         * cil-coff.h: split MonoMSDOSHeader and add size info.
30874         * image.c: add some consistency checks.
30875         * metadata.c: fix row size computation: one programmer
30876         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
30877         add explanation for the locator routine.
30878         Fix decoding of size in method header.
30879         
30880 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
30882         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
30883         (g_concat_dir_and_file): Bring g_concat_dir_and_file
30884         function from gnome-libs.  This uses the right path separator
30885         based on the OS, and also works around a bug in some systems where
30886         a double slash is not allowed. 
30887         (default_assembly_name_resolver): Use g_concat_dir_and_file
30888         (mono_assembly_open): ditto.
30890 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
30892         * metadata.c (mono_metadata_signature_equal): impl.
30894         * *: void is now a realy MonoType (instead of using NULL)
30895         
30896         * metadata.c (do_mono_metadata_parse_type): use
30897         mono_metadata_parse_type to parse void value.
30899 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
30901         * metadata.c, metadata.h: in the signature and method header store
30902         only the space required for holding the loca vars and incoming arguments.
30904 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
30906         * metadata.c (do_mono_metadata_parse_type): treat void like any
30907         other type (instead of assigning NULL);
30909 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
30911         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
30913 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
30915         * image.c (do_mono_image_open): added a cache for arrays.
30917 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
30919         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
30920         decode a single column from a row in a metadata table and changes
30921         to take advantage of it in the typedef locator (gives a nice speed up).
30922         Store offset info for function params.
30924 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
30926         * image.h (MONO_IMAGE_IS_CORLIB): removed 
30928 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
30930         * assembly.c: how could mono_assembly_close () had ever worked?
30931         * metadata.c, metadata.h: provide offset info for local vars.
30932         Implement mono_type_size () to take care of alignment as well
30933         as size (it was mono_field_type_size in cli/class.c before).
30935 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
30937         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
30939         * assembly.h (CORLIB_NAME): set to corlib.dll
30941         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
30943 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
30945         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
30946         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
30947         tokentype.h: massive namespace cleanup.
30949 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
30951         * metadata.h, metadata.c: decode exception clauses when parsing method header.
30953 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
30955         * metadata.c (mono_metadata_free_type): added check for type !=
30956         NULL (void) before calling mono_metadata_free_type()
30958 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
30960         * metadata.h, row_indexes.h: added header with enumerations to use
30961         to index in the columns from tables in metadata and to decode coded
30962         tokens: we should start using this instead of embedding magic numbers
30963         all over the code.
30965 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
30967         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
30968         Move metadata_t info from cli_image_info_t to MonoImage, where
30969         it's easily accessible. Changed all the uses accordingly.
30970         Added the method and class caches to MonoImage.
30971         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
30972         and mono_metadata_decode_value () signature to be more consistent
30973         with the other parse functions (and simplify code). Taken advantage
30974         of zero-length array allocation with GCC. Removed reduntant (and
30975         wrong) MonoFieldType struct and use MonoParam instead. Changed
30976         mono_metadata_parse_field_type () to use common code for parsing.
30977         Added mono_metadata_typedef_from_field () and
30978         mono_metadata_typedef_from_method () to lookup a typedef index from a
30979         field or method token.
30980         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
30982 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
30984         * metadata.c (mono_metadata_parse_field_type): Implement. 
30985         (do_mono_metadata_parse_type): Split engine from
30986         mono_metadata_parse_type, so that we can create smaller structures
30987         for things that just have one pointer to the MonoType (look at
30988         the MonoFieldType)
30990 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
30992         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
30993         as Jan Gray found out, it is incorrect. 
30995 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
30997         * assembly.c: Implement asssembly loading.  This loads an image
30998         and loads all the referenced assemblies.  Come to think of it, we
30999         could always do lazy loading of the assemblies. 
31001         * image.c (mono_image_open): Keep loaded images in a hashtable.
31003         * image.h (MonoImage): Add reference count.
31005 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
31007         * assembly.c (mono_assembly_open): Keep track of the file name in
31008         case the assembly has no ASSEMBLY table.
31010         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
31011         from get.c here.
31013 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
31015         * metadata.c, metadata.h: decode local vars in method header
31016         parse function. Change callers accordingly.
31018 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
31020         * metadata.h, cil-coff.h: protect against multiple inclusion.
31021         Added some new structures to hold information decoded from metadata:
31022         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
31023         and relevant decoding/free functions.
31024         * metadata.c: implement decoding functions. Add warning for out of bounds
31025         index in mono_metadata_locate(). Implement mono_get_method () to retreive
31026         all the info about a method signature and invocation. Remove check on
31027         uninitialized local var in parse_mh() and fix memory leak.
31029 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
31031         * metadata.h: More macros.
31033         * tokentype.h: New file.
31035 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
31037         * assembly.c: added a consistency check and initialize
31038         some structures with g_new0().
31039         * metadata.c: fixed a couple more bugs in table size computation
31040         and add other checks for out-of bound access to metadata.
31042 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
31044         * metatada.c: fix bugs computing table sizes. Spew a
31045         warning when index in string heap is out of bounds.
31047 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
31049         * metadata.h: Add a couple of macros to manipulate tokens. 
31051 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
31053         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
31054         cli_section_tables).
31056 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
31058         * metadata.c (mono_metadata_user_string): New function, provides
31059         access to the UserString heap. 
31061 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
31063         * metadata.c: Add inline documentation.
31065 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
31067         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
31068         files. 
31070 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
31072         * typeattr.h: New file, TypeAttribute flags. 
31074 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
31076         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
31077         mono_assembly_ensure_section): Section loading code.
31078         (load_section_tables): Load the sections.
31080         * mono/metadata/metadata.c (mono_metadata_locate_token,
31081         mono_metadata_locate): Functions to locate the information
31082         definition given a token or a table and an index.
31083         (mono_metadata_compute_table_bases): New.
31084         (compute_size): New function to compute the sizes of the various
31085         tables.
31087         * mono/metadata/metadata.h: Finish listing the different index
31088         types. 
31090         * mono/metadata/pedump.c: Improve to dump new information.
31092 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
31094         * mono/metadata/metadata.c: Entered all the tables matching
31095         Beta2. 
31097         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2