2008-11-28 Mark Probst <mark.probst@gmail.com>
[mono.git] / mono / metadata / ChangeLog
index ffdc23e50dbc2fe9a0c4395e142845a6d4a5c1d2..4105016b773c1ba908c61d54413aa1e22c0bc2be 100644 (file)
@@ -1,7 +1,336 @@
-2008-10-20  Zoltan Varga  <vargaz@gmail.com>
+2008-11-28  Mark Probst  <mark.probst@gmail.com>
+
+       * class.c: Enable generic code sharing on PPC64.
+
+2008-11-27  Mark Probst  <mark.probst@gmail.com>
+
+       * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
+       from mini/mini.c.
+
+       * generic-sharing.c: Allocate the method template slists from the
+       image mempool so it doesn't leak.
+
+2008-11-27 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class.c (generic_array_methods): Release the linked list.
+
+2008-11-27  Mark Probst  <mark.probst@gmail.com>
+
+       * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
+       invocation to g_utf16_to_utf8().
+
+2008-11-26  Mark Probst  <mark.probst@gmail.com>
+
+       * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
+       arguments on big endian archs.
+
+2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
+       the type name (test added in corlib).
+
+2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * pedump.c: initialize perf. counters. Fixes a segv.
+
+2008-11-25  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug-debugger.c
+       (mono_debugger_runtime_invoke): Return the exception object if an
+       exception was thrown.  Visual Studio displays the exception object
+       in the locals window.
+
+2008-11-24  Mark Probst  <mark.probst@gmail.com>
+
+       * mini-trampolines.c (mono_delegate_trampoline): Don't return a
+       ftnptr.
+
+2008-11-24  Mark Probst  <mark.probst@gmail.com>
+
+       * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
+       MONO_TYPE_U are sizeof (gpointer), too.
+
+2008-11-24  Mark Probst  <mark.probst@gmail.com>
+
+       * marshal.c (mono_type_native_stack_size): Fixed size and
+       alignment for reference types.
+
+2008-11-23  Mark Probst  <mark.probst@gmail.com>
+
+       * class.c (mono_class_generic_sharing_enabled): Disable generic
+       code sharing for PPC64.
+
+2008-11-21 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * icall.c (mono_method_get_equivalent_method): Make sure
+       method->klass->methods is inited before looping over it.
+
+2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * object.c: when calling ExecuteAssembly in a newly created domain,
+       the configuration file and application base are already set up.
+       Bug #446353 take 2 fixed.
+
+2008-11-20  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
+       Fixes #444715. Fix a warning.
+
+2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * appdomain.c: write the full path of the assembly to the .ini file
+       created when "shadow-copying"
+       Bug #446353 fixed.
+
+2008-11-18  Zoltan Varga  <vargaz@gmail.com>
+
+       * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
+       if signature==FALSE.
+
+2008-11-17  Bill Holmes  <billholmes54@gmail.com>
+
+       * marshal.h : Fix the cygwin build.
+          marshal.c:12442: undefined reference to `_IID_IMarshal'
+         
+       Code is contributed under MIT/X11 license.
+
+2008-11-17  Bill Holmes  <billholmes54@gmail.com>
+
+       * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
+         free threaded marshaler when QueryInterface is called on a COM callable
+         wrapper requesting the IMarshal interface.
+         
+       Code is contributed under MIT/X11 license.
+
+2008-11-14  Zoltan Varga  <vargaz@gmail.com>
+
+       * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
+
+       * reflection.c (mono_type_get_object): Special case the very common
+       void type.
+
+       * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
+       hold typeof(void).
+
+2008-11-13  Bill Holmes  <billholmes54@gmail.com>
+
+       * process.h : Adding method declaration for
+         ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
+         
+       * process.c : Adding implementation for
+         ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
+         
+       * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
+         to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
+
+       Code is contributed under MIT/X11 license.
+
+2008-11-10  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * appdomain.c (unload_thread_main): Clean up threadpool by
+       calling mono_thread_pool_remove_domain_jobs.
+
+       * domain-internals.h (struct _MonoDomain): Add new fields to
+       help coordinate the cleanup of the threadpool.
+
+       * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
+       that cleans up the threadpool of all jobs associated with an appdomain.
+       It does that by cleaning up the queues and making sure all active
+       threads are accounted.
+
+       * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
+       unloaded or in the process of. Take this is such way that there is
+       no race condition between another thread starting the unload and the
+       current thread acknowledging it.
+
+       * threadpool.c (async_invoke_thread): Same.
+
+       * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
+       firing the new thread.
+
+       * threadpool.c (start_tpthread): Same.
+
+       * theadpool.c (append_job): Increment threadpool_jobs before queueing.
+
+       * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
+
+2008-11-06  Jonathan Chambers  <joncham@gmail.com>
+
+       * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle): 
+       Add support for DuplicateHandle.
+       
+       * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle): 
+       Add support for DuplicateHandle.
+       
+       * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle): 
+       Add support for DuplicateHandle.
+
+       Code is contributed under MIT/X11 license.
+
+2008-11-06  Mark Probst  <mark.probst@gmail.com>
+
+       * class-internals.h: Make min_align into a whole byte.
+
+       * class.c: Set min_align for SIMD types to 16.
+
+2008-11-05  Geoff Norton  <gnorton@novell.com>
+
+       * attach.c: Default the attacher to enabled for all cases including
+       embedded.
+
+Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
+
+       * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
+       change r117650.
+
+2008-11-04  Mark Probst  <mark.probst@gmail.com>
+
+       * monitor.c, monitor.h: New function for querying offsets of
+       members of MonoThreadsSync.
+
+2008-11-04  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
+       to speed up this function and to avoid the boundless memory growth caused by
+       the signature_dup () calls.
+
+2008-11-02  Zoltan Varga  <vargaz@gmail.com>
+
+       * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
+       wrapper.
+
+       * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
+       by 1 bit.
+
+       * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
+
+2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * appdomain.c:
+       * domain-internals.h: made mono_set_private_bin_path_from_config()
+       "internal".
+       * object.c: call the above function after setting the configuration
+       file path for the root domain.
+       Fixes bug #314478.
+
+2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * assembly.c: when the assembly is loaded from an absolute path, end
+       basedir with a directory separator.
+       Bug #440781 fixed.
+
+2008-10-30  Mark Probst  <mark.probst@gmail.com>
+
+       * monitor.c (mono_monitor_get_fast_enter_method): If
+       CompareExchange is not available, don't create the fastpath
+       instead of asserting.  (The method is missing in the 1.1 profile.)
 
-       * loader.c (find_method_in_class): Search directly in metadata to avoid
-       calling mono_class_setup_methods ().
+2008-10-30  Mark Probst  <mark.probst@gmail.com>
+
+       * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
+
+       * monitor.c, monitor.h: Code for generating Monitor.Enter and
+       Monitor.Exit IL fastpaths.
+
+2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class.c (mono_class_create_from_typedef): Added Vector2ul.
+
+2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class.c (mono_class_create_from_typedef): Added Vector2l.
+
+2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class.c (mono_class_create_from_typedef): Added Vector2d.
+
+2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * appdomain.c: translate \ into / for cache_path.
+       * domain-internals.h: new mono_is_shadow_copy_enabled().
+       * icall.c: (fill_reflection_assembly_name) do the same path
+       manipulations that get_code_base does.
+       (get_code_base) use mono_is_shadow_copy_enabled.
+
+2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * appdomain.c: shadow-copied assemblies go to CachePath +
+       ApplicationName when both are set. DynamicBase has nothing to do with
+       shadow copies.
+       Bug #406877 fixed.
+
+2008-10-26  Zoltan Varga  <vargaz@gmail.com>
+
+       * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
+       STANDALONESIG table.
+
+       * metadata-internals.h (struct _MonoDynamicImage): Add cache for
+       standalone signatures.
+
+       * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature 
+       comparison code: instead of comparing the signatures using a custom
+       equals function, transform them to a common signature and compare that. This
+       works better with AOT.
+
+2008-10-25  Zoltan Varga  <vargaz@gmail.com>
+
+       * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
+
+       * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
+       call for generic instances.
+       (mono_class_setup_properties): Call setup_properties () before accessing
+       gklass->properties.
+
+       * class.c (mono_class_get_virtual_methods): New helper function to iterate
+       over the virtual methods of a class using metadata if possible, avoiding the
+       creation of MonoMethod's for non-virtual methods.
+       
+       * class.c (mono_class_setup_vtable_general): Rewrite this to use 
+       get_virtual_methods () to iterate over the virtual methods of classes.
+
+2008-10-25  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
+
+2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class.c (mono_class_create_from_typedef): Added Vector4i.
+
+2008-10-24  Mark Probst  <mark.probst@gmail.com>
+
+       * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
+       ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
+       special-casing applies to eliminate the call completely.
+
+2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class.c (mono_class_create_from_typedef): Added Vector8s.
+
+2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class.c (mono_class_create_from_typedef): Added Vector16sb.
+
+2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * icall.c: get rid of annoying warning.
+
+2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * threadpool.c: in 1.x, if you change the background status of the
+       threadpool thread, it's not reset.
+       Remove unnecessary calls to SetState.
+
+2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * threadpool.c: asynchronously create a set of idle threads upon first
+       use of the threadpool. SetMinThreads will now start the appropriate
+       number of idle threads if they are not already running. The default is
+       1 threadpool thread per CPU. Increased the maximum number of threads
+       per CPU to 10.
+
+2008-10-22  Martin Baulig  <martin@ximian.com>
+
+       Revert r116521 from Zoltan, it breaks the debugger:
 
        * class.c (mono_class_get_virtual_methods): New helper function to iterate
        over the virtual methods of a class using metadata if possible, avoiding the
        * class.c (mono_class_setup_vtable_general): Rewrite this to use 
        get_virtual_methods () to iterate over the virtual methods of classes.
 
+2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * threads.c: when creating a threadpool thread, set its state to
+       'background'.
+       * threadpool.c: reset the background state of a threadpool thread
+       after finishing each work item
+       Bug #437888 fixed.
+
+2008-10-22  Zoltan Varga  <vargaz@gmail.com>
+
+       * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
+       
+       * class.c (mono_class_setup_vtable_general): Add an optimized version for
+       generic instances which works by inflating the methods in the container
+       class's vtable.
+
+       * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
+       variant which doesn't make a copy if no inflation was done.
+       (mono_class_setup_fields): Use it.
+
+       * metadata.c (mono_metadata_get_shared_type): New helper function to
+       return a shared instance of a given MonoType.
+
+       * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
+       a copy of most non-generic types.
+
+Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
+
+       * threadpool.c: remove one more GetSystemInfo () call.
+
+Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
+
+       * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
+       use the code in mono-proclib.h to get processor information.
+
+2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * appdomain.c: fixed the logic that determines whether assemblies in a
+       directory are "shadow-copied" or not. Bug #433483 fixed.
+
+2008-10-22  Zoltan Varga  <vargaz@gmail.com>
+
+       * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
+       warning.
+
+2008-10-21  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
+       returning a vtype.
+
+       * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
+       reflection.c: Use mono_field_get_name () for accessing a field's name.
+
+       * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
+       class.c
+
+       * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
+       field.
+
+       * loader.c (find_method_in_class): Reenable the metadata optimization by
+       not using it for generic instances.
+
+       * class-internals.h (MonoFieldDefaultValue): Extract the rarely used 
+       data/def_type fields from MonoClassField into a separate structure.
+       (struct MonoClassField): Remove data/def_type fields.
+       (struct _MonoClass): Add a 'field_def_values' array to store the default
+       values/RVA for fields.
+
+       * class.c reflection.c: Update after the changes.
+       
+       * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
+       for accessing field->data.
+
+       * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
+
+       * loader.c (find_method_in_class): Revert the last change for now as
+       it breaks Mono.C5 unit tests.
+
+       * class-internals.h (struct _MonoDynamicGenericClass): Add fields
+       'field_generic_types' and 'field_objects' which contain the information
+       previously stored in MonoInflatedField.
+       (MonoInflatedField): Delete.
+       (struct _MonoClassField): Delete 'generic_info' field.
+
+       * reflection.c: Store the information which was previously in 
+       field->generic_info in MonoDynamicGenericClass instead.
+
+       * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
+       MonoClassField changes.
+
+Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
+
+       * marshal.c, method-builder.c: get rid of wrapper_hash and instead
+       store the value inside the data array of the MonoMethodWrapper.
+       This saves memory, is faster and fixes the lifetime issues (methods
+       were never removed from the hash previously). May also fix bug#436996.
+
+2008-10-21  Zoltan Varga  <vargaz@gmail.com>
+
+       * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic 
+       generic instances, compute the type from the generic definition instead of
+       looking in field->generic_info.
+
+       * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
+       for inflated fields, the only user was get_fieldref_token () which no
+       longer needs it.
+
+       * class.c (mono_class_init): Revert the last change as it seems to cause
+       crashes.
+
+       * class-internals.h (struct _MonoClassField): Reorder fields to save 4
+       bytes on 64 bit platforms.
+
+       * object.c (mono_class_create_runtime_vtable): Fix a warning.
+       
+       * object.c (mono_class_create_runtime_vtable): Don't initalize
+       field->data/field->def_type here, it is done lazily by 
+       mono_class_get_field_default_value ().
+
+       * icall.c (ves_icall_get_enum_info): Call 
+       mono_class_get_field_default_value () instead of directly accessing
+       field->data and field->def_type.
+
+       * object.c (get_default_field_value): Ditto.
+
+       * class.c (mono_field_get_data): Ditto.
+       
+       * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
+       call for generic instances.
+
+       * loader.c (find_method_in_class): If klass != from_class, then inflate
+       the method with the context of from_class, since the caller assumes this.
+
+2008-10-20  Zoltan Varga  <vargaz@gmail.com>
+
        * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
        for accessing method->slot.
 
@@ -58,6 +522,7 @@ Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
 
        * appdomain.c: check for NULL setup before it's referenced.
 
+p
 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
 
        * class.c: remove the unused old vtable setup code.