2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / metadata / ChangeLog
index 67f823f51e84cdd965c5ed8a150f8c850a6e42d7..d181478df676a4c7c748e3a3f5f638c8ae00dc9e 100644 (file)
@@ -1,5 +1,507 @@
+2005-01-31  Martin Baulig  <martin@ximian.com>
+
+       * metadata.c (mono_metadata_has_generic_params): New public
+       function; checks whether something is a generic method.
+
+Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * appdomain.c: fix infinite recursion when adding assemblies.
+
+2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * object.c: Fix small typo to return all items for Environment.
+       GetCommandLineArgs.
+
+Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
+       reflection.c: more domain and assembly-unload related fixes
+       and memory leaks plugs.
+
+2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
+
+       * class.c loader.c security.c loader.h process.c threads.c mono-debug-debugger.c profiler.c marshal.c rand.cpedump.c: Fix 64 bit warnings.
+
+2005-01-29  Ben Maurer  <bmaurer@ximian.com>
+
+       * loader.c (mono_method_signature): Make this method lazy
+       (mono_get_method_from_token): Don't computate the signature here.
+
+       Doing this saves quite a bit of memory. I got 90 kb on starting up
+       monodoc. It should also save some disk reads on startup.
+
+       * *: MonoMethod->signature might be NULL now. You *MUST* use
+       mono_method_signature.
+
+2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
+
+       * object.c (mono_runtime_get_main_args): Return an array from the
+       current domain here. Fixes #71938.
+
+Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * monitor.c: formatting changes to comply with the
+       mono coding style and remove #ifdefs from the code.
+
+Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * metadata.c, private.h: remove some unneeded data
+       and use a more compact representation for table schemas.
+
+Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
+       to get a better distribution in hash tables.
+       * *.c: use mono_aligned_addr_hash() where appropriate.
+       * assembly.c: make var static.
+
+2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
+
+       * domain-internals.h: Put MonoJitInfo on a diet.
+
+       * domain.c: Fix a warning.
+
+Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * gc.c: rework the gc handles code to reuse handles
+       when freed.
+
+Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * domain.c: fixed long standing bug in mono_string_equal() which
+       was brought to light with the ldstr changes.
+
+2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * reflection.c: Remove warning by adding missing include for marshal.h
+
+Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * domain.c, object.c: change the ldstr_table to hold
+       MonoString* as keys: makes the runtime isinterned lookup
+       faster and simplifies memory management.
+
+2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
+       * icall.c: Renamed GetEnvironmentVariable so internal* so it was
+       possible to add imperative security checks before calling the icall.
+       * reflection.c: Return security attributes on the original MonoMethod
+       (and not the wrapped one). This fix permissions on icalls.
+
+2005-01-25  Dick Porter  <dick@ximian.com>
+
+       * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
+       the check for mktime() support actually test the mktime() return
+       value.  "Fixes" bug 71682, though the output is still different to
+       MS.
+
+2005-01-25  Martin Baulig  <martin@ximian.com>
+
+       * class.c (mono_class_is_assignable_from): Make this work for
+       generic instances.
+
+2005-01-24  Ben Maurer  <bmaurer@ximian.com>
+
+       * marshal.c (mono_string_utf8_to_builder)
+       (mono_string_builder_to_utf16): We might not have ownership of the
+       string. In thise case, we need to create a new buffer.
+
+       * object-internals.h (mono_stringbuilder_capacity): sb->str might
+       be null, in which case, use the default capacity.
+
+Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
+       GC events to the profiler.
+
+Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
+       if you don't want the GC to run.
+
+Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
+       start providing a GC API and keeping different implementations in
+       their own file.
+       * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
+
+2005-01-22  Ben Maurer  <bmaurer@ximian.com>
+
+       * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
+       mmap rather than allocating a huge buffer.
+       (mono_debug_close_mono_symbol_file): Free the buffer allocated
+       above.
+
+2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
+       and CheckExecutionRights.
+       * reflection.c|h: Keep the index of the declarative security to be 
+       used, instead of the pointer, when AOT compiler is used. Also add 
+       class initialization when requesting demands.
+       * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
+       CheckExecutionRights. Both properties are now FALSE by default, and
+       unmodifiable, unless the --security option is used.
+
+Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
+       reflection.c: properly refcount images and assemblies, many leaks fixed.
+
+2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * threadpool.c: increase the timeout for threads in the thread pool to
+       10s.  Fixes bug #67159.
+
+2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
+
+       * class-internals.h: Sun's compiler insists on explicit
+       signed on bit fields to handle then correctly.
+
+2005-01-19  Miguel de Icaza  <miguel@ximian.com>
+
+       * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
+       Make the size of the array fit only the number of invalid path
+       chars that we have.
+
+       * class.c (_mono_class_get): Improve the error reporting when a
+       class referenced is not found, to assist debugging. 
+
+Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * threads.c: fix off-by-one error.
+       * domain.c: free data allocated in the domain.
+
+2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
+
+       * reflection.c (mono_method_body_get_object): Fill out exception info
+       as well.
+
+       * object-internals.h: Add MonoReflectionExceptionHandlingClause 
+       structure.
+       
+2005-01-19  Martin Baulig  <martin@ximian.com>
+
+       * loader.c (mono_get_method_constrained): Make this work again.
+
+2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
+
+       * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
+       guint16 to match the managed side.
+
+       * reflection.c (mono_reflection_body_get_object): Fill out local
+       variables array.
+
+       * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
+       as well.
+
+       * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
+       'local_var_sig_token'.
+
+2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
+
+       * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
+       System.Drawing.
+
+       * reflection.c (mono_method_body_get_object): Handle abstract and
+       runtime methods.
+
+Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * marshal.c, loader.c, class-internals.h, reflection.c:
+       store the emthod data for a wrapper in an array instead of a list.
+
+Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * marshal.c: change the code to allocate memory more
+       conservatively for method wrappers.
+
+Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
+       fields from MonoClass to the marshal info structure where they belong.
+
+Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * class.c, object.c, class-internals.h, marshal.c: rearrange
+       some fields and tweak some types to lower memory usage.
+
+2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
+
+       * threads.c (signal_thread_state_change): Handle the case when the
+       target thread is the current thread.
+
+       * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
+
+       * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
+       emit_ptr_to_object_conv. 
+
+       * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
+       marshalling. Fixes #71352.
+
+Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * metadata.h, blob.h: move table enum to blob.h so it can be included
+       in any header.
+       * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
+       cut the size of MonoImage/MonoDynamicImage.
+
+2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
+
+       * profiler.c (mono_profiler_install_simple): Fix default arguments.
+
+Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * reflection.c, reflection.h, icall.c: add a function to check
+       if an attribute type is defined for a metadata object.
+
+2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
+
+       * object-internals.h: Added some needed fields from StringBuilder class.
+       * marshal.c: Set the maxCapacity when creating a StringBuilder.
+
+2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
+
+       * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
+       threads before shutting down the runtime.
+
+       * threads.c (mono_thread_suspend_all_other_threads): New helper function.
+
+Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * object-internal.h, threads.c: implement stacksize and 
+       parameterized thread start functionality (requires
+       matching corlib). Marked broken code for later removal.
+
+2005-01-12  Martin Baulig  <martin@ximian.com>
+
+       * class-internals.h (MonoGenericClass): Moved the `initialized'
+       flag to MonoDynamicGenericClass, removed `init_pending'.
+       (MonoGenericInst): Added `is_reference' flag.
+
+2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
+
+       * reflection.c (mono_image_create_pefile): Only set the pe_offset
+       inside the MSDOS header. Fixes #71201.
+
+       * gc.c (mono_gc_cleanup): Handle the case when this is called from the
+       gc thread.
+       (mono_domain_finalize): Ditto.
+
+2005-01-12  Martin Baulig  <martin@ximian.com>
+
+       * class.c (mono_get_shared_generic_class): Use the cache for
+       non-dynamic generic classes.
+
+       * class-internals.h (mono_class_create_generic_2): Removed
+       function prototype, this function is now static inside class.c.
+
+       * class.c (mono_class_create_generic_2): Made this static, only
+       call it from mono_class_init() and mono_class_setup_parent().
+       (collect_implemented_interfaces_aux): Call mono_class_init() on
+       the interfaces we collect.
+       (mono_class_setup_vtable): Call mono_class_init (class->parent).
+
+2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
+
+       * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
+       it a real thread handle.
+
+       * domain-internals.h: Move exvar_offset from MonoJitInfo to 
+       MonoJitExceptionInfo, since each catch clause needs its own variable.
+       
+2005-01-11  Dick Porter  <dick@ximian.com>
+
+       * image.c (mono_pe_file_open): New variant on mono_image_open()
+       that does not set up the CLI metadata; used for FileVersionInfo so
+       it can get the data for windows binaries too.
+       
+       * process.c (process_read_string_block): Don't read off the end of
+       the StringTable block.
+
+       These both fix bug 70766.
+
+Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
+
+       * gc.c: set some fields to NULL at GC cleanup time.
+       * threads.c: if we quit the main thread, call exit ().
+
+2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
+
+       * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
+
+Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * threads.h, threads.c, object.c: added accessor and settor for
+       main_thread. Handle it specially when exiting from it: wait
+       for other foreground threads to exit.
+
+Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * process.c, verify.c: remove some bloat.
+
+2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
+
+       * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
+       the calling convention to cdecl under win32.
+
+2005-01-08  Ben Maurer  <bmaurer@ximian.com>
+
+       * object.c (mono_object_get_size): New function to get the size of
+       an object instance.
+
+       * profiler.c (simple_allocation): Use above.
+
+2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
+       ves_icall_System_AppDomain_getRootDomain (as it's not required to
+       get an appdomain by it's id and we can't assume the root's id is 0).
+       * domain-internals.h: Change the function prototype to match.
+       * icall.c: Change the icall table for AppDomain.
+
+2005-01-08  Miguel de Icaza  <miguel@ximian.com>
+
+       * locales.c (string_invariant_compare_char): Only compute
+       GUnicodeTypes in the case where we need them.  Test for ordinality
+       first and return if so.
+
+       From the commit:
+
+               /*
+                * FIXME: here we must use the information from c1type and c2type
+                * to find out the proper collation, even on the InvariantCulture, the
+                * sorting is not done by computing the unicode values, but their
+                * actual sort order.
+                */
+
+Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * loader.c: for P/Invoke methods, allow the "Internal" shared
+       library name to refer to the calling process symbol namespace.
+
+2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * Makefile.am: Add the security manager to the build.
+       * security-manager.c|h: New. Initialization of the security manager.
+
+2005-01-07  Dick Porter  <dick@ximian.com>
+
+       * threads.c: 
+       * monitor.c: Update thread state during Monitor and WaitHandle
+       waits.  Fixes bug 71031.
+
+2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
+
+       * reflection.c (property_encode_signature): Correctly handle when the
+       property has no methods.
+
+2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
+
+       * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
+       
+       * reflection.c (reflection_methodbuilder_from_method_builder): Copy
+       fields from mb, not rmb. Fixes #71017.
+
+       * marshal.c (emit_ptr_to_str_conv): Add support for 
+       ByValTStr -> string conversion. Fixes #71015.
+
+       * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
+
+       * mempool.c (mono_mempool_contains_addr): New helper function.
+
+2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
+
+       * metadata.c (mono_metadata_compute_size): Fix size calculation of
+       HasSematics encoded fields.
+       
+       * metadata.c (mono_type_to_unmanaged): Improve error message for 
+       invalid string marshalling.
+
+       * metadata.c: Fix warnings.
+       
+Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
+       profiler support.
+
+2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
+
+       * domain.c object.c domain-internals.h: Revert part of r38077 since the
+       keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
+       tests.
+
+2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
+       so methods containing these can be AOTed.
+
+2005-01-03  Martin Baulig  <martin@ximian.com>
+
+       * loader.c (find_method): Removed the hack for generic instances.
+       (method_from_memberref): If our parent is a generic instance, pass
+       its generic type definition to find_method() and then inflate the
+       method.
+       (mono_get_method_constrained): Pass the generic type definition to
+       find_method() and inflate the method later.
+
+       * class-internals.h (MonoStats): Added `generic_class_count'.
+
+       * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
+       Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
+
+       * reflection.c (mono_custom_attrs_from_params): Don't ignore
+       generic type definitions.
+
+2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
+
+       * loader.c icall.c: Fix warnings.
+
+2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
+
+       * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
+       blittable types. Fixes #70864.
+
+2004-12-29  Martin Baulig  <martin@ximian.com>
+
+       * icall.c
+       (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
+
+       * reflection.c (mono_method_get_object): Create a
+       "System.Reflection.MonoGenericMethod" for inflated methods; don't
+       call mono_get_inflated_method().
+
+       * class-internals.h (MonoStats): Added `inflated_method_count_2'.
+
+2004-12-27  Martin Baulig  <martin@ximian.com>
+
+       * class-internals.h (MonoMethod): Added `is_inflated' flag.
+       (MonoMethodInflated): Added `inflated' field.
+
+       * class.c (mono_class_inflate_generic_method): Don't really
+       inflate the method here; just set the `is_inflated' flag in the
+       MonoMethod.
+       (mono_class_get_inflated_method): Actually inflate the method here
+       if it's not already inflated; we use the MonoMethodInflated's new
+       `inflated' field as a cache.
+
+2004-12-26  Martin Baulig  <martin@ximian.com>
+
+       * class.c
+       (inflate_generic_class): Moved some code out of inflate_generic_type().
+       (mono_class_inflate_generic_method): If we're already inflated,
+       inflate the context and use the declaring method; ie. make sure
+       the declaring method of an inflated method is always the generic
+       method definition.
+       (mono_class_create_from_typedef): Create
+       `class->generic_container->context->gclass'.
+
 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
 
+       * metadata-internals.h, marshal.c, reflection.c: More
+       MonoGHashTable->GHashTable.
+
        * domain-internals.h, class.c: Change MonoGHashTable's into
        GHashTables for some cases where no gc stuff is used