2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mono / metadata / ChangeLog
index cf7eb8397436d296da6ddae45ebbf800409d48aa..98e8a2555a2f11d894f4f842fbfc4bd08ee87def 100644 (file)
@@ -1,3 +1,376 @@
+2007-10-04  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * icall-def.h, icall.c : get_bundled_machine_config() is now the
+         common function used by both DefaultConfig in System.dll and
+         InternalConfigurationHost in System.Configuration.dll.
+
+Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * class.c: automatically add to vectors only a few essential explicit
+       generic interfaces. The rest of the interfaces that arrays should
+       provide are currently implicitly added (but still not lazily, see the
+       design in the discussion of bug#325495 for the details of what is
+       needed for that). Additionally, implicit interfaces are assigned the
+       same vtable slot as the explicit interfaces (as they are compatible):
+       this enables huge memory savings since we don't need to instantiate
+       as many memthods and as large vtables anymore. Also, Since
+       GetEnumerator<T> returns an instance of a type that is required to
+       support a similarly large set of interfaces as arrays, we add
+       implicit interfaces and interface offset sharing support to those
+       types, too. This change adds all the required interfaces so that
+       the anonarray.cs test case in the bug report works (we don't add
+       all the interfaces to arrays of arrays 3-level deep and more because
+       of the memory requirements explained in the bug and since they are much
+       less common: the lazy-loading support will enabled them to work, too).
+
+2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (merge_stacks): major clean up, all type compatibility
+       checks are done by verify_type_compatibility. This fix my earlier lack
+       of understanding of the CLR type system and merge_stacks no longer looks
+       scary.
+
+       * verify.c: fixed some bad spelling.
+
+2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
+       a given stack slock.
+       
+       * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
+       verify_type_compatibility_full. This removed a near indentical function and fixed
+       handling of Int32 and IntPtr across all opcodes.
+
+Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * class.c: only vectors have the additional generic interfaces.
+
+2007-10-01  Jonathan Chambers <joncham@gmail.com>
+
+       * mono-config.c: Use g_strcasecmp instead of
+       strcasecmp like everywhere else to fix
+       compilation with MSVC.
+       
+       Code is contributed under MIT/X11 license.
+
+Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * object.c, object-internals.h: refactored the IMT code to enable
+       building a single slot at a time and lazily creating the IMT trampolines
+       and thunks.
+
+2007-09-29  Zoltan Varga  <vargaz@gmail.com>
+
+       * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
+
+       * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
+       Fixes #328501.
+       
+2007-09-29  Raja R Harinath  <harinath@gmail.com>
+
+       * loader.c (method_from_methodspec): Rearrange to avoid
+       un-necessary exposition.  Don't assert out if the method's
+       declaring type is a generic type definition.
+
+2007-09-28  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
+
+Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * class-internals.h: optimize field layout of MonoClass to
+       requires less cachelines at runtime and save a few bytes on 64 bit
+       systems.
+
+2007-09-28  Jb Evain  <jbevain@novell.com>
+
+       * reflection.c: when encoding type names in custom attributes,
+       if the type is a closed generic type, its generic arguments
+       have to be serialized as AssemblyQualifiedName, so that when
+       they are deserialized, it's possible to re-create them properly.
+       Fixes #329450.
+
+
+Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * object.c, class-internals.h: added delegate-creation counter.
+
+Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * class.c: cleanup of the code that synthetizes interfaces for
+       arrays in 2.0: saves quit a bit of corlib mempool memory.
+       Code to fix bug #325495 ifdeffed out for now until the issues
+       with memory usage and O(n^2) behaviour are fixed.
+
+Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * marshal.c: when possible, do not duplicate the name of the methods
+       in the method builder and in the generated MonoMethod.
+
+2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
+       * verify.c: added support for type checking ldind_* opcodes.
+
+2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class-internals.h (struct _MonoGenericClass): new field is_tb_open
+       which is used to distinguish the fully open instantiation of a TypeBuilder
+       with the rest. This temporary hack is required to restore the property that
+       the fully open instantiation is the same type of the generic type definition.
+
+       * class-internals.h (mono_generic_class_is_generic_type_definition):
+       new function as part of the internal API.
+
+       * class.c (inflate_generic_type): return NULL when the generic inst is
+       fully open. The fully open generic type is now the same as the generic type
+       definition for non TypeBuilder types.
+
+       * class.c (mono_generic_class_get_class): removed assert since it is
+       no longer valid, gklass->cached_class can point to the generic type definition.
+
+       * class.c (mono_generic_class_is_generic_type_definition): new.
+
+       * metadata.c (mono_generic_class_hash): added is_tb_open field
+       to the hash calculation.
+
+       * metadata.c (free_generic_class): if the generic class is associated
+       with the generic type definition, its field will come from the mempool and
+       must not be freed.
+
+       * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
+       new, this function identifies the corner case of a TypeBuilder fully open
+       instantiation.
+
+       * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
+       for lookup. Set gclass->cached_class to be the container class in case of
+       the fully open instantiation of non TypeBuilder types.
+
+       * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
+       to compare generic classes.
+
+       * reflection.c (method_encode_methodspec): remove assert that
+       no longer is valid.
+
+       * reflection.c (mono_reflection_generic_class_initialize): add
+       an aditional assert to ensure the proper type is used.
+
+2007-09-26  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
+       to enjoy it.
+
+2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (push_arg): Fixed support for ldarga
+       * verify.c (set_stack_value): Removed superfluous parameter, fixed the
+       MonoType used as first arg in case of instance calls.
+
+2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c: Support for verifying VAR and MVAR types, 
+
+2007-09-25  Zoltan Varga  <vargaz@gmail.com>
+
+       * icall.c (ves_icall_get_property_info): Set the reflected type of the
+       accessors correctly.
+
+Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * threads.c: support OSX and other systems in
+       mono_thread_get_stack_bounds (bug #328026).
+
+2007-09-25  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug.h
+       (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
+
+2007-09-24  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug.h
+       (MonoDebugClassEntry): Moved the definition of this struct into
+       mono-debug.c to make it private.
+
+       * mono-debug.c
+       (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
+       type table per symbol file, we don't need to store the symfile id
+       any longer.
+
+2007-09-24  Martin Baulig  <martin@ximian.com>
+
+       Create one type table per symbol file, since a `MonoClass *' gets
+       invalid when its image is unloaded.
+
+       * mono-debug.h (MonoSymbolTable): Removed `type_table'.
+       (MonoDebugHandle): Added `type_table'.
+
+Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * mempool.c, mempool.h: added mono_mempool_new_size () API
+       to be able to specify a smaller initial size for the pool.
+       Adjusted the code to slowly increase pool size before using
+       the previous default size.
+       * image.c: use a small initial size for image mempools.
+
+2007-09-23  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
+       Fixes ##320990.
+
+       * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal): 
+       Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
+
+2007-09-22  Zoltan Varga  <vargaz@gmail.com>
+
+       * metadata.c (mono_type_create_from_typespec): Remove an invalid
+       free. Fixes #327438.
+
+2007-09-21  Raja R Harinath  <harinath@gmail.com>
+
+       * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
+       generic instantiations, etc.
+       <MONO_TYPE_ARRAY>: Likewise.
+
+2007-09-21  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
+       these structs were never defined.
+       (MonoDebugHandle): Removed the `_priv' field, it was never used.
+
+2007-09-21  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
+
+Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * image.c: removed the guid hash tables: we can get the same info
+       without the additional memory usage hit (partially fixes also bug #327052).
+
+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>