2007-09-13 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / metadata / ChangeLog
index 75c9c9bc464e1caaa211b4ffe8c3bb8e0065d57f..143594ceab5d7a3340f07a8d005aaa45478b2811 100644 (file)
@@ -1,3 +1,532 @@
+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 ().
+
+       * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
+       #82744.
+       
+2007-09-09  Robert Jordan  <robertj@gmx.net>
+
+       * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
+       for generic methods.
+
+       * object.c (mono_object_get_virtual_method): Handle generic methods.
+       Fixes bug #78882.
+
+       Code is contributed under MIT/X11 license.
+
+Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * image.c: fix locking in mono_image_load_file_for_image ().
+
+Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * reflection.c, icall.c, icall-def.h: the methodinfos name field is
+       used only as a cache: added an icall to fill it.
+
+2007-09-16  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * reflection.h: exposed mono_reflection_free_type_info
+       * reflection.c (mono_reflection_get_type_internal): type_args is always freed
+       since mono_reflection_bind_generic_parameters makes a copy of it.
+       * reflection.c (free_type_info): subinfos should be freed.
+       * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and 
+       made non static.
+       * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
+       replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
+       this fixes #82695 and #81726.
+   
+
+2007-09-03  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * process.h, process.c:  added support for user profile/info in
+         ProcessStartInfo. For now only Windows works.
+
+Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * metadata.c: consider the generic arguments when comparing
+       signatures (bug #82614).
+
+Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * cil-coff.h, image.c: updated assembly loader to cope with the
+       PE32+ 64 bit file format.
+
+Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * assembly.c, class.c, domain.c, loader.c: remove useless
+       inclusion of cil-coff.h.
+
+2007-08-29  Jonathan Chambers  <joncham@gmail.com>
+
+       * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
+       if interface is marked with CoClassAttribute. 
+   
+       Code is contributed under MIT/X11 license.
+
+Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * sgen-gc.c: ensure no object from the to space is copied again or finalized
+       if it's seen twice in major collections.
+
+Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * sgen-gc.c: big objects are not copied to the gray area, but they
+       need to be considered for scanning, too, if they are brought alive
+       by an object ready for finalizations or a survived one.
+
+Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * sgen-gc.c: properly account the number of disappearing links when
+       they are nullified.
+
+Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * sgen-gc.c: share the code to scan the registered roots between the
+       different types of collections.
+
+2007-08-28  Zoltan Varga  <vargaz@gmail.com>
+
+       * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
+
+2007-08-28  Zoltan Varga  <vargaz@gmail.com>
+
+       * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
+       class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
+
+2007-08-28  Mark Probst  <mark.probst@gmail.com>
+
+       * security-manager.c (mono_security_manager_get_methods):
+       LinkDemandSecurityException now has 2 arguments instead of 3.
+
+2007-08-27  Zoltan Varga  <vargaz@gmail.com>
+
+       * class.c (mono_class_layout_fields): Only do the struct alignment hack on
+       platforms which need it.
+
+Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * sgen-gc.c: unregister thread data structures with a pthread_key_t
+       dtor.
+
+Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * threads.c: free the thread static data on thread exit.
+
+Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * class.c: walk the hierarchy to find the generic definition for
+       a class (fixes runtime part of bug #82498).
+
+2007-08-24  Zoltan Varga  <vargaz@gmail.com>
+
+       * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
+       ...
+
+       * image.c (mono_image_close): Here. Hopefully fixes #82510.
+
+2007-08-24  Mark Probst  <mark.probst@gmail.com>
+
+       * monodiet.c (handle_cattrs): Fixed a custom attr leak.
+
+2007-08-24  Robert Jordan  <robertj@gmx.net>
+
+       * appdomain.c: don't perform the ':'->';' substitution on Win32.
+
+2007-08-24  Jb Evain  <jbevain@novell.com>
+
+       * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
+       for byref types.
+
+2007-08-24  Mark Probst  <mark.probst@gmail.com>
+
+       * threads.c: Make sure a thread gets cleaned up only once.  Fixes
+       #82286.
+
+2007-08-24  Zoltan Varga  <vargaz@gmail.com>
+
+       * assembly.c: Fix a warning.
+       
+2007-08-23  Marek Habersack  <mhabersack@novell.com>
+
+       * appdomain.c: parse the <runtime> section looking for the probing
+       element with the 'privatePath' attribute, which sets additional
+       directories in which the runtime should look for assemblies.
+
+2007-08-23  Robert Jordan  <robertj@gmx.net>
+
+       * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
+       Fixes #82499.
+
+2007-08-23  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug.[ch]: Rename mono_debug_init_corlib() into
+       _mono_debug_init_corlib() and remove it from the header file.
+
+2007-08-23  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug-debugger.c
+       (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
+       don't notify the debugger about it.
+
+       * mono-debug-debugger.h
+       (MonoDebuggerEvent): Removed `THREAD_ABORT'.
+
+2007-08-23  Robert Jordan  <robertj@gmx.net>
+
+       * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
+       Code is contributed under MIT/X11 license.
+
+Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
+
+2007-08-22  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug.c: Store debugging info on a per-domain basis and
+       free it on domain unload.  Add support for unloading symbol files.
+
+       * mono-debug.h
+       (MonoDebugList): New typedef.
+       (MonoSymbolTable):
+       - add `data_tables and `type_table'.
+       - replace 'symbol_files' and `num_symbol_files' with a
+         `MonoDebugList *'.
+       (mono_debug_data_table): Removed.
+       (mono_debug_list_add): New public function.
+       (mono_debug_list_remove): New public function.
+       (mono_debug_init_1): Renamed into mono_debug_init_corlib().
+       (mono_debug_init_2_memory): Renamed into
+       mono_debug_open_image_from_memory().
+       (mono_debug_close_image): New public function.
+       (mono_debug_domain_create): Likewise.
+       (mono_debug_domain_unload): Likewise.
+       (MONO_DEBUGGER_VERSION): Bump to 60.
+
+       * mono-debug-debugger.h
+       (MonoDebuggerEvent):
+       - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
+       - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
+       - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
+       - rename `THREAD_CREATED' and `THREAD_EXITED' into
+         `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
+       - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
+         meaning.
+       (mono_debugger_add_symbol_file): Removed.
+       (mono_debugger_add_type): Removed.
+       (mono_debugger_lookup_type): Removed.
+       (mono_debugger_lookup_assembly): Removed.
+
+       * domain.c
+       (mono_domain_create): Call mono_debug_domain_create().
+       (mono_init_internal): Call mono_debug_init_corlib().
+
+       * assembly.c
+       (mono_assembly_close): Call mono_debug_close_image().
+
+Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
+       mmap call.
+
+Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * sgen-gc.c: ensure section->pin_queue_end is initialized
+       correctly when non pinning objects in the section have been found.
+
+2007-08-22  Marek Habersack  <mhabersack@novell.com>
+
+       * appdomain.c (set_domain_search_path): cope with PrivateBinPath
+       containing a list of directories separated by ':'. MSDN docs say
+       the directories should be separated with ';'. Part of a bugfix for
+       bug #81446
+
+2007-08-21  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class.c (mono_type_retrieve_from_typespec) : fixed the return type
+       it should MonoType and not MonoClass.
+
+2007-08-21  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * culture-info-table.h : regenerated.
+
+2007-08-20  William Holmes  <billholmes54@gmail.com>
+
+       *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
+        to call ReplaceFile Kernel32 on windows or in io-layer.
+       *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
+       *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
+        as an internal call.
+
+       Code is contributed under MIT/X11 license.
+
+2007-08-20  Jb Evain  <jbevain@novell.com>
+
+       * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
+       and MONO_EXCEPTION_FIELD_ACCESS.
+
+       * debug-helpers.[c|h]: new mono_field_full_name function.
+
+2007-08-20  Mark Probst  <mark.probst@gmail.com>
+
+       * class.c: Removed class_security_level() and moved it to
+       security-core-clr.c.
+
+       * security-core-clr.c, security-core-clr.h: class_security_level()
+       is now public and renamed to mono_security_core_clr_class_level().
+       It also looks for security attributes in the classes a class is
+       nested in.
+
+2007-08-20  Mark Probst  <mark.probst@gmail.com>
+
+       * security-core-clr.c, security-core-clr.h: CoreCLR security
+       utility functions.
+
+       * Makefile.am: Added security-core-clr.[ch].
+
+       * security-manager.c, security-manager.h: Functions and enum for
+       setting and getting the security mode.
+
+       * class.c: CoreCLR security checks.
+
+Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * icall-def.h, process.c, process.h: implemented icall to get
+       user/system processor times.
+
+2007-08-17  Mark Probst  <mark.probst@gmail.com>
+
+       * domain.c, threads.c, class-internals.h, domain-internals.h: New
+       reader-lock-free jit_info_table.
+
+2007-08-17  Zoltan Varga  <vargaz@gmail.com>
+
+       * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
+
+       * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.   
+
+       * object-internals.h (MonoException): Add missing _data member.
+
+2007-08-08  Massimiliano Mantione  <massi@ximian.com>
+
+       * loader.c (find_method, find_method_in_class): Fixed bug #81466,
+       checking that only methods with matching qname or fqname are picked
+       from implemented interfaces.
+
+2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (do_newarr):added, do type verification of
+       newarr ops, push the right value on the eval stack.
+       * verify.c (mono_method_verify): use do_newarr
+
+
+2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
+       factored the common code into get_boxable_mono_type, which
+       is now using mono_type_get_full, this fixed byref related tests.
+
+2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class.c: added mono_type_get_full, this function has the same
+       behavior of mono_class_get_full but the returned MonoType has
+       all metadata of the associated token in case of a typespec token.
+       * class.c: added mono_type_retrieve_from_typespec, used by 
+       mono_type_get_full to retrieve the token type.
+       * class.c (mono_class_create_from_typespec): changed to use
+       mono_type_retrieve_from_typespec.
+       * class.c (mono_ldtoken): changed to use mono_type_get_full
+       for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
+       * class-internals.h: exported mono_type_get_full for internal use.
+
+2007-08-16  Jb Evain  <jbevain@novell.com>
+
+       * domain.c (supported_runtimes): add entry for
+       the 'moonlight' runtime version.
+
+2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (mono_method_verify): small typo sliped in.  
+
+2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (do_unbox_value): added, do type verification of
+       unboxing ops
+       * verify.c (mono_method_verify): use do_unbox_value
+
+
+2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (dump_stack_value): fixed typo, was printing string
+       instead of object on stack.
+       * verify.c (do_box_value): moved the byref check up as it leads
+       to invalid code and should be done earlier.
+       * verify.c: improved error messages for and ldobj
+
+2007-08-15  William Holmes  <billholmes54@gmail.com>
+
+       * marshal.c (emit_marshal_custom): Omit the call to 
+         marshal_native_to_managed when calling native to managed 
+         and the argument is specified as an out argument.
+
+       Code is contributed under MIT/X11 license.
+
+2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c: fixed the type checks for generics, function pointers and vectors.
+       Added type verification for ldobj and ldtoken. The verifier
+       would segfault if header or signature of a method contained references
+       to non-existant types.
+
+2007-08-15  Jonathan Chambers  <joncham@gmail.com>
+
+       * marshal.c (cominterop_get_ccw): Patch from
+       Bill Holmes to no walk up interface hierarchy. 
+       All parent methods should be present in the interface for COM.
+   
+       Code is contributed under MIT/X11 license.
+
+2007-08-15  Jonathan Chambers  <joncham@gmail.com>
+
+       * marshal.c (emit_marshal_com_interface): Patch from
+       Bill Holmes to handle COM Interfaces as return values
+       for native->managed calls.
+   
+       Code is contributed under MIT/X11 license.
+
+2007-08-14  Jonathan Chambers  <joncham@gmail.com>
+
+       * marshal.c (cominterop_get_idispatch_for_object): Implement
+       for runtime callable wrappers.
+   
+       Code is contributed under MIT/X11 license.
+
+2007-08-13  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * pedump.c (main): changed from mono_init to mono_init_from_assembly
+       so 2.0 types are accessible
+
+
+2007-08-13  Miguel de Icaza  <miguel@novell.com>
+
+       * domain.c (mono_init_internal): Call mono_assembly_load_friends
+       once we load mscorlib.   Due to the order in which we initialize,
+       the mono_assembly_load_full routine that loads mscorlib did not
+       load friends.   We now load it once we load the
+       mono_defaults.internals_visible_class class. 
+
+       * assembly.c: Expose the mono_load_friend_assemblies method.
+
+2007-08-11  Rodrigo Kumpera  <rkumpera@novell.com>
+
+        * verify.c: improved the handling of boxing, better
+        type checking for unary ops and conversion. Fix bug
+        regarding managed pointer compatibility checking
+
+2007-08-11  Zoltan Varga  <vargaz@gmail.com>
+
+       * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
+
+       * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
+
+2007-08-09  Raja R Harinath  <rharinath@novell.com>
+
+       * reflection.c (dup_type): Remove.
+       * class.c (dup_type): Remove.
+       (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
+       instead of the dodgy 'dup_type'.
+       (inflate_generic_type): Likewise.  Fix the VAR/MVAR cases to
+       handle the case where 'dup_type' needed the second argument.
+
 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
 
        * domain.c: Fix a warning.