* profiler.h, profiler-private.h, profiler.c: add a new profiler
[mono.git] / mono / metadata / ChangeLog
index 12f4df3fa6d11e3810fa12371e799ae157104bf4..0afdf9f4c92f72088c7d334d7aa10f8474483821 100644 (file)
@@ -1,5 +1,286 @@
+2007-09-10  Massimiliano Mantione  <massi@ximian.com>
+
+       * profiler.h, profiler-private.h, profiler.c: add a new profiler
+       event to handle unloading methods. After the event is called, the
+       corresponding MonoMethod* must be considered invalid.
+       * loader.c (mono_free_method): call the new mono_profiler_method_free
+       event.
+
+2007-09-20  Mark Probst  <mark.probst@gmail.com>
+
+       * domain-internals.h: New flag in MonoJitInfo which marks shared
+       generic methods.  New hash table (shared_generics_hash) in
+       MonoDomain to keep track of shared generic methods.  Prototypes
+       for functions to register and lookup shared generic methods.
+
+       * domain.c: Support for registering and looking up shared generic
+       methods via a hash table (shared_generics_hash) in MonoDomain.
+
+       * class-internals.h: New exception to signal failure of shared
+       compilation of a generic method.  New counters for generics
+       sharing in MonoStats.
+
+Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * image.c, metadata-internals.h: don't keep a file descriptor open
+       for loaded assemblies (bug#325988).
+
+2007-09-19  Raja R Harinath  <rharinath@novell.com>
+
+       * metadata.c (signature_in_image): New.  Carve out of type_in_image.
+       (ginst_in_image, gclass_in_image): Simplify.  Change signature to
+       use the corresponding datatypes.
+       (type_in_image): Update to changes.
+       (CleanForImageUserData): Simplify.
+       (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
+       Avoid quadratic behaviour in handling the "stolen" list by
+       separating the filter predicate out, and by prepending the stolen
+       items rather than appending them.
+       (steal_ginst_in_image): Likewise.
+       (mono_metadata_clean_for_image): Update to changes.
+
+2007-09-19  Martin Baulig  <martin@ximian.com>
+
+       * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
+
+2007-09-19  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug.c (mono_debug_cleanup): Don't call
+       mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
+
+2007-09-19  Raja R Harinath  <harinath@gmail.com>
+
+       Fix crash on 'make run-test' in mcs/errors
+       * metadata.c (type_in_image): New.  Carve out of ginst_in_image.
+       Avoid more potential allocations in mono_class_from_mono_type.
+       (ginst_in_image): Update to changes.
+       (gclass_in_image): Rearrange slightly.
+
+2007-09-18  Zoltan Varga  <vargaz@gmail.com>
+
+       * class.c (mono_class_init): Move the code that sets up class->methods to 
+       mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
+
+       * metadata.c (mono_metadata_get_inflated_signature): New function to return a
+       canonical instance of an inflated generic signature.
+       (mono_type_create_from_typespec): Remove an invalid free.
+
+       * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.  
+
+2007-09-18  Marek Habersack  <mhabersack@novell.com>
+
+       * domain-internals.h: added a declaration of the
+       mono_assembly_load_full_nosearch internal function.
+
+       * assembly.c (mono_assembly_load_with_partial_name): use
+       mono_try_assembly_resolve return value properly.
+       (mono_assembly_load_full_nosearch): copied the function body from
+       mono_assembly_load_full, without the code to invoke assembly
+       search hooks.
+       (mono_assembly_load_full): calls the above new function and if the
+       assembly is not resolved, invokes the search hooks.
+
+       * appdomain.c (mono_runtime_init): restore the global postload
+       assembly search handlers.
+
+2007-09-18  Zoltan Varga  <vargaz@gmail.com>
+
+       * class.c (mono_class_init): Make sure class->methods and class->properties
+       are never NULL in the generics case.
+
+       * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
+
+2007-09-17  Zoltan Varga  <vargaz@gmail.com>
+
+       * metadata.c (free_generic_class): Disable some code to fix the build.
+
+       * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
+
+       * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
+       from the image mempool.
+
+       * metadata.c (free_generic_class): Free more data from the inflated class.
+
+       * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
+
+       * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
+       mempool.
+       (mono_type_create_from_typespec): Ditto.
+
+       * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
+       MonoImage to the caller.
+       (mono_init_internal): Save the opened image in a global variable.
+       (mono_cleanup): Close the image opened in get_runtimes_from_exe.
+
+       * reflection.c (resolve_object): Fix a leak.
+
+       * metadata.c: Fix the freeing of data in the generics caches.
+       
+       * metadata.c (free_generic_inst): Comment this out to fix the build.
+       (free_generic_class): Ditto.
+
+       * metadata.c: Free cached generic methods, instantinations and classes when
+       they are removed from the caches.
+       (mono_metadata_free_type): Free the type itself.
+
+       * class.c: Free the result of mono_class_inflate_generic_type () in a few
+       places.
+
+Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * boehm-gc.c: restrict managed allocs to __thread supporting
+       architectures.
+
+2007-09-16  Zoltan Varga  <vargaz@gmail.com>
+
+       * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
+       (mono_generic_class_get_class): Fix a leak.
+
+       * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
+       mono_metadata_free_type ().
+       (mono_metadata_inflate_generic_inst): Fix a leak.
+
+2007-09-14  Zoltan Varga  <vargaz@gmail.com>
+
+       * mono-debug.c (free_header_data): Fix a leak missed earlier.
+
+       * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
+       mempool.
+
+       * mono-debug.c (mono_debug_close_image): Fix call to 
+       g_hash_table_remove ().
+
+Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * icall-def.h: redirect all the string ctor to the managed
+       CreateString () methods.
+       * string-icalls.c, string-icalls.h: removed dead code for string
+       ctors and icalls.
+
+2007-09-14  Zoltan Varga  <vargaz@gmail.com>
+
+       * mono-debug.c: Fix memory leaks.
+
+2007-09-14  Jonathan Chambers <joncham@gmail.com>
+
+       * threads-types.h: Implement mono_hazard_pointer_set and 
+       mono_hazard_pointer_clear macros using do/while(0) to fix
+       compilation with MSVC.
+       
+       Code is contributed under MIT/X11 license.
+
+2007-09-14  Zoltan Varga  <vargaz@gmail.com>
+
+       * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
+       -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
+
+Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * icall-def.h, string-icalls.c: get rid of old, no longer used, string
+       icalls.
+
+Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * boehm-gc.c, gc-internal.h, object.c: allow strings to be
+       managed-code allocated as well.
+
+2007-09-13  Zoltan Varga  <vargaz@gmail.com>
+
+       * class.c (mono_class_is_assignable_from): Add support for generic variance.
+
+Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * boehm-gc.c: fixed the build after the AOT changes.
+
+2007-09-13  Zoltan Varga  <vargaz@gmail.com>
+
+       * wrapper-types.h: Add an ALLOC wrapper type.
+
+       * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
+       reference managed allocator methods.
+
+2007-09-12  Marek Safar  <marek.safar@gmail.com>
+
+       * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
+       of Type array and not MonoType, a fix suggested by Hari.
+       
+2007-09-12  Jonathan Chambers <joncham@gmail.com>
+
+       * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
+       and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
+       
+       Code is contributed under MIT/X11 license.
+
+2007-09-10  Massimiliano Mantione  <massi@ximian.com>
+
+       * domain.c, object.c, mono-config.c, object-internals.h: Fixed  #82416.
+
+2007-09-12  Marek Habersack  <mhabersack@novell.com>
+
+       * image.c (do_mono_image_open): if assembly file fails to open and
+       MONO_IOMAP is in effect, try to find the path in a
+       case-insensitive way.
+
+       * appdomain.c (mono_runtime_init): do not install postload hooks -
+       tests show that MS.NET doesn't use anything of that sort to
+       trigger the AppDomain.AssemblyResolve event.
+       (mono_try_assembly_resolve): renamed from try_assembly_resolve and
+       made non-static.
+       (mono_runtime_init): init portability helpers here.
+
+       * assembly.c (mono_assembly_load_with_partial_name): if other   
+       attempts fail, trigger the AppDomain.AssemblyResolve event handler
+       to resolve the assembly.
+
+       * domain-internals.h: added mono_try_assembly_resolve and marked
+       it as internal.
+
+2007-09-11  Jb Evain  <jbevain@novell.com>
+
+       * object-internals.h (MonoReflectionDynamicMethod): add
+       a `MonoReflectionType *owner` field. The owner is used
+       * reflection.c:
+       (mono_reflection_create_dynamic_method): use the owner of the dynamic
+       method as the class declaring the dynamic method.
+       (reflection_methodbuilder_from_dynamic_method): copy the owner of the
+       dynamic method to the declaring type of the methodbuilder.
+
+2007-09-11  Mark Probst  <mark.probst@gmail.com>
+
+       * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
+       rules for calling methods via reflection.
+
+2007-09-11  Zoltan Varga  <vargaz@gmail.com>
+
+       * reflection.c (resolve_object): Add support for MonoGenericClass. 
+       Inflate MonoType's.
+
+Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
+       provide a managed method that does fast allocations without needing
+       a managed->unmanaged transition. Boehm GC implementation currently
+       enabled for ptrfree objects on sane architectures.
+
+Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * marshal.c, marshal.h: exported a couple of useful functions and
+       added mono_mb_get_label () to easily handle backward branches.
+
+2007-09-10  Zoltan Varga  <vargaz@gmail.com>
+
+       * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
+
+2007-09-10  Massimiliano Mantione  <massi@ximian.com>
+
+       * loader.c (find_method): Fixed the regression introduced while
+       fixing bug #81466.
+
 2007-09-09  Zoltan Varga  <vargaz@gmail.com>
 
+       * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
+       well.
+       
        * class.c loader.c metadata.c object.c class-internals.h object-internals.h
        icall.c reflection.c: Pass a MonoGenericContext argument to 
        mono_lookup_dynamic_token ().