2004-06-08 Martin Baulig <martin@ximian.com>
[mono.git] / mono / metadata / ChangeLog
index 251fa41f8de47219ee57c3b734dd628f738fea80..f0d03ff1935331228154ec31aa6f609db1cf58b3 100644 (file)
@@ -1,3 +1,565 @@
+2004-06-08  Martin Baulig  <martin@ximian.com>
+
+       * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
+
+       * metadata.c (mono_metadata_parse_method_signature): When parsing
+       a MethodDef which has VarArgs, set sentinelpos.
+
+       * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
+       `gint16' since we're using -1 for non-varargs methods.
+
+       * reflection.c
+       (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
+       (method_encode_signature): Added varargs support.
+       (method_builder_encode_signature): Likewise.
+       (mono_image_get_varargs_method_token): New static method.
+       (mono_image_create_method_token): New public method; this is
+       called via an icall instead of mono_image_create_token() when
+       calling a varargs method.       
+
+2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
+
+       * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
+
+2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * culture-info-tables.h : Reflecting the latest locale-builder that
+         fixed empty array representation ({} to {0}).
+
+2004-06-07  Jackson Harper  <jackson@ximian.com>
+
+       * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
+       looking up extra gac paths. This allows MONO_GAC_PATH to act
+       exactly like a prefix.
+       
+2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
+
+       * reflection.c (mono_reflection_type_from_name): Make a copy of the
+       type name before modifying it. Fixes #59405.
+
+2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * culture-info.h: added fields for "all datetime patterns".
+       * locales.c: (  ves_icall_System_Globalization_CultureInfo
+         _construct_datetime_format ()): fill xxx_patterns fields.
+       * object.h: added fields for "all datetime patterns" to
+         MonoDateTimeFormatInfo.
+       * culture-info-tables.h: reflecting locale-builder updates.
+
+2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
+
+       * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
+       the event has no add and remove methods. Fixes #59629.
+
+2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * object.c: Fixed possible integer overflow when allocating large
+       strings.
+
+2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * culture-info-tables.h: reflecting locale-builder updates.
+
+2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * culture-info-tables.h: reflecting locale-builder updates.
+
+2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * culture-info-tables.h: reflecting locale-builder updates.
+
+2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
+
+       * threads.c: Made Thread.Sleep abortable.
+
+2004-06-02  Martin Baulig  <martin@ximian.com>
+
+       * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
+
+       * debug-mono-symfile.h: Bumped symbol file version number to 37.
+
+2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
+
+2004-05-30  Jackson Harper  <jackson@ximian.com>
+
+       * reflection.c: Do not hardcode assembly versions or public key
+       tokens anymore. All of this except the corlib section was dead
+       code anyways.
+       
+2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
+
+       * object.c (mono_runtime_invoke_array): Automatically create boxed
+       objects for byref valuetypes if needed. Fixes #59300.
+       
+       * object.c (mono_method_return_message_restore): Handle 
+       MONO_TYPE_OBJECT as well.
+
+2004-05-28  Jackson Harper  <jackson@ximian.com>
+
+       * reflection.c: The modified type encoding was causing build
+       problems. Reverted for now.
+       
+2004-05-28  Jackson Harper  <jackson@ximian.com>
+
+       * reflection.c/h: Take an assembly ref so that we dont create
+       fully qualified names when encoding types in the same assembly as
+       the custom attribute being emitted.
+       * appdomain.c: Increment version number.
+       
+2004-05-26  Duncan Mak  <duncan@ximian.com>
+
+       * icall.c
+       (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
+       Set the full version number (major, minor, build, revision).
+
+2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
+
+       * marshal.c (emit_struct_conv): increment src/dst after blit
+       (mono_marshal_get_managed_wrapper,
+       mono_marshal_get_native_wrapper): make sure we have marshalling
+       info before marshalling params (info computation affects
+       blittable)
+
+       * class.c (class_compute_field_layout): correctly deal with
+       blittable
+       (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
+       value types (as per what windows dows by default)
+       (mono_class_setup_mono_type): System.ValueType is blittable
+       (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
+       blittable
+
+       * marshal.c (mono_marshal_load_type_info): flag types  as
+       non-blittable if the native layout doesn't match the managed
+       layout
+
+2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * appdomain.c: don't add stuff in the private search path that is
+       above the application base. If application base is not set, there's
+       no private search path.
+
+2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
+       byref struct arguments in native->managed marshalling.
+
+2004-05-28     Patrik Torstensson      <totte@hiddenpeaks.com>
+
+       * marshal.c (mono_marshal_get_runtime_invoke): correctly
+       cache methods using signature (special case for methods
+       that are value type or string class)
+       
+       * image.c (mono_image_close): clean up allocated GSList's
+       in runtime_invoke_cache.
+
+2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * mono-config.c: set the correct path for mono_cfg_dir on windows when
+       there's no MONO_CFG_DIR environment variable defined.
+
+2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * threads.c: windows version must be >= 0x0500 to include OpenThread.
+
+2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
+
+       * threadpool.c: Really wait for 500ms after the async call, even if the wait
+         is interrumped.
+       * threads.c: In mono_thread_manage, call OpenThread to ref each handle
+         before waiting for it, and call CloseHandle after the wait to unref it.
+         This will make sure that handles are not disposed too early.
+
+2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * appdomain.c:
+       * appdomain.h:
+       * icall.c: removed
+       ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
+       needed now.
+
+       * object.c: se the application_base only for the domain that runs
+       Main. Fixes bug #59216,
+
+2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * appdomain.c:
+       * object.c: only the domain in which Main is run have
+       SetupInformation.ConfigurationFile set, so moved a few lines from
+       appdomain.c to object.c.
+
+2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * appdomain.c: we tried to load [name].(dll|exe), but according
+       to bug #57710, we must also try [culture]/[name].(dll|exe) and
+       [culture]/[name]/[name](dll|exe). This patch fixes the bug.
+       There's a test case attached to bug #58922.
+
+2004-05-27  Dick Porter  <dick@ximian.com>
+
+       * icall.c:
+       * file-io.c: Implemented icalls for locking and unlocking regions
+       in a file.
+       (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
+       FALSE on error (fixes both compiler warning and real bug.)
+
+2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * culture-info-tables.h: reflecting locale-builder updates.
+
+         (Added missing ChangeLog entry for 05/26)
+
+2004-05-27  Jackson Harper  <jackson@ximian.com>
+
+       * locales.c: Fix some cut and paste errors.
+       
+2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * mono-config.c: set the correct path for config. directory on windows.
+
+2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
+         on win32.
+
+2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
+       from pinvoke functions.
+       
+       * marshal.c (mono_ftnptr_to_delegate): Implement this.
+
+2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * culture-info-tables.h: reflecting locale-builder updates.
+
+2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
+
+       * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
+       #59086.
+
+2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
+       * icall.c: Modified icalls for RNG.
+       * rand.c|h: Changed RNG interface to allow thread-safe usage under 
+       Windows (CryptoAPI).
+
+2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
+
+       * locales.c: Fix build.
+
+2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * culture-info-tables.h: reflecting locale-builder updates.
+
+2004-05-25  Jackson Harper  <jackson@ximian.com>
+
+       * locales.c: When creating the current culture use the $LANGs
+       specific culture. So DateTimeFormat and NumberFormat entries are created.
+       
+2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
+
+       * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
+       a char array as parameter.
+
+2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
+
+       * image.c: In mono_image_open(), always use an absolute path name to
+         look for already loaded images.
+
+2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
+       missing in the windows build (like older cygwin include files).
+
+2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * icall.c: Fixed check for possible integer overflow in Buffer_
+       BlockCopy icall. Replaced comments style // by /* */.
+
+2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.c (mono_ftnptr_to_delegate): Fix warning.
+       
+       * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
+       check after MONO_VTADDR. Fixes pinvoke2.exe.
+
+       * marshal.h marshal.c metadata.h: Add beginnings of support for
+       ftnptr -> delegate marshalling.
+
+2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
+
+       * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
+       * threads.c: Fix warnings.
+
+2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
+
+       * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
+       * icall.c: Registered icalls for Suspend and Resume.
+       * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
+         Thread.Abort.
+       * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
+       * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
+       * process.c: Use WaitForSingleObjectEx.
+       * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
+         checkpoints.
+       * threads.c, threads.h: Make use of new Ex wait methods. Improved
+         implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
+         for Suspend and Resume. Added new mono_thread_stop, used for stoping
+         background threads. Added basic support for Abort in Windows.
+         Start new threads using a managed delegate invoke wrapper. This wrapper
+         has an interruption checkpoint that is needed since an interruption
+         can be requested before the thread leaves the unmanaged code that starts 
+         the thread.
+       * marshal.c: Added interruption checkpoint after every native call, and
+         also before managed calls for wrappers called from unmanaged code to
+         go into managed code.
+       * object.h: Added new field in MonoThread to keep track of interruption
+         requests.
+
+2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
+       calls.
+
+2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * appdomain.c:
+       * assembly.c:
+       * gc.c:
+       * locales.c:
+       * mono-config.c:
+       * rand.c: getenv -> g_getenv (windows!)
+
+       * process.c: complete_path is also used on non-windows platforms.
+
+2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * icall.c: new signature for Process_Start.
+
+       * process.[ch]: new signature for Process_Start. If we're on windows
+       and UseShellExecute is false, we have to search for the program by
+       ourselves if we don't get a full path.
+
+2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
+       marshalling and call CleanUpNativeData if needed. Fixes #58646.
+
+2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
+       Fixes bug #58373.
+
+2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * process.c: use double quotes to quote program name and arguments on
+       windows. Fixes bug #58575.
+
+2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * file-io.c: don't return "." and ".." when using windows Find*File.
+
+2003-05-17     Patrik Torstensson <totte@hiddenpeaks.com>
+
+       * marshal.c: Don't pass wrappers to message init because method 
+       addressed used to lookup metadata. part of remoting[2|3] fix.
+
+2004-05-15  Jackson Harper  <jackson@ximian.com>
+
+       * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
+       path is essentially the same as MONO_PATH except that it points to
+       GACs instead of lib directories.
+       * loader.h: The user gac is gone so we dont need function to
+       enable/disable it.
+       * mono-config.c: user gac option is now gone.
+       
+2004-05-15  Jackson Harper  <jackson@ximian.com>
+
+       * culture-info.h: Make defines more consistent, add calendar data
+       to the culture info table.
+       * culture-info-tables.h: Add basic calendar data. Basically
+       everyone gets default gregorian until all the data is
+       updated.
+       * locales.c: Use the new consistent defines. Set calendar data for
+       culture info objects.
+       * object.h: add a field for calendar data to CultureInfo
+       
+2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
+
+       * image.c: image->runtime_invoke_cache is keyed on signatures now.
+       * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
+       a signature.
+       (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
+       (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
+       an extra param that is the pointer of the method to invoke. The IL for
+       the invoke method is no longer specific to the method, but to the
+       signature of the method. Thus, we can share the same code for multiple
+       methods. This reduces the number of methods that have to be compiled.
+
+2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
+
+       * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
+
+       * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
+
+       * icall.c: Optimize Buffer.BlockCopy.
+
+2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * culture-info-tables.h: seems like Spanish and Portuguese cultures had
+       DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
+       quote). Changed them to "MMMM yyyy".
+
+2004-05-12  Miguel de Icaza  <miguel@ximian.com>
+
+       * rand.c
+       (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
+
+2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
+
+       * reflection.h: Updated after changes to managed structures.
+
+       * appdomain.c: Bump corlib version.
+
+2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
+       windows.
+
+2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Makefile.am: link to ../os/libmonoos.la on windows.
+
+       * assembly.c:
+               -If MONO_DEBUG, warn about non-existing directories in
+               MONO_PATH.
+               -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
+               compile time variable.
+               -Removed init_default_path and call mono_set_rootdir from
+               libmonoos.a instead (windows only).
+
+       * assembly.h: declare mono_assembly_getrootdir().
+
+       * domain.c:
+       * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
+
+       * loader.c: s/getenv/g_getenv/
+
+2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.{h,c}: Add support for UnmanagedType.AsAny.
+
+       * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
+
+       * metadata.h: Add new marshalling conversions.
+
+       * metadata.h metadata.c (mono_metadata_signature_dup): New helper
+       function.
+
+       * reflection.c (mono_reflection_get_type): Lookup the type in all
+       modules of a multi-module assembly. Fixes #58291.
+
+2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
+
+       * threads.c: Before aborting a background, set the StopRequested
+       state.  This avoids throwing the Abort exception.
+       In mono_thread_manage, don't continue with the shutdown until all
+       aborted threads have actually stopped.
+
+2004-05-10  Jackson Harper  <jackson@ximian.com>
+
+       * locales.c: Remove the modifier from culture names.
+       
+2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Makefile.am: monosn is not installed any more. It has been deprecated
+       in favor of sn.
+
+2004-05-07  Jackson Harper  <jackson@ximian.com>
+
+       * locales.c
+       (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
+       Fix array construction, add bailout if the length is 0.
+
+2004-05-07  Dick Porter  <dick@ximian.com>
+
+       * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
+       machine doesn't have a DNS entry.  Patch by Urs Muff
+       (umuff@quark.com), fixes bug 57928.
+
+2004-05-06  Jackson Harper  <jackson@ximian.com>
+
+       * reflection.c: Handle null PublicTokens properly. alloc mem for
+       assembly names culture so we dont crash when freeing it.
+       
+2004-05-06  Jackson Harper  <jackson@ximian.com>
+
+       * assembly.c: Check the usergac when loading with partial names.
+       
+2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
+       does nothing for now (not required for Linux/Windows) but the class
+       library can call it (and a newer or modified runtime could need it).
+       * icall.c: Registred icall.
+
+2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * loader.c: prints a message on module loading error we set MONO_DEBUG
+       environment variable.
+
+2004-05-05  Jackson Harper  <jackson@ximian.com>
+
+       * appdomain.c: Handle PublicKeyToken=null properly.
+       
+2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * environment.c|h: Added icall ves_icall_System_Environment_
+       GetOSVersionString to get the current OS version as a string.
+       * icall.c: Registred icall.
+
+2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
+
+       * object.c: in mono_object_get_virtual_method(), take into account that
+       non-virtual methods don't have a slot in the vtable. Check needed when
+       the object is a proxy.
+
+2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
+       (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
+
+       * object.c (mono_class_compute_gc_descriptor): Fix warning.
+
+       * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
+       passed when a valuetype is expected.
+
+       * object.c (mono_unhandled_exception): Only set the exit code if the
+       exception happens in the main thread. Fixes thread5.exe.
+
+       * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
+       invalid names. Fixes #58047.
+
+2004-05-03  Jackson Harper  <jackson@ximian.com>
+
+       * assembly.c: This line was committed accidently and is unneeded.
+       
+2004-05-03  Jackson Harper  <jackson@ximian.com>
+
+       * icall.c: Add new icall for Assembly::LoadWithPartialName
+       * assembly.c/.h: new function that probes the GAC to load partial
+       assembly names by Paolo Molaro.
+       
+2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
+       * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
+       (type_get_fully_qualified_name): Added PublicKeyToken when building a
+       full type name.
+
 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * appdomain.c: fixed check for 'neutral' culture and removed warning.