2005-03-10 Martin Baulig <martin@ximian.com>
[mono.git] / mono / metadata / ChangeLog
index 6c93ae0f075a22b4900f266ae58a70aed00d6c1c..fae09cb504fff7dcd67f6961a406df61522a6695 100644 (file)
@@ -1,5 +1,421 @@
+2005-03-10  Martin Baulig  <martin@ximian.com>
+
+       * class.c (mono_bounded_array_class_get): Initialize `eclass' if
+       it's a generic instance.
+
+2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
+
+       * reflection.c (mono_get_object_from_blob): Applied patch from
+       Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
+
+       * class.c (mono_class_is_assignable_from): Another try at fixing 
+       #73469 without breaking anything.
+
+2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
+
+       * class.c: (mono_class_is_assignable_from): Revert the last changes
+       since they don't work with generics.
+       
+       * class.c (mono_class_is_assignable_from): Fix build bustage.
+
+       * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
+       the managed IsAssignableFrom method. Fixes #73469.
+
+       * reflection.c (mono_reflection_call_is_assignable_from): New helper
+       function.
+
+2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
+
+       * object.c (mono_load_remote_field_new): Fix returning uninitialized
+       memory when the remoting callback does not sets the out arguments.
+       Fixes #73007.
+
+       * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
+       by mistake.
+
+       * string-icalls.c: Return String.Empty where needed. Fixes #73310.
+
+       * object-internals.h (MonoStackFrame): Sync with managed object layout.
+
+       * appdomain.c: Bump corlib version.
+
+2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
+
+       * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
+       function.
+
+       * threads.c (mono_thread_attach): Detect threads which are not started
+       by the GC pthread wrappers.
+
+2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * icall.c: Added new icall for RNG.
+       * rand.c|h: Added new icall to open the RNG. This allows to share a 
+       single handle on Linux to access /dev/urandom and fix #73183.
+
+Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * object.c: setting the new vtable in a transparent proxy object must
+       not change the GC descriptor.
+
+Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * object.c: fixed compilation without GCJ support.
+       * reflection.c: for runtime-created types ensure klass->has_references
+       is correct (bug #73215).
+
+2005-03-02  Martin Baulig  <martin@ximian.com>
+
+       * class.c (mono_class_is_assignable_from): Make this work if
+       `oklass' is a generic instance; fixes #72831.
+
+2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
+       with hasthis set.
+       
+       * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
+
+       * marshal.c: Reorganize native->managed marshalling code to also use
+       the emit_marshal_... functions.
+
+Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * object.c: typed allocs have issues with bitmap sizes > 30,
+       so check for max_set >= 30.
+
+2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.c (emit_marshal_array): Implement marshalling of arrays to
+       managed code. Fixes #73012.
+
+       * metadata.h (MonoMarshalSpec): Add elem_mult field.
+
+       * metadata.c reflection.c: Load/Emit elem_mult as well.
+       
+       * metadata.h (MonoMarshalSpec): Add comment.
+
+       * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
+
+       * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
+       num_elem to -1 if not given.
+
+       * object-internals.h (MonoReflectionMarshal): Add has_size field.
+
+       * reflection.c (encode_marshal_blob): Differentiate between 0 and not
+       given values.
+
+2005-03-01  Marek Safar  <marek.safar@seznam.cz>
+
+       * null-gc.c (mono_gc_free_fixed): Was not compilable.
+
+2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
+
+       * reflection.c (encode_marshal_blob): Encode param_num field as well.
+
+       * object-internals.h (MonoReflectionMarshal): Add param_num field.
+
+Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * object.c: generalized the reference bitmap creation
+       and added hooks for the new GC.
+       * class-internals.c: removed the gc_bitmap field from MonoClass.
+
+Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * domain.c: help the compiler to produce better code
+       in mono_jit_info_table_find ().
+
+Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * object.c: make all allocations look typed.
+
+Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * socket-io.c: load Mono.Posix if it's not loaded already
+       (fixes bug#73033).
+
+2005-02-24  Martin Baulig  <martin@ximian.com>
+
+       * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
+       * reflection.c (dup_type): Likewise.
+
+2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
+
+       * gc.c (run_finalize): Set the domain for finalizing delegates as well.
+       Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
+
+Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * domain.c, threads.c, object-internals.h: make the critical thread
+       local vars use the fast access mode (even when we're compiled in
+       a lib). Provide accessors to be used by the jit during codegen.
+
+2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * appdomain.c: Changed hook functios behavior to include
+       support for the reflection only assemblies. Some icalls were changed
+       to support the mentioned assemblies too. Signatures of static methods
+       try_assembly_resolve and real_load now have an additional parameter:
+       refonly.
+
+       * assembly.c: General changes to mono_assembly_ methods to support
+       reflection only api. Functions mono_assembly_open, mono_assembly_load,
+       mono_assembly_load_from and mono_assembly_loaded have got a '_full'
+       suffix, to support an additional gbool parameter to specify whether
+       the assembli is reflection only or not. Created some new hook functions 
+       to add support for reflection only assemblies. Signatures of static 
+       methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
+       have now an additional parameter: refonly.
+
+       * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
+       indicating whether the assembly is reflection only or not.
+
+       * exception.c: Add mono_get_exception_invalid_operation.
+
+       * icall.c: Throw an InvalidOperationException when trying to invoke
+       a property/method/event, or trying to set/get the value of a field.
+       Also add an icall to retrieve the ref_only flag to the
+       MonoReflectionAssembly.
+
+2005-02-23  Chris Toshok  <toshok@ximian.com>
+
+       Part of fix for #72827.
+       * mono-debug.c (mono_debug_add_method): add lexical block data to
+       the info we write.  Kind of a hack at the moment - we copy the
+       lexical block info from the MonoDebugMethodInfo to the
+       MonoDebugMethodJitInfo here, before writing it.
+       (mono_debug_read_method): read the lexical block info.
+
+       * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
+
+       * debug-mono-symfile.h: add lexical block support.
+
+       * debug-mono-symfile.c (mono_debug_find_method): add lexical block
+       support.
+
+2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
+
+       * loader.c (mono_lookup_pinvoke_call): Fix warning.
+
+       * object.c (mono_runtime_free_method): Call mono_free_method () and
+       put the TODOs there.
+
+       * loader.c (mono_free_method): Free up most memory allocated for 
+       dynamic methods.
+
+Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * reflection.c: properly flag a Type argument to a
+       named custom attr value (bug #72248).
+
+Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * reflection.c: reduce code duplication in named custom
+       attribute encoding.
+
+Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * reflection.c: properly encode custom attrs of type object
+       (bug #72649).
+
+2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
+
+Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * socket-io.c: load System.dll if it's not loaded already
+       (bug #72850 and #70477).
+
+2005-02-21  Martin Baulig  <martin@ximian.com>
+
+       * marshal.c (mono_marshal_get_runtime_invoke): Add support for
+       generic instances.
+
+2005-02-21  Martin Baulig  <martin@ximian.com>
+
+       * reflection.c (mono_image_build_metadata): We also need to
+       "fixup" the MethodImpl table after we computed the final method
+       indices.  Call fixup_methodimpl() to do that.
+       (fixup_methodimpl): New private method.
+
+Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * assembly.c: special case mscorlib.dll (bug#72536),
+       patch from Carlos Alberto Cortez.
+
+2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
+
+       * threads-types.h threads.c: Fix build bustage.
+
+       * threads.c: Use a union for long<->double conversions.
+
+       * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
+       functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
+
+       * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
+       containing the checkpoint call with NOT_TAKEN.
+       
+       * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
+       checkpoint before pushing the arguments, so they won't have to be
+       spilled to stack.
+
+Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * domain.c, assembly.c, domain-internals.h: make some data
+       const and relocation-free.
+
+Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * object.c, appdomain.c, class-internals.h: introduce the
+       MonoClassRuntimeInfo structure to hold the info needed to
+       use a class at runtime. Made mono_class_vtable() lock-free
+       for all the appdomains.
+
+Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * metadata-internals.h, image.c: introduce a per-image mempool to
+       be used for memory that has the same lifetime as the image.
+
+2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
+
+       * domain.c: In mono_init_internal(), instead of selecting the first
+       runtime version supported by an executable, get a list of all
+       supported versions and select the one for which an mscorlib exists
+       (since even if the runtime supports a given version, it doesn't mean
+       that the framework for that version is installed).
+       Modified get_runtimes_from_exe to support this behavior.
+       In supported_runtimes, added information about additional system
+       assembly versions.
+       
+       * assembly.c: Added support for more than one system assembly version
+       per runtime version. Updated the assembly list.
+       In mono_assembly_remap_version, removed the initial version check,
+       since we don't know to which version we need to compare until we
+       get the version set on which the assembly is based.
+       Moved the code for loading corlib into the new method
+       mono_assembly_load_corlib(), so it can be used by the initialization
+       code.
+       
+       * domain-internals.h: Updated data structures and added declaration
+       for mono_assembly_load_corlib.
+
+2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
+
+       * reflection.c (resolve_object): Fix the creation of the signature in 
+       the SignatureHelper case.
+
+       * assembly.c (mono_assembly_remap_version): Fix binary search.
+       
+2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
+       * class.c: Added inheritance check when a method is overloaded (from a
+       virtual method or when implementing an interface) and when a class is
+       inherited. Added functions to set a failure for a class and to 
+       retreive the exception from a failure.
+       * class-internals.h: Added fields to MonoClass to keep the exception
+       information status for inheritance (or other exceptions) to be thrown
+       later (i.e. not at load time).
+       * object.c: Throw the inheritance SecurityException when a type is to 
+       be created with either class or method inheritance violations.
+       * reflection.c|h: Fix when getting declsec from a class. Removed 
+       unrequired code for class. Improved sanity in parameter naming.
+       * security-manager.c|h: Added functions to check for class and method
+       inheritance.
+
+2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
+
+       * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
+       and has_finalize in dynamic types as well.
+
+2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * culture-info-table.h : fixed currency format for en-GB (and so on).
+
+Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * gc.c: ensure the GC handles never have 0 as a value.
+
+2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
+       a pointer to a struct to unmanaged code. Fixes #72625.
+
+2005-02-16  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
+
+2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
+
+2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
+
+       * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
+
+       * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
+       UnmanagedFunctionPointerAttribute, use it for determining calling convention
+       etc. Fixes #71471.
+
+       * reflection.c (mono_custom_attrs_get_attr): New helper function.
+
+       * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
+
+Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
+       changes to make the current context a field in MonoThread.
+
+2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
+       the last change.
+       
+       * marshal.c (mono_marshal_emit_native_wrapper): New helper function
+       extracted from mono_marshal_get_native_wrapper.
+
+       * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
+       to create wrappers around native functions.
+
+       * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
+       delegates for arbitrary function pointers. Fixes #71472.
+
+Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * threads.c: cleaned up the code a little.
+
+2005-02-15  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
+       the data table.
+
+       * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
+       allocate larger chunks if needed.
+
+2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
+
+       * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
+       in by mistake.
+
+Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * domain.c: keep the domains in an array and ensure the domain ids
+       are kept small, so they can be used as indexes to domain-specific data
+       with a small memory overhead.
+
+2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
+
+       * icall.c: Handle byref types in Type icalls. Fixes #72544.
+
+Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * Makefile.am: remove libmetadata: we build just libmonoruntime now.
+
 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
 
+       * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
+
        * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
        values.
 
@@ -8981,7 +9397,7 @@ Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
        * marshal.c (mono_marshal_get_managed_wrapper): Added support for
        object as return type.
 
-2003-03-22  Pedro Mart�nez Juli�  <yoros@wanadoo.es>
+2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
 
        * icall.c: Deleted "ToString" implementation for double and float
        because they are full implemented in managed code.
@@ -9085,7 +9501,7 @@ Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
        * object.h, threads.h: make include files compatible with C++
        (patch by Jerome Laban <jlaban@wanadoo.fr>).
 
-2003-03-04  Pedro Mart�nez Juli�  <yoros@wanadoo.es>
+2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
 
        * icall.c: Erased ToString helper functions for Double and Single.
        Now, that implementations ar all in managed code (Double and Single
@@ -9340,7 +9756,7 @@ Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
        * object.c: fixed mono_object_get_virtual_method () for interfaces.
        * verify.c: check for code that runs after the end of the method.
 
-2003-02-08  Pedro Mart�nez Juli�  <yoros@wanadoo.es>
+2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
 
        * icall.c: Added "System.Math::Floor", "System.Math::Round" and
        "System.Math::Round2".