2008-02-27 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / metadata / ChangeLog
index 5eae0fa1833d3e8562a95478bd70d6af73dbf692..9dea148c65c8bdb3aa7ab88031b6a2b545bfc45f 100644 (file)
@@ -1,5 +1,381 @@
+2008-02-27  Zoltan Varga  <vargaz@gmail.com>
+
+       * class.c (mono_class_setup_methods): Move the check for synchronized methods on
+       vtypes to marshal.c.
+
+       * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
+       it works for AOT as well.
+
+Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
+
+       * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
+       with mono_msec_ticks () which is monotonic and doesn't cause bugs when
+       the system time is adjusted.
+
+Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
+
+       * icall.c, icall-def.h: use the new time functions (fixes the
+       non-monotonic behaviour of TickCount).
+
+2008-02-26  Zoltan Varga  <vargaz@gmail.com>
+
+       * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
+       it breaks the build.
+       
+       * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
+       cattr is not finished yet.
+
+2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c: Proper token validation for field, method and type.
+
+2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * loader.c (field_from_memberref): Generate a loader error if the type is not found.
+
+       * loader.c (method_from_memberref): Generate type load error instead of method missing
+       if the type is not found.
+
+2008-02-23  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
+       some of the conversions caused the generation of a marshal directive exception.
+
+2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       verify.c: Report which exception should be thrown by the JIT.
+       Added a lot of FIXME notes.
+
+2008-02-22  Mark Probst  <mark.probst@gmail.com>
+
+       * generic-sharing.c: Runtime generic context slots are not
+       instantiated on init anymore.  Instead, provide function to do the
+       instantiating on demand.
+
+       * class-internals.h: Added vtable to runtime generic context.
+       Macros for encoding direct and indirect slot offsets in one
+       guint32.
+
+2008-02-21  Mark Probst  <mark.probst@gmail.com>
+
+       * object.c, generic-sharing.c: Moved some generic sharing code
+       from object.c to generic-sharing.c.
+
+       * generic-sharing.c: Added support for extensible runtime generic
+       context.
+
+       * metadata-internals.h: Two new hash tables in MonoImage for
+       extensible runtime generic context support.
+
+       * domain.c: Unregister generic vtables upon domain unloading.
+
+       * image.c: Destroy new hash tables upon image unloading.
+
+       * metadata.c: Unregister generic subclasses upon image unloading.
+
+       * class-internals.h: New data structure for runtime generic
+       context template.  New fields in the runtime generic context for
+       extensible part.
+
+       * Makefile.am: Added generic-sharing.c.
+
+2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
+       there is a pending loader exception, raise it.
+
+       icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
+       same.
+
+       icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): 
+       same.
+
+       Fixes #363450.
+
+2008-02-20  Zoltan Varga  <vargaz@gmail.com>
+
+       * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
+
+       * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
+       
+       * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
+       ref-only requests for compatibility with MS.
+
+2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
+
+       * reflection.c (mono_custom_attrs_from_method): Don't silently
+       return an empty list for generic method instances.
+       (mono_custom_attrs_from_param): Likewise.
+
+2008-02-20  Rodrigo Kumpera  <rkumpera@novell.com>
+           Raja R Harinath  <harinath@hurrynot.org>
+
+       Fix #354757
+       * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
+       * class.c (mono_class_inflate_generic_method_full): Initialize it
+       when a fully-open method is instantiated.
+       * metadata.c (inflated_method_equal, inflated_method_hash): Update
+       to new field.
+       * reflection.c (inflate_mono_method): Don't create a temporary context.
+
+2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
+
+       * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
+       Compute correct value, to prepare for imethod->reflection_info going away.
+
+2008-02-19  Zoltan Varga  <vargaz@gmail.com>
+
+       * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
+
+2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c: Implement skip visibility flag.
+
+2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
+       which contains an extra field to tell the kind of exception that should be thrown.
+
+       * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
+
+2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
+
+       * loader.c (mono_method_get_param_names): Initialize 'klass' after
+       'method' is updated.
+
+2008-02-11  Zoltan Varga  <vargaz@gmail.com>
+
+       * class.c (mono_class_layout_fields): Set class->min_align for classes using
+       explicit layout as well. Fixes #360375.
+
+2008-02-11  Geoff Norton  <gnorton@novell.com>
+
+       * loader.c: Guard and dereference against inflated generic methods
+
+2008-02-10  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * class.c: Include Retargetable spec in assembly name.
+       * assembly.c: Always include PublicKeyToken spec in assembly name
+       (with value "null" if assembly is not signed), and include
+       Retargetable spec.
+       * icall-def.h: Added icall for Assembly.get_fullname.
+       * icall.c: Added icall returning the fullname of an assembly.
+
+2008-02-09  Zoltan Varga  <vargaz@gmail.com>
+
+       * class.c (mono_class_setup_vtable_general): Add a missing call to
+       mono_class_setup_methods () which is needed in the AOT case.
+
+2008-02-08 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (mono_type_get_stack_name): Added. Return the name for the
+       stack type of the given MonoType.
+
+       * verify.c (verify_type_compatibility_full): Handle the void type.
+
+       * verify.c (is_compatible_boxed_valuetype): Changed to fit the
+       way stack merging works.
+
+       * verify.c (store_local): Improved verification message.
+
+       * verify.c (do_branch_op): If the merging is invalid, the method
+       is unverifiable and not invalid. Improved error message.
+
+       * verify.c (merge_stacks): Properly merge a boxed valuetype and
+       a reference type diferent than System.Object. Improved error
+       message.
+
+2008-02-07 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
+
+       * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
+       type of an enum even if the argument is byref.
+
+       * verify.c: Replace all explicit uses of enumtype and enum_basetype
+       to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
+
+       * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
+
+       *verify.c (verify_type_compatibility_full): Make enum types
+       compatible with their base types.
+
+       * verify.c (is_compatible_boxed_valuetype): Added. Check if both
+       types are compatible for the special case of a boxed valuetype and
+       System.Object.
+
+       * verify.c (verify_stack_type_compatibility): The function
+       is_compatible_boxed_valuetype was extracted from here.
+
+       * verify.c (push_arg): Only set ctx->has_this_store if the method
+       is not static.
+
+       * verify.c (do_ldelem): Fixed a typo in an error message and added
+       strict check for mixing int32 and native int as the array type
+       and ldelem type.
+
+       * verify.c (merge_stacks): Consider boxed valuetypes in the
+       compatibility checks.
+
+2008-02-07  Massimiliano Mantione  <massi@ximian.com>
+       * profiler.h: (MonoGCEvent): Added start-stop the world events.
+
+2008-02-06  Massimiliano Mantione  <massi@ximian.com>
+       *class.c: use_new_interface_vtable_code: renamed the env var to have
+       a "MONO_" prefix, and fix the logic to enable it by default.
+
+2008-02-06  Massimiliano Mantione  <massi@ximian.com>
+       *class.c:
+       mono_class_setup_vtable_general: rewrote the way in which interface
+       methods are added to vtables. Makes bug-77127.exe pass, and hopefully
+       makes the code more maintainable.
+       For now the old code is still there, and can be activated setting
+       the env var "USE_NEW_INTERFACE_VTABLE_CODE".
+
+2008-02-06 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c: guarded some debug functions around and #ifdef.
+
+       * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
+
+2008-02-06  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
+       changes for now since they seem to break too many things.
+
+2008-02-05  Mark Probst  <mark.probst@gmail.com>
+
+       * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
+       mono_marshal_find_nonzero_bit_offset): Added macro and function
+       for finding the byte- and bit-offset of a bitfield within a
+       struct.
+
+2008-02-05  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
+       (mono_marshal_get_struct_to_ptr): Ditto.
+
+       * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of 
+       cctor_signature.
+
+2008-02-03  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
+       between methods for non-corlib types.
+
+2008-02-02  Geoff Norton  <gnorton@novell.com>
+
+       * loader.c (mono_method_get_param_names): Populate the parameter name for 
+       generic parameters as well. (Fixes #342536)
+
+2008-01-31 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
+
+       * verify.c (do_invoke_method): Fix for calling with byref structs.
+
+       * verify.c (do_cast): push a boxed value type based on the type token and not
+       the type of stack.
+
+2008-01-31  William Holmes  <billholmes54@gmail.com>
+
+       * process.c (process_module_string_read): Check the size returned form 
+         VerQueryValue to avoid out of memory exception. 
+
+2008-01-30  Zoltan Varga  <vargaz@gmail.com>
+
+       * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
+       Handle properly modules which are not in the moduleref table. Fixes
+       #356938.
+
+2008-01-29  Zoltan Varga  <vargaz@gmail.com>
+
+       * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
+       the dynamic case which is now in managed code.
+       (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
+
+       * marshal.c (mono_string_to_bstr): Fix a warning.
+       (init_com_provider_ms): Ditto.
+
+       * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
+
+       * exception.c (mono_get_exception_out_of_memory): New helper function.
+
+2008-01-28  Jonathan Chambers  <joncham@gmail.com>
+
+       * marshal.c: Add support for BSTR marshalling
+       using other COM systems.
+
+       Code is contributed under MIT/X11 license.
+
+2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * object.c (mono_runtime_invoke_array): reverted previous
+       commit as it breaks the build.
+
+2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * object.c (mono_runtime_invoke_array): Verify arguments for
+       invalid types. Fixes #348522.
+
+2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
+       non-final virtual calls using call. 
+
+       * verify.c (do_invoke): fixed some TODOs.
+
+       * verify.c (push_arg): set has_this_store for "ldarga 0".
+
+2008-01-27  Zoltan Varga  <vargaz@gmail.com>
+
+       * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
+       which belong to an inflated class. Fixes #356531.
+
+2008-01-26  Robert Jordan  <robertj@gmx.net>
+
+       * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
+       which resort to FindFirstFile when a certain error condition
+       (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
+       Code is contributed under MIT/X11 license.
+
+2008-01-24  Jonathan Chambers  <joncham@gmail.com>
+
+       * marshal.c (emit_marshal_string): Fix out string marshalling
+       to use specified encoding. Fixes #323900.
+
+       Code is contributed under MIT/X11 license.
+
+2008-01-24  Raja R Harinath  <harinath@hurrynot.org>
+
+       * class.c (mono_class_inflate_generic_method_full): Don't modify
+       iresult->context after cache check.
+
+2008-01-23  Zoltan Varga  <vargaz@gmail.com>
+
+       * class.c (mono_class_inflate_generic_method_full): Change the
+       struct assignments to memcpy for better visibility and add some comments.
+
+2008-01-23  Dick Porter  <dick@ximian.com>
+
+       * threads.c (mono_threads_set_shutting_down): Simplify shutdown
+       procedure, and make it work on windows.
+
 2008-01-22  Zoltan Varga  <vargaz@gmail.com>
 
+       * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
+       a MonoReflectionTypeBuilder since it is always of that type.
+
+       * reflection.c (mono_type_get_object): Remove an unneccesary check.     
+
+       * reflection.c (mono_generic_class_get_object): Simplify this a bit.
+
+       * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
+       
+       * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
+
+       * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
+
        * reflection.c (mono_reflection_create_runtime_class): Remove already created
        instantiations from the type cache.