2007-03-13 Jonathan Chambers <joncham@gmail.com>
[mono.git] / mono / metadata / ChangeLog
index af0aa6382e9d42098afcb2fa5dbd6134452ea8b8..46eb33127ef145584c6038ceabbd70ae60bccb7f 100644 (file)
@@ -1,5 +1,405 @@
+2007-03-13  Jonathan Chambers  <joncham@gmail.com>
+
+       * icall.c:  Fix environ access in VS.  
+       
+2007-03-13  Alp Toker  <alp@atoker.com>
+
+       * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
+       rather than the underlying type. Based on a patch by Ben Maurer. Fixes
+       #63841.
+
+2007-03-12  Zoltan Varga  <vargaz@gmail.com>
+
+       * reflection.c (mono_reflection_create_dynamic_method): Add support for 
+       circular references among dynamic methods. Fixes #81091.
+
+       * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
+
+2007-03-09  Martin Baulig  <martin@ximian.com>
+
+       * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
+
+2007-03-09  Jonathan Chambers  <joncham@gmail.com>
+
+       * appdomain.c:  Fix shadow copy on Windows. Use g_snprintf instead
+       of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.  
+       
+       Code is contributed under MIT/X11 license.
+        
+2007-03-09  Gert Driesen  <drieseng@users.souceforge.net>
+
+       * loader.c: Reapply patch for bug #79424.
+
+2007-03-06  Zoltan Varga  <vargaz@gmail.com>
+
+       * metadata.c (mono_type_to_unmanaged): Only convert object to
+       MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
+
+Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * class-internals.h, class.c, metadata.c, reflection.c: removed unused
+       (and incorrectly set) is_reference field from MonoGenericInst.
+
+2007-03-06  Zoltan Varga  <vargaz@gmail.com>
+
+       * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
+       a little earlier.
+
+       * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
+
+       * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
+
+2007-03-05  Miguel de Icaza  <miguel@novell.com>
+
+       * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
+       FileOptions.1 value to mean "temporary", map that to
+       FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
+
+       Fixes 80688
+
+2007-03-03  Marek Habersack  <mhabersack@novell.com>
+
+       * appdomain.c: implement MS .Net style shadow copying. Copies of
+       the assemblies are made in a subdirectory of the dynamic base
+       directory, the assembly names are preserved.
+       Copy .mdb and .config files along with the assemblies being shadowed.
+
+2007-02-28  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
+       (emit_marshal_handleref): Ditto.
+
+       * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
+       on Visual C++. Fixes #80671.
+
+Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
+       for clone operations.
+
+2007-02-28  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c: Fix warnings.
+
+Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * loader.c: allow case-insensitive matching of the dll name
+       in dllmap handling when prefixed with "i:".
+
+2007-02-20  Jonathan Chambers  <joncham@gmail.com>
+
+       * threads.c: Fix #ifdef for dummy_apc function for VS.
+
+Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
+
+2007-02-19  Massimiliano Mantione  <massi@ximian.com>
+       * class.c (mono_class_setup_vtable_general): Fix bug 75903,
+       giving precedence to the methods with a fully qualified name
+       (InterfaceName.MethodName) when building the interface sections
+       of the vtable.
+
+2007-02-16  Dick Porter  <dick@ximian.com>
+
+       * threadpool.c (append_job): Fix fast-path array handling, so it's
+       less likely the array will grow exponentially when the load is
+       heavy.
+
+Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * metadata-internals.h, loader.c: fix dllmap lookup order
+       for non-function maps, too, and prepare for fallback code.
+
+2007-02-12  Robert Jordan  <robertj@gmx.net>
+
+       * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
+       to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
+       and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
+       GlobalFree. Fixes a part of bug #77075.
+
+Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * loader.c: implemented typedef parent in field memberref.
+
+2007-02-11  Jonathan Chambers  <joncham@gmail.com>
+
+       * marshal.c: Fix warnings and remember to call Release on
+       IUnknown of RCW.
+       
+       Code is contributed under MIT/X11 license.
+
+2007-02-10  Miguel de Icaza  <miguel@novell.com>
+
+       * class-internals.h: Add MonoHandleRef definition, and
+       handleref_class to mono_defaults. 
+
+       * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
+       structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
+
+       * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
+       (do nothing on this stage)
+       (emit_object_to_ptr_conv): Extract the handle from the HandleRef.  
+       (emit_marshal_handleref): New method, used for argument handling
+       of HandleRefs. 
+
+2007-02-08  Jonathan Chambers  <joncham@gmail.com>
+
+       * class.c (mono_class_setup_parent): Lazily init com types.
+       * domain.c (mono_init_internal, mono_init_com_types): Lazily 
+       init com types.
+       * object.c (mono_remote_class_vtable): Lazily init com types.
+       * class-internals.h: Add iunknown and idispatch to MonoDefaults.
+       * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
+       * domain-internals.h: Expose mono_init_com_types.
+       * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
+       * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
+       Add support for COM Callable Wrapper marshalling.
+       * marshal.h: Add icall definitions.
+       * gc.c: Handle freeing of CCWs in finalizer code.
+       
+       Code is contributed under MIT/X11 license.
+
+Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * reflection.c: changed all the signature encoding code to use
+       a variable-sized buffer.
+
+Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * marshal.c: locking fixes: never take the loader lock
+       or other runtime locks when holding the marshal lock
+       (fixes bug#80664).
+
+Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * marshal.c: make the delegate function pointer mapping
+       work for the moving GC.
+
+Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * marshal.c: fix from Robert Jordan (robertj@gmx.net)
+       for bug #80618.
+
+Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * image.h, loader.c, metadata-internals.h: use mono-dl instead of
+       gmodule.
+
+Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * threadpool.c: made the code moving-GC safe.
+
+Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * assembly.c, boehm-gc.c, class-internals.h, class.c,
+       debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
+       monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
+       warning cleanup.
+       * reflection.c: warning cleanup, some threading and moving GC fixes.
+
+Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * class.c, loader.c: create the needed Set/Get/Address array methods
+       as well as the .ctors in mono_class_init (), fixes bug #80567.
+
+2007-01-24  Zoltan Varga  <vargaz@gmail.com>
+
+       * class.c (mono_class_layout_fields): When force-aligning a field, make sure
+       we doesn't decrease its alignment. Should fix the sparc build.
+
+2007-01-24  Dick Porter  <dick@ximian.com>
+
+       * socket-io.c
+       (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
+       Create the returned object if we need to ignore an unsupported
+       socket option.  Fixes a segfault reported by Atsushi.
+
+Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * class.c, object.c: restrict GC-tracked fields to
+       UIntPtr fields used inside corlib, so we provide better
+       type info to the GC and also allow broken packing as in
+       bug #80580.
+
+Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * sgen-gc.c: removed duplicated function.
+
+2007-01-19  Miguel de Icaza  <miguel@novell.com>
+
+       *  socket-io.c (convert_sockopt_level_and_name): return -2 as a
+       value that means that the value is not supported, but that we
+       should not return a failure, but instead report this as a
+       successful operation.
+
+2007-01-19  Raja R Harinath  <rharinath@novell.com>
+
+       Fix tests/bug79956.2.il
+       * class.c (mono_type_get_underlying_type): Handle genericinst enums.
+       (mono_generic_class_get_class): If the generic definition in an
+       enum, copy over other fields related to it.
+
+Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
+       genericinst enums (bug #79215).
+
+2007-01-17  Massimiliano Mantione  <massi@ximian.com>
+       * class.c: Fix bug 80307.
+
+Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * image.c: if the file table is not present, try to load
+       all the modules, since we don't have info about them
+       having or not metadata (bug #80517).
+       * assembly.c: allow mono_assembly_load_references () to
+       work for netmodules.
+
+Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * image.c, metadata-internals.h, object.c: execute module
+       cctors when running on the 2 runtime if present (bug #80487).
+
+Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * icall.c: optimized InitializeArray() on bigendian.
+
+Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * icall.c: fix for the broken ARM FPA double format.
+
+Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * icall.c: handle endian issues for r4 and r8 types, too, in
+       the InitializeArray() icall.
+
+2007-01-15  Miguel de Icaza  <miguel@novell.com>
+
+       * loader.c (mono_loader_error_prepare_exception): Clear the error
+       once we have extracted the information from it, do this before we
+       call into the JIT's class loading mechanisms.
+
+       * object.c (mono_class_create_runtime_vtable): Do not clear the
+       loader error before calling mono_class_get_exception_for_failure
+       as the loader error is needed inside
+       mono_class_get_exception_for_failure to throw the error (thinko).
+
+       Fixes #80521
+       
+Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * reflection.c: align fields rva data so it's faster to load at
+       runtime.
+
+2007-01-12  Raja R Harinath  <rharinath@novell.com>
+
+       Prepare to simplify GenericMethod handling.
+       * class-internals.h (mono_method_get_context): New accessor function.
+       * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
+       rather than directly accessing '->context' field.
+
+       * class-internals.h (_MonoGenericParam.method): Move ...
+       (_MonoGenericContainer): ... here.  Add into union with klass field.
+       * class.c, icall.c, loader.c, metadata.c, reflection.c:
+       Update to changes.
+
+Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * Makefile.am, class-internals.h, debug-helpers.c: consolidate
+       the wrapper type enum and reduce relocations.
+
+2007-01-12  Raja R Harinath  <rharinath@novell.com>
+
+       * reflection.c (inflate_mono_method): Reuse method instantiation
+       from the generic method, if available.
+
+2007-01-11  Jonathan Chambers  <joncham@gmail.com>
+
+       * marshal.c (emit_marshal_variant): Fix conv_arg
+       type in last commit, based on whether parameter is byref.
+       
+2007-01-11  Jonathan Chambers  <joncham@gmail.com>
+
+       * marshal.c (emit_marshal_variant): Handle unmanaged->managed
+       marshalling.
+       (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
+       MONO_TYPE_OBJECT back for VARIANT support.
+
+2007-01-11  Jonathan Chambers  <joncham@gmail.com>
+
+       * marshal.c, marshal.h, icall-def.h: Implement 
+       Marshal.ReAllocCoTaskMem.
+
+Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * marshal.c: memory retention fixes: use the proper
+       image cache for runtime_invoke method lookups.
+
+Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * mempool.c: added code to help debug mempool allocations.
+
+2007-01-11  Dick Porter  <dick@ximian.com>
+
+       * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
+       support (experimenting with faking it with IP_MTU_DISCOVER for
+       systems that don't have IP_DONTFRAGMENT.)
+       (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
+       icall.
+
+       * icall-def.h: new System.Net.Sockets.Disconnect icall.
+
+       * socket-io.h: Add new fields to MonoSocketAsyncResult
+       corresponding to the new ones in Socket.cs.
+
+2007-01-11  Raja R Harinath  <rharinath@novell.com>
+
+       Fix IronPython regression mentioned in #80249
+       * metadata.c (do_mono_metadata_parse_generic_class): Clear
+       'cached_context' field, since it may have been initialized as a
+       side-effect of metadata parsing.
+
+       * class-internals.h (_MonoGenericClass.is_inflated): Remove.
+       (_MonoGenericClass.cached_class): Move here and rename from lone
+       remaining field of ...
+       (_MonoInflatedGenericClass): ... this.  Remove.
+       * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
+       to changes.
+
+       Fix mcs/tests/test-128.cs regression.
+       * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
+       2007-01-10 change below.
+       [MONO_TYPE_OBJECT]: Recurse into array case.
+
+2007-01-11  Raja R Harinath  <harinath@gmail.com>
+
+       * class-internals.h (mono_get_inflated_generic_class): Remove.
+       * class.c (mono_get_inflated_generic_class): Remove.
+       (mono_generic_class_get_class): Rename from
+       mono_class_create_generic.
+       (mono_class_from_mono_type) [GENERICINST]: Use it.
+       * reflection.c, metadata.c: Update to changes.  Use
+       'mono_class_from_mono_type'.
+
+Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * reflection.c: use passed type when encoding an array element
+       in custom attributes (patch from David Mitchell, dmitchell@logos.com).
+
+2007-01-09  Robert Jordan  <robertj@gmx.net>
+
+       * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
+       result arguments (someDelegate.EndInvoke (unrelatedAres)).
+       Fixes bug #80392.
+
 2007-01-09  Raja R Harinath  <rharinath@novell.com>
 
+       * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
+
+       * object.c (set_value): Avoid aliasing between type->data.klass
+       and type->data.generic_class.
+
        * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
 
 2007-01-08  Raja R Harinath  <rharinath@novell.com>