2003-12-17 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / metadata / ChangeLog
index 9789b392eeb772bf5d13d02cecb883db0fd3326b..2e0c2ad99e9cd4996a4ca846fdea884d7cc86642 100644 (file)
@@ -1,3 +1,510 @@
+2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
+
+       * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
+       Reenable call to mono_runtime_is_shutting_down ().
+
+       * appdomain.c (mono_runtime_is_shutting_down): New helper function to
+       determine if the runtime is shutting down.
+
+2003-12-16  Jackson Harper <jackson@ximian.com>
+
+       * icall.c: comment out call to mono_runtime_is_shutting_down to
+       fix build.
+       
+2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
+
+       * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
+       (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
+
+2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
+
+       * reflection.c: move definition of swap_with_size
+       to before its first call
+
+2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
+
+       * appdomain.c (mono_runtime_is_shutting_down): New public function.
+
+       * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
+       icall.
+
+       * object.c: Fix warnings.
+
+       * icall.c (ves_icall_Type_Get...): Only consider inherited static
+       members if FlattenHierarchy is set.
+
+       * reflection.c (mono_image_add_decl_security): New function to emit
+       declarative security.
+
+       * reflection.h reflection.c: Add support for declarative security.
+
+       * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
+       
+2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
+
+       appdomain.c (MONO_CORLIB_VERSION): Bump version number.
+       
+       * appdomain.c verify.c: Moved corlib version checking into its own
+       function in appdomain.c since it needs to create vtables etc.
+
+2003-12-13  Patrik Torstensson <p@rxc.se>
+
+       * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
+       instead of unwrapped server.
+
+2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
+
+       * verify.c (check_corlib): Fix field index.
+
+2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
+
+       * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
+       GetGacPath icall.
+
+2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
+
+       * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
+       ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
+       cope with sizeof(size_t) != sizeof(guint32).
+
+2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
+       in case of failure.
+
+2003-12-10  Mark Crichton <crichton@gimp.org>
+
+       * icall.c: removed the GetNonZeroBytes.  We now handle this case
+       in managed code.
+
+       * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
+
+Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
+
+       * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
+       marked as deleted.
+
+2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
+
+       * verify.c (check_corlib): Handle the case when the version field is 
+       initialized by a static constructor.
+
+2003-12-08  Patrik Torstensson  <p@rxc.se>
+
+    * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
+
+2003-12-08  Martin Baulig  <martin@ximian.com>
+
+       * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
+       a MonoReflectionGenericParameter, also take the parameter index
+       and name as arguments.
+       (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
+       (ves_icall_MonoGenericParam_initialize): New interncall.
+       (ves_icall_Type_make_byref_type): New interncall.
+
+       * reflection.h (MonoReflectionGenericParam): Derive from
+       MonoReflectionType, not just from MonoObject.  Added `refobj' and
+       `index' fields.
+
+       * reflection.c (mono_reflection_define_generic_parameter): Create
+       and return a new MonoReflectionGenericParam; don't initialize the
+       constraints here.
+       (mono_reflection_initialize_generic_parameter): New public method;
+       initializes the constraints and creates the `param->pklass'.
+
+2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
+
+       * reflection.h reflection.c: Use the new fields 'num_types', 
+       'num_fields' and 'num_methods' to track the number of types etc.
+
+       * verify.c (check_corlib): Check corlib version number.
+
+2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
+       function works on all methods.
+
+2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
+
+       * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
+       * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
+       the custom_type_info flag of the transparent proxy.
+       * object.c: Added method mono_object_isinst_mbyref for casting mbyref
+       objects that supports IRemotingTypeInfo.
+       * object.h: Added custom_type_info field in transparent proxy.
+
+2003-12-06  Martin Baulig  <martin@ximian.com>
+
+       * class.c (mono_class_create_from_generic): Removed.
+       (mono_class_from_generic): Check `ginst->klass' before doing
+       anything else.  This is important to fully support "recursive"
+       generic types.
+
+       * metadata.c (do_mono_metadata_parse_generic_inst): Create an
+       empty `generic_inst->klass' before doing anything else.
+
+2003-12-06  Dick Porter  <dick@ximian.com>
+
+       * verify.c: 
+       * object.h:
+       * icall.c:
+       * locales.c: Use C structs to access class fields.  Don't do a
+       conversion between MonoString and UChar because both are
+       platform-endian UTF-16.  Compare now takes startindex and count
+       parameters.  Add a char overload for IndexOf.  Speed up the
+       invariant string IndexOf.
+
+2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
+
+       * Makefile.am (monosn_LDADD): Fix parallel build.
+
+2003-12-04  Martin Baulig  <martin@ximian.com>
+
+       * icall.c
+       (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
+       (ves_icall_Type_make_array_type): New interncall.       
+
+2003-12-04  Martin Baulig  <martin@ximian.com>
+
+       * locales.c: also change it in the !HAVE_ICU case.
+
+2003-12-04  Dick Porter  <dick@ximian.com>
+
+       * icall.c:
+       * locales.c: construct_compareinfo is now in CompareInfo, not
+       CultureInfo.
+
+2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
+
+       * image.c (mono_image_load_file_for_image): Cache loaded images in the
+       image->files array.
+
+       * image.c (load_class_name): Load class names from the EXPORTEDTYPES
+       table as well.
+
+       * assembly.c (mono_assembly_load_references): Only load references
+       once.
+
+       * class.c (mono_class_from_name): Avoid linear search of the 
+       EXPORTEDTYPE table.
+
+       * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
+
+2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
+
+       * image.h (MonoImage): Add 'field_cache' field.
+
+       * loader.c (mono_field_from_token): Cache field lookups.
+       
+       * reflection.c (mono_module_get_object): Fix name property.
+
+       * icall.c (ves_icall_get_enum_info): Update after changes to 
+       mono_metadata_get_constant_index ().
+
+       * icall.c: Get rid of get_type_info icall, use a separate icall for
+       each type property to avoid needless memory allocations. Fixes #51514.
+
+       * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
+       to avoid needless binary searches.
+
+       * class.c (class_compute_field_layout): Move the initialization of
+       field->def_value to mono_class_vtable ().
+
+       * class.c (mono_class_layout_fields): Enable GC aware auto layout for
+       non-corlib types.
+
+       * object.c (mono_object_allocate): Make it inline.
+
+       * object.c (mono_object_allocate_spec): Make it inline.
+       
+2003-12-02  Dick Porter  <dick@ximian.com>
+
+       * locales.c (create_NumberFormat): NumberFormatInfo construction.
+       Patch by Mohammad DAMT (mdamt@cdl2000.com).
+
+2003-12-01  Dick Porter  <dick@ximian.com>
+
+       * threads.c: Fix signature and call in CreateMutex and
+       CreateEvent.
+
+2003-12-01  Dick Porter  <dick@ximian.com>
+
+       * icall.c: 
+       * locales.c: Implement string compares and searching
+
+       * object.h: Add extra Thread field
+
+2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
+
+       * reflection.c (fixup_method): Add support for MonoCMethod.
+
+2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
+
+       * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
+
+       * reflection.c (assembly_name_to_aname): Allow extra characters in
+       assembly names. Fixes #51468.
+
+2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
+
+       * exception.c (mono_exception_from_name_domain): New helper function.
+
+       * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
+       exception object in the correct domain.
+
+       * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
+       formatting + make a copy a the input data.
+
+       * loader.c (mono_get_method_from_token): Methods which contain
+       native code do not have entries in the ImplMap.
+
+       (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
+       Thanks to Gonzalo for spotting this.
+       
+       * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
+       patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
+
+       * assembly.h (mono_assembly_load_from): Split the second part of 
+       assembly loading into a new public function.
+
+       * exception.h (mono_get_exception_bad_image_format): New function.
+
+2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
+
+       icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
+       Enumerate all modules inside a dynamic assembly. Fixes #51293.
+       
+       * icall.c: Add new icall for creating dynamic methods.
+
+       * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
+
+       * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
+
+       * reflection.c (mono_reflection_create_dynamic_method): New icall to
+       create a dynamic method.
+
+       * reflection.c (resolve_object): New helper function.
+
+       * reflection.c: Generalize ReflectionMethodBuilder and the functions
+       which manipulate it so they can also work on dynamic methods.
+
+       * reflection.c (reflection_method_builder_to_mono_method): Avoid 
+       creating the MonoReflectionMethodAux structure if it is not needed.
+       
+       * reflection.h verify.c: Update after changes to object layout.
+
+       * reflection.c (method_builder_encode_signature): Fix compilation on
+       gcc 2.95.x.
+
+2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
+
+       * appdomain.h: Added support for context static fields. Added static_data
+         field to MonoAppContext and renamed thread_static_fields to a more
+         generic special_static_fields in MonoAppDomain, since it can now contain
+         context static fields.
+       * domain.c: Updated hashtable name.
+       * object.c: Replaced field_is_thread_static() for a more generic
+         field_is_special_static() which also checks for context static attribute.
+         In mono_class_vtable(), added support for static context fields.
+       * threads.c: Changed methods that manage thread static fields to more
+         generic methods so they can be reused both for thread and context static
+         data.
+       * threads.h: Declared some new methods.
+
+2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
+
+       * reflection.h: Update after changes to the managed types.
+
+       * reflection.c (encode_custom_modifiers): New helper function.
+
+       * reflection.c (method_encode_signature): Emit custom modifiers.
+
+       * reflection.c (field_encode_signature): Emit custom modifiers.
+
+2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
+
+       * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
+
+       * icall.c (ves_icall_System_ValueType_Equals): New optimized 
+       implementation.
+
+       * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
+       icall.
+
+       * object.c (mono_field_get_value_object): New function.
+
+       * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
+       specific.
+
+2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
+
+       * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
+       return a preallocated out-of-memory exception instance.
+
+       * object.c (out_of_memory): Use the new function.
+
+       * metadata.c (mono_metadata_parse_type): Handle the case when the byref
+       flag is before the custom modifiers. Fixes #49802.
+
+2003-11-16  Martin Baulig  <martin@ximian.com>
+
+       * class.c (mono_class_is_open_constructed_type): Implemented the
+       MONO_TYPE_GENERICINST case.
+
+2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
+
+       * assembly.c (mono_assembly_fill_assembly_name): New function to
+       fill out the MonoAssemblyName structure.
+       (mono_assembly_open): Use the new function.
+
+       * icall.c (fill_reflection_assembly_name): New helper function.
+
+       * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
+       new function.
+
+       * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
+
+2003-11-15  Martin Baulig  <martin@ximian.com>
+
+       * class.c (mono_class_is_open_constructed_type): New public
+       function; checks whether a type is an open constructed type,
+       ie. whether it still contains type parameters.
+       (mono_class_inflate_generic_type): If we're a type parameter and
+       the inflated type is also a MONO_TYPE_(M)VAR, return the original
+       type.
+
+       * class.h (MonoGenericInst): Added `guint32 is_open'.
+
+       * loader.c (method_from_methodspec): Check whether we're an open
+       or closed constructed type and set `ginst->is_open'.
+
+       * reflection.c (mono_reflection_bind_generic_parameters): Check
+       whether we're an open or closed constructed type and set
+       `ginst->is_open'.
+       (mono_reflection_inflate_method_or_ctor): Don't inflate methods
+       from open constructed types.
+
+2003-11-15  Martin Baulig  <martin@ximian.com>
+
+       * reflection.c (mono_reflection_bind_generic_parameters): If we're
+       a generic instance (instead of a generic type declaration) with
+       unbound generic parameters, bind them to our actual types.
+
+2003-11-14  Martin Baulig  <martin@ximian.com>
+
+       * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
+
+       * reflection.c (mono_reflection_bind_generic_parameters): If we're
+       an interface type, populate `res->interfaces' with instantiated
+       versions of all the interfaces we inherit.
+
+2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
+
+       * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
+       when MONO_PATH is set but doesn't contain the install dir.
+
+2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * icall.c:
+       (ves_icall_Type_GetInterfaces): don't return an interface twice when
+       it's also implemented in base classes. Fixes bug #50927.
+
+2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
+
+       * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
+       if this method is called from a finalizer. Fixes #50913.
+
+2003-11-12  Miguel de Icaza  <miguel@ximian.com>
+
+       * threads.c: Implement VolatileRead/VolatileWrite
+
+       * icall.c: Add new icalls for VolatileRead/VolatileWrite
+
+2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
+
+       * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
+       patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
+       2.95.3.
+
+       * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
+       from Peter Ross (pro@missioncriticalit.com).
+       
+2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
+
+       * icall.c: Added internal call for System.Environment::GetMachineConfigPath
+
+2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
+
+       * assembly.c (mono_assembly_load_references): Disable check because it
+       triggers on older corlibs which lots of people have.
+
+2003-11-12  Jackson Harper  <jackson@ximian.com>
+
+       * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
+       load corlib.dll if mscorlib.dll is not found.
+       * assembly.h: Remove corlib name define.
+       * class.c:
+       * domain.c:
+       * image.c: Change corlib name to mscorlib.
+       
+2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
+
+       * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
+
+2003-11-11  Miguel de Icaza  <miguel@ximian.com>
+
+       * appdomain.h: Added loader_optimization here to sync with the C#
+       code, and add disallow_binding_redirects field.
+
+2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
+
+       * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
+
+       * reflection.c (mono_image_build_metadata): Fix crash on modules
+       with no types.
+
+       * reflection.h (MonoMethodInfo): Track changes to the managed structure.
+
+       * icall.c (ves_icall_get_method_info): Return callingConvention as
+       well.
+
+       * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
+       namespaces from the EXPORTEDTYPE table as well.
+
+       * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
+       from all modules inside the assembly.
+       
+2003-11-11  Martin Baulig  <martin@ximian.com>
+
+       * reflection.c (mono_reflection_bind_generic_parameters): Make
+       this work for interfaces.
+
+2003-11-11  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
+
+2003-11-11  Martin Baulig  <martin@ximian.com>
+
+       * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
+       "MonoInflatedMethod" and "MonoInflatedCtor".
+
+2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
+
+       * reflection.c (resolution_scope_from_image): Use the assembly table
+       from the manifest module, since other modules don't have it.
+
+       * debug-helpers.c (mono_type_full_name): New helper function.
+
+       * image.h (MonoAssembly): Change 'dynamic' to a boolean.
+
+       * image.c (mono_image_load_file_for_image): New public function which
+       is a replacement for the load_file_for_image in class.c.
+
+       * assembly.c (mono_assembly_load_module): A wrapper for the function
+       above which does assembly association and reference loading too.
+
+       * class.c (mono_class_from_name): Call mono_assembly_load_module.
+
 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * appdomain.c: not all of the attributes for the full assembly name