2008-02-05 Mark Probst <mark.probst@gmail.com>
[mono.git] / mono / metadata / ChangeLog
index 6a2705b7e25592c9d55754552ca937730a381491..a4e91b3e4dd2381ce2427ea33a4a7e1a38d74c5e 100644 (file)
@@ -1,3 +1,453 @@
+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.
+
+2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
+
+       * verify.c (do_unbox_value): push a controled mutability managed pointer.
+
+2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (do_ldstr): added, verifies if the #US token is valid.
+
+       * verify.c (mono_method_verify): removed old TODO
+
+2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (do_newobj): add visibility check.
+
+2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (do_load_function_ptr): add visibility check.
+
+2008-01-21  Massimiliano Mantione  <massi@ximian.com>
+       *class.c:
+       mono_generic_class_get_class: hook profiler events.
+       mono_field_get_offset: added to support heap-shot in the new profiler.
+       *class.h: exported mono_field_get_offset.
+       * reflection.c:
+       mono_reflection_setup_internal_class: hook profiler events.
+
+2008-01-20  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions' 
+       argument here too and use it to avoid checking for pending exceptions if 
+       possible.
+
+2008-01-20  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * assembly.c (build_assembly_name): add arg for passing the assembly
+       flags. Do not consider a PublicKey with value "null" valid.
+        (mono_assembly_name_parse_full): added boolean argument that will be
+       set if the assembly name contains a PublicKeyToken spec. Added support
+       for the Retargetable spec for which only Yes or No are allowed as valid
+       value. Consider assembly name invalid if Retargetable spec is set, but
+       either version, culture or public key (token) are not specified.
+       * metadata-internals.h: sync signature of mono_assembly_name_parse_full
+       with implementation in assembly.c.
+       * icall.c (fill_reflection_assembly_name): also copy assembly flags
+       from MonoAssemblyName.
+       (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
+       introduced argument for mono_assembly_name_parse_full to know if the
+       assembly name has a PublicKeyToken spec, and if it has instruct
+       fill_reflection_assembly_name to use default value for keyToken (if
+       PublicKeyToken is null).
+
+2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (mono_method_verify): fixed ovf ops with
+       float values. They are unverifiable now.
+
+2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * class.c (set_failure_from_loader_error): add BadImageException to the
+       list of exceptions that can cause a type to fail to load.
+
+       * class.c (mono_class_get_exception_for_failure): same.
+
+2008-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (in_any_exception_block): added, check if offset
+       is part of any exception handling clause.
+
+       * verify.c (get_stack_type): added VAR and MVAR types.
+
+       * verify.c (do_stobj): better error messages.
+
+       * verify.c (do_cpobj): added, check cpobj.
+
+       * verify.c (do_initobj): added, check initobj.
+
+       * verify.c (do_sizeof): added, check sizeof.
+
+       * verify.c (do_localloc): added, check localloc.
+
+       * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
+
+2008-01-17  Zoltan Varga  <vargaz@gmail.com>
+
+       * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
+       save_lmf/restore_lmf opcodes.
+
+       * threads.c (mono_threads_install_notify_pending_exc): New function to
+       install a callback notifying the JIT there is a pending exception on a thread.
+       (mono_thread_request_interruption): Call the new callback.
+       (mono_thread_get_and_clear_pending_exception): New function to return the
+       exception pending on a thread.
+
+       * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
+       to turn off checking for pending exceptions.
+       (mono_marshal_get_native_wrapper): Ditto.
+
+2008-01-16  Zoltan Varga  <vargaz@gmail.com>
+
+       * threads-types.h: Get rid of the unnecessary extern declarations.
+
+2008-01-16  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
+       return field from parent class if not private.
+       (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
+       returns fields from parent class if they are not private.
+       (method_nonpublic): added function to determine if a given method
+       should be considered non-public. Returns false for private methods
+       on parent class, and internal methods from parent on the 1.0 profile.
+       (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
+       use method_nonpublic function to determine whether method should be
+       returned.
+       (property_accessor_public): use newly introduced method_nonpublic
+       function to determine whether accessor is non-public. 
+       (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
+       event from parent class if not private. Only return static event if
+       Static flag is set, and only return static event from parent class if
+       FlattenHierarchy flag is set.
+       (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
+       include non-private events from parent class.
+
+2008-01-16  Zoltan Varga  <vargaz@gmail.com>
+
+       * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
+       warning.
+
+2008-01-16  Wade Berrier <wberrier@novell.com>
+
+       * security.c: Add assembly.h header to appease some warnings
+
+2008-01-16  Dick Porter  <dick@ximian.com>
+
+       * process.c (process_module_string_read): Remove trailing null
+       when saving string.
+
+2008-01-16  Mark Probst  <mark.probst@gmail.com>
+
+       * class-internals.h: A new data structure describing the layout of
+       a runtime generic context (MonoRuntimeGenericContextTemplate).
+
+       * metadata-internals.h: Added a hash table to MonoDomain that maps
+       from open generic classes to their runtime generic context
+       templates.
+
+       * object.c: Building of the runtime generic context, including
+       proper handling of generic type arguments of superclasses.
+       Building of the runtime generic context according to the template.
+
+2008-01-15  Zoltan Varga  <vargaz@gmail.com>
+
+       * class.c (mono_class_setup_fields): Set field.count for generic instances.
+       Fixes #350856.
+
+       * image.c (do_mono_image_open): Pass TRUE as last_exists to 
+       mono_portability_find_file (). Fixes #325466.
+       (mono_image_get_public_key): Fix a warning.
+
+2008-01-14  Zoltan Varga  <vargaz@gmail.com>
+
+       * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
+       Fixes #353550.
+       (mono_class_from_name_case): Ditto.
+
+2008-01-13  Eyal Alaluf <eyala@mainsoft.com>
+
+       * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
+         common storage for the tables used in the System/NumberFormatter class.
+
+2008-01-13  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
+
+2008-01-11  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (get_boxable_mono_type): check if the token is valid.
+
+       * verify.c (set_stack_value): changed to add an error if an
+       invalid type is set on stack. Changed all callers due to signature change.
+
+       * verify.c (do_stobj): implement stobj validation.
+
+2008-01-11  Zoltan Varga  <vargaz@gmail.com>
+
+       * reflection.c (reflection_methodbuilder_to_mono_method): No need to
+       set container->is_method, it was set earlier.
+
+       * metadata.c (type_in_image): Handle MVARs which belong to not finished
+       generic methods.
+
+       * reflection.c (mono_reflection_initialize_generic_parameter): Set
+       is_method of the generic container to TRUE for methods.
+
+2008-01-10  Zoltan Varga  <vargaz@gmail.com>
+
+       * metadata.c (type_in_image): Handle type parameters properly.
+
+       * class-internals.h (MonoGenericParam): Add an 'image' argument to track
+       memory ownership of this structure.
+
+2008-01-10  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (get_boxable_mono_type): make typedref types been just
+       unverifiable. check for void type.
+
+       * verify.c (do_unbox_any): added, verify opcode unbox.any.
+
+       * verify.c (do_load_function_ptr): accept method spec tokens.
+
+2008-01-10  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (mono_class_native_size): Always set *align even if this is called
+       recursively.
+
+2008-01-09  Zoltan Varga  <vargaz@gmail.com>
+
+       * verify.c (mono_verify_corlib): Remove this as it was not used and was 
+       out-of-date.
+
+2008-01-09  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c: removed some old unused tables. A huge bunch of small fixes
+       to things found while testing the verifier with mono basic.
+
+       * verify.c (dump_stack_value): dump null literal flag to.
+
+       * verify.c (verify_type_compatibility_full): fix comparison
+       for types that have a generic super type.
+
+       * verify.c (verify_stack_type_compatibility): fix compatibility
+       between null literals and reference types. fix compatibility between
+       boxed valuetypes and object. fix corner case test for enums.
+
+       * verify.c (do_cmp_op): proper verification of cgt.un in case
+       of reference types.
+
+       * verify.c (do_invoke_method): fix error message.
+
+       * verify.c (do_store_indirect
+
+       * verify.c (check_is_valid_type_for_field_ops): proper verification
+       of managed pointers to valuetypes and boxed valuetypes. proper verification
+       of null literals.
+
+       * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
+       allow token to be a reference type.
+
+       * verify.c (do_cast): proper handling of boxes valuetypes.
+
+       * verify.c (do_stelem): proper handling of storing a boxed valuetype
+       in object[].
+
+       * verify.c (mono_method_verify): pass the opcode to do_cmp_op
+       to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
+       fixed the decoding of unbox_any
+
+2008-01-08  Zoltan Varga  <vargaz@gmail.com>
+
+       * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
+
+2008-01-08  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c (do_newobj): do delegate verification.
+
+       * verify.c (verify_delegate_compatibility): perform delegate
+       verification.
+
+       * verify.c (verify_ldftn_delegate): perform tests related to
+       ldftn delegates.
+
+       * verify.c (mono_delegate_signature_equal): perform the
+       slightly diferent signature comparison required by delegates.
+
+       * metadata.c (mono_metadata_type_equal_full): added and exported
+       as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
+       allows signature only comparison.
+
+       * metadata-internal.h (mono_metadata_type_equal_full): added and exported
+       as MONO_INTERNAL.
+
+2008-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * verify.c: added a bunch of stack_slot_* functions to
+       make access to stack slot type easier. This is required to
+       allow optional flags, like null literal, boxed value and
+       this pointer.
+       All access paths to IlStackDesc::stype have been changed 
+       to use these new funcions.
+       Removed a bunch of unused functions and cleared all warnings.
+       This patch introduces the usage of the this pointer and 
+       boxed value flags.
+
+2008-01-07  Zoltan Varga  <vargaz@gmail.com>
+
+       * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
+
+2008-01-06  Zoltan Varga  <vargaz@gmail.com>
+
+       * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
+       match managed version.
+
+       * appdomain.c: Bump corlib version.
+       
+       * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
+       argument.
+
+2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
+       Set public key token to zero-length byte array if assembly is not
+       strongnamed.
+
 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
 
        * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when