1 2008-06-11 Zoltan Varga <vargaz@gmail.com>
3 * reflection.c (resolve_object): Inflate the inst with the context for
4 FieldOnTypeBuilderInst. Fixes #399010.
6 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
8 * reflection.c (mono_image_get_field_on_inst_token): Don't
9 inflate the field to encode it's signature. If it's a
10 VAR or MVAR it should stay that way in the signature.
13 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
15 * reflection.c (resolve_object): Release memory of inflated types.
17 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
19 * loader.c (mono_method_get_signature_full): Remove assert about
20 loading a methodspec to a generic method. We have such methods, such as
21 System.Threading.Interlocked::CompareExchange<T>.
22 This assert was removed since it crashes the verifier when it checks
23 methods calling CompareExchange<T>.
25 2008-06-10 Marek Safar <marek.safar@gmail.com>
27 * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
28 of Type array and not MonoType.
30 2008-06-10 Marek Habersack <mhabersack@novell.com>
32 * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
35 2008-06-10 Martin Baulig <martin@ximian.com>
37 * debug-mono-symfile.h
38 (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6. There were no
39 changes to the file format, but we were generating incorrect
40 source file indices in the line number table due to a bug, which
41 made backtraces report an incorrect source file.
43 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
45 * mono-debug.c: Moved mono_debug_free_method_jit_info from
46 mini/debug-mini.c to here.
48 * mono-debug.c (il_offset_from_address): Free memory from find_method.
50 * mono-debug.h: Export mono_debug_free_method_jit_info, users should
51 use it to release structs returned by mono_debug_find_method.
53 2008-06-10 Zoltan Varga <vargaz@gmail.com>
55 * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
56 since it needs to set method->slot for all interface methods.
58 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
60 * class-internals.h: Forgot to add.
62 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
64 * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
66 * reflection.c (lookup_custom_attr): Added a MonoImage argument.
67 Lookup the custom attributes from property_hash.
69 * reflection.c (mono_save_custom_attrs): Save the custom attributes
70 in property_hash. Allocate all data using the image mempool.
72 * reflection.c: Removed dynamic_custom_attrs. Changed all checks
73 for dynamic_custom_attrs to checks if the image is dynamic.
75 2008-06-09 Zoltan Varga <vargaz@gmail.com>
77 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
80 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
81 runtime functions while holding the domain assemblies lock.
83 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
85 * verify.c: Reapplied the last bit of the reverted changes.
87 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
89 * verify.c: Reapplied more of the reverted changes.
91 2008-06-09 Martin Baulig <martin@ximian.com>
93 * debug-mono-symfile.c (load_symfile): Check the major version
94 first; if it's wrong, don't print the minor version in the error message.
96 2008-06-09 Zoltan Varga <vargaz@gmail.com>
98 * appdomain.c (set_domain_search_path): Make this use the domain assemblies
99 lock instead of the domain lock to avoid deadlocks, since the thread might
100 already hold the loader lock.
102 * threads.c (start_wrapper): Call mono_monitor_init_tls ().
103 (mono_thread_attach): Ditto.
105 * monitor.c: Use a TLS variable for holding the current thread id instead
106 of calling pthread_self ().
107 (mono_monitor_init_tls): New internal function to initialize the TLS
109 (mono_monitor_try_enter_internal): Put the owner == id check after the
112 * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
113 missed optimizations when using gcc-4.3.
115 2008-06-08 Rodrigo Kumpera <rkumpera@novell.com>
117 * reflection.c (mono_dynamic_image_free): Free the memory
118 used by MonoGenericParam in MonoDynamicImage::gen_param.
120 * reflection.c (mono_reflection_setup_generic_class): Allocate
121 container from mempool.
123 * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
124 container from mempool.
126 2008-06-07 Zoltan Varga <vargaz@gmail.com>
128 * threads.c (mono_set_pending_exception): New internal function to set the
129 pending exception of the current thread.
130 (mono_thread_get_and_clear_pending_exception): Check for
131 thread->pending_exception as well.
133 * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
135 * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
136 it can trigger a collection.
138 2008-06-06 Martin Baulig <martin@ximian.com>
140 Merged the `debugger-kahalo' branch.
143 (MONO_DEBUGGER_VERSION): Bumped to 72.
145 * debug-mono-symfile.h
146 (MonoSymbolFileMethodIndexEntry): Removed.
147 (MonoSymbolFileMethodEntry): New public typedef.
148 (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
149 (MonoSymbolFileSourceEntry): Remove everything except `index' and
151 (MonoSymbolFileMethodEntry): Removed.
152 (MonoSymbolFileLexicalBlockEntry): Removed.
153 (MonoSymbolFileLineNumberEntry): Removed.
154 (MonoDebugLexicalBlockEntry): Removed.
155 (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
156 removed `num_il_offsets' and `il_offsets'.
157 (MonoSymbolFile): Replace `version' with `major_version' and
159 (MONO_SYMBOL_FILE_VERSION): Replace with
160 `MONO_SYMBOL_FILE_MAJOR_VERSION' and
161 `MONO_SYMBOL_FILE_MINOR_VERSION'.
163 * debug-mono-symfile.c
164 (mono_debug_symfile_lookup_location): Add support for the new line
167 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
169 * metadata.c (free_generic_class): Release the inflated
170 MonoClass of dynamic generic classes if it's not a generic
173 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
175 * verify.c: Reapplied more of the reverted changes.
177 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
179 * reflection.c (lookup_custom_attr): Clean the cached flag or
180 nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
183 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
185 * verify.c: Reapplied a small part of the reverted changes.
187 2008-06-07 Zoltan Varga <vargaz@gmail.com>
189 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
191 * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was
192 previously in managed code.
193 (mono_monitor_exit): Ditto.
194 (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
196 * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
197 the managed definition.
199 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
201 * verify.c: Revert changes to see if it helps with weird buildbot crashes.
203 2008-06-06 Zoltan Varga <vargaz@gmail.com>
205 * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
207 * monitor.c: Add some micro optimizations.
209 * icall.c (type_from_typename): Handle 'bool'.
211 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
213 * verify.c: Implement constructor verification per P III 1.8.1.4.
216 2008-06-06 Zoltan Varga <vargaz@gmail.com>
218 * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
219 holding the assemblies lock here too.
221 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
223 * verify.c: Kill stack_top function.
225 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
227 * verify.c: Kill stack_get function.
229 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
231 * verify.c (mono_method_verify): Last change broke the build. Fixed.
233 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
235 * verify.c (verify_type_compatibility_full): Make SZARRAY checks
238 * verify.c (mono_method_verify): Inflate params and locals to avoid
239 mismatch when checking for compatibility.
241 2008-06-05 Jonathan Chambers <joncham@gmail.com>
243 * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
244 Length prefix should be size in bytes. Fix bug #339530.
246 * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
247 Length prefix should be size in bytes. Fix bug #339530.
249 Code is contributed under MIT/X11 license.
251 2008-06-05 Bill Holmes <billholmes54@gmail.com>
253 * decimal.c: Adding MSVC implementation to my_g_bit_nth_msf.
255 Contributed under MIT/X11 license.
257 2008-06-05 Martin Baulig <martin@ximian.com>
259 * mono-debug-debugger.c
260 (mono_debugger_check_breakpoints): Reflect latest runtime changes.
262 2008-06-05 Zoltan Varga <vargaz@gmail.com>
264 * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
265 while holding the assemblies lock to prevent deadlocks. Handle the case
266 where the search hook returns NULL but the assembly was still loaded.
269 * appdomain.c (set_domain_search_path): Acquire the domain lock since we
272 2008-06-05 Andreas Färber <andreas.faerber@web.de>
274 * boehm-gc.c: Add DTrace probes gc-{begin,end}.
275 * Makefile.am (pedump_LDADD): Post-process object files and
276 add dtrace-generated object file, if necessary.
278 Code is contributed under MIT/X11 license.
280 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
282 * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
284 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
286 * class.c (mono_type_get_full): Add a work-around for generic type definitions.
288 2008-06-04 Mark Probst <mark.probst@gmail.com>
290 * threads.c: Try to free everything from the delayed free table
291 when shutting down threads, and set the variable to NULL after the
292 table is freed so that calling
293 mono_thread_hazardous_try_free_all() when shutting down the root
294 domain doesn't crash.
296 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
298 * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
299 the caller if resulting type was inflated.
301 * class.c (mono_class_create_from_typespec): Free the MonoType if it
304 * class.c (mono_type_get_full): Free the MonoType if it was inflated.
307 2008-06-04 Zoltan Varga <vargaz@gmail.com>
309 * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
312 * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume
313 (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
316 2008-06-04 Mark Probst <mark.probst@gmail.com>
318 * domain.c, domain-internals.h: The JIT infos are now freed by the
319 JIT info table code. They are freed immediately if there only a
320 single JIT info table in circulation. If there is more, the free
321 is delayed via a queue.
323 * threads.c, threads-types.h: New hazard pointer function for
324 freeing all freeable delayed items in one sitting.
326 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
328 * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
330 * reflection.c (typebuilder_setup_properties): Same.
332 * reflection.c (typebuilder_setup_events): Same.
334 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
336 * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
337 and use it for allocating memory.
339 * reflection.c (mono_marshal_spec_from_builder): Same.
341 * reflection.c: Change code to use new signatures.
343 * metadata.c (mono_metadata_type_dup): Add a FIXME note.
345 2008-06-03 Zoltan Varga <vargaz@gmail.com>
347 * decimal.c (rescale128): Put back one line which was accidently commented
350 * decimal.c (rescale128): Disable the code added by the last patch, as it seems
353 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
355 * reflection.c (mono_reflection_generic_class_initialize): Name must
356 be always malloc'ed so we can free it later on. Do this for field, property
359 * metadata.c (free_generic_class): Free field, property and event names.
361 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
363 * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
366 * reflection.c (typebuilder_setup_fields): Same.
368 2008-06-03 Zoltan Varga <vargaz@gmail.com>
370 * decimal.c (rescale128): Optimize this function a bit more.
372 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
374 * metadata.c (free_generic_class): Release some memory from
377 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
379 * reflection.c (mono_image_get_generic_field_token): No reference
380 to name is kept, free it.
382 * reflection.c (mono_reflection_generic_class_initialize): Free
383 more memory of the inflated field.
385 2008-06-03 Zoltan Varga <vargaz@gmail.com>
387 * decimal.c (mono_decimalDiv): Moved equality checks here from managed
390 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
392 * reflection.c (mono_dynamic_image_free): Release memory used by
393 MonoDynamicImage::array_methods elements.
395 * reflection.c (assembly_add_win32_resources): Release memory after
398 2008-06-02 Zoltan Varga <vargaz@gmail.com>
400 * decimal.c (log2_32): Use an optimized version for this function too.
402 * decimal.c (log2_64): Fix this on 32 bit machines.
404 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
406 * class.c (mono_dup_array_type): Implement allocation using a mempool.
408 * class.c (mono_metadata_signature_deep_dup): Same.
410 * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
413 * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
415 * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
417 * metadata-internals.h: Added mono_metadata_signature_dup_full.
419 * class-internals.h: Update signatures to take a MonoMemPool.
421 2008-06-02 Dick Porter <dick@ximian.com>
423 * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage):
425 System.ComponentModel.Win32Exception.W32ErrorMessage, using the
426 FormatMessage API to get the error text. Fixes bug 321827.
428 2008-06-02 Zoltan Varga <vargaz@gmail.com>
430 * decimal.c: Add some micro optimizations to make decimal operations faster.
432 2008-06-01 Rodrigo Kumpera <rkumpera@novell.com>
434 * reflection.c (method_encode_clauses): Take a mempool
435 as parameter and use it to allocate the clause array.
437 * reflection.c (mono_image_get_field_on_inst_token): Free
438 the inflated type after encoding it.
440 * reflection.c (mono_dynamic_image_free): Free each element
441 of MonoDynamicImage::gen_params.
443 * reflection.c (reflection_methodbuilder_to_mono_method):
444 Allocate the generic param array from the mempool.
445 Allocate signature params from the mempool.
447 * reflection.c (mono_reflection_generic_class_initialize):
448 Free inflated fields after been used.
450 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
452 * icall.c: Reapply the memory leak fixes as they no
453 longer make mono crash.
455 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
457 * reflection.c (mono_type_get_object): Don't store the suplied
458 MonoType with type_hash. A caller which pass a type that
459 was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
460 might end with a pointer to freed memory.
461 The solution is to use byval_arg or this_arg from the associated
462 MonoClass of the supplied type.
464 2008-05-29 Zoltan Varga <vargaz@gmail.com>
466 * icall.c: Revert the rest of the last change as it breaks the build too.
468 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
470 * icall.c: Revert a leak fix as it's breaking the build.
472 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
474 * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
476 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
478 * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
480 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
482 * icall.c: Fix some memory leaks.
484 2008-05-29 Dick Porter <dick@ximian.com>
486 * threadpool.c (mono_thread_pool_remove_socket): Always remove the
487 async socket operations from the pending list when a socket
488 closes. Leaving it until the threadpool services the event
489 exposes a race condition when a socket descriptor is reused.
492 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
494 * object.c: Fix negative index check for array alocation.
496 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
498 * icall.c, marshal.c: Delegate wrappers should skip visibility.
499 This check is performed by the verifier for IL created delegates
500 and by Delegate::CreateDelegate for programatically created ones.
503 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
505 * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
506 Fix code to use mono_array_size_t instead of int.
508 Based on patch by Luis F. Ortiz.
509 Contributed under X11 license.
510 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
512 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
514 * icall.c: Added ves_icall_System_Array_GetLongLength and
515 ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
518 * icall.h: Export both new functions.
520 Based on patch by Luis F. Ortiz.
521 Contributed under X11 license.
522 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
524 2008-05-28 Martin Baulig <martin@ximian.com>
526 The debugger now requires exactly r103463.
528 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
529 This version is not supported by the debugger, wait for 72.
531 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
533 * object.h: Changed array related functions to use
534 mono_array_size_t instead of guint32. Forgot to commit this file.
536 Patch by Luis F. Ortiz.
537 Contributed under X11 license.
538 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
541 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
543 * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
544 don't define it. Use the number literal instead.
546 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
548 * icall.c: Changed array related functions to use
549 mono_array_size_t instead of guint32.
551 * icall.c (ves_icall_System_Array_GetLength): Check for length
552 overflow under MONO_BIG_ARRAYS.
554 Based on patch by Luis F. Ortiz.
555 Contributed under X11 license.
556 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
558 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
560 * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
562 Based on patch by Luis F. Ortiz.
563 Contributed under X11 license.
564 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
566 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
568 * object.c, object.h: Changed array related functions to use
569 mono_array_size_t instead of guint32.
571 Patch by Luis F. Ortiz.
572 Contributed under X11 license.
573 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
575 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
577 * object.h: Introduced mono_array_size_t typedef. This must be used
578 in all places an array length is expected. This is 64bits wide if
579 MONO_BIG_ARRAYS is enabled.
581 Patch by Luis F. Ortiz.
582 Contributed under X11 license.
583 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
585 2008-05-27 Zoltan Varga <vargaz@gmail.com>
587 * security-manager.c class.c: Set the class exception info by calling
588 mono_class_set_failure ().
590 * class.c (mono_class_get_exception_data): New accessor function.
591 (mono_class_set_failure): Store exception_data in the property hash.
593 * class-internals.h (struct _MonoClass): Store 'exception_data' outside
594 the struct as a property.
596 * loader.c (mono_get_method_full): Store the lookup result for method
597 tokens in method_cache, the others in methodref_cache to decrease the memory
598 usage of hash tables.
600 * image.c (mono_image_close): Destroy method_cache and methodref_cache.
601 (mono_image_init): method_cache is lazy inited now.
603 * metadata-internals.h (struct _MonoImage): Change method_cache to
604 a MonoValueHashTable, add a separate methodref_cache.
606 2008-05-27 Eyal Alaluf <eyala@mainsoft.com>
608 * number-formatter.h: Fix tables to avoid arithemtic overflow in
609 Double.ToString as exposed by Bug #383531.
611 2008-05-26 Zoltan Varga <vargaz@gmail.com>
613 * number-formatter.h: Make some tables static.
615 * class.c (mono_method_set_generic_container): New accessor function.
616 (mono_method_get_generic_container): Ditto.
618 * class-internals.h (struct _MonoMethod): Remove rarely used
619 'generic_container' field, store it in the property hash instead. Add
620 'is_generic' boolean field instead.
622 * image.c (mono_image_init): Initialize property_hash.
623 (mono_image_close): Destroy property_hash.
625 * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
626 hold rarely used fields of runtime structures belonging to this image.
628 * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
629 to get/set method->generic_container.
631 * loader.c (mono_get_method_from_token): Avoid loading the method header for
634 2008-05-25 Zoltan Varga <vargaz@gmail.com>
636 * class.c (mono_class_inflate_generic_method_full): Don't increase
637 mono_stats.inflated_method_count for methods found in the cache.
639 * threads.c (mono_thread_request_interruption): Add a comment about
642 2008-05-24 Zoltan Varga <vargaz@gmail.com>
644 * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
645 interface_offsets_packed table.
647 * class.c (mono_class_init): Remove some dead code.
649 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
650 mono_class_setup_vtable () when CAS is active to detect security problems.
652 2008-05-23 Rodrigo Kumpera <rkumpera@novell.com>
654 * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
656 * verify.c (mono_delegate_signature_equal): Don't compar number of generic
657 parameters as it's irrelevant for delegate checking.
659 2008-05-23 Zoltan Varga <vargaz@gmail.com>
661 * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
663 * class.c (mono_class_init): Control the creation of a generic vtable using
664 a global which is true by default, but set to false by the runtime startup code.
666 * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
667 Disabled for now since it breaks the embedding API.
668 Move the setup of class->methods for arrays to mono_class_setup_methods ().
669 (mono_class_setup_methods): Add a memory barrier.
671 * object.c (mono_class_create_runtime_vtable): Add code to handle the case
672 when mono_class_init () doesn't compute the generic vtable.
674 2008-05-23 Massimiliano Mantione <massi@ximian.com>
675 * profiler.c: Added mono_profiler_install_statistical_call_chain,
676 mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
677 to support call chains (backtrace) in the stat profiler.
678 * profiler.c, profiler-private.h: Likewise.
680 2008-05-22 Mark Probst <mark.probst@gmail.com>
682 * generic-sharing.c: Init generic class when a method of it is
683 requested via a runtime generic context.
685 2008-05-22 Zoltan Varga <vargaz@gmail.com>
687 * class.c (mono_class_init): Add a comment about trying to avoid calling this.
689 * reflection.c (mono_type_get_object): Add a FIXME.
691 * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
693 * class.c (mono_class_get_method_by_index): New helper function, returning an
694 entry in the class->methods array.
696 2008-05-21 Zoltan Varga <vargaz@gmail.com>
698 * class.c (mono_class_init): Only do the array optimization for szarrays.
699 Avoid creating a generic vtable for generic instances as well.
700 (mono_class_get_method_from_name_flags): Don't search in the metadata for
703 2008-05-21 Rodrigo Kumpera <rkumpera@novell.com>
705 * loader.c (mono_get_method_constrained): Inflate the signature
706 with class context. Fix #325283.
708 2008-05-21 Zoltan Varga <vargaz@gmail.com>
710 * object.c (mono_class_create_runtime_vtable): Add a comment.
712 * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
714 (setup_interface_offsets): Handle the case when this is called twice for arrays.
715 (mono_class_setup_vtable_general): Add an assert.
716 (mono_class_init): Avoid creating a generic vtable for arrays.
718 * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
719 here, let mono_class_init () do that.
721 * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
722 interfaces in mscorlib.
724 * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
725 interfaces. Add some comments.
726 (mono_class_init): Call mono_class_setup_methods () here since it is no
727 longer called by mono_class_setup_vtable ().
729 * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
730 not set in class->vtable.
731 (mono_class_create_runtime_vtable): Reenable the disabled code.
733 * object.c (mono_class_create_runtime_vtable): Disable the last change for
734 now as it causes some test failures.
736 * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
737 if using the vtable trampoline. Also remove some strange code which put the
738 generic methods themselves into the vtable slots. Remove the AOT init_vtable
739 stuff as it is no longer needed.
741 2008-05-19 Rodrigo Kumpera <rkumpera@novell.com>
743 * pedump.c: Give make --verify all option check code as well.
744 Using --verify code won't check for metadata now.
746 2008-05-19 Martin Baulig <martin@ximian.com>
748 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
751 (_mono_debug_using_mono_debugger): New global variable; it's set
752 directly by the debugger, so mono_debug_using_mono_debugger() also
753 works after attaching.
755 2008-05-18 Rodrigo Kumpera <rkumpera@novell.com>
757 * object.c (mono_class_create_runtime_vtable): Use memory barriers
758 as we do double checked locking on MonoClass::runtime_info and
759 MonoClassRuntimeInfo::domain_vtables.
761 2008-05-18 Zoltan Varga <vargaz@gmail.com>
763 * debug-helpers.c (print_field_value): Fix a warning.
765 2008-05-16 Zoltan Varga <vargaz@gmail.com>
767 * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
770 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
772 * class.c (mono_class_setup_vtable_general): Use memory barriers
773 as we do double checked locking on MonoClass::vtable.
775 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
777 * reflection.c (resolve_object): Inflate only if the generic context
778 is not null. Fixes #389886.
780 2008-05-15 Jonathan Chambers <joncham@gmail.com>
782 * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
785 Code is contributed under MIT/X11 license.
787 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
789 * class.c: Revert unrelated change.
791 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
793 * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
794 a generic instantiation, use mono_class_from_mono_type instead of playing
795 with MonoType directly.
797 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
799 * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
800 checks must ignore generic instantiations, so mono_class_has_parent is not
801 suitable. Fixes #390128.
803 2008-05-14 Zoltan Varga <vargaz@gmail.com>
805 * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
806 it to avoid registering tokens during metadata generation. Fixes #390023.
808 2008-05-14 Kornél Pál <kornelpal@gmail.com>
810 * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
813 Contributed under MIT/X11 license.
815 2008-05-14 Kornél Pál <kornelpal@gmail.com>
817 * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
818 even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
819 to fixup the EXE image.
820 (mono_cleanup): Use mono_close_exe_image.
821 (mono_close_exe_image): New function.
822 * image.c: Include "marshal.h".
823 (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
824 (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
825 counting when the image is loaded outside of mono_image_open_full. Set status
826 based on GetLastError.
827 * coree.c: Include required headers. Add init_from_coree.
828 (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
829 mono_assembly_open only when the image has vtfixups. Set init_from_coree.
830 (_CorExeMain): Set init_from_coree.
831 (CorExitProcess): Only call ExitProcess for now.
832 (CorBindToRuntimeEx): New stub implementation.
833 (CorBindToRuntime): New function.
834 (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
835 (MonoFixupExe): ILONLY executables require no fixups.
836 (mono_set_act_ctx): New function to set activation context.
837 (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.
838 * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
839 Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
840 mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
842 * domain-internals.h: Add mono_close_exe_image.
844 Contributed under MIT/X11 license.
846 2008-05-13 Rodrigo Kumpera <rkumpera@novell.com>
848 * metadata.c (mono_metadata_compute_size): Correctly calculate field
849 size for generic param and event tables. Fixes #388977.
851 2008-05-13 Zoltan Varga <vargaz@gmail.com>
853 * loader.c (mono_method_signature): Use memory barriers because of the double
854 checked locking pattern.
856 * threads.c (remove_and_abort_threads): Stop and wait for threads which are
857 aborting or aborted as well. Fixes #376391.
859 * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
860 existing runtime state in the Suspend handler during shutdown.
862 2008-05-12 Zoltan Varga <vargaz@gmail.com>
864 * threads.c (mono_thread_request_interruption): Add some FIXMEs.
866 * threads.c (mono_thread_suspend_all_other_threads): Add support for threads
867 which are starting up or shutting down.
869 * threads.c (mono_threads_set_shutting_down): Don't return a value since
870 this function never returns if the runtime is already shutting down.
872 * icall.c (ves_icall_System_Environment_Exit): Update after
873 mono_threads_set_shutting_down () signature change.
875 2008-05-09 Rodrigo Kumpera <rkumpera@novell.com>
877 * class.c: Added can_access_instantiation to verify if the instantiation
878 is visible. Fix access check for nested types as they returned TRUE
879 before doing type and generic instantiation visibility checks.
881 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
883 * reflection.c (mono_reflection_create_generic_class): The created type
884 must have a different container from its TypeBuilder. Otherwise they
885 will end sharing generic arguments, which is wrong.
887 Due to the sharing, making a generic instance of the created type using
888 the TypeBuider generic arguments resulted in the generic type definition
889 been returned, which is wrong as well.
891 As a bonus the code was leaking the type_params array. This memory should
892 be allocated from the image mempool.
894 This fixes bug #354047.
896 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
898 * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
899 to here as they are now used in assembly.c new code.
900 Added a skipverification flag to MonoAssembly.
901 New internal function mono_assembly_has_skip_verification.
903 * assembly.c: New function mono_assembly_has_skip_verification. It checks
904 if an assembly has a version 2.0 SkipVerification security attribute. Fixes
907 2008-05-07 Zoltan Varga <vargaz@gmail.com>
909 * object.c (mono_object_get_virtual_method): Inflate the resulting method if
910 needed. Fixes #387034.
912 * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
914 2008-05-06 Miguel de Icaza <miguel@novell.com>
916 * assembly.c (mono_assembly_load_reference): Prevent crash while
917 disassembling Silverlight 2.0 executables while we still do not
918 have GACed libraries.
920 2008-05-07 Zoltan Varga <vargaz@gmail.com>
922 * reflection.c: Special case generic type definitions as well. Fixes #383444.
924 2008-05-06 Zoltan Varga <vargaz@gmail.com>
926 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
927 of the dynamic case. Fixes #387404.
929 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
931 *verify.c (mono_verifier_is_class_full_trust): If under
932 verify_all and the verifier mode was not set, only
933 gac and corlib types are fulltrust. This makes --verify-all
934 usable to detect unverifiable code, which is the expected
937 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
939 * verify.h: Ops, commited the header with debug
942 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
944 * verify.c (merge_stack): Use the new value on unverifiable
947 * verify.c (verify_type_compatibility_full): Comparison
948 of nullable types can't use mono_class_is_assignable_from.
950 * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
951 that makes all verification errors be reported.
953 * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
956 2008-05-05 Robert Jordan <robertj@gmx.net>
958 * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
959 support for value types. See #386415.
961 * object.c: comments.
963 Code is contributed under MIT/X11 license.
965 2008-05-05 Martin Baulig <martin@ximian.com>
967 * debug-mono-symfile.h
968 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
969 for old pre-terrania symbol files.
971 2008-05-05 Andreas Färber <andreas.faerber@web.de>
973 * mono-config.c: Add ppc64 architecture.
975 Code is contributed under MIT/X11 license.
977 2008-05-05 Andreas Färber <andreas.faerber@web.de>
979 * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
980 PPC64 uses function descriptors as well.
982 Code is contributed under MIT/X11 license.
984 2008-05-04 Zoltan Varga <vargaz@gmail.com>
986 * object.c (compute_class_bitmap): Ignore literal static fields.
988 * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
989 var has an invalid format.
990 (describe_ptr): Add some sanity checks for the vtable.
991 (add_nursery_frag): Clear unused nursery fragments.
992 (major_collection): Clear all remaining nursery fragments.
994 2008-05-03 Robert Jordan <robertj@gmx.net>
996 * image.c, metadata-internals.h: add thunk_invoke_cache.
998 * marshal.c, marshal.h: implement
999 mono_marshal_get_thunk_invoke_wrapper ().
1001 * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
1003 Code is contributed under MIT/X11 license.
1005 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
1007 * verify.c (do_leave): Empty the stack.
1009 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
1011 * class.c (mono_class_is_assignable_from): Variance
1012 doesn't work between reference and value types. For example,
1013 given type C<T+>, C<int32> is not assignable to C<object>.
1014 Break the argument checking loop on first error.
1016 2008-05-02 Atsushi Enomoto <atsushi@ximian.com>
1018 * icall.c : base64_to_byte_array() needs some more strict
1019 check for sequence of '=' characters. Patch by Santa
1020 Marta (http://deee.g.hatena.ne.jp/santamarta).
1022 Contributed under MIT/X11 license.
1023 (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
1025 2008-05-02 Jonathan Chambers <joncham@gmail.com>
1027 * domain.c: Disable LoadLibrary support to fix Win32 build.
1029 Code is contributed under MIT/X11 license.
1031 2008-05-02 Zoltan Varga <vargaz@gmail.com>
1033 * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
1034 to help with cache behaviour.
1036 2008-05-01 Miguel de Icaza <miguel@novell.com>
1038 * appdomain.c (mono_domain_from_appdomain): Add new accessor
1041 2008-05-01 Zoltan Varga <vargaz@gmail.com>
1043 * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
1045 2008-05-01 Dick Porter <dick@ximian.com>
1047 * process.c (process_get_fileversion): Only pass 16 bits of
1048 language ID to VerLanguageName. Fixes bug 381204.
1050 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
1052 * verify.c (mono_method_verify): Fix the comparison
1053 operator for code bounds check.
1055 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
1057 * verify.c (mono_method_verify): Check the bounds of
1058 all access of the code array.
1060 2008-04-29 Kornél Pál <kornelpal@gmail.com>
1062 * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
1064 2008-04-28 Zoltan Varga <vargaz@gmail.com>
1066 * image.c (mono_image_strong_name_position): Fix return value when the rva is
1069 2008-04-28 Kornél Pál <kornelpal@gmail.com>
1071 * loader.c (mono_get_method_from_token, mono_method_signature): Add
1072 support for METHOD_IMPL_ATTRIBUTE_NATIVE.
1073 * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
1074 fixup main EXE images when using mono.exe for mixed-mode assembly support.
1075 * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
1077 * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
1078 runtime initialization from metadata.
1079 * assembly.c: Remove obsolete ceGetModuleFileNameA.
1080 (mono_set_rootdir): Use mono_get_module_file_name.
1081 (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
1083 * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
1084 * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
1085 * image.c (mono_cli_rva_image_map): Use MonoImage instead of
1086 MonoCLIImageInfo. Add support for module handles.
1087 (load_cli_header): Update mono_cli_rva_image_map signature.
1088 (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
1089 (mono_image_strong_name_position): Use mono_cli_rva_image_map.
1090 (mono_image_rva_map): Add support for module handles.
1091 (mono_image_ensure_section_idx): Add support for module handles.
1092 (mono_image_close): Add support for module handles.
1093 (do_load_header): Add support for module handles.
1094 (mono_image_open_from_module_handle): New function for internal use.
1095 (mono_image_open_full): Load normal images using LoadLibrary on Windows.
1096 (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
1097 (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
1099 (mono_image_fixup_vtable): New function for mixed-mode assembly support.
1100 * image.h: Add mono_image_fixup_vtable.
1101 * coree.c: New file for mscoree.dll functions and mixed-mode assembly
1103 * coree.h: New file.
1104 * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
1105 unsupported native code.
1106 (mono_marshal_set_callconv_from_modopt): New function splitted from
1107 mono_marshal_get_managed_wrapper.
1108 (mono_marshal_get_managed_wrapper): Use
1109 mono_marshal_set_callconv_from_modopt.
1110 (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
1111 * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
1112 * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
1113 that results in a deadlock when the runtime is loaded in _CorDllMain.
1114 * Makefile.am: Add coree.c and coree.h.
1116 Contributed under MIT/X11 license.
1118 2008-04-28 Mark Probst <mark.probst@gmail.com>
1120 * generic-sharing.c: Search for type arguments in array element
1123 2008-04-28 Mark Probst <mark.probst@gmail.com>
1125 * class-internals.h, generic-sharing.c: New, small runtime generic context.
1127 * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
1129 * object.c: Don't setup the RGCTX when the vtable is created,
1130 because we're setting it up lazily now.
1132 2008-04-26 Zoltan Varga <vargaz@gmail.com>
1134 * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix
1137 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
1139 * verify.c (verify_class_for_overlapping_reference_fields):
1140 If class is under fulltrust allow reference types to overllap
1141 if they have the same RVA.
1143 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
1145 * pedump.c: Added new flag valid-only, that makes the verifier
1146 behaves just like --security=validil. It won't fail type load
1147 due to unverifiable restrictions.
1149 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
1151 * class-internals.h (struct MonoMethod): Added a verification_success
1152 field to cache verifier executions. Reduced MonoMethod:slot size by
1155 2008-04-23 Zoltan Varga <vargaz@gmail.com>
1157 * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
1158 instead of a 'vt' argument to save an indirection and to allow these to be used
1160 (scan_vtype): New helper function to scan an area using a gc descriptor.
1161 (mono_gc_wbarrier_value_copy): Implement this.
1162 (handle_remset): Add support for REMSET_VTYPE.
1163 (find_in_remset_loc): Ditto.
1164 (mono_gc_base_init): Allow some debugging options to be controlled through the
1165 use of the MONO_GC_DEBUG env variable.
1166 (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
1167 (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
1169 2008-04-23 Martin Baulig <martin@ximian.com>
1171 * domain.c (mono_domain_create): Move the call to
1172 mono_debug_domain_create() down, after allocating the domain id.
1174 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
1176 verify.c (verify_class_for_overlapping_reference_fields): Skip
1177 static fields while verifying for overlapping fields as they
1178 don't matter at all.
1180 2008-04-23 Marek Habersack <mhabersack@novell.com>
1182 * domain-internals.h: added a declaration of
1183 mono_make_shadow_copy.
1185 * assembly.c (mono_assembly_open_full): shadow copying of
1186 assemblies moved to here, so that all the assemblies within the
1187 application domain's private binary directories can be
1188 processed. Fixes bug #380546
1190 * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
1191 mono_make_shadow_copy and made non-static. The decision whether
1192 to shadow-copy an assembly is made based on its location - it's
1193 copied if it's in one of the private application domain binary
1194 directories and its different to the target file in the shadow
1195 directory. Fixes bug #380546
1197 2008-04-22 Zoltan Varga <vargaz@gmail.com>
1199 * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
1201 * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
1204 * reflection.c (mono_image_create_token): Handle
1205 Method/ConstructorOnTypeBuilderInst.
1206 (resolve_object): Ditto.
1207 (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
1208 so it can be called from resolve_object. Also handle the case when the inflated
1209 class already has its methods setup.
1211 2008-04-21 Martin Baulig <martin@ximian.com>
1213 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
1215 2008-04-20 Geoff Norton <gnorton@novell.com>
1217 * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
1218 pointer dereference.
1220 2008-04-15 Marek Habersack <mhabersack@novell.com>
1222 * appdomain.c (try_load_from): if IOMAP is in effect, call the
1223 portability API to look up the assembly file. Fixes behavior in
1224 situations when the application has a bin/ directory, but the
1225 assembly search patch refers to Bin/ (and thus the requested file
1226 name is Bin/SomeLibrary.dll). Fixes bug #379888
1228 2008-04-15 Rodrigo Kumpera <rkumpera@novell.com>
1230 verify.c (mono_type_is_generic_argument): Extracted this check
1231 from a dozen places to here.
1233 verify.c: Fixed all issues related to boxing generic arguments
1234 and their constraints.
1236 2008-04-14 Rodrigo Kumpera <rkumpera@novell.com>
1238 verify.c (mono_class_interface_implements_interface): Fix win32 build.
1240 2008-04-14 Zoltan Varga <vargaz@gmail.com>
1242 * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
1243 isn't finished yet. Fixes #363447.
1245 2008-04-13 Zoltan Varga <vargaz@gmail.com>
1247 * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
1250 2008-04-13 Jb Evain <jbevain@novell.com>
1252 * domain.c: update the 2.1 profile versions.
1253 Merged from the Moonlight 2 branch.
1255 2008-04-12 Zoltan Varga <vargaz@gmail.com>
1257 * assembly.c (mono_assembly_load_from_full): Do the check for loading other
1258 mscorlibs for the non-refonly case as well.
1260 * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
1261 in mono_assembly_load_from_full (). Fixes #378924.
1263 2008-04-11 Geoff Norton <gnorton@novell.com>
1265 * icall.c: The global extern environ doesn't exist on Mac. We
1266 need to call NSGetEnviron instead.
1268 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
1270 verify.c: Add generic method constraint verification.
1272 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
1274 class.c (mono_class_inflate_generic_method_full): Add a long
1275 explanation to the is_mb_open hack. Remove the FIXME.
1277 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
1279 * verify.c (mono_method_verify): Mark all unknown opcodes
1280 as invalid. Mark jmp as unverifiable.
1282 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
1284 * verify.c: Add code to do type constraint verification on class instances.
1286 * verify.c (mono_verifier_verify_class): Use the type constraint
1289 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
1291 * class.c (mono_class_get_field_default_value): Don't pass cindex
1292 as hint to mono_metadata_get_constant_index. The local is not initialized
1293 and should contain garbage most of the time. This could only work
1296 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
1298 * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
1300 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
1302 * class-internals.h: Add generic_param_token to MonoClass::sizes union.
1304 * class.c (mono_class_from_generic_parameter): Save the token of the
1305 generic param in MonoClass::sizes.generic_param_token.
1307 * reflection.c (mono_custom_attrs_from_class): If the class type is
1308 VAR or MVAR retrieve the attributes of the generic param.
1310 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
1312 * class.c (mono_class_init): Do class verification if the verifier
1315 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
1317 * verify-internal.h: Added mono_verifier_verify_class.
1319 * verify.c: Added mono_verifier_verify_class. It checks for
1320 classes with explicit layout that have overlapping reference fields.
1322 * pedump.c: Init the verifier state prior to verification. Fixed
1323 command line arguments.
1325 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
1327 * Makefile.am: Added verify-internals.h, hopefully fix the build.
1329 2008-04-08 Zoltan Varga <vargaz@gmail.com>
1331 * verify-internals.h: Fix a warning.
1333 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
1335 * verify-internals.h: New header with the verifier configuration
1336 extracted from mini.c.
1338 * verify.c: Implemented the new functions exported by verify-internals.h.
1340 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
1342 * verify.c: Add proper verification of ckfinite.
1344 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
1346 * verify.c (do_conversion): Improved error message to something
1349 * verify.c (check_is_valid_type_for_field_ops): Fix to work
1350 with primitive types.
1352 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
1354 * verify.c: Added tail prefix checking. Marked icall
1357 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
1359 * verify.c: Fix the detection of branches to the middle
1362 2008-04-03 Rodrigo Kumpera <rkumpera@novell.com>
1364 * verify.c: Implemented verification of volatile. and
1365 unaligned. prefix. Check if a type is valid after retrieving it.
1367 2008-04-01 Dick Porter <dick@ximian.com>
1369 * process.c (process_get_fileversion): If there's no string block,
1370 set the file language to en_US. Fixes the other new part of bug
1373 2008-03-29 Rodrigo Kumpera <rkumpera@novell.com>
1375 * class.c: New functions mono_method_can_access_field_full and
1376 mono_method_can_access_method_full. They perform type visibility
1377 and type site check.
1379 * class-internal.h: Added exported functions.
1381 * verify.c: Use new functions to implement proper visibility checks.
1383 2008-03-29 Zoltan Varga <vargaz@gmail.com>
1385 * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
1387 2008-03-28 Dick Porter <dick@ximian.com>
1389 * process.c (process_get_fileversion): Use the first language ID
1390 we see, rather than insisting on an invariant language. Fixes bug
1393 2008-03-28 Zoltan Varga <vargaz@gmail.com>
1395 * reflection.c (calc_section_size): Use add_stream_zero to align the size of
1396 the streams to fix reading of invalid memory later.
1398 * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
1401 2008-03-26 Zoltan Varga <vargaz@gmail.com>
1403 * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
1404 (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
1406 2008-03-26 Massimiliano Mantione <massi@ximian.com>
1407 * threads.h: Added MonoThreadManageCallback type and
1408 mono_thread_set_manage_callback prototype
1409 * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
1410 (used to store the mono_thread_manage callback).
1411 * threads.c: Added mono_thread_set_manage_callback, and handle
1412 "MonoThread->manage_callback" in build_wait_tids.
1414 2008-03-26 Dick Porter <dick@ximian.com>
1416 * process.c (process_get_fileversion): Set FileVersionInfo strings
1417 to Empty when the resource doesn't have the particular info.
1420 2008-03-25 Rodrigo Kumpera <rkumpera@novell.com>
1422 * verify.c (mono_method_verify): Proper prefix validation.
1424 2008-03-25 Zoltan Varga <vargaz@gmail.com>
1426 * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
1427 itself in a separate argument instead of throwing them. Fixes #373448.
1429 * appdomain.c: Bump corlib version.
1431 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
1433 * verify.c: Implemented readonly prefix and verify controled mutability pointers.
1435 2008-03-20 Kornél Pál <kornelpal@gmail.com>
1437 * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
1440 2008-03-20 Mark Probst <mark.probst@gmail.com>
1442 * generic-sharing.c, class-internals.h: Code for putting
1443 reflection types into the runtime generic context.
1445 2008-03-19 Rodrigo Kumpera <rkumpera@novell.com>
1447 * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
1451 2008-03-17 Rodrigo Kumpera <rkumpera@novell.com>
1453 * verify.c (VerifyContext): Added instruction prefix data to the struct.
1455 * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
1457 * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
1459 * verify.c (do_cast): Let the result value keep the boxed status.
1461 * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
1463 2008-03-17 Jb Evain <jbevain@novell.com>
1465 * reflection.c: when running on a 2.0 runtime, emit
1466 unconditionally the #~ header version as 2.0, and the
1467 CLI header version as 2.5, for symmetry's sake with csc.
1469 2008-03-16 Zoltan Varga <vargaz@gmail.com>
1471 * class.c: Remove the unused cache_interface_offsets stuff.
1473 * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
1474 profiler.c: Fix warnings.
1476 2008-03-16 Mark Probst <mark.probst@gmail.com>
1478 * generic-sharing.c, class-internals.h: Support for putting
1479 methods into the runtime generic context.
1481 2008-03-16 Zoltan Varga <vargaz@gmail.com>
1483 * class.c (mono_class_setup_fields): Ignore calls made to this function for
1484 classes which are generic instances of not-yet finished typebuilders. Fixes
1487 * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
1489 2008-03-15 Zoltan Varga <vargaz@gmail.com>
1491 * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
1493 * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
1494 field, replace it with a hash table in MonoDynamicImage.
1496 * reflection.c (inflate_mono_method): Access the generic definition object from
1497 image->generic_def_objects instead of imethod->reflection_info.
1499 * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.
1501 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
1503 * image.c (mono_image_close): Move the dynamic image freeing code to a separate
1504 function in reflection.c so it is easier to keep in sync with the dynamic image
1507 * reflection.c (mono_dynamic_image_free): New internal function, extracted from
1508 mono_image_close ().
1510 2008-03-15 Mark Probst <mark.probst@gmail.com>
1512 * class.c (mono_class_generic_sharing_enabled): Disable generic
1513 sharing for all architectures except AMD64 and x86 to fix build.
1515 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
1517 * verify.c: Use the generic definition MonoGenericContext when available.
1518 Remove code for checking generics instance compatibility in favor of
1519 mono_class_is_assignable_from.
1521 2008-03-14 Mark Probst <mark.probst@gmail.com>
1523 * marshal.c, marshal.h, metadata-internals.h, image.c,
1524 wrapper-types.h: New wrapper for invoking a shared static method
1525 without having to pass the runtime generic context argument.
1527 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
1529 * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
1531 2008-03-14 Zoltan Varga <vargaz@gmail.com>
1533 * reflection.c (mono_image_get_field_on_inst_token): Add caching.
1535 * reflection.c (mono_image_get_field_on_inst_token): New helper function to
1536 create a token from a FieldOnTypeBuilderInst.
1537 (mono_image_create_token): Handle FieldOnTypeBuilderInst.
1538 (resolve_object): Ditto.
1540 * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
1541 mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
1543 2008-03-14 Martin Baulig <martin@ximian.com>
1545 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
1547 * debug-mono-symfile.h
1548 (MONO_SYMBOL_FILE_VERSION): Bump to 41.
1549 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
1551 2008-03-10 Martin Baulig <martin@ximian.com>
1553 * debug-mono-symfile.h
1554 (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
1555 `lexical_block_table_offset'.
1556 (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
1558 (MonoSymbolFile): Added `version'.
1561 (MonoDebugLexicalBlockEntry): Removed.
1562 (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
1565 * mono-debug.c (mono_debug_add_method): Don't compute lexical
1566 blocks here; the debugger now does this internally.
1568 2008-02-27 Martin Baulig <martin@ximian.com>
1570 * object.c (mono_runtime_exec_main): Call
1571 `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
1572 `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
1574 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
1576 * verify.c (verify_type_compatibility_full): Allow native int to be converted
1577 to native pointer in non-strict mode. Required to "(IntPtr)null" work.
1579 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
1581 * verify.c (verify_ldftn_delegate): Accept a sealed type when using
1582 ldftn with a virtual method.
1584 2008-03-13 Geoff Norton <gnorton@novell.com>
1586 * decimal.c: Only include memory.h if the platform has it.
1588 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
1590 * assembly.c, class.c, metadata-internals.h: make sure public key
1591 tokesns are compared in a case-insensitive way. Also, all
1592 the lookups in the GAC use a lowercase public key token
1593 (gaacutil already does the lowercasing on install). Fixes
1596 2008-03-11 Rodrigo Kumpera <rkumpera@novell.com>
1598 * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
1601 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
1603 * image.c: when someone loads a mscorlib from a file, return the
1604 currently loaded mscorlib (fixes bug #369253).
1606 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
1608 * class.c: handle types with no parents by forcing them to have
1609 System.Object as a parent and marking them as broken (this currently
1610 allows the first part of bug #369173 to work as well, likely because
1611 we don't check for typeload exceptions everywhere yet).
1613 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
1615 * class.c: more complete check that types belong to corlib
1616 (fixes second part of bug #369173).
1618 2007-03-10 Bill Holmes <billholmes54@gmail.com>
1620 * generic-sharing.c: Including glib.h for the MSVC builds to define
1621 "inline" to "__inline" before including mono-membar.h.
1623 * mono-perfcounters.c: Adding HAVE_SYS_TIME_H check for MSVC builds.
1624 Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for
1627 Contributed under MIT/X11 license.
1629 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
1631 * verify.c (do_invoke_method): Remove return type validation.
1633 * verify.c (do_ret): Do return type validation at return site instead of
1636 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
1638 * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
1640 * verify.c: Some todos cleaned and improved a few error messages.
1642 2008-03-08 Zoltan Varga <vargaz@gmail.com>
1644 * class.c (mono_class_setup_mono_type): Improve the test for corlib.
1646 2008-03-07 Zoltan Varga <vargaz@gmail.com>
1648 * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
1649 system types correctly.
1651 * exception.h exception.c (mono_exception_from_token_two_strings): New helper
1654 2008-03-06 Zoltan Varga <vargaz@gmail.com>
1656 * assembly.c (build_assembly_name): Fix a warning.
1658 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
1660 * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
1661 the called function takes an object type argument. Fixes storing or
1662 valuetypes across remoting as well as reducing memory usage.
1663 * image.c, metadata-internals.h: remove now unused ldfld_remote and
1664 stfld_remote wrapper caches.
1666 2008-03-06 Zoltan Varga <vargaz@gmail.com>
1668 * icall.c (mono_lookup_internal_call): Update the exception message when an icall
1671 * reflection.c (mono_image_register_token): New helper function to save
1672 a token->object mapping.
1674 * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
1677 * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
1678 one dimension arrays. Fixes #367670.
1679 (mono_reflection_get_type_internal): Ditto.
1681 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
1683 * marshal.c: mono_load_remote_field_new() always returns object.
1684 so use the proper signature (fixes bug #366445).
1686 2008-03-04 Zoltan Varga <vargaz@gmail.com>
1688 * class-internals.h (MonoMethod): Remove unused uses_this flag,
1689 add an 'inline_failure' flag instead.
1691 2008-03-04 Mark Probst <mark.probst@gmail.com>
1693 * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
1694 with a new structure, MonoGenericJitInfo, in the MonoJitInfo. It
1695 contains the location of "this", used for exception handling.
1697 2008-03-04 Zoltan Varga <vargaz@gmail.com>
1699 * class.c (mono_class_layout_fields): Set the min alignment of small structs to
1700 their size on all platforms for perf reasons.
1702 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
1704 * reflection.h: Move mono_reflection_is_valid_dynamic_token to
1707 * object-internal.h: Same.
1709 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
1711 * reflection.h: Fix the build I just broke.
1713 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
1715 * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
1716 Test if a token is valid, this remove explicit usage of
1717 MonoDynamicImage::tokens from the verifier code.
1719 * reflection.h: Added mono_reflection_is_valid_dynamic_token.
1721 * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
1722 instead of direct access to MonoDynamicImage::tokens.
1724 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
1726 * verify.c (token_bounds_check): Fix the build I just broke.
1728 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
1730 * verify.c (token_bounds_check): Fix bounds check for dynamic images.
1732 * verify.c (verifier_load_method): Fixed the errors message.
1734 * verify.c (mono_method_verify): Fixed a debug message.
1736 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
1738 * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
1739 mono-perfcounters.h, class-internals.h: support for predefined
1740 writable counters, query of categories and counters, bugfixes.
1742 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
1744 * verify.c (do_refanytype): Verify the refanytype opcode.
1746 * verify.c (mono_method_verify): Use do_refanytype.
1748 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
1750 * verify.c (do_mkrefany): Verify the mkrefany opcode.
1752 * verify.c (mono_method_verify): Use do_mkrefany.
1754 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
1756 * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
1757 mono-perfcounters.c, mono-perfcounters.h: basic performance counter
1760 2008-02-27 Zoltan Varga <vargaz@gmail.com>
1762 * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
1763 the type load exception.
1765 2008-02-27 Rodrigo Kumpera <rkumpera@novell.com>
1767 * verify.c: Added a few FIXME for method signatures
1769 * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
1770 of mono_method_get_signature and get vararg call working. Removed unused
1771 checks for return value.
1773 * verify.c (do_refanyval): Verify the refanyval opcode.
1775 * verify.c (mono_method_verify): Implemented verification of arglist and
1778 2008-02-27 Zoltan Varga <vargaz@gmail.com>
1780 * class.c (mono_class_setup_methods): Move the check for synchronized methods on
1781 vtypes to marshal.c.
1783 * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
1784 it works for AOT as well.
1786 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
1788 * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
1789 with mono_msec_ticks () which is monotonic and doesn't cause bugs when
1790 the system time is adjusted.
1792 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
1794 * icall.c, icall-def.h: use the new time functions (fixes the
1795 non-monotonic behaviour of TickCount).
1797 2008-02-26 Zoltan Varga <vargaz@gmail.com>
1799 * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
1800 it breaks the build.
1802 * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
1803 cattr is not finished yet.
1805 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
1807 * verify.c: Proper token validation for field, method and type.
1809 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
1811 * loader.c (field_from_memberref): Generate a loader error if the type is not found.
1813 * loader.c (method_from_memberref): Generate type load error instead of method missing
1814 if the type is not found.
1816 2008-02-23 Zoltan Varga <vargaz@gmail.com>
1818 * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
1819 some of the conversions caused the generation of a marshal directive exception.
1821 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
1823 verify.c: Report which exception should be thrown by the JIT.
1824 Added a lot of FIXME notes.
1826 2008-02-22 Mark Probst <mark.probst@gmail.com>
1828 * generic-sharing.c: Runtime generic context slots are not
1829 instantiated on init anymore. Instead, provide function to do the
1830 instantiating on demand.
1832 * class-internals.h: Added vtable to runtime generic context.
1833 Macros for encoding direct and indirect slot offsets in one
1836 2008-02-21 Mark Probst <mark.probst@gmail.com>
1838 * object.c, generic-sharing.c: Moved some generic sharing code
1839 from object.c to generic-sharing.c.
1841 * generic-sharing.c: Added support for extensible runtime generic
1844 * metadata-internals.h: Two new hash tables in MonoImage for
1845 extensible runtime generic context support.
1847 * domain.c: Unregister generic vtables upon domain unloading.
1849 * image.c: Destroy new hash tables upon image unloading.
1851 * metadata.c: Unregister generic subclasses upon image unloading.
1853 * class-internals.h: New data structure for runtime generic
1854 context template. New fields in the runtime generic context for
1857 * Makefile.am: Added generic-sharing.c.
1859 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
1861 icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
1862 there is a pending loader exception, raise it.
1864 icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
1867 icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken):
1872 2008-02-20 Zoltan Varga <vargaz@gmail.com>
1874 * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
1876 * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
1878 * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
1879 ref-only requests for compatibility with MS.
1881 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
1883 * reflection.c (mono_custom_attrs_from_method): Don't silently
1884 return an empty list for generic method instances.
1885 (mono_custom_attrs_from_param): Likewise.
1887 2008-02-20 Rodrigo Kumpera <rkumpera@novell.com>
1888 Raja R Harinath <harinath@hurrynot.org>
1891 * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
1892 * class.c (mono_class_inflate_generic_method_full): Initialize it
1893 when a fully-open method is instantiated.
1894 * metadata.c (inflated_method_equal, inflated_method_hash): Update
1896 * reflection.c (inflate_mono_method): Don't create a temporary context.
1898 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
1900 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
1901 Compute correct value, to prepare for imethod->reflection_info going away.
1903 2008-02-19 Zoltan Varga <vargaz@gmail.com>
1905 * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
1907 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
1909 * verify.c: Implement skip visibility flag.
1911 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
1913 * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
1914 which contains an extra field to tell the kind of exception that should be thrown.
1916 * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
1918 2008-02-17 Raja R Harinath <harinath@hurrynot.org>
1920 * loader.c (mono_method_get_param_names): Initialize 'klass' after
1921 'method' is updated.
1923 2008-02-11 Zoltan Varga <vargaz@gmail.com>
1925 * class.c (mono_class_layout_fields): Set class->min_align for classes using
1926 explicit layout as well. Fixes #360375.
1928 2008-02-11 Geoff Norton <gnorton@novell.com>
1930 * loader.c: Guard and dereference against inflated generic methods
1932 2008-02-10 Gert Driesen <drieseng@users.sourceforge.net>
1934 * class.c: Include Retargetable spec in assembly name.
1935 * assembly.c: Always include PublicKeyToken spec in assembly name
1936 (with value "null" if assembly is not signed), and include
1938 * icall-def.h: Added icall for Assembly.get_fullname.
1939 * icall.c: Added icall returning the fullname of an assembly.
1941 2008-02-09 Zoltan Varga <vargaz@gmail.com>
1943 * class.c (mono_class_setup_vtable_general): Add a missing call to
1944 mono_class_setup_methods () which is needed in the AOT case.
1946 2008-02-08 Rodrigo Kumpera <rkumpera@novell.com>
1948 * verify.c (mono_type_get_stack_name): Added. Return the name for the
1949 stack type of the given MonoType.
1951 * verify.c (verify_type_compatibility_full): Handle the void type.
1953 * verify.c (is_compatible_boxed_valuetype): Changed to fit the
1954 way stack merging works.
1956 * verify.c (store_local): Improved verification message.
1958 * verify.c (do_branch_op): If the merging is invalid, the method
1959 is unverifiable and not invalid. Improved error message.
1961 * verify.c (merge_stacks): Properly merge a boxed valuetype and
1962 a reference type diferent than System.Object. Improved error
1965 2008-02-07 Rodrigo Kumpera <rkumpera@novell.com>
1967 * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
1969 * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
1970 type of an enum even if the argument is byref.
1972 * verify.c: Replace all explicit uses of enumtype and enum_basetype
1973 to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
1975 * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
1977 *verify.c (verify_type_compatibility_full): Make enum types
1978 compatible with their base types.
1980 * verify.c (is_compatible_boxed_valuetype): Added. Check if both
1981 types are compatible for the special case of a boxed valuetype and
1984 * verify.c (verify_stack_type_compatibility): The function
1985 is_compatible_boxed_valuetype was extracted from here.
1987 * verify.c (push_arg): Only set ctx->has_this_store if the method
1990 * verify.c (do_ldelem): Fixed a typo in an error message and added
1991 strict check for mixing int32 and native int as the array type
1994 * verify.c (merge_stacks): Consider boxed valuetypes in the
1995 compatibility checks.
1997 2008-02-07 Massimiliano Mantione <massi@ximian.com>
1998 * profiler.h: (MonoGCEvent): Added start-stop the world events.
2000 2008-02-06 Massimiliano Mantione <massi@ximian.com>
2001 *class.c: use_new_interface_vtable_code: renamed the env var to have
2002 a "MONO_" prefix, and fix the logic to enable it by default.
2004 2008-02-06 Massimiliano Mantione <massi@ximian.com>
2006 mono_class_setup_vtable_general: rewrote the way in which interface
2007 methods are added to vtables. Makes bug-77127.exe pass, and hopefully
2008 makes the code more maintainable.
2009 For now the old code is still there, and can be activated setting
2010 the env var "USE_NEW_INTERFACE_VTABLE_CODE".
2012 2008-02-06 Rodrigo Kumpera <rkumpera@novell.com>
2014 * verify.c: guarded some debug functions around and #ifdef.
2016 * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
2018 2008-02-06 Zoltan Varga <vargaz@gmail.com>
2020 * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
2021 changes for now since they seem to break too many things.
2023 2008-02-05 Mark Probst <mark.probst@gmail.com>
2025 * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
2026 mono_marshal_find_nonzero_bit_offset): Added macro and function
2027 for finding the byte- and bit-offset of a bitfield within a
2030 2008-02-05 Zoltan Varga <vargaz@gmail.com>
2032 * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
2033 (mono_marshal_get_struct_to_ptr): Ditto.
2035 * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of
2038 2008-02-03 Zoltan Varga <vargaz@gmail.com>
2040 * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
2041 between methods for non-corlib types.
2043 2008-02-02 Geoff Norton <gnorton@novell.com>
2045 * loader.c (mono_method_get_param_names): Populate the parameter name for
2046 generic parameters as well. (Fixes #342536)
2048 2008-01-31 Rodrigo Kumpera <rkumpera@novell.com>
2050 * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
2052 * verify.c (do_invoke_method): Fix for calling with byref structs.
2054 * verify.c (do_cast): push a boxed value type based on the type token and not
2057 2008-01-31 William Holmes <billholmes54@gmail.com>
2059 * process.c (process_module_string_read): Check the size returned form
2060 VerQueryValue to avoid out of memory exception.
2062 2008-01-30 Zoltan Varga <vargaz@gmail.com>
2064 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
2065 Handle properly modules which are not in the moduleref table. Fixes
2068 2008-01-29 Zoltan Varga <vargaz@gmail.com>
2070 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
2071 the dynamic case which is now in managed code.
2072 (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
2074 * marshal.c (mono_string_to_bstr): Fix a warning.
2075 (init_com_provider_ms): Ditto.
2077 * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
2079 * exception.c (mono_get_exception_out_of_memory): New helper function.
2081 2008-01-28 Jonathan Chambers <joncham@gmail.com>
2083 * marshal.c: Add support for BSTR marshalling
2084 using other COM systems.
2086 Code is contributed under MIT/X11 license.
2088 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
2090 * object.c (mono_runtime_invoke_array): reverted previous
2091 commit as it breaks the build.
2093 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
2095 * object.c (mono_runtime_invoke_array): Verify arguments for
2096 invalid types. Fixes #348522.
2098 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
2100 * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
2101 non-final virtual calls using call.
2103 * verify.c (do_invoke): fixed some TODOs.
2105 * verify.c (push_arg): set has_this_store for "ldarga 0".
2107 2008-01-27 Zoltan Varga <vargaz@gmail.com>
2109 * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
2110 which belong to an inflated class. Fixes #356531.
2112 2008-01-26 Robert Jordan <robertj@gmx.net>
2114 * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
2115 which resort to FindFirstFile when a certain error condition
2116 (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
2117 Code is contributed under MIT/X11 license.
2119 2008-01-24 Jonathan Chambers <joncham@gmail.com>
2121 * marshal.c (emit_marshal_string): Fix out string marshalling
2122 to use specified encoding. Fixes #323900.
2124 Code is contributed under MIT/X11 license.
2126 2008-01-24 Raja R Harinath <harinath@hurrynot.org>
2128 * class.c (mono_class_inflate_generic_method_full): Don't modify
2129 iresult->context after cache check.
2131 2008-01-23 Zoltan Varga <vargaz@gmail.com>
2133 * class.c (mono_class_inflate_generic_method_full): Change the
2134 struct assignments to memcpy for better visibility and add some comments.
2136 2008-01-23 Dick Porter <dick@ximian.com>
2138 * threads.c (mono_threads_set_shutting_down): Simplify shutdown
2139 procedure, and make it work on windows.
2141 2008-01-22 Zoltan Varga <vargaz@gmail.com>
2143 * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
2144 a MonoReflectionTypeBuilder since it is always of that type.
2146 * reflection.c (mono_type_get_object): Remove an unneccesary check.
2148 * reflection.c (mono_generic_class_get_object): Simplify this a bit.
2150 * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
2152 * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
2154 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
2156 * reflection.c (mono_reflection_create_runtime_class): Remove already created
2157 instantiations from the type cache.
2159 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
2161 * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
2163 * verify.c (do_unbox_value): push a controled mutability managed pointer.
2165 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
2167 * verify.c (do_ldstr): added, verifies if the #US token is valid.
2169 * verify.c (mono_method_verify): removed old TODO
2171 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
2173 * verify.c (do_newobj): add visibility check.
2175 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
2177 * verify.c (do_load_function_ptr): add visibility check.
2179 2008-01-21 Massimiliano Mantione <massi@ximian.com>
2181 mono_generic_class_get_class: hook profiler events.
2182 mono_field_get_offset: added to support heap-shot in the new profiler.
2183 *class.h: exported mono_field_get_offset.
2185 mono_reflection_setup_internal_class: hook profiler events.
2187 2008-01-20 Zoltan Varga <vargaz@gmail.com>
2189 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
2190 argument here too and use it to avoid checking for pending exceptions if
2193 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
2195 * assembly.c (build_assembly_name): add arg for passing the assembly
2196 flags. Do not consider a PublicKey with value "null" valid.
2197 (mono_assembly_name_parse_full): added boolean argument that will be
2198 set if the assembly name contains a PublicKeyToken spec. Added support
2199 for the Retargetable spec for which only Yes or No are allowed as valid
2200 value. Consider assembly name invalid if Retargetable spec is set, but
2201 either version, culture or public key (token) are not specified.
2202 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
2203 with implementation in assembly.c.
2204 * icall.c (fill_reflection_assembly_name): also copy assembly flags
2205 from MonoAssemblyName.
2206 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
2207 introduced argument for mono_assembly_name_parse_full to know if the
2208 assembly name has a PublicKeyToken spec, and if it has instruct
2209 fill_reflection_assembly_name to use default value for keyToken (if
2210 PublicKeyToken is null).
2212 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
2214 * verify.c (mono_method_verify): fixed ovf ops with
2215 float values. They are unverifiable now.
2217 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
2219 * class.c (set_failure_from_loader_error): add BadImageException to the
2220 list of exceptions that can cause a type to fail to load.
2222 * class.c (mono_class_get_exception_for_failure): same.
2224 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
2226 * verify.c (in_any_exception_block): added, check if offset
2227 is part of any exception handling clause.
2229 * verify.c (get_stack_type): added VAR and MVAR types.
2231 * verify.c (do_stobj): better error messages.
2233 * verify.c (do_cpobj): added, check cpobj.
2235 * verify.c (do_initobj): added, check initobj.
2237 * verify.c (do_sizeof): added, check sizeof.
2239 * verify.c (do_localloc): added, check localloc.
2241 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
2243 2008-01-17 Zoltan Varga <vargaz@gmail.com>
2245 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
2246 save_lmf/restore_lmf opcodes.
2248 * threads.c (mono_threads_install_notify_pending_exc): New function to
2249 install a callback notifying the JIT there is a pending exception on a thread.
2250 (mono_thread_request_interruption): Call the new callback.
2251 (mono_thread_get_and_clear_pending_exception): New function to return the
2252 exception pending on a thread.
2254 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
2255 to turn off checking for pending exceptions.
2256 (mono_marshal_get_native_wrapper): Ditto.
2258 2008-01-16 Zoltan Varga <vargaz@gmail.com>
2260 * threads-types.h: Get rid of the unnecessary extern declarations.
2262 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
2264 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
2265 return field from parent class if not private.
2266 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
2267 returns fields from parent class if they are not private.
2268 (method_nonpublic): added function to determine if a given method
2269 should be considered non-public. Returns false for private methods
2270 on parent class, and internal methods from parent on the 1.0 profile.
2271 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
2272 use method_nonpublic function to determine whether method should be
2274 (property_accessor_public): use newly introduced method_nonpublic
2275 function to determine whether accessor is non-public.
2276 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
2277 event from parent class if not private. Only return static event if
2278 Static flag is set, and only return static event from parent class if
2279 FlattenHierarchy flag is set.
2280 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
2281 include non-private events from parent class.
2283 2008-01-16 Zoltan Varga <vargaz@gmail.com>
2285 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
2288 2008-01-16 Wade Berrier <wberrier@novell.com>
2290 * security.c: Add assembly.h header to appease some warnings
2292 2008-01-16 Dick Porter <dick@ximian.com>
2294 * process.c (process_module_string_read): Remove trailing null
2297 2008-01-16 Mark Probst <mark.probst@gmail.com>
2299 * class-internals.h: A new data structure describing the layout of
2300 a runtime generic context (MonoRuntimeGenericContextTemplate).
2302 * metadata-internals.h: Added a hash table to MonoDomain that maps
2303 from open generic classes to their runtime generic context
2306 * object.c: Building of the runtime generic context, including
2307 proper handling of generic type arguments of superclasses.
2308 Building of the runtime generic context according to the template.
2310 2008-01-15 Zoltan Varga <vargaz@gmail.com>
2312 * class.c (mono_class_setup_fields): Set field.count for generic instances.
2315 * image.c (do_mono_image_open): Pass TRUE as last_exists to
2316 mono_portability_find_file (). Fixes #325466.
2317 (mono_image_get_public_key): Fix a warning.
2319 2008-01-14 Zoltan Varga <vargaz@gmail.com>
2321 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
2323 (mono_class_from_name_case): Ditto.
2325 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
2327 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
2328 common storage for the tables used in the System/NumberFormatter class.
2330 2008-01-13 Zoltan Varga <vargaz@gmail.com>
2332 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
2334 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
2336 * verify.c (get_boxable_mono_type): check if the token is valid.
2338 * verify.c (set_stack_value): changed to add an error if an
2339 invalid type is set on stack. Changed all callers due to signature change.
2341 * verify.c (do_stobj): implement stobj validation.
2343 2008-01-11 Zoltan Varga <vargaz@gmail.com>
2345 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
2346 set container->is_method, it was set earlier.
2348 * metadata.c (type_in_image): Handle MVARs which belong to not finished
2351 * reflection.c (mono_reflection_initialize_generic_parameter): Set
2352 is_method of the generic container to TRUE for methods.
2354 2008-01-10 Zoltan Varga <vargaz@gmail.com>
2356 * metadata.c (type_in_image): Handle type parameters properly.
2358 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
2359 memory ownership of this structure.
2361 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
2363 * verify.c (get_boxable_mono_type): make typedref types been just
2364 unverifiable. check for void type.
2366 * verify.c (do_unbox_any): added, verify opcode unbox.any.
2368 * verify.c (do_load_function_ptr): accept method spec tokens.
2370 2008-01-10 Zoltan Varga <vargaz@gmail.com>
2372 * marshal.c (mono_class_native_size): Always set *align even if this is called
2375 2008-01-09 Zoltan Varga <vargaz@gmail.com>
2377 * verify.c (mono_verify_corlib): Remove this as it was not used and was
2380 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
2382 * verify.c: removed some old unused tables. A huge bunch of small fixes
2383 to things found while testing the verifier with mono basic.
2385 * verify.c (dump_stack_value): dump null literal flag to.
2387 * verify.c (verify_type_compatibility_full): fix comparison
2388 for types that have a generic super type.
2390 * verify.c (verify_stack_type_compatibility): fix compatibility
2391 between null literals and reference types. fix compatibility between
2392 boxed valuetypes and object. fix corner case test for enums.
2394 * verify.c (do_cmp_op): proper verification of cgt.un in case
2397 * verify.c (do_invoke_method): fix error message.
2399 * verify.c (do_store_indirect
2401 * verify.c (check_is_valid_type_for_field_ops): proper verification
2402 of managed pointers to valuetypes and boxed valuetypes. proper verification
2405 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
2406 allow token to be a reference type.
2408 * verify.c (do_cast): proper handling of boxes valuetypes.
2410 * verify.c (do_stelem): proper handling of storing a boxed valuetype
2413 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
2414 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
2415 fixed the decoding of unbox_any
2417 2008-01-08 Zoltan Varga <vargaz@gmail.com>
2419 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
2421 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
2423 * verify.c (do_newobj): do delegate verification.
2425 * verify.c (verify_delegate_compatibility): perform delegate
2428 * verify.c (verify_ldftn_delegate): perform tests related to
2431 * verify.c (mono_delegate_signature_equal): perform the
2432 slightly diferent signature comparison required by delegates.
2434 * metadata.c (mono_metadata_type_equal_full): added and exported
2435 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
2436 allows signature only comparison.
2438 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
2441 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
2443 * verify.c: added a bunch of stack_slot_* functions to
2444 make access to stack slot type easier. This is required to
2445 allow optional flags, like null literal, boxed value and
2447 All access paths to IlStackDesc::stype have been changed
2448 to use these new funcions.
2449 Removed a bunch of unused functions and cleared all warnings.
2450 This patch introduces the usage of the this pointer and
2453 2008-01-07 Zoltan Varga <vargaz@gmail.com>
2455 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
2457 2008-01-06 Zoltan Varga <vargaz@gmail.com>
2459 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
2460 match managed version.
2462 * appdomain.c: Bump corlib version.
2464 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
2467 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
2469 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
2470 Set public key token to zero-length byte array if assembly is not
2473 2008-01-05 Zoltan Varga <vargaz@gmail.com>
2475 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
2476 writing a vtype array elem.
2478 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
2480 * assembly.c (build_assembly_name): return FALSE if length of token is
2481 not 16 (if not "null").
2482 (mono_assembly_name_parse_full): return FALSE if value of version,
2483 culture, token or key is 0.
2484 * icall.c (fill_reflection_assembly_name): add boolean arguments to
2485 specify whether public key and public key token must be set to default
2486 value (zero-length byte array) if not available. Set versioncompat to
2487 SameMachine. If public key is available or the default is set, then
2489 (ves_icall_System_Reflection_Assembly_FillName): if no public key
2490 is available, use empty byte array as default value. On the 2.0
2491 profile, use default value for public key token if not set.
2492 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
2493 profile, use default value for public key if not set. On the 2.0
2494 profile, use default value for public key token if not set.
2495 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
2496 default values for public key and public key token.
2498 2008-01-05 Zoltan Varga <vargaz@gmail.com>
2500 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
2501 field to keep it in synch with the managed object.
2503 * marshal.c (emit_marshal_object): Add support for byref marshalling of
2504 delegates. Fixes #351520.
2506 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
2507 contains defined memory.
2509 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
2511 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
2513 * sgen-gc.c (check_consistency): New helper function to do a consistency check
2514 of the GC data structures.
2516 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
2518 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
2520 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
2522 (mono_array_clone_in_domain): Ditto.
2523 (mono_array_clone_in_domain): Ditto.
2525 * threads.c (start_wrapper): Register the thread start argument as a GC root.
2526 (cache_culture): Use a write barrier.
2528 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
2529 (ves_icall_get_property_info): Ditto.
2531 * object.h (MONO_STRUCT_SETREF): New macro.
2533 * class-internals.h (MonoStats): Add some GC statistics.
2535 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
2537 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
2539 * exception.c (mono_exception_from_name_two_strings):
2540 Break from loop after method is found.
2542 2008-01-04 Dick Porter <dick@ximian.com>
2544 * process.c (process_module_string_read): Rename variable to
2545 reflect correct usage, after fixing bug 345972.
2547 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
2549 * verify.c (mono_type_create_fnptr_from_mono_method):
2550 created a MonoType function pointer instance to be used during
2551 verification. The verifier releases this memory at end.
2553 * verify.c (mono_method_is_constructor): extracted repeated
2554 checks for constructor into a single class.
2556 * verify.c (do_push_field): use new extracted method
2557 for constructor check.
2559 * verify.c (do_newobj): same.
2561 * verify.c (do_ldftn): renamed to do_load_function_ptr
2562 and make it verify ldvirtftn too.
2564 * verify.c (mono_method_verify: proper verification
2565 of ldvirtftn. release created MonoMethod instances.
2567 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
2569 * verify.c (token_bounds_check): added.
2571 * verify.c (do_ldftn): added.
2573 * verify.c (mono_method_verify): proper verificartion of ldftn.
2575 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
2577 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
2578 than the table row count. It's the resposibility of the caller to
2579 make the bounds check and raise the correct error.
2581 * metadata.c (mono_metadata_decode_row_col): Same.
2583 * loader.c (mono_get_method_from_token): perform bounds check
2584 on token for methoddef table.
2586 2007-12-29 Miguel de Icaza <miguel@novell.com>
2589 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
2590 assert into a negative result, the managed code already coped with
2593 Some folks on Windows reported this error.
2595 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
2597 * appdomain.c: Bump corlib version.
2599 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
2600 CultureInfo.CreateCulture to create CultureInfo for name.
2601 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
2602 create CultureInfo for name. Fixes bug #347174.
2604 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
2606 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
2609 * verify.c (is_valid_branch_instruction): allow branching to the
2610 first instruction of the protected block.
2612 * verify.c (is_valid_cmp_branch_instruction): same.
2614 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
2615 avoid double initialization.
2617 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
2618 detect which cases the eval stack should just be copied.
2620 * verify.c (mono_method_verify): check if the eval stack
2621 is empty when entering a protected block.
2623 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
2625 * verify.c: added is_clause_in_range, is_clause_inside_range,
2626 is_clause_nested and verify_clause_relationship. They perform
2627 the verifications stated in P1 12.4.2.7.
2629 * verify.c (mono_method_verify): remove some unused variables,
2630 add the new exception clause checks, add instruction border
2631 checks for protected block start/end, improved some error
2632 messages and fixed a bug in the way invalid instruction access
2635 2007-12-26 Zoltan Varga <vargaz@gmail.com>
2637 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
2638 from GC 7.0 if available.
2640 * object.c: Remove an unused define.
2642 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
2644 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
2646 * null-gc.c (mono_gc_make_descr_for_array): Implement.
2648 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
2650 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
2651 to take the same arguments as the other make_descr functions.
2653 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
2655 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
2658 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
2661 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
2664 * boehm-gc.c (mono_gc_register_root): Fix a warning.
2666 * null-gc.c (mono_gc_register_root): Fix a warning.
2668 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
2670 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
2671 (mono_gc_base_init): Call GC_init ().
2673 * null-gc.c: Define mono_gc_register_root () as a no-op.
2675 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
2677 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
2679 * verify.c: add prototype for merge_stacks at top
2681 * verify.c (do_switch): added.
2683 * verify.c (merge_stacks): on some cases the stack merging
2684 was not happening properly. Unequal stack sizes at merge
2685 points should be invalid.
2687 * verify.c (mono_method_verify): added more debug info on stack state.
2688 verify switch properly.
2690 2007-12-24 Zoltan Varga <vargaz@gmail.com>
2692 * method-builder.h: New file, moved the mono_mb_ declarations here from
2695 * boehm-gc.c marshal.c: Include method-builder.h.
2697 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
2699 * marshal.c: Remove some code which is now in method-builder.c.
2701 2007-12-23 Zoltan Varga <vargaz@gmail.com>
2703 * method-builder.c: New file, extraction of the method builder functionality
2706 * marshal.c: Move the mb functions into method-builder.c.
2708 * marshal.h marshal.c: Export some mono_mb_... functions.
2710 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
2712 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
2715 * class.c (mono_class_get_full): Check the token type in the dynamic case.
2717 * loader.c (mono_field_from_token): Ditto.
2719 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
2722 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
2725 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
2726 a helper function for setting it.
2728 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
2731 * assembly.c: Significally simplify code now that referenced assemblies are
2732 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
2734 * threads.h: Don't include the internal threads-types.h header file. Fixes
2737 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
2739 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
2740 instructions that were target of branches or are at protected block boundaries.
2742 * verify.c (in_same_block): handle filter clauses.
2744 * verify.c (is_valid_branch_instruction): added. checks the target of
2745 instructions br or brtrue/false.
2747 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
2748 binary branch instructions such as beq and bge.
2750 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
2751 and made it pin the instruction as been part of the exception block.
2753 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
2756 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
2759 * verify.c (do_ret): ret from a protected block is unverifiable and
2762 * verify.c (do_static_branch): verify br and br.s instructions.
2764 * verify.c (merge_stacks): add extra param to support detection
2765 of branches in the middle of instructions.
2767 * verify.c (mono_method_verify): verify branches and exception blocks
2768 that target the middle of instructions. Proper verification of br and br.s.
2770 2007-12-21 Zoltan Varga <vargaz@gmail.com>
2772 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
2773 skip_visibility field.
2774 (reflection_methodbuilder_from_dynamic_method): Ditto.
2776 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
2777 registrations. Fixes #348193.
2779 * threads.h: Move the internal mono_thread_get_pending_exception () to
2780 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
2782 2007-12-20 Zoltan Varga <vargaz@gmail.com>
2784 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
2785 icall registration. Fixes #348193.
2787 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
2788 for corlib classes into object. Fixes #349621.
2790 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
2792 * icall.c (property_accessor_nonpublic): new function to determine
2793 whether an accessor allows a property to be considered non-public.
2794 Returns false for private accessor(s) from parent class, and internal
2795 accessor(s) from parent on 2.0 profile (and higher).
2796 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
2797 to determine whether property should be included if NonPublic flag
2798 is set. Fixes bug #349078.
2800 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
2802 * verify.c (init_stack_with_value): added.
2804 * verify.c (mono_method_verify): extracted common
2805 code for exception initialization into init_stack_with_value.
2807 * verify.c (mono_method_verify): initialize the exception
2808 for handler clauses as well.
2810 * verify.c (mono_method_verify): fix the exception clause
2811 ordering rules, it should use handler end offset and not
2814 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
2816 * rawbuffer.c: remove useless warning.
2818 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
2820 * threads.h, threads-types.h: move functions to the correct header
2823 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
2825 * verify.c (mono_method_verify): proper verification
2826 of exception handling clauses ranges and fallthru in
2827 and out of protected blocks.
2829 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
2831 * verify.c (mono_method_verify): fixed compilation issue.
2833 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
2835 * verify.c (mono_method_verify): a printf slipped in, changed
2836 to use verifier debug macro.
2838 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
2840 * verify.c (is_correct_leave): check for filter clauses.
2842 * verify.c (do_filter): added.
2844 * verify.c (mono_method_verify): property verification of leave.
2847 2007-12-18 Mark Probst <mark.probst@gmail.com>
2849 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
2850 Win32 build, until we figure out how to do the proper thing on
2853 2007-12-17 Zoltan Varga <vargaz@gmail.com>
2855 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
2856 by the previous patch.
2858 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
2859 the assembly resolve handler for refonly assemblies.
2861 2007-12-17 Mark Probst <mark.probst@gmail.com>
2863 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
2864 Make sure only one thread is allowed to commence shutdown, and
2865 don't allow new threads to be started once shutdown is in
2868 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
2870 * verify.c (is_correct_endfilter): added.
2872 * verify.c (is_unverifiable_endfilter): added.
2874 * verify.c (do_endfilter): added.
2876 * verify.c (mono_method_verify): property verification of endfilter
2877 and fixed a corner case or endfinally.
2879 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
2881 * verify.h: new flags to support fail fast of unverifiable code and
2882 do non-strict verification. Non-strict verification is required to
2883 have MS runtime compatibility. There are a huge amount of unverifiable
2884 code that it accepts as verifiable. The strict mode verifies the code
2886 Non-strict mode will be required in cases where code needs to be
2887 accepted as verifiable but fails under strict mode.
2889 * pedump.c: added support to fail fast and non-strict verification.
2891 * verify.c: added support for both fail fast and non-strict verification.
2893 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
2895 * verify.c (is_correct_endfinally): added.
2897 * verify.c (mono_method_verify): property verification of endfinally.
2899 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
2901 * verify.c (in_any_block): check for filter clauses.
2903 * verify.c (is_correct_rethrow): added.
2905 * verify.c (mono_method_verify): property verification of rethrow.
2907 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
2909 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
2911 * verify.c (do_throw): added.
2913 * verify.c (mono_method_verify): property verification of throw
2915 2007-12-11 Zoltan Varga <vargaz@gmail.com>
2917 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
2918 assemblies. Fixes #346425.
2920 2007-12-10 Zoltan Varga <vargaz@gmail.com>
2922 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
2925 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
2927 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
2928 prevent asserts when this is called with a token which might not be valid.
2930 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
2931 lookup_dynamic_token_class with valid_token == FALSE.
2933 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
2935 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
2937 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
2939 2007-12-10 Mark Probst <mark.probst@gmail.com>
2941 * gc.c: Don't delay threadpool thread finalization unless Mono is
2944 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
2946 * threads.c: turn an assert into a non-fatal warning.
2948 2007-12-09 Robert Jordan <robertj@gmx.net>
2950 * icall.c (GetVirtualMethod): Add missing argument validation.
2952 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
2954 * verify.c (do_cast): added.
2956 * verify.c (mono_method_verify): property verification of castclass and isinst.
2959 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
2961 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
2963 * verify.c (do_stelem): added.
2965 * verify.c (mono_method_verify): property verification of stelem.X.
2967 2007-12-07 Mark Probst <mark.probst@gmail.com>
2969 * class.c, class-internals.h: Introduce an environment variable
2970 (MONO_GENERIC_SHARING) through which the extent of generic code
2971 sharing can be controlled (share all classes, share only corlib
2972 classes, or share nothing).
2974 * object.c: Only create runtime generic context for classes for
2975 which sharing is enabled.
2977 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
2979 * verify.c (do_ldelem): refactor it to work with ldelem.any.
2981 * verify.c (mono_method_verify): property verification of ldelem.any.
2983 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
2985 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
2986 added ldelem.X opcodes.
2988 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
2990 * verify.c: proper verification of ldelem.X
2992 2007-12-06 Zoltan Varga <vargaz@gmail.com>
2994 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
2996 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
2998 * verify.c (mono_method_verify): null literal requires special handling,
2999 the value pushed on stack need to be flagged as so.
3001 * verify.c (do_ldelema): Verify ldelema properly.
3003 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
3005 * verify.c: Verify ldlen properly.
3007 2007-12-05 Zoltan Varga <vargaz@gmail.com>
3009 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
3010 to the target object's type. Fixes #346160.
3012 2007-12-05 Dick Porter <dick@ximian.com>
3014 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
3015 Solaris needs the same workaround as BSD-derived systems. Fixes
3016 bug 323524, patch by Burkhard Linke
3017 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
3019 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
3021 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
3022 handle to use when error dialog is shown; otherwise, update mask
3023 to show no error dialog when an error occurs.
3025 2007-12-03 Zoltan Varga <vargaz@gmail.com>
3027 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
3029 * class.c (mono_class_get_field_default_value): New helper function to initialize
3030 field->def_type and field->data.
3032 2007-11-30 Zoltan Varga <vargaz@gmail.com>
3034 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
3037 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
3039 * marshal.c: Avoid depending on delegate->method_info being set.
3041 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
3043 * object.c (mono_delegate_ctor): Set delegate->method.
3045 * object-internals.h (struct _MonoDelegate): Add 'method' field.
3047 * appdomain.c: Bump corlib version.
3049 2007-11-27 Raja R Harinath <harinath@gmail.com>
3051 * metadata.c (mono_generic_inst_equal_full): Short-circuit
3052 equality check if we're comparing canonicalized MonoGenericInsts.
3054 2007-11-23 Zoltan Varga <vargaz@gmail.com>
3056 * class.c (generic_array_methods): Call mono_class_setup_methods () before
3057 accessing class->methods.
3059 2007-11-22 Dick Porter <dick@ximian.com>
3061 * threads.c: Ensure that the synch_cs is set before trying to use
3064 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
3066 * profiler.c: r89126 broke the statistial profiler, unbreak.
3068 2007-11-22 Martin Baulig <martin@ximian.com>
3070 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
3073 (mono_debug_debugger_version): Bump to 3.
3074 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
3075 -> mono_debugger_class_initialized().
3077 * mono-debug-debugger.c
3078 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
3081 (mono_debugger_start_class_init_func): Removed.
3082 (mono_debugger_class_loaded_methods_func): Added.
3083 (mono_class_setup_methods): Call it here.
3085 2007-11-22 Martin Baulig <martin@ximian.com>
3088 (mono_debug_add_delegate_trampoline): New public method.
3089 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
3092 (MonoSymbolTable): Added `global_data_table'.
3093 (MonoDebuggerTypeKind): Removed.
3095 2007-11-21 Zoltan Varga <vargaz@gmail.com>
3097 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
3100 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3102 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
3104 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
3106 2007-11-20 Martin Baulig <martin@ximian.com>
3108 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
3110 * mono-debug-debugger.c
3111 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
3112 (mono_debugger_remove_breakpoint): Likewise.
3113 (mono_debugger_check_breakpoints): Likewise.
3114 (mono_debugger_register_class_init_callback): New public method.
3115 (mono_debugger_remove_class_init_callback): Likewise.
3116 (mono_debugger_add_type): Likewise.
3118 * mono-debug-debugger.h
3119 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
3121 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
3123 * class.c: more interface implementations needed for the
3124 array enumerator (fixes bug #341112).
3126 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
3128 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
3129 fix ParamName of ArgumentNullExceptions.
3131 2007-11-17 Miguel de Icaza <miguel@novell.com>
3133 * reflection.c (mono_reflection_encode_sighelper): Generate the
3134 modopts and modreqs. I have a useless test that crashes monodis,
3135 but that shows the code working.
3137 2007-11-17 Zoltan Varga <vargaz@gmail.com>
3139 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
3140 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
3142 2007-11-15 Dick Porter <dick@ximian.com>
3144 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
3145 When joining a thread, it's the thread that's calling Join that
3146 gets WaitSleepJoin state not the target. Fixes the standalone
3147 test case in bug 334740, and hopefully the whole bug too.
3149 2007-11-15 Dick Porter <dick@ximian.com>
3151 * process.c: Read file version info from the files pointed at by
3152 process modules, not the current process. Fixes bug 315969.
3154 Use windows typedef names in some places to fix warnings on the
3157 2007-11-15 Mark Probst <mark.probst@gmail.com>
3159 * image.c, metadata-internals.h: Added a generic_class_cache hash
3160 to MonoImage for looking up generic classes when sharing generics.
3162 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3164 * sgen-gc.c: warning cleanups.
3166 2007-11-15 Zoltan Varga <vargaz@gmail.com>
3168 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
3169 inherited properties.
3171 2007-11-14 Mark Probst <mark.probst@gmail.com>
3173 * object.c, class-internals.h: Added more information to the
3174 runtime generic context.
3176 2007-11-13 Zoltan Varga <vargaz@gmail.com>
3178 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
3179 instead of just the target method. Generalize the abstract method handling to
3180 handle any non-static method.
3182 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
3183 mono_marshal_get_delegate_invoke () signature change.
3185 2007-11-13 Mark Probst <mark.probst@gmail.com>
3187 * class.c, class-internals.h: Made
3188 mono_type_get_basic_type_from_generic () public. Fixed member
3189 access check for shared generics.
3191 * loader.c: Don't insert field into field cache if it's part of a
3192 non-inflated generic class.
3194 * domain.c, domain-internals.h: The generic sharing context is now
3195 part of the jit info data structure. Added two accessor
3198 2007-11-12 Zoltan Varga <vargaz@gmail.com>
3200 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
3201 the array Get/Set/Address methods, since the JIT inlines them.
3203 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
3205 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
3206 (mono_image_init): Initialize runtime_invoke_direct_cache.
3208 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
3209 mono_marshal_get_delegate_invoke signature change.
3211 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
3212 an additional argument. Add support for invoking abstract methods.
3214 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
3216 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
3218 2007-11-09 Mark Probst <mark.probst@gmail.com>
3220 * class.c: Do field layout for open generic classes as well.
3222 2007-11-09 Mark Probst <mark.probst@gmail.com>
3224 * gc.c, gc-internal.h: Don't finalize threadpool threads with
3225 other objects, because the threadpool is still around. Put them
3226 in a list instead and after finalizing all other objects in the
3227 root domain shut down the thread pool and then finalize the
3228 threads. Fixes bug #337383.
3230 * threads.c, thread-types.h: New mono_thread_create_internal()
3231 function for marking a thread with the threadpool flag before it
3232 started. Set synch_cs to NULL after freeing it.
3234 * threadpool.c: Mark threadpool threads before they start.
3236 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
3238 * reflection.h, reflection.c: don't export random functions
3239 and lazy load dbnull and missing objects.
3241 2007-11-07 Jonathan Chambers <joncham@gmail.com>
3243 * class.c: Initialize COM types if COM interfaces
3244 are present (not just COM classes).
3246 Code is contributed under MIT/X11 license.
3248 2007-11-07 Massimiliano Mantione <massi@ximian.com>
3250 create_dynamic_mono_image: hook module profiler events (dynamic case).
3251 mono_image_basic_init: hook assembly profiler events (dynamic case).
3253 2007-11-07 Massimiliano Mantione <massi@ximian.com>
3255 simple_appdomain_unload: completely terminate the profiler
3256 instead of only processing the statistical samples.
3257 simple_shutdown: make sure this is really called exactly once,
3258 even in multithreaded applications, and always listen to
3260 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
3261 here, the "[un]load" functions will do it.
3262 Fixes bugs #333791 and #325261.
3264 2007-11-07 Geoff Norton <gnorton@novell.com>
3266 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
3267 rather than depend on __APPLE__.
3269 2007-11-07 Mark Probst <mark.probst@gmail.com>
3271 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
3273 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
3275 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
3276 UTF16 MonoString. Fix the crash from bug #335488
3278 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
3280 * marshal.c: Correct (for non-Win32 OS) length != size in
3281 mono_string_from_bstr. Fix #339530.
3283 2007-11-06 Geoff Norton <gnorton@novell.com>
3285 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
3288 2007-11-05 Kornél Pál <kornelpal@gmail.com>
3290 * process.c: Added run-time GetProcessId API detection for Windows.
3292 2007-11-04 Miguel de Icaza <miguel@novell.com>
3294 * reflection.c (mono_param_get_objects): If a parameter has the
3295 attribute [System.Runtime.InteropServices.Optional] we should
3296 set the DefaultValue of the ParameterInfo to be
3297 System.Reflection.Missing instead of DBNull.
3301 (mono_get_reflection_missing_object): New method,
3302 returns the System.Reflection.Missing.Value singleton instance.
3304 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
3306 * culture-info-table.h : regenerated.
3308 2007-11-02 Jonathan Chambers <joncham@gmail.com>
3310 * icall.c: Use GetEnvironmentStrings on windows
3311 so we are using the same environment block as
3312 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
3315 Code is contributed under MIT/X11 license.
3317 2007-10-31 Martin Baulig <martin@ximian.com>
3319 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
3321 * mono-debug-debugger.h
3322 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
3324 2007-10-30 Zoltan Varga <vargaz@gmail.com>
3326 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
3329 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
3331 * culture-info-table.h : regenerated.
3333 2007-10-30 Robert Jordan <robertj@gmx.net>
3335 * icall-def.h, icall.c:
3336 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
3338 Code is contributed under MIT/X11 license.
3340 2007-10-29 Zoltan Varga <vargaz@gmail.com>
3342 * class.c (mono_class_setup_vtable): Find the inflated methods in the
3343 inflated class instead of inflating them again.
3345 * class.c (mono_class_setup_vtable): Inflate the override methods in the
3348 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
3349 Call setup_supertypes () after klass->parent is set.
3350 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
3352 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
3353 for inflated instances of not yet created dynamic generic classes.
3354 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
3355 times from inflated_method.
3356 (methodbuilder_to_mono_method): Ditto.
3358 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
3360 * gc.c: code cleanup and removed old untested option of not creating the
3363 2007-10-29 Zoltan Varga <vargaz@gmail.com>
3365 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
3366 creating a jump trampoline for dynamic methods.
3368 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
3370 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
3371 generic TypeBuilders when called from another method of the same type (bug #335131).
3374 2007-10-27 Zoltan Varga <vargaz@gmail.com>
3376 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
3377 doesn't seem to work perfectly.
3379 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
3380 called multiple times.
3381 (methodbuilder_to_mono_method): Ditto.
3382 (resolve_object): Inflate FieldBuilder's.
3384 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
3386 * string-icalls.c, string-icalls.h, appdomain.c: patch from
3387 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
3388 RemoveEmptyEntries in the string.Split implementation (bug #322375).
3390 2007-10-26 Dick Porter <dick@ximian.com>
3392 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
3393 Thread initialisation changes
3395 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
3397 * verify.c: fix compatibility check between arrays and System.Array
3399 2007-10-26 Zoltan Varga <vargaz@gmail.com>
3401 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
3404 2007-10-25 Zoltan Varga <vargaz@gmail.com>
3406 * object.c (mono_value_box): Use typed allocation here.
3408 2007-10-23 Zoltan Varga <vargaz@gmail.com>
3410 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
3411 trampoline instead of compiling the method right away.
3413 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
3415 2007-10-21 Zoltan Varga <vargaz@gmail.com>
3417 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
3418 related fields for dynamic classes. Fixes #334493.
3420 2007-10-20 Zoltan Varga <vargaz@gmail.com>
3422 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
3424 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
3426 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
3427 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
3429 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
3431 * reflection.c (create_generic_typespec): Initialize klass->generic_container
3433 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
3435 2007-10-18 Jonathan Chambers <joncham@gmail.com>
3437 * marshal.c: Use correct key when removing item
3440 Code is contributed under MIT/X11 license.
3442 2007-10-17 William Holmes <billholmes54@gmail.com>
3444 *marshal.c: Adding a case to marshal booleans to U1
3446 Code is contributed under MIT/X11 license.
3448 2007-10-18 Zoltan Varga <vargaz@gmail.com>
3450 * class.c (mono_class_from_name): Search the modules compromising dynamic
3451 assemblies. Fixes #331601.
3453 2007-10-16 Zoltan Varga <vargaz@gmail.com>
3455 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
3456 exception if the type name contains an assembly component. Fixes #334203.
3458 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
3459 modules inside dynamic assemblies. Fixes #334200.
3461 * reflection.c: Set image->public_key and image->public_key_length;
3463 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
3466 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
3468 2007-10-16 Mark Probst <mark.probst@gmail.com>
3470 * metadata.c: Implemented correct comparing of generic classes.
3471 An inflated generic class can be equal to a non-inflated one if it
3472 is inflated with generic type variables as type arguments. Fixes
3475 2007-10-15 Dick Porter <dick@ximian.com>
3477 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
3478 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
3481 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
3482 instead of a monitor lock. This means that monitor_try_enter and
3483 co can set the thread state safely.
3484 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
3485 thread_interrupt_requested, so interrupt actually works.
3487 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
3488 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
3489 state accessor function
3491 2007-10-15 Martin Baulig <martin@ximian.com>
3494 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
3495 the debugger with the current runtime.
3497 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
3499 * object.c, object-internals.h: added the ability to set a single
3500 trampoline for all the slots in a vtable.
3502 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
3504 * marshal.c: deal with a possible race condition during multicast
3505 delegate invocation.
3507 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
3509 * class.c: ensure value type methods don't have the synchronized
3512 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
3514 * string-icalls.c, string-icalls.h: reverted unapproved patch that
3517 2007-10-11 Joel Reed <joelwreed@comcast.com>
3519 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
3520 to take an options parameter so that empty entries can be removed during
3521 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
3523 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3525 * marshal.c: make sure we don't store the signature from a dynamic
3526 method into the runtime invoke cache (bug #327189).
3528 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
3530 * marshal.c: make sure the wrapper methods are properly initialized.
3532 2007-10-11 Mark Probst <mark.probst@gmail.com>
3534 * metadata.c, metadata-internals.h: Generalized
3535 mono_type_stack_size() to mono_type_stack_size_internal() which
3536 takes an additional argument specifying whether it allows open
3539 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
3541 * verify.c (do_invoke_method): handle typedbyref params
3542 correctly and check for unverifiable return values.
3544 * verify.c (do_newobj): fix a warning.
3546 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
3548 * verify.c: don't tread typedbyref as allways unverifable,
3549 so uses, like (ld/st)loc.0 are valid. verify for the cases
3550 that it matters, like boxing related operations.
3552 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
3554 * verify.c: add verification of the newobj opcode. verification
3555 of delegate instantation still missing due ldftn and virldftn not
3556 pushing the function type on stack
3558 2007-10-08 Mark Probst <mark.probst@gmail.com>
3560 * class-internals.h: Runtime generic context data structure
3563 * object.c: Initialization of runtime generic context at runtime
3564 vtable creation time.
3566 2007-10-08 Massimiliano Mantione <massi@ximian.com>
3567 * class.c (mono_class_create_from_typedef,
3568 mono_class_from_generic_parameter, mono_ptr_class_get,
3569 mono_fnptr_class_get, mono_bounded_array_class_get)
3570 * domain.c (mono_domain_create, mono_domain_free)
3571 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
3572 * image.c (do_mono_image_load, mono_image_close):
3573 Hooked up load-unload profiler events.
3575 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3577 * domain.c: track statistics about the actual amount of native code
3580 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
3582 * class.c: the valuetype enumerators don't have the additional
3583 supertypes interfaces.
3585 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
3587 * class.c: need more interfaces setup for the IEnumerator<T>
3588 object created for arrays (tests/ienumerator-interfaces.2.cs).
3590 2007-10-05 Zoltan Varga <vargaz@gmail.com>
3592 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
3594 2007-10-05 Alp Toker <alp@atoker.com>
3596 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
3597 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
3600 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
3602 * verify.c (verify_type_compatibility_full): verification of
3603 compatibility improved, validates correctly non-strict checks between
3604 native int and I4 types different than (unsigned)int32.
3606 * verify.c (do_store_indirect): added, do all verification of
3609 * verify.c (get_load_indirect_mono_type): renamed to
3610 get_indirect_op_mono_type, as it now returns the MonoType for
3611 ldind.X and stind.X opcodes.
3613 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
3615 * reflection.c: Fix the encoding of generic type definition for
3618 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
3619 mono_image_typedef_or_ref but allows to specify if typespec lookups should
3620 be made. Typespec check is done prior to typeref cache lookup.
3622 * reflection.c (mono_image_typedef_or_ref): now just delegate to
3623 mono_image_typedef_or_ref_full.
3625 * reflection.c (encode_generic_class): encode the generic class
3626 directly instead of calling encode_type.
3628 * reflection.c (encode_type): encode the generic type definition
3629 MonoClass as a generic instantiation.
3631 * reflection.c (create_typespec): cache typespec tokens in
3632 the assembly->typespec cache. Don't create typespec for a generic
3633 instance MonoClass. Create typespec for the generic type defintion.
3635 * reflection.c (create_generic_typespec): encode the generic
3636 class directly instead of calling encode_type.
3638 * reflection.c (mono_image_create_token): encode the generic
3639 type definition not using a typespec for MonoType instances.
3642 2007-10-04 Raja R Harinath <rharinath@novell.com>
3645 * class.c (mono_image_init_name_cache): Don't return nested
3646 'protected internal' classes.
3647 (mono_class_from_name_case): Likewise.
3649 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
3651 * icall-def.h, icall.c : get_bundled_machine_config() is now the
3652 common function used by both DefaultConfig in System.dll and
3653 InternalConfigurationHost in System.Configuration.dll.
3655 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3657 * class.c: automatically add to vectors only a few essential explicit
3658 generic interfaces. The rest of the interfaces that arrays should
3659 provide are currently implicitly added (but still not lazily, see the
3660 design in the discussion of bug#325495 for the details of what is
3661 needed for that). Additionally, implicit interfaces are assigned the
3662 same vtable slot as the explicit interfaces (as they are compatible):
3663 this enables huge memory savings since we don't need to instantiate
3664 as many memthods and as large vtables anymore. Also, Since
3665 GetEnumerator<T> returns an instance of a type that is required to
3666 support a similarly large set of interfaces as arrays, we add
3667 implicit interfaces and interface offset sharing support to those
3668 types, too. This change adds all the required interfaces so that
3669 the anonarray.cs test case in the bug report works (we don't add
3670 all the interfaces to arrays of arrays 3-level deep and more because
3671 of the memory requirements explained in the bug and since they are much
3672 less common: the lazy-loading support will enabled them to work, too).
3674 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
3676 * verify.c (merge_stacks): major clean up, all type compatibility
3677 checks are done by verify_type_compatibility. This fix my earlier lack
3678 of understanding of the CLR type system and merge_stacks no longer looks
3681 * verify.c: fixed some bad spelling.
3683 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
3685 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
3686 a given stack slock.
3688 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
3689 verify_type_compatibility_full. This removed a near indentical function and fixed
3690 handling of Int32 and IntPtr across all opcodes.
3692 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
3694 * class.c: only vectors have the additional generic interfaces.
3696 2007-10-01 Jonathan Chambers <joncham@gmail.com>
3698 * mono-config.c: Use g_strcasecmp instead of
3699 strcasecmp like everywhere else to fix
3700 compilation with MSVC.
3702 Code is contributed under MIT/X11 license.
3704 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
3706 * object.c, object-internals.h: refactored the IMT code to enable
3707 building a single slot at a time and lazily creating the IMT trampolines
3710 2007-09-29 Zoltan Varga <vargaz@gmail.com>
3712 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
3714 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
3717 2007-09-29 Raja R Harinath <harinath@gmail.com>
3719 * loader.c (method_from_methodspec): Rearrange to avoid
3720 un-necessary exposition. Don't assert out if the method's
3721 declaring type is a generic type definition.
3723 2007-09-28 Martin Baulig <martin@ximian.com>
3725 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
3727 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
3729 * class-internals.h: optimize field layout of MonoClass to
3730 requires less cachelines at runtime and save a few bytes on 64 bit
3733 2007-09-28 Jb Evain <jbevain@novell.com>
3735 * reflection.c: when encoding type names in custom attributes,
3736 if the type is a closed generic type, its generic arguments
3737 have to be serialized as AssemblyQualifiedName, so that when
3738 they are deserialized, it's possible to re-create them properly.
3742 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
3744 * object.c, class-internals.h: added delegate-creation counter.
3746 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
3748 * class.c: cleanup of the code that synthetizes interfaces for
3749 arrays in 2.0: saves quit a bit of corlib mempool memory.
3750 Code to fix bug #325495 ifdeffed out for now until the issues
3751 with memory usage and O(n^2) behaviour are fixed.
3753 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
3755 * marshal.c: when possible, do not duplicate the name of the methods
3756 in the method builder and in the generated MonoMethod.
3758 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
3759 * verify.c: added support for type checking ldind_* opcodes.
3761 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
3763 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
3764 which is used to distinguish the fully open instantiation of a TypeBuilder
3765 with the rest. This temporary hack is required to restore the property that
3766 the fully open instantiation is the same type of the generic type definition.
3768 * class-internals.h (mono_generic_class_is_generic_type_definition):
3769 new function as part of the internal API.
3771 * class.c (inflate_generic_type): return NULL when the generic inst is
3772 fully open. The fully open generic type is now the same as the generic type
3773 definition for non TypeBuilder types.
3775 * class.c (mono_generic_class_get_class): removed assert since it is
3776 no longer valid, gklass->cached_class can point to the generic type definition.
3778 * class.c (mono_generic_class_is_generic_type_definition): new.
3780 * metadata.c (mono_generic_class_hash): added is_tb_open field
3781 to the hash calculation.
3783 * metadata.c (free_generic_class): if the generic class is associated
3784 with the generic type definition, its field will come from the mempool and
3787 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
3788 new, this function identifies the corner case of a TypeBuilder fully open
3791 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
3792 for lookup. Set gclass->cached_class to be the container class in case of
3793 the fully open instantiation of non TypeBuilder types.
3795 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
3796 to compare generic classes.
3798 * reflection.c (method_encode_methodspec): remove assert that
3801 * reflection.c (mono_reflection_generic_class_initialize): add
3802 an aditional assert to ensure the proper type is used.
3804 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
3806 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
3809 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
3811 * verify.c (push_arg): Fixed support for ldarga
3812 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
3813 MonoType used as first arg in case of instance calls.
3815 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
3817 * verify.c: Support for verifying VAR and MVAR types,
3819 2007-09-25 Zoltan Varga <vargaz@gmail.com>
3821 * icall.c (ves_icall_get_property_info): Set the reflected type of the
3822 accessors correctly.
3824 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3826 * threads.c: support OSX and other systems in
3827 mono_thread_get_stack_bounds (bug #328026).
3829 2007-09-25 Martin Baulig <martin@ximian.com>
3832 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
3834 2007-09-24 Martin Baulig <martin@ximian.com>
3837 (MonoDebugClassEntry): Moved the definition of this struct into
3838 mono-debug.c to make it private.
3841 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
3842 type table per symbol file, we don't need to store the symfile id
3845 2007-09-24 Martin Baulig <martin@ximian.com>
3847 Create one type table per symbol file, since a `MonoClass *' gets
3848 invalid when its image is unloaded.
3850 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
3851 (MonoDebugHandle): Added `type_table'.
3853 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
3855 * mempool.c, mempool.h: added mono_mempool_new_size () API
3856 to be able to specify a smaller initial size for the pool.
3857 Adjusted the code to slowly increase pool size before using
3858 the previous default size.
3859 * image.c: use a small initial size for image mempools.
3861 2007-09-23 Zoltan Varga <vargaz@gmail.com>
3863 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
3866 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
3867 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
3869 2007-09-22 Zoltan Varga <vargaz@gmail.com>
3871 * metadata.c (mono_type_create_from_typespec): Remove an invalid
3872 free. Fixes #327438.
3874 2007-09-21 Raja R Harinath <harinath@gmail.com>
3876 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
3877 generic instantiations, etc.
3878 <MONO_TYPE_ARRAY>: Likewise.
3880 2007-09-21 Martin Baulig <martin@ximian.com>
3882 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
3883 these structs were never defined.
3884 (MonoDebugHandle): Removed the `_priv' field, it was never used.
3886 2007-09-21 Martin Baulig <martin@ximian.com>
3888 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
3890 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
3892 * image.c: removed the guid hash tables: we can get the same info
3893 without the additional memory usage hit (partially fixes also bug #327052).
3895 2007-09-10 Massimiliano Mantione <massi@ximian.com>
3897 * profiler.h, profiler-private.h, profiler.c: add a new profiler
3898 event to handle unloading methods. After the event is called, the
3899 corresponding MonoMethod* must be considered invalid.
3900 * loader.c (mono_free_method): call the new mono_profiler_method_free
3903 2007-09-20 Mark Probst <mark.probst@gmail.com>
3905 * domain-internals.h: New flag in MonoJitInfo which marks shared
3906 generic methods. New hash table (shared_generics_hash) in
3907 MonoDomain to keep track of shared generic methods. Prototypes
3908 for functions to register and lookup shared generic methods.
3910 * domain.c: Support for registering and looking up shared generic
3911 methods via a hash table (shared_generics_hash) in MonoDomain.
3913 * class-internals.h: New exception to signal failure of shared
3914 compilation of a generic method. New counters for generics
3915 sharing in MonoStats.
3917 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
3919 * image.c, metadata-internals.h: don't keep a file descriptor open
3920 for loaded assemblies (bug#325988).
3922 2007-09-19 Raja R Harinath <rharinath@novell.com>
3924 * metadata.c (signature_in_image): New. Carve out of type_in_image.
3925 (ginst_in_image, gclass_in_image): Simplify. Change signature to
3926 use the corresponding datatypes.
3927 (type_in_image): Update to changes.
3928 (CleanForImageUserData): Simplify.
3929 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
3930 Avoid quadratic behaviour in handling the "stolen" list by
3931 separating the filter predicate out, and by prepending the stolen
3932 items rather than appending them.
3933 (steal_ginst_in_image): Likewise.
3934 (mono_metadata_clean_for_image): Update to changes.
3936 2007-09-19 Martin Baulig <martin@ximian.com>
3938 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
3940 2007-09-19 Martin Baulig <martin@ximian.com>
3942 * mono-debug.c (mono_debug_cleanup): Don't call
3943 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
3945 2007-09-19 Raja R Harinath <harinath@gmail.com>
3947 Fix crash on 'make run-test' in mcs/errors
3948 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
3949 Avoid more potential allocations in mono_class_from_mono_type.
3950 (ginst_in_image): Update to changes.
3951 (gclass_in_image): Rearrange slightly.
3953 2007-09-18 Zoltan Varga <vargaz@gmail.com>
3955 * class.c (mono_class_init): Move the code that sets up class->methods to
3956 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
3958 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
3959 canonical instance of an inflated generic signature.
3960 (mono_type_create_from_typespec): Remove an invalid free.
3962 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
3964 2007-09-18 Marek Habersack <mhabersack@novell.com>
3966 * domain-internals.h: added a declaration of the
3967 mono_assembly_load_full_nosearch internal function.
3969 * assembly.c (mono_assembly_load_with_partial_name): use
3970 mono_try_assembly_resolve return value properly.
3971 (mono_assembly_load_full_nosearch): copied the function body from
3972 mono_assembly_load_full, without the code to invoke assembly
3974 (mono_assembly_load_full): calls the above new function and if the
3975 assembly is not resolved, invokes the search hooks.
3977 * appdomain.c (mono_runtime_init): restore the global postload
3978 assembly search handlers.
3980 2007-09-18 Zoltan Varga <vargaz@gmail.com>
3982 * class.c (mono_class_init): Make sure class->methods and class->properties
3983 are never NULL in the generics case.
3985 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
3987 2007-09-17 Zoltan Varga <vargaz@gmail.com>
3989 * metadata.c (free_generic_class): Disable some code to fix the build.
3991 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
3993 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
3994 from the image mempool.
3996 * metadata.c (free_generic_class): Free more data from the inflated class.
3998 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
4000 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
4002 (mono_type_create_from_typespec): Ditto.
4004 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
4005 MonoImage to the caller.
4006 (mono_init_internal): Save the opened image in a global variable.
4007 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
4009 * reflection.c (resolve_object): Fix a leak.
4011 * metadata.c: Fix the freeing of data in the generics caches.
4013 * metadata.c (free_generic_inst): Comment this out to fix the build.
4014 (free_generic_class): Ditto.
4016 * metadata.c: Free cached generic methods, instantinations and classes when
4017 they are removed from the caches.
4018 (mono_metadata_free_type): Free the type itself.
4020 * class.c: Free the result of mono_class_inflate_generic_type () in a few
4023 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
4025 * boehm-gc.c: restrict managed allocs to __thread supporting
4028 2007-09-16 Zoltan Varga <vargaz@gmail.com>
4030 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
4031 (mono_generic_class_get_class): Fix a leak.
4033 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
4034 mono_metadata_free_type ().
4035 (mono_metadata_inflate_generic_inst): Fix a leak.
4037 2007-09-14 Zoltan Varga <vargaz@gmail.com>
4039 * mono-debug.c (free_header_data): Fix a leak missed earlier.
4041 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
4044 * mono-debug.c (mono_debug_close_image): Fix call to
4045 g_hash_table_remove ().
4047 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
4049 * icall-def.h: redirect all the string ctor to the managed
4050 CreateString () methods.
4051 * string-icalls.c, string-icalls.h: removed dead code for string
4054 2007-09-14 Zoltan Varga <vargaz@gmail.com>
4056 * mono-debug.c: Fix memory leaks.
4058 2007-09-14 Jonathan Chambers <joncham@gmail.com>
4060 * threads-types.h: Implement mono_hazard_pointer_set and
4061 mono_hazard_pointer_clear macros using do/while(0) to fix
4062 compilation with MSVC.
4064 Code is contributed under MIT/X11 license.
4066 2007-09-14 Zoltan Varga <vargaz@gmail.com>
4068 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
4069 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
4071 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
4073 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
4076 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
4078 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
4079 managed-code allocated as well.
4081 2007-09-13 Zoltan Varga <vargaz@gmail.com>
4083 * class.c (mono_class_is_assignable_from): Add support for generic variance.
4085 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
4087 * boehm-gc.c: fixed the build after the AOT changes.
4089 2007-09-13 Zoltan Varga <vargaz@gmail.com>
4091 * wrapper-types.h: Add an ALLOC wrapper type.
4093 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
4094 reference managed allocator methods.
4096 2007-09-12 Marek Safar <marek.safar@gmail.com>
4098 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
4099 of Type array and not MonoType, a fix suggested by Hari.
4101 2007-09-12 Jonathan Chambers <joncham@gmail.com>
4103 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
4104 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
4106 Code is contributed under MIT/X11 license.
4108 2007-09-10 Massimiliano Mantione <massi@ximian.com>
4110 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
4112 2007-09-12 Marek Habersack <mhabersack@novell.com>
4114 * image.c (do_mono_image_open): if assembly file fails to open and
4115 MONO_IOMAP is in effect, try to find the path in a
4116 case-insensitive way.
4118 * appdomain.c (mono_runtime_init): do not install postload hooks -
4119 tests show that MS.NET doesn't use anything of that sort to
4120 trigger the AppDomain.AssemblyResolve event.
4121 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
4123 (mono_runtime_init): init portability helpers here.
4125 * assembly.c (mono_assembly_load_with_partial_name): if other
4126 attempts fail, trigger the AppDomain.AssemblyResolve event handler
4127 to resolve the assembly.
4129 * domain-internals.h: added mono_try_assembly_resolve and marked
4132 2007-09-11 Jb Evain <jbevain@novell.com>
4134 * object-internals.h (MonoReflectionDynamicMethod): add
4135 a `MonoReflectionType *owner` field. The owner is used
4137 (mono_reflection_create_dynamic_method): use the owner of the dynamic
4138 method as the class declaring the dynamic method.
4139 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
4140 dynamic method to the declaring type of the methodbuilder.
4142 2007-09-11 Mark Probst <mark.probst@gmail.com>
4144 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
4145 rules for calling methods via reflection.
4147 2007-09-11 Zoltan Varga <vargaz@gmail.com>
4149 * reflection.c (resolve_object): Add support for MonoGenericClass.
4152 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
4154 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
4155 provide a managed method that does fast allocations without needing
4156 a managed->unmanaged transition. Boehm GC implementation currently
4157 enabled for ptrfree objects on sane architectures.
4159 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
4161 * marshal.c, marshal.h: exported a couple of useful functions and
4162 added mono_mb_get_label () to easily handle backward branches.
4164 2007-09-10 Zoltan Varga <vargaz@gmail.com>
4166 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
4168 2007-09-10 Massimiliano Mantione <massi@ximian.com>
4170 * loader.c (find_method): Fixed the regression introduced while
4173 2007-09-09 Zoltan Varga <vargaz@gmail.com>
4175 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
4178 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
4179 icall.c reflection.c: Pass a MonoGenericContext argument to
4180 mono_lookup_dynamic_token ().
4182 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
4185 2007-09-09 Robert Jordan <robertj@gmx.net>
4187 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
4188 for generic methods.
4190 * object.c (mono_object_get_virtual_method): Handle generic methods.
4193 Code is contributed under MIT/X11 license.
4195 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
4197 * image.c: fix locking in mono_image_load_file_for_image ().
4199 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
4201 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
4202 used only as a cache: added an icall to fill it.
4204 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
4206 * reflection.h: exposed mono_reflection_free_type_info
4207 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
4208 since mono_reflection_bind_generic_parameters makes a copy of it.
4209 * reflection.c (free_type_info): subinfos should be freed.
4210 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
4212 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
4213 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
4214 this fixes #82695 and #81726.
4217 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
4219 * process.h, process.c: added support for user profile/info in
4220 ProcessStartInfo. For now only Windows works.
4222 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4224 * metadata.c: consider the generic arguments when comparing
4225 signatures (bug #82614).
4227 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4229 * cil-coff.h, image.c: updated assembly loader to cope with the
4230 PE32+ 64 bit file format.
4232 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4234 * assembly.c, class.c, domain.c, loader.c: remove useless
4235 inclusion of cil-coff.h.
4237 2007-08-29 Jonathan Chambers <joncham@gmail.com>
4239 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
4240 if interface is marked with CoClassAttribute.
4242 Code is contributed under MIT/X11 license.
4244 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
4246 * sgen-gc.c: ensure no object from the to space is copied again or finalized
4247 if it's seen twice in major collections.
4249 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4251 * sgen-gc.c: big objects are not copied to the gray area, but they
4252 need to be considered for scanning, too, if they are brought alive
4253 by an object ready for finalizations or a survived one.
4255 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
4257 * sgen-gc.c: properly account the number of disappearing links when
4260 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
4262 * sgen-gc.c: share the code to scan the registered roots between the
4263 different types of collections.
4265 2007-08-28 Zoltan Varga <vargaz@gmail.com>
4267 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
4269 2007-08-28 Zoltan Varga <vargaz@gmail.com>
4271 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
4272 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
4274 2007-08-28 Mark Probst <mark.probst@gmail.com>
4276 * security-manager.c (mono_security_manager_get_methods):
4277 LinkDemandSecurityException now has 2 arguments instead of 3.
4279 2007-08-27 Zoltan Varga <vargaz@gmail.com>
4281 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
4282 platforms which need it.
4284 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4286 * sgen-gc.c: unregister thread data structures with a pthread_key_t
4289 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
4291 * threads.c: free the thread static data on thread exit.
4293 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
4295 * class.c: walk the hierarchy to find the generic definition for
4296 a class (fixes runtime part of bug #82498).
4298 2007-08-24 Zoltan Varga <vargaz@gmail.com>
4300 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
4303 * image.c (mono_image_close): Here. Hopefully fixes #82510.
4305 2007-08-24 Mark Probst <mark.probst@gmail.com>
4307 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
4309 2007-08-24 Robert Jordan <robertj@gmx.net>
4311 * appdomain.c: don't perform the ':'->';' substitution on Win32.
4313 2007-08-24 Jb Evain <jbevain@novell.com>
4315 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
4318 2007-08-24 Mark Probst <mark.probst@gmail.com>
4320 * threads.c: Make sure a thread gets cleaned up only once. Fixes
4323 2007-08-24 Zoltan Varga <vargaz@gmail.com>
4325 * assembly.c: Fix a warning.
4327 2007-08-23 Marek Habersack <mhabersack@novell.com>
4329 * appdomain.c: parse the <runtime> section looking for the probing
4330 element with the 'privatePath' attribute, which sets additional
4331 directories in which the runtime should look for assemblies.
4333 2007-08-23 Robert Jordan <robertj@gmx.net>
4335 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
4338 2007-08-23 Martin Baulig <martin@ximian.com>
4340 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
4341 _mono_debug_init_corlib() and remove it from the header file.
4343 2007-08-23 Martin Baulig <martin@ximian.com>
4345 * mono-debug-debugger.c
4346 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
4347 don't notify the debugger about it.
4349 * mono-debug-debugger.h
4350 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
4352 2007-08-23 Robert Jordan <robertj@gmx.net>
4354 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
4355 Code is contributed under MIT/X11 license.
4357 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4359 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
4361 2007-08-22 Martin Baulig <martin@ximian.com>
4363 * mono-debug.c: Store debugging info on a per-domain basis and
4364 free it on domain unload. Add support for unloading symbol files.
4367 (MonoDebugList): New typedef.
4369 - add `data_tables and `type_table'.
4370 - replace 'symbol_files' and `num_symbol_files' with a
4372 (mono_debug_data_table): Removed.
4373 (mono_debug_list_add): New public function.
4374 (mono_debug_list_remove): New public function.
4375 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
4376 (mono_debug_init_2_memory): Renamed into
4377 mono_debug_open_image_from_memory().
4378 (mono_debug_close_image): New public function.
4379 (mono_debug_domain_create): Likewise.
4380 (mono_debug_domain_unload): Likewise.
4381 (MONO_DEBUGGER_VERSION): Bump to 60.
4383 * mono-debug-debugger.h
4384 (MonoDebuggerEvent):
4385 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
4386 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
4387 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
4388 - rename `THREAD_CREATED' and `THREAD_EXITED' into
4389 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
4390 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
4392 (mono_debugger_add_symbol_file): Removed.
4393 (mono_debugger_add_type): Removed.
4394 (mono_debugger_lookup_type): Removed.
4395 (mono_debugger_lookup_assembly): Removed.
4398 (mono_domain_create): Call mono_debug_domain_create().
4399 (mono_init_internal): Call mono_debug_init_corlib().
4402 (mono_assembly_close): Call mono_debug_close_image().
4404 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
4406 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
4409 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
4411 * sgen-gc.c: ensure section->pin_queue_end is initialized
4412 correctly when non pinning objects in the section have been found.
4414 2007-08-22 Marek Habersack <mhabersack@novell.com>
4416 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
4417 containing a list of directories separated by ':'. MSDN docs say
4418 the directories should be separated with ';'. Part of a bugfix for
4421 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
4423 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
4424 it should MonoType and not MonoClass.
4426 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
4428 * culture-info-table.h : regenerated.
4430 2007-08-20 William Holmes <billholmes54@gmail.com>
4432 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
4433 to call ReplaceFile Kernel32 on windows or in io-layer.
4434 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
4435 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
4436 as an internal call.
4438 Code is contributed under MIT/X11 license.
4440 2007-08-20 Jb Evain <jbevain@novell.com>
4442 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
4443 and MONO_EXCEPTION_FIELD_ACCESS.
4445 * debug-helpers.[c|h]: new mono_field_full_name function.
4447 2007-08-20 Mark Probst <mark.probst@gmail.com>
4449 * class.c: Removed class_security_level() and moved it to
4450 security-core-clr.c.
4452 * security-core-clr.c, security-core-clr.h: class_security_level()
4453 is now public and renamed to mono_security_core_clr_class_level().
4454 It also looks for security attributes in the classes a class is
4457 2007-08-20 Mark Probst <mark.probst@gmail.com>
4459 * security-core-clr.c, security-core-clr.h: CoreCLR security
4462 * Makefile.am: Added security-core-clr.[ch].
4464 * security-manager.c, security-manager.h: Functions and enum for
4465 setting and getting the security mode.
4467 * class.c: CoreCLR security checks.
4469 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4471 * icall-def.h, process.c, process.h: implemented icall to get
4472 user/system processor times.
4474 2007-08-17 Mark Probst <mark.probst@gmail.com>
4476 * domain.c, threads.c, class-internals.h, domain-internals.h: New
4477 reader-lock-free jit_info_table.
4479 2007-08-17 Zoltan Varga <vargaz@gmail.com>
4481 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
4483 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
4485 * object-internals.h (MonoException): Add missing _data member.
4487 2007-08-08 Massimiliano Mantione <massi@ximian.com>
4489 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
4490 checking that only methods with matching qname or fqname are picked
4491 from implemented interfaces.
4493 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
4495 * verify.c (do_newarr):added, do type verification of
4496 newarr ops, push the right value on the eval stack.
4497 * verify.c (mono_method_verify): use do_newarr
4500 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
4502 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
4503 factored the common code into get_boxable_mono_type, which
4504 is now using mono_type_get_full, this fixed byref related tests.
4506 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
4508 * class.c: added mono_type_get_full, this function has the same
4509 behavior of mono_class_get_full but the returned MonoType has
4510 all metadata of the associated token in case of a typespec token.
4511 * class.c: added mono_type_retrieve_from_typespec, used by
4512 mono_type_get_full to retrieve the token type.
4513 * class.c (mono_class_create_from_typespec): changed to use
4514 mono_type_retrieve_from_typespec.
4515 * class.c (mono_ldtoken): changed to use mono_type_get_full
4516 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
4517 * class-internals.h: exported mono_type_get_full for internal use.
4519 2007-08-16 Jb Evain <jbevain@novell.com>
4521 * domain.c (supported_runtimes): add entry for
4522 the 'moonlight' runtime version.
4524 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
4526 * verify.c (mono_method_verify): small typo sliped in.
4528 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
4530 * verify.c (do_unbox_value): added, do type verification of
4532 * verify.c (mono_method_verify): use do_unbox_value
4535 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
4537 * verify.c (dump_stack_value): fixed typo, was printing string
4538 instead of object on stack.
4539 * verify.c (do_box_value): moved the byref check up as it leads
4540 to invalid code and should be done earlier.
4541 * verify.c: improved error messages for and ldobj
4543 2007-08-15 William Holmes <billholmes54@gmail.com>
4545 * marshal.c (emit_marshal_custom): Omit the call to
4546 marshal_native_to_managed when calling native to managed
4547 and the argument is specified as an out argument.
4549 Code is contributed under MIT/X11 license.
4551 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
4553 * verify.c: fixed the type checks for generics, function pointers and vectors.
4554 Added type verification for ldobj and ldtoken. The verifier
4555 would segfault if header or signature of a method contained references
4556 to non-existant types.
4558 2007-08-15 Jonathan Chambers <joncham@gmail.com>
4560 * marshal.c (cominterop_get_ccw): Patch from
4561 Bill Holmes to no walk up interface hierarchy.
4562 All parent methods should be present in the interface for COM.
4564 Code is contributed under MIT/X11 license.
4566 2007-08-15 Jonathan Chambers <joncham@gmail.com>
4568 * marshal.c (emit_marshal_com_interface): Patch from
4569 Bill Holmes to handle COM Interfaces as return values
4570 for native->managed calls.
4572 Code is contributed under MIT/X11 license.
4574 2007-08-14 Jonathan Chambers <joncham@gmail.com>
4576 * marshal.c (cominterop_get_idispatch_for_object): Implement
4577 for runtime callable wrappers.
4579 Code is contributed under MIT/X11 license.
4581 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
4583 * pedump.c (main): changed from mono_init to mono_init_from_assembly
4584 so 2.0 types are accessible
4587 2007-08-13 Miguel de Icaza <miguel@novell.com>
4589 * domain.c (mono_init_internal): Call mono_assembly_load_friends
4590 once we load mscorlib. Due to the order in which we initialize,
4591 the mono_assembly_load_full routine that loads mscorlib did not
4592 load friends. We now load it once we load the
4593 mono_defaults.internals_visible_class class.
4595 * assembly.c: Expose the mono_load_friend_assemblies method.
4597 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
4599 * verify.c: improved the handling of boxing, better
4600 type checking for unary ops and conversion. Fix bug
4601 regarding managed pointer compatibility checking
4603 2007-08-11 Zoltan Varga <vargaz@gmail.com>
4605 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
4607 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
4609 2007-08-09 Raja R Harinath <rharinath@novell.com>
4611 * reflection.c (dup_type): Remove.
4612 * class.c (dup_type): Remove.
4613 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
4614 instead of the dodgy 'dup_type'.
4615 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
4616 handle the case where 'dup_type' needed the second argument.
4618 2007-08-08 Zoltan Varga <vargaz@gmail.com>
4620 * domain.c: Fix a warning.
4622 2007-08-08 Massimiliano Mantione <massi@ximian.com>
4624 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
4625 checking that methods with the same fqname are not overridden
4626 with a method from an ancestor.
4628 2007-08-07 Zoltan Varga <vargaz@gmail.com>
4630 * threads.c (free_thread_static_data_helper): Avoid a crash if
4631 thread->static_data is not yet set.
4633 2007-08-07 Jonathan Chambers <joncham@gmail.com>
4635 * marshal.c: Use correct image when emitting
4636 native wrapper for COM calls.
4638 Code is contributed under MIT/X11 license.
4640 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
4642 * icall-def.h, security.c, security.h :
4643 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
4645 2007-08-07 Martin Baulig <martin@ximian.com>
4647 * mono-debug-debugger.h
4648 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
4650 * domain.c (mono_domain_free): Call
4651 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
4653 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
4655 * verify.c (check_underflow, check_overflow): error message now returns IL offset
4656 * verify.c (in_same_block): code should test if either offset is inside the clauses
4657 * verify.c (mono_method_verify): push the exception into the eval stack of exception
4660 2007-08-03 Zoltan Varga <vargaz@gmail.com>
4662 * image.c (mono_image_close): Fix a leak.
4664 * object.c (mono_runtime_invoke_array): Avoid using alloca.
4666 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
4668 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
4670 * domain.c, threads.c, threads-types.h: fix memory retention issue
4671 with thread static variables not being cleared on domain unload.
4672 Reuse thread static slots after domain unload.
4674 2007-08-03 Zoltan Varga <vargaz@gmail.com>
4676 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
4679 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
4680 now done in mono_runtime_invoke_array.
4682 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
4683 receiver is a nullable type.
4685 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
4688 2007-08-03 Jonathan Chambers <joncham@gmail.com>
4690 * marshal.c: Implement COM Objects as return type for
4691 managed->unmanaged calls. Added Release calls for COM Object
4692 out/return values in managed->unmanaged calls.
4694 Code is contributed under MIT/X11 license.
4696 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
4698 * threads.h, threads-type.h: move the hazard pointer declarations
4699 to the private header.
4701 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4703 * file-io.c, appdomain.c: memory leak fixes.
4705 2007-08-02 Dick Porter <dick@ximian.com>
4708 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
4709 SO_REUSEADDR setting into io-layer/sockets.c.
4711 2007-08-01 Zoltan Varga <vargaz@gmail.com>
4713 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
4714 from Object when called on a generic parameter. Fixes #82211.
4716 2007-08-01 Dick Porter <dick@ximian.com>
4718 * file-io.c (convert_share): Test FileShare values bit-by-bit.
4719 Fixes bug 79250 yet again.
4721 2007-07-30 Martin Baulig <martin@ximian.com>
4723 Merged the `debugger-dublin' branch.
4726 (MonoDebugDataTable): New typedef.
4727 (MonoDebugMethodAddressList): New typedef.
4728 (MonoDebugWrapperData): Removed.
4729 (MonoDebugSymbolTable): Removed `current_data_table',
4730 `current_data_table_size', `current_data_table_offset'.
4731 (MonoDebugDataItemType): Moved into mono-debug.c.
4732 (MonoDebugMethodJitInfo): Remove `address'.
4733 (mono_debug_data_table): New global variable.
4734 (mono_debug_lookup_method_addresses): New public function.
4735 (mono_debug_find_method): Take a `MonoMethod *', not a
4736 `MonoDebugMethodInfo *'.
4738 * mono-debug.c: Drop support for the old symbol tables.
4740 2007-06-28 Martin Baulig <martin@ximian.com>
4742 * mono-debug.c (mono_debug_debugger_version): New public variable.
4744 2007-07-31 William Holmes <billholmes54@gmail.com>
4746 * metadata.c Changed mono_type_create_from_typespec to not insert
4747 the type into the hash map until after
4748 do_mono_metadata_parse_type has completed.
4750 Code is contributed under MIT/X11 license.
4752 2007-07-31 Zoltan Varga <vargaz@gmail.com>
4754 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
4755 generic parameter. Fixes #82211.
4757 2007-07-27 Jb Evain <jbevain@novell.com>
4759 * pedump.c (dump_metadata, dump_metadata_header): dump
4760 versions contained in the metadata header.
4762 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
4764 * threads.c: register small_id_table with the GC.
4766 2007-07-27 Mark Probst <mark.probst@gmail.com>
4768 * threads.c, threads.h, class-internals.h, object-internals.h:
4769 Hazard pointers, to be used by lock-free parallel algorithms.
4771 2007-07-26 Dick Porter <dick@ximian.com>
4773 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
4774 routine on non-windows platforms, as I've not managed to think of
4775 a non-kludgy way of doing this. Finishes off bug 78739.
4777 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
4779 * object.c: properly setup interface_bitmap in proxy vtables.
4781 2007-07-25 Marek Habersack <mhabersack@novell.com>
4783 * appdomain.c (get_shadow_assembly_location): do not use TickCount
4784 to create unique shadow copy target directories, use the domain's
4785 serial number instead. Each domain gets a unique target directory
4788 * domain.c (mono_domain_create): added code to increment domain
4789 shadow copy serial number and cache the value in the current
4792 * domain-internals.h (struct _MonoDomain): added a new field -
4793 shadow_serial to hold the serial number used in generation of
4794 shadow-copy directories. This is to make sure that the directory
4795 name is unique for each and every domain created. We avoid a race
4796 condition with overriding assemblies already in use by other app
4799 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
4801 * class.c (mono_bounded_array_class_get): fixed memory leak when
4802 binding generic parameters.
4804 2007-07-24 Raja R Harinath <rharinath@novell.com>
4806 * metadata.c (do_mono_metadata_parse_generic_class): Use
4807 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
4810 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4812 * loader.c, class-internals.h, reflection.c: removed the per-method
4813 generics hashtable: we use the global one through the call of
4814 mono_class_inflate_generic_method ().
4816 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
4818 * class.c, metadata.c, class-internals.h: introduce yet another
4819 generics global cache for inflated methods (fixes 98% of the perf
4820 issue in bug #81806).
4822 2007-07-23 Raja R Harinath <rharinath@novell.com>
4824 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
4825 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
4826 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
4827 return a MonoGenericInst containing (a copy) of those types.
4828 (mono_metadata_inflate_generic_inst): Update to changes.
4829 (mono_metadata_parse_generic_inst): Likewise.
4830 (mono_get_shared_generic_inst): Likewise.
4831 * reflection.c (mono_class_bind_generic_parameters): Likewise.
4832 (mono_reflection_bind_generic_method_parameters): Likewise.
4833 * metadata-internals.h: Likewise.
4834 * icall.c (free_generic_context): Kill.
4835 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
4837 * reflection.c (reflection_methodbuilder_to_mono_method): Use
4838 mono_metadata_type_dup.
4839 * marshal.c (mono_mb_create_method): Likewise.
4841 * metadata.c (mono_metadata_type_dup): Rename from
4842 mono_metadata_type_dup_mp. Take an optional mempool instead of a
4843 MonoImage. Handle a few more cases, esp. when no mempool is given.
4844 * marshal.c, metadata-internals.h: Update to changes.
4846 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
4848 * class.c: fixed a small leak for array classes and removed warning.
4850 2007-07-22 Zoltan Varga <vargaz@gmail.com>
4852 * loader.c (mono_method_get_param_token): Make this work on generic methods.
4853 Return 0x8000000 for return parameters. Fixes #82161.
4855 2007-07-21 Marek Habersack <grendello@gmail.com>
4857 * appdomain.c (get_shadow_assembly_location): append the current
4858 ticks value to the path. Avoids overwriting the same assemblies by
4859 several threads at the same time.
4861 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
4862 and Raja R Harinath <rharinath@novell.com>
4864 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
4866 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
4867 property for testing if a method is a generic method definition.
4869 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
4871 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
4873 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
4875 * verify.c: used function from private branch, reverted to the one in class.h
4877 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
4879 * verify.c: a typo slipped in and the code wont compile
4881 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
4883 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
4884 disabled box instruction as it is doing the wrong thing
4885 improved stack dump messages, now it is easier to debug type related issues
4888 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
4890 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
4892 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
4894 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
4895 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
4896 grouped with class and valuetype. This change will simply
4897 the code as it should be handled just like unmanaged pointers.
4899 2007-07-19 Mark Probst <mark.probst@gmail.com>
4901 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
4903 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
4905 * verify.c: several stack merge issues fixed, reference comparisons now
4906 check the type size. strict type check now works correctly.
4907 added more uses of IS_MANAGED_POINTER macro.
4908 fixed issues pointed by running the test suite against .net.
4911 2007-07-19 Mark Probst <mark.probst@gmail.com>
4913 * class.c, loader.c, class-internals.h: Removed the
4914 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
4917 * icall.c: Better error checking in some internal reflection
4920 2007-07-18 William Holmes <billholmes54@gmail.com>
4922 * filewatcher.c : removed unused variable 'filename' in
4923 ves_icall_System_IO_FSW_SupportsFSW
4925 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4927 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
4930 2007-07-15 Zoltan Varga <vargaz@gmail.com>
4932 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
4934 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
4936 2007-07-14 Zoltan Varga <vargaz@gmail.com>
4938 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
4939 Implement generics support.
4940 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
4942 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
4943 type_args and method_args arguments.
4944 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
4945 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
4946 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
4948 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
4950 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
4951 It adds a rootimage parameter to mono_reflection_get_type_internal,
4952 adds new function mono_reflection_get_type_with_rootimage and use
4953 the rootimage to resolve the types instead of the current image
4955 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
4957 * culture-info-table.h: Forgot to update after r78304.
4959 2007-07-13 Raja R Harinath <rharinath@novell.com>
4961 * class.c (mono_class_is_open_constructed_type)
4962 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
4964 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
4966 * class.c (mono_bounded_array_class_get): method fails if used with
4967 an incomplete TypeBuilder enum (no basetype field), fixed it by
4968 avoiding calculating the size for such array as it cannot be instantiated.
4971 2007-07-12 Raja R Harinath <rharinath@novell.com>
4973 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
4975 * metadata.c, reflection.c: Update to changes.
4977 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
4979 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
4980 mono_class_is_valid_enum, they are used to valide a enum when loading.
4981 * reflection.c: used new functions to throw TypeLoadException when and
4982 invalid enum is build with TypeBuilder. Fixes #82018
4984 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
4986 * object.c: forgot commit of mono_class_setup_methods () to access
4988 * object-internals.h: added a few more handy fields to
4991 2007-07-11 Zoltan Varga <vargaz@gmail.com>
4993 * object.c (build_imt): Call mono_class_setup_methods () before accessing
4996 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
4998 * class-internals.h, object-internals.h, object.c: IMT-based
4999 interface invocation core from Massimiliano Mantione
5000 (massi@ximian.com) with a reworked arch-specific interface,
5001 bsearch implementation and a few bugfixes and memory savings by me.
5003 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
5005 * class.c (mono_class_create_from_typedef): mono would segfault if
5006 an enum did not have a __value field. It now throws a TypeLoadException
5007 for such cases. Fix bug #82022
5009 2007-07-10 Zoltan Varga <vargaz@gmail.com>
5011 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
5013 2007-07-09 Mark Probst <mark.probst@gmail.com>
5015 * class.c (mono_class_init): If a class is already inited but has
5016 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
5018 2007-07-09 Mark Probst <mark.probst@gmail.com>
5020 * class.c: Properly handle the case of an unimplemented interface
5021 method. Fixes: 81673.
5023 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
5025 * class-internals.h, object.c: cleanup patch from massi: use
5026 MonoVTable->interface_bitmap since the vtable interfaces offset array
5029 2007-07-10 Zoltan Varga <vargaz@gmail.com>
5031 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
5032 GetMDStreamVersion icall instead.
5034 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
5036 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
5037 not use mono_dl_build_path() with a full library name: makes
5038 fallbacks to libgaim and libfam work.
5040 2007-07-06 William Holmes <billholmes54@gmail.com>
5042 * assembly.c: Added a continue statement in probe_for_partial_name when
5043 parse_assembly_directory_name fails. Fixes : 82002
5045 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
5047 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
5048 and added a verification for TYPEDBYREF.
5049 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
5050 make native int interchangeable with int32 and some small cleanup and formating.
5051 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
5052 handle byref of byref.
5053 * verify.c (push_local): handle byref of byref.
5054 * verify.c (do_binop): invalid mix of values is unverifiable
5055 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
5056 added visibility checks
5057 * verify.c (field related method): added visibility checks
5058 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
5060 2007-07-06 Zoltan Varga <vargaz@gmail.com>
5062 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
5065 2007-07-05 Zoltan Varga <vargaz@gmail.com>
5067 * profiler.c (mono_profiler_load): Fix an off-by-one error.
5069 * marshal.c (emit_marshal_string): When returning a string from managed code,
5070 allways make a copy even for unicode strings. Fixes #81990.
5072 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
5074 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
5075 of byref generic inst types (bug #81997).
5077 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
5079 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
5080 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
5082 2007-07-02 Zoltan Varga <vargaz@gmail.com>
5084 * marshal.c (emit_marshal_string): Add support for unicode strings in
5085 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
5087 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
5089 * verify.c: field load/store are now verified, missing only access checks now
5091 2007-06-28 Martin Baulig <martin@ximian.com>
5093 * mono-debug.c (mono_debug_debugger_version): New public variable.
5095 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
5097 * locales.c: When constructing DateTimeFormat or NumberFormat for
5098 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
5099 MonoCultureInfo contructed from the current locale is always
5100 read-only and has UseUserOverride set to true. All MonoCultureInfo
5101 instances returned for GetCultures have both IsReadOnly and
5102 UseUserOverride set to true. Fixes part of bug #81930.
5104 2007-06-22 Jonathan Chambers <joncham@gmail.com>
5106 * icall-def.h: Update System.__ComObject icalls
5107 * marshal.c: Avoid managed transition (and object creation)
5108 when looking up COM interface in RCW.
5111 Code is contributed under MIT/X11 license.
5113 2007-06-22 Zoltan Varga <vargaz@gmail.com>
5115 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
5116 to avoid crashes during assembly unloading.
5118 2007-06-22 Raja R Harinath <rharinath@novell.com>
5120 Fix MethodInfo.IsGenericMethodDefinition
5121 * reflection.c (mono_reflection_bind_generic_method_parameters):
5122 Rearrange code to ensure we always uses a generic method definition.
5123 * class.c (mono_class_inflate_generic_method_full): Set
5124 'generic_container' field only for generic method definitions.
5125 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
5126 Use presense of 'generic_container' field as indication of being a
5127 generic method definition.
5129 2007-06-21 Zoltan Varga <vargaz@gmail.com>
5131 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5133 * object-internals.h: Reflect changes in the layout of the managed Delegate
5136 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
5137 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
5138 runtime memory used by the dynamic method. Fixes #77146.
5140 2007-06-21 Dick Porter <dick@ximian.com>
5143 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
5144 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
5147 2007-06-21 Raja R Harinath <rharinath@novell.com>
5149 * reflection.c (method_encode_methodspec): Add a tripwire.
5150 * class.c (inflate_generic_type): The fully open generic type is
5151 not the same as the generic type definition.
5153 2007-06-21 Martin Baulig <martin@ximian.com>
5155 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
5157 * mono-debug-debugger.h
5158 (MonoDebuggerBreakpointInfo): Removed.
5159 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
5160 (mono_debugger_remove_breakpoint): Likewise.
5161 (mono_debugger_breakpoint_callback): Likewise.
5162 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
5164 2007-06-21 Raja R Harinath <rharinath@novell.com>
5166 * metadata.c (mono_metadata_lookup_generic_class): The fully open
5167 generic type is not the same as the generic type definition.
5168 * class.c (mono_generic_class_get_class): Likewise.
5170 2007-06-20 Geoff Norton <gnorton@customerdna.com>
5172 * icall.c: The second argument to
5173 System.Reflection.MethodBase.GetMethodFromHandleInternalType
5174 is a MonoType not a MonoClass.
5176 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
5178 * verify.c: support for function pointers in the verifier
5180 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
5182 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
5184 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
5186 * assembly.c: removed Mono.Data.SqliteClient from the list of
5187 forward-compatible assemblies as it breaks the ABI (bug #81899).
5189 2007-06-19 Raja R Harinath <rharinath@novell.com>
5191 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
5192 lookup/update with the loader lock.
5193 * reflection.c (mono_class_bind_generic_parameters): No need to
5194 protect mono_metadata_lookup_* with the loader lock.
5195 * class.c (inflate_generic_type): Likewise.
5197 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
5198 on a generic instantiated type.
5200 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
5202 *verify.c: produce meanfull error messages on verification error
5203 *verify.c: fixed some cases of verification errors reported as validation errors
5204 *pedump.c: fixed the error name array, now it shows validation errors properly
5205 *verify.h: fixed the contant that should be used for verification errors
5207 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5209 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
5210 for bug #77596, 81858 and 80743 (generics data structures on domain
5213 2007-06-15 Raja R Harinath <rharinath@novell.com>
5215 Avoid allocating 'MonoGenericContext' on the heap.
5216 * class-internals (_MonoMethodInflated::context): Make field
5217 inline, not a pointer.
5218 * loader.c (method_from_methodspec): Allocate 'new_context' on the
5219 stack. Use the context embedded within the inflated method as the
5220 hash key, rather than 'new_context'.
5221 * class.c (inflate_generic_context): Simplify. Return a struct
5222 rather than allocating on the heap.
5223 (mono_class_inflate_generic_method_full): Update to changes. Now,
5224 doesn't salt away a copy of the context -- simplifying the
5225 lifetime rules of a 'MonoGenericContext *'.
5226 (mono_method_get_context): Return pointer to embedded context.
5227 (setup_generic_array_ifaces): Allocate temporary context on stack.
5228 * reflection.c (inflate_mono_method): Likewise.
5229 (mono_reflection_bind_generic_method_parameters): Likewise.
5230 Use the context embedded within the inflated method as the hash key.
5232 Avoid a source of allocation of 'MonoGenericContext'.
5233 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
5234 and 'cached_context' fields into embedded 'MonoGenericContext' field.
5235 * class.c: Update to changes.
5236 (mono_generic_class_get_context): Simplify drastically. Now just
5237 returns a pointer to the field.
5238 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
5239 argument as a const pointer.
5240 (mono_metadata_generic_context_equal): Likewise.
5241 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
5244 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
5246 * verify.c improved the handling of brtrue/brfalse, factored out common code
5248 2007-06-14 Raja R Harinath <rharinath@novell.com>
5250 Kill MonoGenericMethod.
5251 * class-internals.h (MonoGenericContext::method_inst): Rename from
5252 'gmethod' and convert to a MonoGenericInst.
5253 (MonoGenericMethod): Remove.
5254 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
5255 * loader.c (method_from_methodspec): Update to changes. Use a
5256 MonoGenericContext as the key to the hashtable.
5257 * metadata.c (mono_metadata_generic_context_equal): Rename from
5258 'mono_metadata_generic_method_equal' and take MonoGenericContext.
5259 (mono_metadata_generic_context_hash): Likewise from
5260 'mono_metadata_generic_method_hash'. Change hash function.
5261 (mono_metadata_load_generic_params): Update to changes.
5262 (mono_get_shared_generic_method): Remove.
5263 * metadata-internals.h (mono_get_shared_generic_method): Remove.
5264 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
5265 (inflate_generic_context): Likewise.
5266 (mono_class_inflate_generic_method_full): Likewise.
5267 (setup_generic_array_ifaces): Likewise.
5268 (mono_class_create_from_typespec): Likewise.
5269 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
5270 (method_encode_methodspec): Update callsite.
5271 (reflection_methodbuilder_to_mono_method): Update to changes.
5272 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
5273 MonoGenericContext as the key to the hashtable.
5274 (inflate_mono_method): Update to changes.
5276 * class-internals.h (MonoGenericMethod::container): Remove.
5277 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
5279 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
5281 * profiler-private.h, profiler.c, profiler.h: added API to profile
5284 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
5286 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
5288 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
5290 * verify.c: method invocation is now validated, now we verify parameter types on stack.
5291 Fixed overflow and underflow not aborting the verification process.
5293 2007-06-13 Mark Probst <mark.probst@gmail.com>
5295 * class-internals.h (MonoStats): Added stats entries for dynamic
5298 2007-06-12 Zoltan Varga <vargaz@gmail.com>
5300 * loader.c (mono_free_method): Free header->locals and header->clauses.
5302 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
5305 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
5307 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
5309 2007-06-12 Raja R Harinath <rharinath@novell.com>
5311 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
5314 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
5316 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
5318 2007-06-11 Raja R Harinath <harinath@gmail.com>
5320 MonoGenericMethod on a diet
5321 * class-internals.h (_MonoMethodInflated::reflection_info): Move
5323 (_MonoGenericMethod::reflection_info): ... from here.
5324 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
5326 * reflection.c (inflate_mono_method): Likewise.
5327 (mono_reflection_bind_generic_method_parameters): Likewise.
5329 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
5331 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
5332 *verify.c: factored long ldarg forms to share code with short forms
5334 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
5336 *verify.c: fixed code formating factored some duplicate code
5339 *verify.h: fixed binary incompatibility introduced earlier
5341 *pedump.c: fixed formating
5343 2007-06-11 Raja R Harinath <harinath@gmail.com>
5345 Fix assertion when disassembling Mono.C5.dll
5346 * loader.c (method_from_methodspec): Avoid inflating a method
5347 twice with the same context. If the methodref is inflated, use
5348 the declaring method instead.
5350 * class.c (mono_class_from_generic_parameter): Fix case similar to
5351 bug #81830 handled below, but for method containers.
5353 2007-06-10 Raja R Harinath <harinath@gmail.com>
5355 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
5356 get_shared_generic_class. Directly inflate the instance.
5357 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
5358 (inflate_generic_class): Delete.
5359 (get_shared_generic_class): Delete. Move setting of
5360 'cached_class' and 'cached_context' ...
5361 * metadata.c (mono_metadata_lookup_generic_class): ... here.
5363 * metadata.c (mono_metadata_lookup_generic_class): Change
5364 signature to take the components of a MonoGenericClass rather than
5365 an allocated MonoGenericClass. Change semantics to be intern-like.
5366 * reflection.c (mono_class_bind_generic_parameters): Update to
5367 changes. Make locking region tighter.
5368 * class.c (inflate_generic_class): Update to changes.
5369 (get_shared_generic_class): Likewise.
5370 * metadata-internals.h: Likewise.
5372 * reflection.c (mono_class_bind_generic_parameters): Take and
5373 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
5374 (mono_reflection_bind_generic_parameters): Use
5375 'mono_class_bind_generic_parameters' rather than duplicate the code.
5376 * class.c (mono_bounded_array_class_get): Update to changes.
5377 * object-internals.h: Likewise.
5379 * reflection.c (mono_class_bind_generic_parameters): Only support
5380 parameterizing generic type definitions. Remove support for other
5383 2007-06-08 Zoltan Varga <vargaz@gmail.com>
5385 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
5387 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
5388 in the dynamic case.
5390 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
5392 * threads.c: When cleaning up thread, reset the Background bit.
5395 2007-06-08 Jonathan Chambers <joncham@gmail.com>
5397 * metadata.c: Move variable declarations to top of scope.
5398 * verify.c: Move variable declarations to top of scope.
5400 Code is contributed under MIT/X11 license.
5402 2007-06-08 Raja R Harinath <rharinath@novell.com>
5404 * reflection.c (mono_class_bind_generic_parameters): Replace
5405 open-coded loop with mono_metadata_inflate_generic_inst.
5407 * class.c (get_shared_generic_class): Don't call
5408 mono_get_shared_generic_inst. Use the container's own
5411 * metadata.c (mono_metadata_load_generic_params): Move
5412 initialization of 'context' field here from ...
5413 * class.c (mono_class_create_from_typedef): ... here, and ...
5414 * loader.c (mono_get_method_from_token): ... here.
5416 * class.c (get_shared_generic_class): Rename from
5417 mono_get_shared_generic_class and make static.
5418 (mono_get_shared_generic_inst): Move to metadata.c.
5419 * loader.c (mono_get_shared_generic_method): Likewise.
5420 * class-internals.h, metadata-internals.h: Update to changes.
5423 * class.c (mono_class_from_generic_parameter): Don't assume a
5424 generic container owner exists. Generic containers from monodis
5427 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
5429 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
5430 * verify.h: new typedefs to returns the non-verifiable status
5431 * verify.c: initial implementation of generics, stack merging and object compatibility check
5433 2007-06-06 Mark Probst <mark.probst@gmail.com>
5435 * class.c, image.c, class-internals.h (MonoImage): class_cache is
5436 a MonoInternalHashTable again (fixed bug in internal hash table
5439 2007-06-06 Mark Probst <mark.probst@gmail.com>
5441 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
5442 MonoInternalHashTable again (fixed bug in internal hash table
5445 2007-06-06 Mark Probst <mark.probst@gmail.com>
5447 * class.c, image.c, class-internals.h, domain.c,
5448 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
5449 changes. Have to figure out what makes them break the SWF
5452 2007-06-04 Mark Probst <mark.probst@gmail.com>
5454 * class.c, image.c, class-internals.h (MonoImage): class_cache is
5455 a MonoInternalHashTable now.
5457 2007-06-04 Mark Probst <mark.probst@gmail.com>
5459 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
5460 MonoInternalHashTable now.
5462 2007-05-31 Zoltan Varga <vargaz@gmail.com>
5464 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
5467 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
5469 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
5470 dependent trampoline.
5472 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5474 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
5476 2007-05-29 Robert Jordan <robertj@gmx.net>
5478 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
5480 2007-05-28 Zoltan Varga <vargaz@gmail.com>
5482 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
5484 2007-05-25 Jonathan Chambers <joncham@gmail.com>
5486 * marshal.c: Fix interface lookup loops for
5487 cominterop_get_com_slot_for_method and
5488 cominterop_get_method_interface. Only need to lookup
5489 if type is a class, else use interface type method is on.
5491 Code is contributed under MIT/X11 license.
5493 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
5495 * reflection.c: HasSecurity can be present even if no specially
5496 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
5497 SecurityAttribute). Fix CAS regression tests on buildbot.
5499 2007-05-24 Jonathan Chambers <joncham@gmail.com>
5501 * appdomain.c: Add configure checks for header files.
5502 * image.c: Add configure checks for header files.
5503 * file-io.c: Add configure checks for header files.
5504 * debug-mono-symfile.c: Add configure checks for header files.
5505 * threadpool.c: Add configure checks for header files.
5506 * console-io.c: Add configure checks for header files.
5507 * profiler.c: Add configure checks for header files.
5508 * rawbuffer.c: Add configure checks for header files.
5509 * icall.c: Add configure checks for header files.
5510 * rand.c: Add configure checks for header files.
5511 * socket-io.c: Add configure checks for header files.
5513 Code is contributed under MIT/X11 license.
5515 2007-05-24 Zoltan Varga <vargaz@gmail.com>
5517 * reflection.c (mono_custom_attrs_from_builders): Remove the
5518 assertion as it breaks the build.
5520 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
5522 * reflection.c (lookup_custom_attr): Make a copy here too.
5524 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
5527 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
5530 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
5533 2007-05-22 Zoltan Varga <vargaz@gmail.com>
5535 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
5536 (load_cattr_value): Ditto.
5538 2007-05-20 Zoltan Varga <vargaz@gmail.com>
5540 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
5542 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
5544 * threads.c: In "start_wrapper", set apartment_state to MTA if
5545 apartment_state is Unknown and we're running on 2.0 profile or
5547 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
5548 to main method, then set apartment_state to Unknown on 1.0 profile,
5549 and MTA on 2.0 profile.
5551 2007-05-16 Jb Evain <jb@nurv.fr>
5553 * class-internals.h (MonoDefaults): Add an attribute_class and
5554 customattribute_data_class.
5555 * domain.c (mono_init_internal): Populate them.
5556 * reflection.c: Use them to remove duplicates. Make a vew
5557 MonoClass variables `static'.
5559 2007-05-15 Massimiliano Mantione <massi@ximian.com>
5561 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
5562 step in implementing IMT, so that all isinst checks now can go
5564 This was needed because vtables for TransparentProxy need to look
5565 like the vtable of the "target" class, so they need to point to
5566 its interface bitmap directly.
5568 * object.c: inside "mono_class_create_runtime_vtable" and
5569 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
5571 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
5573 * object-internals.h
5574 culture-info.h : added territory field in MonoCulture and
5575 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
5576 * locales.c : fill territory field above too.
5577 * culture-info-table.h : regenerated.
5579 2007-05-12 Zoltan Varga <vargaz@gmail.com>
5581 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
5584 2007-05-11 Jonathan Chambers <joncham@gmail.com>
5586 * object.c: Always initialize apartment, even if
5587 there is no custom attributes on entry point.
5589 Code is contributed under MIT/X11 license.
5591 2007-05-10 Jonathan Chambers <joncham@gmail.com>
5593 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
5594 * metadata.c: If no encoding is set, check for unicode
5597 Code is contributed under MIT/X11 license.
5599 2007-05-09 Jonathan Chambers <joncham@gmail.com>
5601 * threads.c: Handle if mono_thread_current returns NULL
5603 Code is contributed under MIT/X11 license.
5605 2007-05-09 Jonathan Chambers <joncham@gmail.com>
5607 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
5608 in start_wrapper. Added mono_thread_init_apartment_state and
5609 mono_thread_cleanup_apartment_state.
5610 * object.c: Initialize thread apartment state on main thread
5611 by checking for STAThreadAttribute on entry point.
5612 * object-internals.h: Add apartment_state field to MonoThread.
5613 * threads-types.h: Add unmanaged definition of
5614 System.Threading.ApartmentState, MonoThreadApartmentState.
5616 Code is contributed under MIT/X11 license.
5618 2007-05-08 Jonathan Chambers <joncham@gmail.com>
5620 * class.c: Fix windows build.
5621 * class-internals.h: Fix windows build.
5623 Code is contributed under MIT/X11 license.
5625 2007-05-08 Robert Jordan <robertj@gmx.net>
5627 * process.c (CreateProcess_internal):
5628 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
5629 .CreateNoWindow was specified. Fixes #81496.
5631 2007-05-08 Massimiliano Mantione <massi@ximian.com>
5633 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
5634 step in implementing IMT, replaced it with two compact arrays
5635 (interfaces_packed and interface_offsets_packed) and a bitmap that
5636 is used for isinst checks (interface_bitmap).
5638 * class.c: (compare_interface_ids): compare function to pass to
5639 bsearch when looking for an interface with a given id.
5640 (mono_class_interface_offset): reimplemented using bsearch on
5641 interfaces_packed, getting the offset from interface_offsets_packed.
5642 (print_implemented_interfaces): utility debugging function.
5643 (setup_interface_offsets): reworked to initialize interfaces_packed,
5644 interface_offsets_packed and interface_bitmap.
5646 * object.c: replaced all accesses to "MonoClass.interface_offsets"
5647 with uses of interfaces_packed and interface_offsets_packed.
5649 2007-05-08 Massimiliano Mantione <massi@ximian.com>
5651 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
5652 mono_class_interface_offset prototype to wrap all accesses to
5653 "MonoClass.interface_offsets".
5655 * class.c: Implemented mono_class_interface_offset, and wrapped all
5656 accesses to "MonoClass.interface_offsets".
5658 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
5659 "MonoClass.interface_offsets".
5661 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
5663 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
5664 GetMethodFromHandle overloads (bug #78637).
5666 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
5668 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
5669 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
5671 2007-05-01 Zoltan Varga <vargaz@gmail.com>
5673 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
5676 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
5678 (mono_custom_attrs_from_index): Ditto.
5680 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
5683 2007-04-30 Zoltan Varga <vargaz@gmail.com>
5685 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
5686 is now allocated from a mempool.
5688 2007-04-28 Zoltan Varga <vargaz@gmail.com>
5690 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
5691 caller holds threads_lock, leading to deadlocks. Fixes #81476.
5693 2007-04-26 Zoltan Varga <vargaz@gmail.com>
5695 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
5696 mono_loader_clear_error () too late. Fixes #81463.
5698 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
5700 * culture-info-table.h : regenerated.
5702 2007-04-25 Zoltan Varga <vargaz@gmail.com>
5704 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
5707 2007-04-25 Dick Porter <dick@ximian.com>
5709 * Makefile.am: Put the mingw enforced-optimisation back into the
5710 PLATFORM_WIN32 section.
5712 2007-04-24 Zoltan Varga <vargaz@gmail.com>
5714 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
5717 * image.c (mono_image_load_module): New API function to load a module reference.
5719 * image.c (load_modules): Load modules lazily. Fixes #80812.
5721 * class.c (mono_class_from_typeref): Use mono_image_load_module.
5723 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
5725 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
5726 to mono_image_load_module_dynamic.
5728 2007-04-23 Jonathan Chambers <joncham@gmail.com>
5730 * marshal.c: Fix calling convention for CCW on non-windows
5731 platforms. STDCALL on windows, CDECL everywhere else to work
5732 with XPCOM and MainWin COM.
5734 Code is contributed under MIT/X11 license.
5736 2007-04-23 Martin Baulig <martin@ximian.com>
5741 (method_from_memberref): Added `gboolean *used_context' argument.
5742 (mono_get_method_from_token): Likewise.
5743 (mono_get_method_full): Don't insert the method in the cache when
5744 `used_context' is true.
5746 2007-04-23 Raja R Harinath <rharinath@novell.com>
5748 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
5750 * reflection.c (mono_reflection_bind_generic_parameters): Don't
5751 create new MonoTypes for returned types.
5752 * class.c (mono_generic_class_get_class): Export mono-internal.
5753 * class-internals.h: Update to changes.
5755 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
5757 * threadpool.c, threadpool.h, icall-def.h: patch from
5758 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
5760 2007-04-18 Zoltan Varga <vargaz@gmail.com>
5762 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
5764 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
5766 * threads.c (mono_thread_get_stack_bounds): New helper function.
5768 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
5769 Correctly compute stack bounds when attaching. Fixes #81394.
5771 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
5773 * reflection.c: fix handling of doubles in custom attributes
5774 for the arm-fpa format (bug #81368).
5776 2007-04-18 Raja R Harinath <rharinath@novell.com>
5778 * reflection.c (assembly_add_win32_resources): Mildly relax an
5779 bounds check to let the end pointer point just past the end of the
5780 allocated buffer. (may fix #81384)
5782 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
5784 * culture-info-table.h : regenerated.
5786 2007-04-07 Zoltan Varga <vargaz@gmail.com>
5788 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
5789 the thread is aborted early.
5791 2007-04-05 Dick Porter <dick@ximian.com>
5793 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
5794 FindFirstFile()/FindNextFile() to find entries. This lets the
5795 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
5798 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
5800 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
5802 2007-04-04 Martin Baulig <martin@ximian.com>
5805 (mono_method_desc_full_match): Add support for nested classes.
5807 2007-04-02 Zoltan Varga <vargaz@gmail.com>
5809 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
5811 2007-04-01 Zoltan Varga <vargaz@gmail.com>
5813 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
5814 waiting for too many threads.
5816 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
5818 * environment.c: Fix return value check on uname so we can get the
5819 executing version on Solaris operating systems.
5821 2007-03-28 Jb Evain <jbevain@gmail.com>
5823 * class.c (mono_type_get_name_recurse): Complete the
5824 fix for the creation of assembly qualified names for
5825 pointer types. Fixes #81208.
5827 2007-03-27 Dick Porter <dick@ximian.com>
5829 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
5830 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
5834 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
5835 the value of ReleaseMutex().
5837 2007-03-27 Dick Porter <dick@ximian.com>
5839 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
5840 in little-endian order, not network endian, so must be converted
5841 to host endian here. Fixes bug 80593.
5843 2007-03-22 Jb Evain <jbevain@gmail.com>
5845 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
5846 qualified names for pointer types. Fixes #81208.
5848 2007-03-21 Jonathan Chambers <joncham@gmail.com>
5850 * marshal.c: Add support for PreserveSigAttribute.
5852 Code is contributed under MIT/X11 license.
5854 2007-03-14 Zoltan Varga <vargaz@gmail.com>
5856 * process.c: Fix endianness issues. Fixes #81126.
5858 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
5859 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
5861 * image.c (mono_image_lookup_resource): Make this work on big-endian
5862 machines.Change API contract so the caller needs to free the return value.
5864 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
5867 2007-03-14 Martin Baulig <martin@ximian.com>
5869 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
5870 mono_type_get_desc() as well.
5872 2007-03-13 Jonathan Chambers <joncham@gmail.com>
5874 * icall.c: Fix environ access in VS.
5876 2007-03-13 Alp Toker <alp@atoker.com>
5878 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
5879 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
5882 2007-03-12 Zoltan Varga <vargaz@gmail.com>
5884 * reflection.c (mono_reflection_create_dynamic_method): Add support for
5885 circular references among dynamic methods. Fixes #81091.
5887 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
5889 2007-03-09 Martin Baulig <martin@ximian.com>
5891 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
5893 2007-03-09 Jonathan Chambers <joncham@gmail.com>
5895 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
5896 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
5898 Code is contributed under MIT/X11 license.
5900 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
5902 * loader.c: Reapply patch for bug #79424.
5904 2007-03-06 Zoltan Varga <vargaz@gmail.com>
5906 * metadata.c (mono_type_to_unmanaged): Only convert object to
5907 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
5909 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
5911 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
5912 (and incorrectly set) is_reference field from MonoGenericInst.
5914 2007-03-06 Zoltan Varga <vargaz@gmail.com>
5916 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
5919 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
5921 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
5923 2007-03-05 Miguel de Icaza <miguel@novell.com>
5925 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
5926 FileOptions.1 value to mean "temporary", map that to
5927 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
5931 2007-03-03 Marek Habersack <mhabersack@novell.com>
5933 * appdomain.c: implement MS .Net style shadow copying. Copies of
5934 the assemblies are made in a subdirectory of the dynamic base
5935 directory, the assembly names are preserved.
5936 Copy .mdb and .config files along with the assemblies being shadowed.
5938 2007-02-28 Zoltan Varga <vargaz@gmail.com>
5940 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
5941 (emit_marshal_handleref): Ditto.
5943 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
5944 on Visual C++. Fixes #80671.
5946 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
5948 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
5949 for clone operations.
5951 2007-02-28 Zoltan Varga <vargaz@gmail.com>
5953 * marshal.c: Fix warnings.
5955 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
5957 * loader.c: allow case-insensitive matching of the dll name
5958 in dllmap handling when prefixed with "i:".
5960 2007-02-20 Jonathan Chambers <joncham@gmail.com>
5962 * threads.c: Fix #ifdef for dummy_apc function for VS.
5964 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
5966 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
5968 2007-02-19 Massimiliano Mantione <massi@ximian.com>
5969 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
5970 giving precedence to the methods with a fully qualified name
5971 (InterfaceName.MethodName) when building the interface sections
5974 2007-02-16 Dick Porter <dick@ximian.com>
5976 * threadpool.c (append_job): Fix fast-path array handling, so it's
5977 less likely the array will grow exponentially when the load is
5980 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
5982 * metadata-internals.h, loader.c: fix dllmap lookup order
5983 for non-function maps, too, and prepare for fallback code.
5985 2007-02-12 Robert Jordan <robertj@gmx.net>
5987 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
5988 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
5989 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
5990 GlobalFree. Fixes a part of bug #77075.
5992 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
5994 * loader.c: implemented typedef parent in field memberref.
5996 2007-02-11 Jonathan Chambers <joncham@gmail.com>
5998 * marshal.c: Fix warnings and remember to call Release on
6001 Code is contributed under MIT/X11 license.
6003 2007-02-10 Miguel de Icaza <miguel@novell.com>
6005 * class-internals.h: Add MonoHandleRef definition, and
6006 handleref_class to mono_defaults.
6008 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
6009 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
6011 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
6012 (do nothing on this stage)
6013 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
6014 (emit_marshal_handleref): New method, used for argument handling
6017 2007-02-08 Jonathan Chambers <joncham@gmail.com>
6019 * class.c (mono_class_setup_parent): Lazily init com types.
6020 * domain.c (mono_init_internal, mono_init_com_types): Lazily
6022 * object.c (mono_remote_class_vtable): Lazily init com types.
6023 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
6024 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
6025 * domain-internals.h: Expose mono_init_com_types.
6026 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
6027 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
6028 Add support for COM Callable Wrapper marshalling.
6029 * marshal.h: Add icall definitions.
6030 * gc.c: Handle freeing of CCWs in finalizer code.
6032 Code is contributed under MIT/X11 license.
6034 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
6036 * reflection.c: changed all the signature encoding code to use
6037 a variable-sized buffer.
6039 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6041 * marshal.c: locking fixes: never take the loader lock
6042 or other runtime locks when holding the marshal lock
6045 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
6047 * marshal.c: make the delegate function pointer mapping
6048 work for the moving GC.
6050 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
6052 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
6055 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6057 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
6060 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6062 * threadpool.c: made the code moving-GC safe.
6064 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
6066 * assembly.c, boehm-gc.c, class-internals.h, class.c,
6067 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
6068 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
6070 * reflection.c: warning cleanup, some threading and moving GC fixes.
6072 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
6074 * class.c, loader.c: create the needed Set/Get/Address array methods
6075 as well as the .ctors in mono_class_init (), fixes bug #80567.
6077 2007-01-24 Zoltan Varga <vargaz@gmail.com>
6079 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
6080 we doesn't decrease its alignment. Should fix the sparc build.
6082 2007-01-24 Dick Porter <dick@ximian.com>
6085 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
6086 Create the returned object if we need to ignore an unsupported
6087 socket option. Fixes a segfault reported by Atsushi.
6089 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
6091 * class.c, object.c: restrict GC-tracked fields to
6092 UIntPtr fields used inside corlib, so we provide better
6093 type info to the GC and also allow broken packing as in
6096 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
6098 * sgen-gc.c: removed duplicated function.
6100 2007-01-19 Miguel de Icaza <miguel@novell.com>
6102 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
6103 value that means that the value is not supported, but that we
6104 should not return a failure, but instead report this as a
6105 successful operation.
6107 2007-01-19 Raja R Harinath <rharinath@novell.com>
6109 Fix tests/bug79956.2.il
6110 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
6111 (mono_generic_class_get_class): If the generic definition in an
6112 enum, copy over other fields related to it.
6114 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6116 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
6117 genericinst enums (bug #79215).
6119 2007-01-17 Massimiliano Mantione <massi@ximian.com>
6120 * class.c: Fix bug 80307.
6122 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
6124 * image.c: if the file table is not present, try to load
6125 all the modules, since we don't have info about them
6126 having or not metadata (bug #80517).
6127 * assembly.c: allow mono_assembly_load_references () to
6128 work for netmodules.
6130 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
6132 * image.c, metadata-internals.h, object.c: execute module
6133 cctors when running on the 2 runtime if present (bug #80487).
6135 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
6137 * icall.c: optimized InitializeArray() on bigendian.
6139 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
6141 * icall.c: fix for the broken ARM FPA double format.
6143 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6145 * icall.c: handle endian issues for r4 and r8 types, too, in
6146 the InitializeArray() icall.
6148 2007-01-15 Miguel de Icaza <miguel@novell.com>
6150 * loader.c (mono_loader_error_prepare_exception): Clear the error
6151 once we have extracted the information from it, do this before we
6152 call into the JIT's class loading mechanisms.
6154 * object.c (mono_class_create_runtime_vtable): Do not clear the
6155 loader error before calling mono_class_get_exception_for_failure
6156 as the loader error is needed inside
6157 mono_class_get_exception_for_failure to throw the error (thinko).
6161 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6163 * reflection.c: align fields rva data so it's faster to load at
6166 2007-01-12 Raja R Harinath <rharinath@novell.com>
6168 Prepare to simplify GenericMethod handling.
6169 * class-internals.h (mono_method_get_context): New accessor function.
6170 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
6171 rather than directly accessing '->context' field.
6173 * class-internals.h (_MonoGenericParam.method): Move ...
6174 (_MonoGenericContainer): ... here. Add into union with klass field.
6175 * class.c, icall.c, loader.c, metadata.c, reflection.c:
6178 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
6180 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
6181 the wrapper type enum and reduce relocations.
6183 2007-01-12 Raja R Harinath <rharinath@novell.com>
6185 * reflection.c (inflate_mono_method): Reuse method instantiation
6186 from the generic method, if available.
6188 2007-01-11 Jonathan Chambers <joncham@gmail.com>
6190 * marshal.c (emit_marshal_variant): Fix conv_arg
6191 type in last commit, based on whether parameter is byref.
6193 2007-01-11 Jonathan Chambers <joncham@gmail.com>
6195 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
6197 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
6198 MONO_TYPE_OBJECT back for VARIANT support.
6200 2007-01-11 Jonathan Chambers <joncham@gmail.com>
6202 * marshal.c, marshal.h, icall-def.h: Implement
6203 Marshal.ReAllocCoTaskMem.
6205 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
6207 * marshal.c: memory retention fixes: use the proper
6208 image cache for runtime_invoke method lookups.
6210 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6212 * mempool.c: added code to help debug mempool allocations.
6214 2007-01-11 Dick Porter <dick@ximian.com>
6216 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
6217 support (experimenting with faking it with IP_MTU_DISCOVER for
6218 systems that don't have IP_DONTFRAGMENT.)
6219 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
6222 * icall-def.h: new System.Net.Sockets.Disconnect icall.
6224 * socket-io.h: Add new fields to MonoSocketAsyncResult
6225 corresponding to the new ones in Socket.cs.
6227 2007-01-11 Raja R Harinath <rharinath@novell.com>
6229 Fix IronPython regression mentioned in #80249
6230 * metadata.c (do_mono_metadata_parse_generic_class): Clear
6231 'cached_context' field, since it may have been initialized as a
6232 side-effect of metadata parsing.
6234 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
6235 (_MonoGenericClass.cached_class): Move here and rename from lone
6236 remaining field of ...
6237 (_MonoInflatedGenericClass): ... this. Remove.
6238 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
6241 Fix mcs/tests/test-128.cs regression.
6242 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
6243 2007-01-10 change below.
6244 [MONO_TYPE_OBJECT]: Recurse into array case.
6246 2007-01-11 Raja R Harinath <harinath@gmail.com>
6248 * class-internals.h (mono_get_inflated_generic_class): Remove.
6249 * class.c (mono_get_inflated_generic_class): Remove.
6250 (mono_generic_class_get_class): Rename from
6251 mono_class_create_generic.
6252 (mono_class_from_mono_type) [GENERICINST]: Use it.
6253 * reflection.c, metadata.c: Update to changes. Use
6254 'mono_class_from_mono_type'.
6256 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
6258 * reflection.c: use passed type when encoding an array element
6259 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
6261 2007-01-09 Robert Jordan <robertj@gmx.net>
6263 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
6264 result arguments (someDelegate.EndInvoke (unrelatedAres)).
6267 2007-01-09 Raja R Harinath <rharinath@novell.com>
6269 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
6271 * object.c (set_value): Avoid aliasing between type->data.klass
6272 and type->data.generic_class.
6274 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
6276 2007-01-08 Raja R Harinath <rharinath@novell.com>
6278 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
6279 between type->data.klass and type->data.generic_class.
6281 2007-01-08 Lluis Sanchez <lluis@ximian.com>
6283 * marshal.c: In MS.NET, StringBuilder objects are not copied by
6284 value in out parameters.
6286 2007-01-08 Raja R Harinath <rharinath@novell.com>
6288 Simplify invariant for MonoGenericClass::klass field.
6289 * class.c (mono_class_create_generic): Verify 'klass' is null.
6290 * metadata.c (do_mono_metadata_parse_generic_class): Don't
6291 initialize 'klass' field.
6293 2007-01-05 Raja R Harinath <rharinath@novell.com>
6295 Ongoing work to avoid redundant data and simplify invariants.
6296 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
6297 'generic_class', and change type to a GenericInst.
6298 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
6299 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
6301 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
6303 * class.c : skip io-layer under PLATFORM_WIN32.
6305 2007-01-03 Tor Lillqvist <tml@novell.com>
6307 Fix #80305: In a bundled executable, look in the bundled exe
6308 assembly to determine the runtime version. Add the possibility to
6309 bundle also the machine.config file.
6311 * assembly.c (mono_assembly_open_from_bundle): Make
6312 non-static. Allow being called even if we have no bundled
6313 assemblies, and return NULL right away in that case.
6315 * domain-internals.h: Declare mono_assembly_open_from_bundle()
6318 * domain.c (app_config_parse): Take an assembly exe file name as
6319 parameter instead of a config file name. Check for a bundled
6320 config file for that assembly by calling
6321 mono_config_string_for_assembly_file() (see below) before looking
6322 for one in the file system.
6323 (get_runtimes_from_exe): Corrsponding change to call of
6325 (get_runtimes_from_exe): Check for bundled assembly exe file first
6326 by calling mono_assembly_open_from_bundle(). If no bundled
6327 assembly exe file is found, call mono_image_open() as before to
6328 look it up in the file system.
6330 * mono-config.c: Add variable bundled_machinec_onfig.
6331 (mono_config_string_for_assembly_file): New function.
6332 (mono_config_for_assembly): Move code snippet that looks for a
6333 bundled assembly .config file into the above new function. Call
6335 (mono_register_machine_config, mono_get_machine_config): New
6336 functions to set and retrieve
6338 * assembly.h: Declare mono_register_machine_config().
6340 * mono-config.h: Declare mono_get_machine_config() and
6341 mono_config_string_for_assembly_file().
6343 * icall.c: No declaration of environ necessary on Win32. It is
6344 declared (as a macro expanding to a function call) in stdlib.h.
6345 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
6346 New internal mono function. Returns the value of
6347 mono_get_machine_config() as a Mono string.
6349 * icall-def.h: Add get_bundled_machine_config().
6351 2007-01-04 Raja R Harinath <rharinath@novell.com>
6353 Remove redundant field
6354 * class-internals.h (_MonoGenericContext.container): Remove field.
6355 * loader.c (mono_method_get_signature_full): Don't parse a
6356 "container" for a signature parse when the signature is inflated
6358 (method_from_methodspec): Likewise, for a generic_inst.
6359 * class.c, metadata.c, reflection.c: Update to changes.
6361 2006-01-04 Raja R Harinath <rharinath@novell.com>
6363 * class-internals.h (_MonoGenericClass): Rename 'context' field to
6364 'cached_context', and change semantics -- it starts off NULL, and
6365 is initialized on demand.
6366 * class.c (mono_generic_class_get_context): New accessor to
6367 replace 'context' field accesses.
6368 (mono_class_get_context): New helper.
6369 (*): Update to changes.
6370 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
6372 2007-01-03 Miguel de Icaza <miguel@novell.com>
6374 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
6375 before the memcpy. Fixes Marshal2 regression.
6377 2007-01-02 Jb Evain <jbevain@gmail.com>
6379 * blob.h: add a MONO_TYPE_ENUM definition
6380 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
6381 fix the encoding of arrays of enums in custom attributes.
6385 2007-01-01 Miguel de Icaza <miguel@novell.com>
6387 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
6388 string is null terminated, but only cut the string short if it
6389 overflows the buffer.
6391 (mono_string_to_byvalstr): Also fix this routine. The code here
6392 was not properly terminating a string (it was only terminated
6393 because of the previous catch-all memset).
6395 I left the memset, because I do not know if applications expect
6396 the runtime to clear this region.
6400 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
6401 Clear the error before returning to unmanaged code to prevent the
6402 runtime from being confused later on (fixes 80420).
6403 (ves_icall_type_from_name): Always call mono_loader_clear_error
6404 after parsing a type that could have failed.
6405 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
6407 * loader.c (mono_loader_clear_error): Fix indentation.
6409 2006-12-28 Martin Baulig <martin@ximian.com>
6411 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
6413 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
6415 * reflection.c: patch from Rolf Bjarne Kvinge to fix
6416 getting a token for an EnumBuilder.
6418 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
6420 * reflection.c: be more careful in case resource generation
6421 fails to create the data array.
6423 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
6425 * sgen-gc.c: write barrier for clone and fix unregister handles.
6427 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6429 * reflection.c: some fixes needed in the generics code for the moving GC.
6431 2006-12-22 Robert Jordan <robertj@gmx.net>
6433 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
6434 account. Fixes bug #80299.
6436 2006-12-21 Raja R Harinath <rharinath@novell.com>
6438 Fix WaitHandle usage in delegates.
6439 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
6440 * object.c (mono_wait_handle_new): Use the property set method to
6441 initialize the handle.
6442 (mono_wait_handle_get_handle): New.
6443 * threadpool.c (mono_async_invoke): Use it.
6444 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
6446 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
6448 2006-12-21 Jonathan Chambers <joncham@gmail.com>
6450 * marshal.c (emit_marshal): Call emit_marshal_variant and
6451 emit_marshal_com_interface when applicable.
6452 (emit_marshal_variant, emit_marshal_com_interface): Add
6453 methods for this case and remove if's from emit_marshal_object.
6455 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
6457 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
6459 2006-12-19 Jonathan Chambers <joncham@gmail.com>
6461 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
6462 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
6463 and GlobalFree on Windows. Remove FIXME.
6465 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
6467 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
6468 implementation for managed objects.
6470 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6472 * object.c: implemented code to be used for checking
6473 that no reference field overlaps with non-references.
6475 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6477 * threadpool.c: fix queue code to be compatible with the
6480 2006-12-18 Miguel de Icaza <miguel@novell.com>
6482 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
6483 in structures by throwing ArgumentNullException.
6485 (emit_marshal_safehandle): Also when they are null parameters.
6487 (emit_marshal_safehandle): Add support for ref
6488 SafeHandles parameters
6490 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6492 * profiler.c: updated to use the mono-dl API instead of
6495 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6497 * profiler.c: updated to use the mono-dl dynamic loading
6498 API instead of gmodule.
6500 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
6502 * profiler.c: use readlink, older versions of glib don't have
6503 g_file_read_link ().
6505 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
6507 * profiler.c: try to detect the path to mono if libc fails to provide
6508 a useful name (bug #80286).
6510 2006-12-16 Raja R Harinath <rharinath@novell.com>
6513 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
6514 instance, use the generic type definition instead.
6515 (ves_icall_Type_GetNestedTypes): Likewise.
6516 * class.c (mono_class_create_generic): Always set the
6517 nested_classes of a generic instance to NULL, even if the generic
6518 type definition has nested types.
6520 2006-12-15 Jonathan Chambers <joncham@gmail.com>
6522 * marshal.c (mono_string_from_bstr): Revert previous Windows change
6525 2006-12-15 Miguel de Icaza <miguel@novell.com>
6527 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
6528 my arguments were in the wrong order. I also fixed the Windows
6529 version which seems to have had the same issue.
6531 (mono_free_bstr): On Unix, this is g_free.
6532 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
6533 conversions (for the tests in corlib to pass).
6535 2006-12-14 Miguel de Icaza <miguel@novell.com>
6537 * marshal.c (emit_ptr_to_object_conv): For now, ignore
6538 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
6539 exception if a ref SafeHandle in a struct has changed).
6541 (emit_struct_conv): Do not perform layout checks for classes
6542 derived from SafeHandle, as those are specially handled.
6544 (emit_object_to_ptr_conv): Add support for
6545 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
6547 (emit_marshal_safehandle): Implement conversion of return values
6548 of safehandles (MARSHAL_ACTION_CONV_RESULT).
6550 * threads.c: WaitHandle now is compiled with two different handles
6551 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
6554 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
6555 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
6556 these routines to cope with both kinds of fields.
6558 2006-12-12 Miguel de Icaza <miguel@novell.com>
6560 * metadata.c (mono_type_to_unmanaged): Handle the case where
6561 type->data.klass is a SafeHandle, and in that case, return the
6562 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
6563 MONO_MARSHAL_CONV_SAFEHANDLE.
6565 2006-12-11 Miguel de Icaza <miguel@novell.com>
6567 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
6568 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
6569 calling emit_marshal_object.
6571 (emit_marshal_safehandle): Implement marshalling of
6572 SafeHandle parameters (no ref support yet).
6574 (MarshalAction): Document the defines as I implement
6575 them for SafeHandle.
6577 (emit_marshal_object): indentation police.
6579 * class-internals.h: Define MonoSafeHandle.
6580 Add safehandle_class to MonoDefaults type.
6582 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
6583 list of classes to check for fields.
6585 * domain.c (mono_init_internal): Add SafeHandle to the list of
6586 mono_defaults loaded.
6588 2006-12-15 Raja R Harinath <rharinath@novell.com>
6591 * reflection.c (mono_reflection_bind_generic_parameters): If the
6592 generic type definition is a type builder, ensure that it is fully
6593 initialized before instantiating it. Kill some dead code.
6595 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
6597 * object.c: clear the loader_error () before loading
6598 more metadata stuff (bug #80258).
6600 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
6602 * icall.c, icall-defs.h: type modifiers icalls for
6603 parameters and properties.
6605 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
6607 * object.c, icall.c: fixed warnings.
6609 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
6611 * marshal.c: fixed a couple of leaks and coding style in a few places.
6613 2006-12-08 Dick Porter <dick@ximian.com>
6615 * process.c: Cope with NULL ProcessStartInfo arguments on windows
6616 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
6619 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
6621 * process.c: ProcessStartInfo may have only filename set and
6622 arguments can be NULL.
6624 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
6626 * icall.c: fix leak found by Robert Jordan.
6628 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
6630 * marshal.c, marshal.h: generate managed method to access an element
6631 of a multi-dimensional array.
6633 2006-11-30 Paolo Molaro (lupus@ximian.com)
6635 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
6637 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6639 * icall.c: back out GetFields () fix until the serialization code is
6640 fixed to not depend on the incorrect behaviour.
6642 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
6644 * profiler.c: provide defaults if none are set.
6646 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6648 * Makefile.am, attrdefs.h: new public header file with
6649 constants for attributes for use by embedders.
6651 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
6653 * icall.c: GetFields () fix for bug #80064.
6655 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
6657 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
6658 removed long unused icalls.
6660 2006-11-27 Jonathan Chambers <joncham@gmail.com>
6663 (mono_marshal_emit_managed_wrapper): Level of indirection for
6664 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
6665 can be generated without a delegate class.
6666 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
6668 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
6670 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6672 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
6675 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6677 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
6678 icall-def.h: added icalls needed by System.GC.
6680 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
6682 * loader.c: ensure the class in catch clauses is handled
6683 correctly for generics methods (fixes bug#79980).
6685 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
6687 * monitor.h, monitor.c: added mono_locks_dump () function
6688 to help debug deadlocks involving managed locks.
6690 2006-11-13 Dick Porter <dick@ximian.com>
6692 * file-io.c (get_file_attributes): If the file is a symlink try
6693 and get the stat data for the target, but also add the
6694 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
6695 the specs for the windows symlink support, but will probably have
6696 to be reworked when I have test data from a vista machine. Fixes
6699 2006-11-13 Dick Porter <dick@ximian.com>
6701 * gc.c (mono_domain_finalize):
6702 * marshal.c (mono_delegate_begin_invoke):
6703 * threadpool.c (socket_io_init, mono_thread_pool_init)
6704 (mono_thread_pool_finish):
6705 * monitor.c (mono_monitor_try_enter_internal):
6706 * threads.c (mono_thread_resume, mono_thread_init)
6707 (mono_thread_suspend_all_other_threads)
6708 (mono_thread_execute_interruption):
6709 * appdomain.c (mono_domain_unload): Check for NULL error returns
6710 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
6713 2006-11-11 Miguel de Icaza <miguel@novell.com>
6716 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
6717 Only close the handle if the value of the handle is not
6718 INVALID_HANDLE_VALUE. This just makes the process a bit more
6721 Improvement for #75733, so that we do not run into this problem.
6724 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
6725 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
6726 internal variables. Fixes #79462
6729 2006-11-09 Dick Porter <dick@ximian.com>
6731 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
6732 Use poll() not select(). Fixes bug 79397.
6734 2006-11-09 Raja R Harinath <rharinath@novell.com>
6737 * assembly.c (mono_assembly_load_from_full): Check that the given
6738 image has an assembly manifest.
6740 2006-11-09 Ankit Jain <jankit@novell.com>
6742 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
6743 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
6744 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
6746 2006-11-07 Dick Porter <dick@ximian.com>
6748 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
6749 Put the old resolver behaviour back for pre-2.0 profiles.
6751 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
6753 * threadpool.c: precise GC and locking fixes.
6755 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
6757 * class.c: don't load types that have an explicit unaligned
6758 managed reference. Provide better info in the TypeLoad exception.
6759 Part of the fix for bug #79744.
6760 * object.c: use the correct check for class type load issues.
6762 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
6764 * class.c: enforce alignment of fields with managed references
6765 even when Pack=1 is forced by the user (bug #77788).
6767 2006-11-03 Dick Porter <dick@ximian.com>
6769 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
6770 If the address reverse lookup fails, return it as the hostname
6771 anyway. Fixes bug 79721.
6773 2006-11-03 Dick Porter <dick@ximian.com>
6775 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
6776 Fix build on Windows.
6778 2006-11-02 Dick Porter <dick@ximian.com>
6781 * object-internals.h:
6782 * exception.c (mono_get_exception_thread_interrupted):
6783 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
6786 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
6787 Check for pending Thread.Interrupt.
6789 2006-10-27 Massimiliano Mantione <massi@ximian.com>
6790 * loader.c: Fixed bug 79684.
6792 2006-10-27 Dick Porter <dick@ximian.com>
6794 * file-io.c (get_file_attributes): Force symlinks to directories
6795 to be returned as a regular file. Fixes bug 79733.
6796 2006-10-26 Dick Porter <dick@ximian.com>
6798 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
6799 CreateFile to open a directory then we need to set the
6800 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
6802 2006-10-23 Zoltan Varga <vargaz@gmail.com>
6804 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
6807 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
6809 * sgengc.c: small cleanup of timer code.
6811 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6813 * sgen-gc.c: fix some warnings and start adding support for
6814 complete object removal on domain unload.
6816 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
6818 * assembly.c: build_assembly_name should not consider a version
6819 number without build or revision number invalid. Fixes bug #79715.
6821 2006-10-18 Jonathan Chambers <joncham@gmail.com>
6823 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
6824 call kernel32 function OutputDebugString directly.
6826 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
6828 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
6830 * reflection.c: small cleanup, using a function to insert a MonoString
6833 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
6835 * reflection.c: moving GC fixes.
6837 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
6839 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
6840 all the objects with finalizers belonging to an unloading appdomain.
6842 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
6844 * sgen-gc.c: added ability to allocate even when the nursery is fully
6845 pinned and fixed a couple of bugs.
6847 2006-10-15 Zoltan Varga <vargaz@gmail.com>
6849 * threads.h: Revert the last change for now.
6851 * threads.h (mono_thread_get_pending_exception): Rename this to
6852 mono_thread_get_undeniable_exception ().
6854 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
6856 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
6857 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
6858 when fname does not refer to valid assembly. This result in a more
6859 meaningful error message.
6860 * exception.c: added mono_get_exception_bad_image_format2 which
6861 constructs a BadImageFormatException using the ctor taking a custom
6862 message and the file name. Passing in a NULL msg results in a default
6864 * exception.h: define mono_get_exception_bad_image_format2 function.
6865 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
6866 when file name pointed to an invalid IL image. Use
6867 mono_get_exception_file_not_found2 to construct FileNotFoundException,
6868 as this results in a more meaningful error message.
6870 2006-10-15 Zoltan Varga <vargaz@gmail.com>
6872 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
6875 2006-10-12 Zoltan Varga <vargaz@gmail.com>
6877 * metadata.c (mono_type_size): Change the align parameter to guint32 for
6878 consistency with the other _size functions.
6879 (mono_type_stack_size): Ditto.
6881 * class.c object.c icall.c: Fix warnings caused by the above change.
6883 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
6885 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
6887 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
6889 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
6891 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
6892 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
6893 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
6894 threadpool.h, threads-types.h: mark more internal functions.
6896 2006-10-11 Dick Porter <dick@ximian.com>
6898 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
6899 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
6900 reproduce the bug even before applying the fix.)
6902 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
6904 * reflection.c: allow retrieving attributes for arguments in generic
6905 methods (bug #79241).
6907 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
6909 * debug-mono-symfile.c: properly check fopen () result (found by
6912 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
6914 * reflection.c: make error message clearer and fixed two
6915 issuelets found by Coverity.
6917 2006-10-10 Zoltan Varga <vargaz@gmail.com>
6919 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
6921 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
6923 * object-internals.h, gc-internal.h, profiler-private.h:
6924 mark internal functions.
6926 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
6928 * reflection.c: put data in the text section.
6929 * icall.c: recognize more types in type_from_typename ().
6930 * process.c, marshal.c: added some GC FIXMEs.
6932 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
6934 * loader.c: check for NULL before initializing.
6936 2006-10-09 Zoltan Varga <vargaz@gmail.com>
6938 * gc.c (finalizer_thread): Use a non-alertable wait here.
6940 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
6941 until the correct solution is found.
6943 2006-10-06 Zoltan Varga <vargaz@gmail.com>
6945 * reflection.c (mono_module_get_object): Avoid an assert when operating on
6946 modules with no metadata. Fixes #79596.
6948 * image.c (load_metadata_ptrs): Put back the error message when
6949 the #- heap is encountered since the support is not complete yet.
6951 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
6953 * gc.c: do not allow the user to SuppressFinalize () a
6954 delegate because it would leak the trampoline if present.
6956 2006-10-06 Zoltan Varga <vargaz@gmail.com>
6958 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
6961 2006-10-05 Zoltan Varga <vargaz@gmail.com>
6963 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
6965 * metadata.c (mono_metadata_get_param_attrs): Ditto.
6967 * row-indexes.h: Add definitions for *Ptr tables.
6969 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
6971 * metadata.c (mono_metadata_translate_token_index): New helper function to
6972 translate table indexes used in uncompressed metadata.
6973 (mono_metadata_decode_table_row): Ditto.
6974 (mono_metadata_decode_table_row_col): Ditto.
6976 * metadata.c: Add table schema for *Ptr tables.
6978 * class.c loader.c: Use the new helper function to access the affected metadata
6981 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
6984 2006-10-04 Zoltan Varga <vargaz@gmail.com>
6986 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
6987 sequences which can be unbounded in size. Fixes #79583.
6989 2006-10-02 Zoltan Varga <vargaz@gmail.com>
6991 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
6992 static initialization.
6994 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
6996 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
6998 * domain.c (mono_domain_free): Free up type_init_exception_hash.
7000 * object.c (mono_runtime_class_init): Implement correct semantics when a static
7001 ctor fails, i.e. throw the same exception on subsequent accesses.
7003 2006-09-0 Jonathan Chambers <joncham@gmail.com>
7005 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
7006 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
7007 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
7008 Handle marshalling of interfaces and VARIANTs contained in structs.
7010 Code is contributed under MIT/X11 license.
7012 2006-09-30 Zoltan Varga <vargaz@gmail.com>
7014 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
7016 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
7019 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7021 * console-io.c: ignore previous SIGINT handler.
7023 2006-09-27 Zoltan Varga <vargaz@gmail.com>
7025 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
7026 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
7027 #79460, #79461, #79485.
7029 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
7031 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
7034 2006-09-26 Zoltan Varga <vargaz@gmail.com>
7036 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
7037 could be generated from it.
7039 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
7041 * rand.c: fix read loop to correctly handle EINTR.
7043 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
7045 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
7046 internal calls are defined to keep methods closer to the declaring
7047 type and allow a significant reduction in runtime relocations and
7050 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
7052 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
7053 exception message to have FileNotFoundException use the default
7054 assembly load error message. Fixes bug #79426.
7055 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
7057 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7059 * threadpool.c: (start_thread_or_queue) use the root domain when
7060 creating the thread instead of the async object one.
7062 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
7064 * class.c, object.c, class-internals.h, reflection.c:
7065 for arrays, store element_size inside MonoClass (speedup
7066 for array object creation).
7068 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
7070 * icall.c: fixed CodeBase to use the file name and not the module
7073 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
7075 * mono-debug.c, mono-debug.h: export find_method as
7076 mono_debug_find_method ().
7078 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
7080 * debug-helpers.c, class-internals.h: added a few functions useful
7081 when debugging under gdb.
7083 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7085 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
7086 characters that need special handling.
7088 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
7090 * mono-config.c: make the os/cpu specification more flexible,
7091 allowing lists and negation.
7093 2006-09-18 Jonathan Chambers <joncham@gmail.com>
7095 * marshal.c: COM Interop fixes. Handle case where method->klass.
7096 is interface. Handle BSTR/MonoString when null. Use CDECL as
7097 calling convention on non-windows platforms. This is for
7098 compatibility with XPCOM and MainWin COM.
7100 Code is contributed under MIT/X11 license.
7103 2006-09-18 Zoltan Varga <vargaz@gmail.com>
7105 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
7106 correctly. Fixes #79217.
7108 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
7110 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
7112 * mono-config.c: allow both an os and cpu attribute for dllmap
7113 and dllentry elemnets to enable a single config file to be used
7114 for multiple architectures.
7116 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
7118 * loader.c: MonoLoaderError was cleared too soon on load failure.
7121 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
7123 * icall.c: use the defining class vtable when accessing a
7124 static field, not a pobblibly derived class.
7126 2006-09-17 Zoltan Varga <vargaz@gmail.com>
7128 * icall.c string-icalls.c: Remove references to unicode.h.
7130 * unicode.h unicode.c Makefile.am: Remove these unused source files.
7132 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
7134 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
7135 indicating the image where custom marshaller types should be looked up.
7136 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
7137 custom marshallers, instead of corlib. Fixes #79425.
7139 2006-09-14 Zoltan Varga <vargaz@gmail.com>
7141 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
7143 2006-09-14 Jonathan Chambers <joncham@gmail.com>
7145 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
7146 Implement Environment.ProcessorCount.
7148 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
7149 Implement Environment.ProcessorCount.
7152 Add Environment.ProcessorCount icall.
7154 Patch by Jason McFall.
7156 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7158 * assembly.c: don't append .exe/.dll when the filename already contains
7159 one of those extensions.
7161 2006-09-12 Martin Baulig <martin@ximian.com>
7163 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
7164 to array interfaces.
7166 2006-09-11 Martin Baulig <martin@ximian.com>
7168 * reflection.c (mono_image_build_metadata): Create the
7169 MethodImpl's after emitting all types and methods, so we don't
7170 need another fixup pass for them.
7172 2006-09-11 Zoltan Varga <vargaz@gmail.com>
7174 * class.c (mono_class_from_name_case): Fix regression introduced by the last
7177 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
7179 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
7182 2006-09-10 Zoltan Varga <vargaz@gmail.com>
7184 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
7185 args is not set. Fixes #78926.
7187 2006-09-08 Zoltan Varga <vargaz@gmail.com>
7189 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
7191 * image.c (load_class_names): Move this to class.c, and rename it to
7192 'mono_image_init_name_cache'.
7193 (load_modules): Fix a warning.
7195 * class.c icall.c image.c: Initialize image->name_cache lazily.
7197 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
7198 on its name using information in the AOT file.
7200 * class.c (mono_class_from_name): Use the new hook function.
7202 2006-09-06 Zoltan Varga <vargaz@gmail.com>
7204 * reflection.c (mono_param_get_objects): Handle enum default parameter values
7207 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
7210 2006-09-06 Martin Baulig <martin@ximian.com>
7212 * icall.c (mono_lookup_internal_call): Small fix.
7214 2006-09-05 Raja R Harinath <rharinath@novell.com>
7216 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
7219 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
7221 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
7222 when --debug is specified.
7224 2006-09-04 Zoltan Varga <vargaz@gmail.com>
7226 * class.c (setup_generic_array_ifaces): Fix a warning.
7228 2006-09-04 Miguel de Icaza <miguel@novell.com>
7230 * Temporarily remove the patch to assemly.c that checks the
7231 assembly versions as it breaks our gacutil.
7233 2006-09-03 Zoltan Varga <vargaz@gmail.com>
7235 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
7237 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
7240 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
7241 created using the default ctor. Fixes #79152.
7242 (mono_string_builder_to_utf16): Ditto.
7244 2006-09-01 Martin Baulig <martin@ximian.com>
7246 Fix handling of the generic array interfaces.
7249 (MonoDefaults): Removed `generic_array_class' and added
7250 `generic_ilist' class.
7253 (mono_bounded_array_class_get): Add the new generic array interfaces.
7254 (setup_generic_array_ifaces): New static method; create vtable
7255 entries for each method in the generic array interfaces.
7258 (select_container): Allow "parent-less" generic methods.
7261 (mono_marshal_get_generic_array_helper): New public method.
7264 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
7265 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
7266 moved the interncall into System.Array.
7268 2006-09-01 Raja R Harinath <rharinath@novell.com>
7270 A few more cases of avoiding work on types with ->byref set.
7271 Has the real fix for #79238
7272 * icall.c (is_generic_parameter): New helper.
7273 (ves_icall_Type_GetGenericParameterPosition): Use it.
7274 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
7275 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
7276 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
7277 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
7279 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
7281 (ves_icall_Type_get_IsGenericInstance): Likewise.
7282 (ves_icall_Type_get_IsGenericType): Likewise.
7284 2006-09-01 Zoltan Varga <vargaz@gmail.com>
7286 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
7289 * mempool.h (mono_mempool_get_allocated): New helper function.
7291 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
7294 * mempool.c: Fix warnings and the calculation of stats.
7296 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
7298 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
7300 * loader.c (mono_get_method_from_token): Update method_count stat.
7302 * class-internals.h (MonoStats): Add some stats.
7304 2006-08-31 Robert Jordan <robertj@gmx.net>
7306 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
7307 with managed variants.
7308 All code is contributed under the MIT/X11 license.
7310 2006-08-31 Zoltan Varga <vargaz@gmail.com>
7312 * reflection.c (reflection_methodbuilder_to_mono_method): Set
7313 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
7315 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
7317 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
7318 with cycles in classes.
7320 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
7322 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
7323 missing a [MarshalAs] directive. Fixes #79203.
7325 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
7326 klass->marshal_info. Fixes #79217.
7328 2006-08-30 Martin Baulig <martin@ximian.com>
7330 Committing a patch from Joachim Ante <joe@otee.dk>:
7331 Add support for binary data symbol stores.
7333 * debug-mono-symfile.c
7334 (mono_debug_open_mono_symbol_file): Renamed into
7335 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
7339 (mono_debug_open_image): Added `raw_contents' and `size' args.
7340 (mono_debug_init_2_memory): New public function.
7342 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
7344 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
7346 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7348 * appdomain.c: implement support for ShadowCopyFiles.
7350 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
7352 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
7353 when value is NULL (and should remove CID #51).
7355 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7357 * image.c: moved 2 functions to ../utils.
7359 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
7361 * gc.c: cope with the target object of a GC handle being NULL
7364 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7366 * class.c: recursively check parent's explicit implementations
7367 of interface methods (fixes bug #79125).
7369 2006-08-19 Miguel de Icaza <miguel@novell.com>
7371 * filewatcher.c: Avoid warnings when building, do not redefine
7372 constants that are defined.
7376 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7378 * image.c: don't fail when the link points to an absolute path.
7380 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
7382 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
7385 2006-08-17 Miguel de Icaza <miguel@novell.com>
7387 * image.c (full_path): A new method used to obtain the actual path
7388 of an assembly even in the presence of symbolic links.
7390 This is necessary for the case where we are running a binary that
7391 has been GACed, but we are using the "published" path name
7392 ($prefix/mono/1.0/blah.exe) which happens to point to the real
7395 This was the source of the failure for the `xsp' command with the
7396 recent AppDomain changes, as far as the runtime was concerned,
7397 there were two different assemblies: $prefix/mono/1.0/blah.exe and
7398 $prefix/mono/gac/blah/version/blah.exe.
7400 (do_mono_image_open): use full path
7402 2006-08-17 Zoltan Varga <vargaz@gmail.com>
7404 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
7406 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
7408 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
7409 domain_id is supplied. Fix CID #241 and corlib's unit tests.
7411 2006-08-17 Zoltan Varga <vargaz@gmail.com>
7413 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
7414 small structures. Fixes #78990.
7416 2006-08-17 Zoltan Varga <vargaz@gmail.com>
7418 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
7420 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
7422 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7425 * marshal.c: don't load all the assemblies from a domain into newly
7426 created ones. The new domains might have different rules and load
7427 assemblies from different locations. Fixes bug #76757.
7429 Patch by Lluis. Conflicts resolved by Brian Crowell.
7431 2006-08-16 Alp Toker <alp@atoker.com>
7433 * socket-io.c: First half of the fix for #79084.
7434 Set sa_size to the length of the content, not that of the struct.
7435 Don't add NULL suffix to the content, this should be done in
7436 managed code if needed.
7438 2006-08-14 Raja R Harinath <rharinath@novell.com>
7441 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
7442 mono_metadata_parse_type returns NULL.
7444 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
7446 * normalization-tables.h : new file for string normalization data.
7447 * locales.c, locales.h, icall.c :
7448 added load_normalization_resource() for string normalization,
7450 * Makefile.am : added normalization-tables.h to the sources.
7452 2006-08-13 Zoltan Varga <vargaz@gmail.com>
7454 * marshal.c: Add more helper functions to reduce code duplication and use them
7457 2006-08-12 Zoltan Varga <vargaz@gmail.com>
7459 * marshal.c: Fix non-x86 stdcall warnings.
7461 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
7464 2006-08-11 Jonathan Chambers <joncham@gmail.com>
7466 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
7467 type check on multi-dimensional arrays. Fixes #79000.
7469 2006-08-10 Jonathan Chambers <joncham@gmail.com>
7471 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
7472 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
7473 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
7474 * class-internals.h: add is_com_object to class structure.
7475 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
7476 null checks to COM object marshalling. Fix .ctor call on RCW.
7477 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
7479 All code is contributed under the MIT/X11 license.
7481 2006-08-09 Dick Porter <dick@ximian.com>
7483 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
7484 racing mono_monitor_allocator_lock() somewhere, so don't delete
7485 the critical section for now. Found by running and exiting
7488 2006-08-10 Zoltan Varga <vargaz@gmail.com>
7490 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
7491 (ves_icall_System_ComObject_FindInterface): Ditto.
7492 (ves_icall_System_ComObject_CacheInterface): Ditto.
7494 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
7495 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
7497 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7499 * threadpool.c: treat pipes from process asynchronous reads as sockets
7500 when reading from them, so we get select/poll or epoll to wait for
7503 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
7505 * loader.c: Fix a typo (CID #233) in the null check.
7507 2006-08-07 Zoltan Varga <vargaz@gmail.com>
7509 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
7510 Hopefully fixes #78949.
7512 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
7513 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
7514 bytes. Fixes #78972.
7516 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7518 * filewatcher.c: we need to set errno here.
7520 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7522 * filewatcher.c: let Win32Exception get the error value.
7524 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7526 * filewatcher.c: translate errno into win32 errors for Win32Exception
7527 to know what happened.
7529 2006-08-01 Zoltan Varga <vargaz@gmail.com>
7531 * threadpool.c: Fix more warnings.
7533 * assembly.c (search_loaded): Fix warnings.
7535 * threadpool.c (mono_thread_pool_finish): Fix warnings.
7536 (mono_async_invoke): Ditto.
7538 2006-07-28 Jonathan Chambers <joncham@gmail.com>
7540 * object.c (mono_remote_class_vtable): Need to create proxy vtable
7541 entries for __ComObject type in addition to ComImport types.
7542 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
7545 All code is contributed under the MIT/X11 license.
7547 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
7549 * image.c: avoid tentative loading of modulerefs that contain
7550 no metadata (P/Invoke library names).
7552 2006-07-28 Dick Porter <dick@ximian.com>
7554 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
7555 mono_loader_lock() somewhere, so don't delete the critical section
7556 for now. Found by running and exiting monodevelop.
7558 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7560 * filewatcher.c: define the inotify syscalls when we're building on
7561 linux and have sys/syscall.h. The build system might not have support
7562 for inotify but the target system might have it.
7564 2006-07-26 Miguel de Icaza <miguel@novell.com>
7566 * domain.c: Documentation updates.
7568 * loader.c (mono_free_method): Do not release the method
7569 information if we are being profiled, as profilers will use this
7570 information at shut down to present some data to the user.
7572 This is needed so that the profiler does not crash, as the
7573 profiler tends to keep MonoMethods around, and they might become
7574 invalid if we free these.
7576 (mono_get_method_constrained): Return the original CIL stream
7577 method as well, so verification can be performed against it.
7579 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7581 * filewatcher.[ch]: support for inotify file system watcher.
7582 * icall.c: add new internal calls for the inotify file system watcher.
7584 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7586 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
7589 2006-07-20 Dick Porter <dick@ximian.com>
7591 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
7594 2006-07-20 Dick Porter <dick@ximian.com>
7596 * threads.c (start_wrapper): Do the thread cleanup while we still
7597 hold a reference to its object. Fixes bug 78123.
7599 2006-07-18 Kornél Pál <kornelpal@gmail.com>
7601 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
7602 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
7603 "managed-to-managed".
7604 * icall.c: Redirect string constructors that take sbyte* to
7605 ves_icall_System_String_ctor_RedirectToCreateString.
7606 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
7607 to CreateString () methods with matching signature.
7608 * reflection.c: Use original security informations for
7609 MONO_WRAPPER_MANAGED_TO_MANAGED.
7610 * security-manager.c: Use original security informations for
7611 MONO_WRAPPER_MANAGED_TO_MANAGED.
7612 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
7613 that is a placeholder and only its address should be used.
7614 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
7615 that is a placeholder and only its address should be used.
7617 2006-07-15 Jonathan Chambers <joncham@gmail.com>
7619 Begin implementing COM Interop.
7620 * appdomain.c: Increment corlib version.
7621 * class.c: Set ComImport classes' parent to __ComObject.
7622 * loader.c: Mark cominterop methods as such.
7623 * domain.c: Add __ComObject class to MonoDefaults structure.
7624 * image.c: Add 2 hashtables to the image for COM Interop related methods
7625 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
7626 using the mempool allocator
7628 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
7629 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
7630 declaration for mono_metadata_type_dup_mp.
7632 * debug-helpers.c: Added strings for two additional wrapper types
7633 * object.c: Create proxy objects for ComImport classes
7634 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
7635 and added __ComObject class to MonoDefaults structure.
7637 * object-internals.h: Finish MonoRealProxy definition, and add definition of
7638 MonoComInteropProxy and MonoComObject.
7640 * marshal.c: Added support for COM Interop
7641 (signature_cominterop): Converts managed signature to corresponding
7642 unmanaged COM signature.
7643 (cominterop_get_function_pointer): gets unmanaged function pointer via
7645 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
7646 (cominterop_get_method_interface): returns interface type that method is defined on
7647 (mono_mb_emit_cominterop_call): emits native call to function pointer
7649 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
7650 that matches signature of unmanaged function.
7651 (cominterop_get_native_wrapper): wrapper around adjusted method call.
7652 (cominterop_get_invoke): forwards call from proxy to __ComObject
7653 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
7654 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
7655 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
7657 * marshal.h: Added Marshal icall declarations.
7658 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
7659 so we can access them in finalizer
7661 2006-07-14 Dick Porter <dick@ximian.com>
7663 * object.c (mono_type_initialization_cleanup): Fix a race
7664 condition by temporarily commenting out the critical section
7667 2006-07-14 Zoltan Varga <vargaz@gmail.com>
7669 * reflection.c (create_custom_attr): Fix some warnings.
7670 (create_custom_attr_data): Ditto.
7671 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
7672 types. Fixes #78855.
7674 2006-07-11 Zoltan Varga <vargaz@gmail.com>
7676 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
7678 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
7680 2006-07-08 Zoltan Varga <vargaz@gmail.com>
7682 * reflection.c (resolve_object): Add support for DynamicMethod.
7684 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
7685 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
7687 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
7689 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
7690 don't leak GPtrArray's pdata has we have no use (nor free) for it.
7692 2006-07-01 Zoltan Varga <vargaz@gmail.com>
7694 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
7697 2006-06-30 Raja R Harinath <rharinath@novell.com>
7699 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
7700 slightly: remove a shadow local variable.
7702 2006-06-29 Raja R Harinath <rharinath@novell.com>
7704 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
7705 definition that introduces the virtual function slot.
7706 Also fix Coverity #105.
7708 2006-06-29 Zoltan Varga <vargaz@gmail.com>
7710 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
7711 for dynamic assemblies. Fixes #78724.
7713 2006-06-28 Zoltan Varga <vargaz@gmail.com>
7715 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
7718 2006-06-21 Martin Baulig <martin@ximian.com>
7721 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
7724 2006-06-21 Zoltan Varga <vargaz@gmail.com>
7726 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
7728 2006-06-20 Raja R Harinath <rharinath@novell.com>
7730 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
7732 * class.c (mono_class_create_from_typespec): Add 'context' argument.
7733 Inflate result if necessary.
7734 (mono_class_get_full): Remove old version. Rename from
7735 'mono_class_get' and add 'context' argument. Pass it to
7736 ..._create_from_typespec.
7737 (mono_class_get): New. Simple wrapper to mono_class_get_full.
7738 (mono_ldtoken): Revert change below.
7740 2006-06-20 Martin Baulig <martin@ximian.com>
7742 * class.c (mono_ldtoken): Don't pass the generic context to
7743 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
7745 2006-06-15 Zoltan Varga <vargaz@gmail.com>
7747 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
7748 and later freeing it. Fixes #78638.
7750 2006-06-15 Miguel de Icaza <miguel@novell.com>
7752 * icall.c (mono_class_get_throw): Revert over-zealous error
7753 throwing, the caller for mono_class_get_throw will cope with
7754 errors when classes are not properly initialized already.
7756 The code still copes with loader exceptions though.
7758 Fixes the regression in reftype1 and reftype3 from the CAS tests.
7760 2006-06-14 Miguel de Icaza <miguel@novell.com>
7762 Fixes the `make run1' version of RuntimeAbort (to be commited,
7763 source is in Bugzilla).
7765 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
7766 FALSE on class loading failure instead of returning true.
7768 * class.c (mono_class_create_from_typedef): It is possible for
7769 mono_metadata_interfaces_from_typedef_full to fail if a class is
7770 not found, cope with this.
7773 2006-06-14 Dick Porter <dick@ximian.com>
7776 * process.c: Fix a bunch of signed/unsigned warnings from gcc
7779 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
7781 * culture-info-table.h : oops, forgot to make it nsync with r61548.
7783 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
7785 * icall.c: Another fix for building mono in Visual Studio.
7787 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
7789 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
7791 2006-06-09 Martin Baulig <martin@ximian.com>
7793 * debug-mono-symfile.c: Put this back and really fix it this
7794 time. Sorry for all the trouble.
7796 2006-06-08 Zoltan Varga <vargaz@gmail.com>
7798 * icall.c (mono_class_get_throw): Fix a warning.
7799 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
7800 ReflectionTypeLoadException if needed. Fixes #78606.
7802 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
7803 (mono_class_init): Ditto.
7805 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
7806 ref_only exceptions.
7807 (mono_loader_clear_error): Make this work even if there is no error.
7809 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
7811 * object-internals.h marshal.c marshal.h icall.c: Implement method
7812 Marshal.GetComSlotForMethodInfo using internal call.
7814 2006-06-07 Zoltan Varga <vargaz@gmail.com>
7816 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
7817 a function for signalling it.
7819 * class.c (mono_class_from_typeref): Use the new kind of loader error when
7820 a referenced assembly is not found.
7822 * loader.c (mono_loader_error_prepare_exception): Add support for
7823 LOADER_ERROR_ASSEMBLY. Fix formatting.
7825 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
7827 * domain.c appdomain.c class-internals.h marshal.c: Add support
7828 for VARIANT marshalling on windows and increment corlib version
7829 since Variant struct was added.
7831 2006-06-03 Miguel de Icaza <miguel@novell.com>
7833 * debug-mono-symfile.c: Revert Martin's previous patch which broke
7834 stack trace line information:
7836 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
7837 (Martin) when looking up B which is between A and C, return A not C.
7841 Thanks to Alexander Olk for tracking this down.
7843 2006-06-02 Zoltan Varga <vargaz@gmail.com>
7845 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
7847 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
7848 avoid clobbering its value.
7849 (mono_string_to_lpstr): Fix a warning on windows.
7851 2006-05-31 Zoltan Varga <vargaz@gmail.com>
7853 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
7855 * reflection.c loader.c: Removed references to 'dummy' flag.
7857 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
7859 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
7860 it gets GC tracking.
7862 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
7865 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
7867 * marshal.c threadpool.c: Update callers of mono_async_result_new.
7869 * appdomain.c: Bump corlib version.
7871 2006-05-30 Zoltan Varga <vargaz@gmail.com>
7873 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
7874 CEE_STIND_REF when working with object references.
7876 2006-05-31 Zoltan Varga <vargaz@gmail.com>
7878 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
7881 2006-05-30 Miguel de Icaza <miguel@novell.com>
7883 * loader.c (method_from_memberref): Fix argument value for
7884 mono_loader_set_error_method_load (I was passing the MonoClass
7885 instead of the class name char *).
7887 2006-05-30 Zoltan Varga <vargaz@gmail.com>
7889 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
7890 CEE_STIND_REF when working with object references.
7892 2006-05-30 Martin Baulig <martin@ximian.com>
7894 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
7895 mono_method_full_name() change and replace the ':' with a '.'
7898 2006-05-30 Martin Baulig <martin@ximian.com>
7900 * debug-mono-symfile.c
7901 (mono_debug_symfile_lookup_location): Fix the algorithm:
7902 when looking up B which is between A and C, return A not C.
7904 2006-05-29 Martin Baulig <martin@ximian.com>
7907 (MonoDebugMethodInfo): Make the typedef public.
7908 (MonoDebugSourceLocation): New public struct.
7911 (mono_debug_source_location_from_address): Removed.
7912 (mono_debug_source_location_from_il_offset): Removed.
7913 (mono_debug_il_offset_from_address): Removed.
7914 (mono_debug_address_from_il_offset): Removed.
7915 (mono_debug_lookup_method): New public function.
7916 (mono_debug_lookup_source_location): New public function; replaces
7917 the old mono_debug_source_location_from_*() functions; see the
7918 inline documentation.
7919 (mono_debug_free_source_location): New public function.
7920 (mono_debug_print_stack_frame): New public function; see the
7921 inline documentation.
7923 * debug-mono-symfile.c
7924 (mono_debug_find_source_location): Renamed into
7925 mono_debug_symfile_lookup_location(); only take a
7926 `MonoDebugMethodInfo *' and an `offset' argument; added inline
7928 (mono_debug_find_method): Renamed into
7929 mono_debug_symfile_lookup_method().
7931 2006-05-27 Zoltan Varga <vargaz@gmail.com>
7933 * assembly.c (mono_assembly_open_full): Dont overwrite the status
7934 returned by mono_image_open_full ().
7936 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
7937 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
7940 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
7943 2006-05-27 Miguel de Icaza <miguel@novell.com>
7945 * class.c (mono_class_from_typeref): handle missing images
7946 earlier, deals with bug #78418. Refactor code;
7948 Fix a warning introduced in my previous commit (some stale code
7949 from before I revisited my patch).
7951 * class.c (mono_class_create_from_typedef): On failure, remove the
7952 class from the MonoImage->class_cache as the class is not
7953 initialized; Fixes the leak pointed out by Paolo.
7955 2006-05-25 Dick Porter <dick@ximian.com>
7957 * threads.c (mono_thread_cleanup): Build fix. Comment out the
7958 DeleteCriticalSections until I figure out which one may still be
7959 sometimes locked when mono_thread_cleanup is called.
7961 2006-05-24 Dick Porter <dick@ximian.com>
7963 * threads.c (mono_thread_cleanup): Move the threading cleanup out
7964 of mono_thread_manage and back into its own function, so it can be
7965 called after the finalizer thread has finished.
7967 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
7969 2006-05-24 Zoltan Varga <vargaz@gmail.com>
7971 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
7974 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
7975 with non-blittable elements.
7976 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
7978 2006-05-24 Martin Baulig <martin@ximian.com>
7980 * mono-debug-debugger.h (MonoDebuggerEvent): Added
7981 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
7983 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
7984 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
7985 `mono_debugger_event_handler' to NULL.
7987 2006-05-24 Martin Baulig <martin@ximian.com>
7989 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
7991 2006-05-24 Martin Baulig <martin@ximian.com>
7993 * mono-debug-debugger.h
7994 (mono_debugger_create_notification_function): Added
7995 `MonoCodeManager *' argument.
7997 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
7999 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
8001 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
8003 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
8004 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
8007 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
8009 * icall.c: precise GC support: objects can't be stored in unmanaged
8010 memory anymore, even if they are kept alive by other references: since
8011 they can move the GC needs to be able to always find them.
8013 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8015 * object.c: precise GC support for static fields. Support
8016 for moving GCs: write barriers and pinned allocation for interned
8019 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
8021 * domain.c, domain-internals.h: precise GC support for the MonoDomain
8024 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
8026 * class.c, gc.c: sgen and precise GC updates.
8028 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
8030 * marshal.h, marshal.c: added write barrier wrapper and precise type
8033 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
8035 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
8038 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
8040 * reflection.c: precise and sgen GC updates.
8042 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
8044 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
8046 2006-05-22 Zoltan Varga <vargaz@gmail.com>
8048 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
8050 2006-05-20 Zoltan Varga <vargaz@gmail.com>
8052 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
8053 MONO_TYPE_OBJECT. Fixes #78462.
8055 2006-05-18 Zoltan Varga <vargaz@gmail.com>
8057 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
8058 and blittable types.
8060 2006-05-17 Miguel de Icaza <miguel@novell.com>
8062 * class.c (mono_class_get_exception_for_failure): Implement parts
8063 of a TODO: if the loader error is set (instead of the class
8064 error), we return a Loader exception that can be properly thrown
8067 This was exposed by some Winforms 2.0 code that I tried to run
8068 (Atsushi pointed me to it).
8070 2006-05-17 Zoltan Varga <vargaz@gmail.com>
8072 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
8073 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
8075 * marshal.c (emit_marshal_vtype): Add limited support for
8076 UnmanagedType.LPStruct. Fixes #78427.
8078 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
8079 Applied a patch from kangaroo to fix #77523.
8081 2006-05-17 Martin Baulig <martin@ximian.com>
8084 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
8085 (debugger_thread_created): Removed.
8086 (debugger_thread_exited): Removed.
8088 2006-05-15 Zoltan Varga <vargaz@gmail.com>
8090 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8092 * object-internals.h (MonoReflectionResource): Sync with managed version.
8094 2006-05-12 Wade Berrier <wberrier@novell.com>
8096 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
8098 2006-05-12 Zoltan Varga <vargaz@gmail.com>
8100 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
8101 functions try to allocate from the image mempool.
8103 2006-05-12 Dick Porter <dick@ximian.com>
8105 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
8107 2006-05-12 Lluis Sanchez <lluis@ximian.com>
8109 * object.c: The FieldGetter and FieldSetter methods require the full
8110 name of the class, not only the name. Fixes bug #78277.
8112 2006-05-11 Miguel de Icaza <miguel@novell.com>
8114 * loader.c (method_from_memberref): Do not pass the NULL klass to
8115 mono_loader_set_error_() methods. Pass the non-NULL value
8118 2006-05-11 Zoltan Varga <vargaz@gmail.com>
8120 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
8121 (mono_assembly_close): Null out assembly->image->references after freeing it.
8123 * image.c (mono_image_close): Free image->references.
8125 * reflection.c (mono_image_basic_init): Fix a small memory leak.
8127 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
8129 * marshal.c: In function mono_mb_add_local don't use the mb pointer
8130 before checking if it's NULL (g_assert).
8132 2006-05-10 Martin Baulig <martin@ximian.com>
8134 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
8135 I thought I already killed that two months ago, but now it somehow reappeared.
8137 2006-05-10 Martin Baulig <martin@ximian.com>
8139 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
8141 2006-05-10 Zoltan Varga <vargaz@gmail.com>
8143 * reflection.c: Allocate memory for dynamically created methods in the image
8146 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
8148 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
8149 don't use the ad pointer before checking if it's NULL (g_assert).
8151 2006-05-09 Zoltan Varga <vargaz@gmail.com>
8153 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
8154 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
8156 * marshal.c: Allocate all signatures from mempools.
8158 * marshal.c: Allocate some more signatures from mempools.
8160 2006-05-09 Miguel de Icaza <miguel@novell.com>
8162 * object.c (mono_load_remote_field): The code used to provide a
8163 temporary variable for returning results if the user did not
8164 provide a result pointer. But our temporary variable was allocted
8167 Fix calling code to always pass a result area. Coverity ID 103.
8169 2006-05-06 Zoltan Varga <vargaz@gmail.com>
8171 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
8172 value, not the old. Fixes #78312.
8173 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
8175 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
8176 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
8179 * assembly.c (mono_assembly_close): Free image->references.
8181 * assembly.c (mono_assembly_names_equal): Fix a warning.
8182 (mono_assemblies_cleanup): Cleanup more global data.
8184 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
8186 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
8187 ptr_cache and image->modules.
8189 * image.c (mono_image_init): Allocate array_cache lazily.
8191 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8193 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
8194 behavior was changed recently and has bad side effects.
8196 2006-05-05 Zoltan Varga <vargaz@gmail.com>
8198 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
8200 * assembly.c (mono_assembly_close): Remove a debug printf.
8202 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
8204 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
8205 to also allow for temporary references between mono_image_open ()/close ().
8207 * domain.c (get_runtimes_from_exe): Add a FIXME.
8209 2006-05-04 Zoltan Varga <vargaz@gmail.com>
8211 * marshal.c: Fix support for dynamic methods.
8213 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
8215 * marshal.c (mono_marshal_cleanup): New cleanup function.
8217 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
8220 * class.c (mono_class_init): Fix leaking class->nested_classes.
8222 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
8224 * image.c (mono_image_init): Initialize the new cashes.
8226 * image.c (mono_image_close): Destroy the new cashes.
8228 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
8230 * mempool.c (mono_mempool_strdup): New helper function.
8232 * class-internals.h: Add prototype for mono_loader_unlock ().
8234 * domain.c (mono_jit_info_table_find): Fix a warning.
8235 (mono_debugger_check_runtime_version): Ditto.
8237 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
8238 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
8239 functions to these modules.
8241 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
8244 * marshal.c (mono_free_bstr): Fix a warning.
8246 * assembly.c (mono_assembly_open_full): Fix another small leak.
8248 * object.c: Fix some unload leaks in the remoting code.
8250 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
8253 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
8255 * reflection.c: Fix some unload leaks in dynamic assemblies.
8257 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
8259 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
8260 * marshal.h: Add BSTR support on Win32
8261 * icall.c: Add BSTR icalls
8262 * metadata.h: Add BSTR enums
8264 2006-04-28 Miguel de Icaza <miguel@novell.com>
8266 Work to catch the crash from #76795 and turn it into an
8267 exception. As I stubbed out pieces of the VisualBasic support,
8268 I found a number of places where the code was failing and I added
8269 checks to those places.
8271 * metadata.c (do_mono_metadata_parse_generic_class): Make this
8272 function return a status code. If we fail to parse the signature
8273 from mono_metadata_parse_generic_inst, return FALSE.
8275 * loader.c (mono_get_method_from_token): If we fail to load the
8276 method (mono_class_get) return NULL.
8278 * (method_from_memberref): Return NULL if we are unable to parse
8279 the method signature
8281 (mono_loader_error_prepare_exception): Since we now use the
8282 loader_error flag internally to stop processing, and obtaining
8283 exceptions that might be thrown will walk this code path the
8284 proper way of going from a MonoLoaderError into a
8285 MonoException was convoluted. This new routine encapsulates the
8286 process of turning the error into an exception and *clearing* the
8289 2006-04-27 Miguel de Icaza <miguel@novell.com>
8291 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
8292 with missing assemblies), and to cope with:
8294 * Missing fieldref from a non-existing assembly.
8295 * Missing methodref from a non-existing assembly.
8297 The first batch of work to address *some* of the issues from 76661.
8299 * object.c (mono_class_create_runtime_vtable): If we fail to
8300 initialize the class raise the exception here.
8302 * metadata.c (mono_class_get_overrides_full): If any methods fail
8303 to load return the failure to the caller.
8305 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
8306 flagging assemblies that failed to load.
8308 Do not crash if we are unable to load the assembly.
8310 (mono_assembly_close): Do nothing with REFERENCE_MISSING
8313 * loader.c (mono_loader_set_error_type_load): Change the
8314 convention to always pass unallocated strings, so we make our own
8315 copies (I know our own code had duplicated strings before, but
8316 this keeps the normal conventions).
8317 (method_from_memberref): Call mono_loader_set_error_method_load
8318 for all possible failures of loading the class.
8319 Remove assert, turn into a loader error.
8321 (mono_loader_error_to_exception): Move this routine from mini
8322 (mini_loader_error_to_exception) there was no need to have that in
8325 * class.c (mono_class_from_typeref): If we were not able to load
8326 the assembly with mono_assembly_load_reference, call the
8327 mono_loader_set_error_type_load to register the problem.
8329 (mono_class_setup_fields): If we fail to load the type from
8330 mono_metadata_parse_type_full, call mono_class_set_failure and
8331 break from the loop.
8333 If class->exception_type is set, we do not layout the fields as
8334 that might crash the runtime, and instead return (from breaking
8335 from the previous loop).
8337 (mono_class_setup_vtable): This now returns a boolean indicating
8338 whether the table was properly setup. The decision is driven by
8339 mono_class_get_overrides_full which might run into non-existing
8342 (mono_class_init): Returns TRUE on success or FALSE if there was a
8343 problem in loading the type (incorrect assemblies, missing
8344 assemblies, methods, etc).
8346 When we call mono_class_setup_fields we also check for a potential
8347 error inside this call (either a class exception or a general
8350 (mono_class_create_from_typedef): If the parent fails to load
8351 (calling mono_class_get_full) return NULL.
8355 calls to mono_metadata_parse_type_full should be checked
8356 everywhere and set the mono_class_set_failure
8357 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
8359 The current patch checks the places where my manually constructed
8360 tests show the errors are showing up, but we should do it
8365 mono_class_init return values should be tested everywhere, like
8366 the previous case this is something that we should audit
8367 everywhere and not only on the cases exposed by the tests I
8370 2006-04-26 Miguel de Icaza <miguel@novell.com>
8372 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
8373 boolean parameter and instead pass the information on `options'
8374 parameter (FileOptions).
8376 * icall.c: Register the new signature for MonoIO.Open.
8378 * debug-helpers.c (dis_one): Trying to understand how coverity
8379 works. Fix Run 5, item 78.
8381 2006-04-26 Dick Porter <dick@ximian.com>
8383 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
8386 2006-04-25 Martin Baulig <martin@ximian.com>
8388 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
8390 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
8391 debugger_thread_created().
8392 (debugger_gc_push_all_stacks): Don't handle the main thread in any
8394 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
8395 (mono_debugger_finalize_threads): New function; undo the effects
8396 of mono_debugger_init_threads().
8397 (mono_debugger_create_all_threads): Removed.
8399 2006-04-24 Zoltan Varga <vargaz@gmail.com>
8401 * image.c (mono_image_close): Tidy up trace messages.
8403 * assembly.c (mono_assembly_close): Ditto.
8405 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
8406 no longer references an already freed assembly. Fixes #78168.
8408 2006-04-21 Dick Porter <dick@ximian.com>
8410 * threads.c (mono_thread_detach): Fix reference counting when
8413 2006-04-21 Zoltan Varga <vargaz@gmail.com>
8415 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
8418 2006-04-19 Zoltan Varga <vargaz@gmail.com>
8420 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
8421 (mono_type_to_stind): Ditto.
8423 * marshal.c: Use the new helper functions to simplify code.
8425 * image.c (mono_image_close): Add some code for help debug assembly unloading
8428 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
8431 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
8432 assembly was already loaded in another appdomain. Fixes #78083.
8434 2006-04-13 Zoltan Varga <vargaz@gmail.com>
8436 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
8437 referenced assemblies.
8438 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
8440 * domain.c (mono_domain_free): Add a trace message.
8442 * appdomain.c (add_assemblies_to_domain): Ditto.
8444 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
8447 2006-04-12 Zoltan Varga <vargaz@gmail.com>
8449 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
8451 2006-04-12 Martin Baulig <martin@ximian.com>
8453 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
8454 `USE_INCLUDED_LIBGC'.
8456 2006-04-12 Zoltan Varga <vargaz@gmail.com>
8458 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
8459 the patch contains ../ and a small directory name later. Hopefully fixes
8462 2006-04-10 Martin Baulig <martin@ximian.com>
8464 Clean up the debugger's thread-handling code.
8466 The debugger's thread-handling code has been moved from
8467 ../mini/debug-debugger.c to threads.c. We now iterate directly
8468 over the `threads' hash, keep track of exiting threads and also
8471 We can now debug XSP and XSP based applications with the debugger.
8473 * object-internals.h (MonoThread): Added `gpointer end_stack'.
8476 (MonoThreadCallbacks): Removed; this was only used by the debugger.
8477 (mono_install_thread_callbacks): Likewise.
8479 * threads.c (mono_thread_callbacks): Removed.
8480 (debugger_thread_created, debugger_thread_exited): New static functions.
8481 (start_wrapper): Call debugger_thread_created().
8482 (thread_cleanup): Call debugger_thread_exited().
8483 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
8484 (mono_debugger_init_threads): New public function.
8485 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
8486 iterate directly over the `threads' hash and also use proper locking.
8488 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
8490 * mono-debug-debugger.h
8491 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
8493 2006-04-10 Zoltan Varga <vargaz@gmail.com>
8495 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
8496 argument type=array. Fixes #78057.
8498 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
8500 * culture-info-table.h : regenerated. Fixed bug #69652.
8502 2006-04-07 Zoltan Varga <vargaz@gmail.com>
8504 * loader.c metadata.c: Reapply a variant r59116.
8506 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
8508 * class.c (mono_class_setup_interface_offsets): New internal function.
8510 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
8511 interfaces too. Fixes #77398.
8513 * reflection.c (encode_cattr_value): Add support for
8514 parameter type=object, argument type=array.
8515 (load_cattr_value): Ditto. Fixes #77916.
8517 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
8518 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
8520 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
8521 a byval char array and CharSet is Ansi.
8523 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
8525 2006-04-06 Zoltan Varga <vargaz@gmail.com>
8527 * metadata.c: Add some locking comments.
8529 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
8531 (mono_metadata_free_method_signature): Don't free the signature itself.
8533 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
8535 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
8536 reference the same MonoImage.
8537 (mono_assembly_load_from_full): Add an assert.
8539 2006-04-05 Zoltan Varga <vargaz@gmail.com>
8541 * image.c (mono_image_close): Don't put the image we are about to free into the
8542 loaded_images_guid_hash.
8544 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
8545 to reduce code duplication.
8547 * marshal.c: Register the native functions called by this module as icalls, to
8548 somewhat centralize the creation of MonoMethodSignature's.
8550 * loader.c (mono_method_signature): Add a cache for method signatures.
8552 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
8553 the parameter attributes of a method.
8554 (mono_metadata_parse_method_signature_full): Refactored the computation of
8555 parameter attributes into a separate function. Also avoid one allocation in
8558 * assembly.c (mono_assembly_close): Ditto.
8560 * image.c (mono_image_close): Log trace messages with INFO level.
8562 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
8564 * image.c reflection.c: Correct reference counting of image modules.
8566 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
8567 of this function from the image mempool.
8569 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
8570 to allow more cached types to be used.
8572 * mono-debug.c (mono_debug_add_method): Appled patch from
8573 David S. Miller <davem@sunset.davemloft.net>: Access
8574 minfo->lexical_blocks[] entry elements using read32().
8576 2006-04-04 Zoltan Varga <vargaz@gmail.com>
8578 * loader.c (mono_free_method): No longer free the method header for non-dynamic
8579 methods as it is allocated from the mempool.
8581 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
8584 * metadata-internals.h: Add comments describing the reference counting scheme
8585 used for MonoImage and MonoAssembly.
8587 * image.c assembly.c reflection.c: Rework reference counting of images and
8588 assemblies so they are freed when the runtime is shut down. Free some
8589 additional memory structures when an image is unloaded.
8591 2006-04-03 Zoltan Varga <vargaz@gmail.com>
8593 * class.c loader.c reflection.c: Allocate more data structures in
8596 2006-03-31 Miguel de Icaza <miguel@novell.com>
8599 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
8600 build on pre glib 2.4 systems.
8602 2006-03-31 Zoltan Varga <vargaz@gmail.com>
8604 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
8606 * icall.c: Fix some warnings.
8608 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
8610 * culture-info-table.h : regenerated.
8612 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
8614 * threads.c, object-internals.h, verify.c: changed the culture caching
8615 code to use a normal MonoArray for storage so the GC can keep track of
8616 them easily. Fixed bits of the cache logic, too and simplified the
8619 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
8621 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
8622 thread for non-Boehm GCs.
8624 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
8626 * domain.c, object.c, domain-internals.h: reduce the amount of memory
8627 needed to keep track of the data for static fields.
8629 2006-03-29 Raja R Harinath <rharinath@novell.com>
8632 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
8633 for interface classes. Use 'num_methods' instead.
8634 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
8635 before using '->vtable_size' field.
8637 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8639 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
8640 doesn't contain managed pointers, so use a normal hashtable.
8642 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
8644 * reflection.c, class-internals.h, domain.c: fixed handling of types
8645 used as values for objects in custom attributes (bug #77915):
8647 2006-03-24 Martin Baulig <martin@ximian.com>
8649 * class.c (mono_class_setup_fields): Added support for generic
8650 instances; fixes #77580.
8652 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8654 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
8656 2006-03-24 Dick Porter <dick@ximian.com>
8658 * file-io.c (get_file_attributes): More stat macro breakage.
8661 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
8663 * profiler.c: added the file=filename option in the default profiler
8664 to output the profile data to filename.
8666 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8668 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
8671 2006-03-22 Martin Baulig <martin@ximian.com>
8673 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
8674 allocated `MonoClassField *' in `fb->handle'.
8676 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8678 * class.c, image.c, metadata-internals.h: implemented new mechanism to
8679 allocate interface ID to save memory and allow better ID reuse on
8680 appdomain unload. setup_generic_vtable () removal from Martin.
8682 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
8684 * object.h, appdomain.c, domain.c, exception.c, icall.c,
8685 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
8686 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
8687 write barriers for reference stores with managed objects accessed with
8688 C structures in the runtime and in embedding programs.
8690 2006-03-20 Raja R Harinath <rharinath@novell.com>
8692 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
8693 'interface_id' and 'max_interface_id' fields of MonoClasses
8694 representing open generic types.
8696 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
8698 * object.h, object.c, icall.c: added functions to deal with
8699 storing valuetypes that contain references in managed objects.
8700 * reflection.c, string-icalls.c, threads.c, marshal.c: small
8701 fixes and comments around uses of mono_array_addr ().
8703 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
8705 * object.h, icall.c, monitor.c: object.GetHashCode ()
8706 implementation that supports the moving garbage collector.
8708 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
8710 * icall.c, threads-types.h, threads.c: implemented finalizer for
8713 2006-03-15 Zoltan Varga <vargaz@gmail.com>
8715 * metadata.c (mono_type_size): Add a fixme.
8716 (mono_type_stack_size): Ditto.
8718 * object-internals.h (MonoReflectionAssemblyBuilder): Added
8719 'type_forwarders' field.
8721 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
8722 attribute from net 2.0.
8724 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
8727 * class.c (mono_class_setup_fields): Fix a warning.
8729 * class.c (mono_class_from_name): Add support for assemblyref entries
8730 in the EXPORTEDTYPE table.
8732 * reflection.c: Add support for handling type forwarders under net 2.0.
8734 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8736 2006-03-14 Zoltan Varga <vargaz@gmail.com>
8738 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
8739 overwriting entries in ModuleBuild->types, also clean up the code
8740 a little. Fixes #77774.
8742 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8744 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
8745 load friend assembly info when present.
8747 2006-03-14 Raja R Harinath <rharinath@novell.com>
8749 Fix crasher on gtest-158.cs.
8750 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
8751 the return value if the MonoClass we want is yet in an
8753 * class.c (mono_class_create_from_typedef): Add an comment
8754 explaining an order dependency between mono_class_setup_parent and
8755 mono_class_setup_mono_type.
8757 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
8759 * class.c: documentation updates and events bug fix.
8761 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
8763 * class.c: some cleanup, locking fixes.
8765 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8767 * class.c: fix the generics code to setup nested
8768 type info to the instantiated type (bug #77770).
8770 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
8772 * marshal.c: fixed a few type correctness issues.
8774 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8776 * loader.c: the Set/Get/Addrtess array methods should be public.
8778 2006-03-11 Zoltan Varga <vargaz@gmail.com>
8780 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
8782 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
8785 2006-03-10 Zoltan Varga <vargaz@gmail.com>
8787 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
8789 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
8791 * mempool.c (mono_mempool_alloc): Speed this up a bit.
8792 (mono_mempool_alloc0): Ditto.
8794 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8797 (create_object_from_sockaddr): it was allocating 4 extra bytes
8798 for the AF_UNIX data. Fixes bug #77747.
8800 2006-03-09 Zoltan Varga <vargaz@gmail.com>
8802 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
8804 2006-03-09 Dick Porter <dick@ximian.com>
8806 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
8807 Fixes bug 76966 again.
8809 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
8811 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
8813 * appdomain.c: Bumped corlib version to 48 (due to r57532)
8815 2006-03-07 Martin Baulig <martin@ximian.com>
8818 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
8820 2006-03-07 Martin Baulig <martin@ximian.com>
8823 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
8824 regression introduced in r56970; see gtest-252.cs.
8826 * loader.c (mono_get_method_constrained): Correctly handle generic
8827 methods; see gtest-253.cs.
8829 2006-03-04 Zoltan Varga <vargaz@gmail.com>
8831 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
8833 2006-03-04 Martin Baulig <martin@ximian.com>
8835 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
8836 compute the parent type at runtime, just like we're already doing
8840 (mono_reflection_bind_generic_parameters): Don't compute the
8841 parent type anymore.
8843 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
8845 2006-03-04 Martin Baulig <martin@ximian.com>
8847 * mono-debug-debugger.h
8848 (mono_debugger_create_notification_function): Allocate memory at
8849 runtime and return a pointer to it.
8851 2006-03-03 Zoltan Varga <vargaz@gmail.com>
8853 * assembly.c: Fix windows build.
8855 * assembly.c: Fix build.
8857 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
8859 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
8861 2006-03-03 Dick Porter <dick@ximian.com>
8864 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
8865 Check parameters before dereferencing them. Fixes Aaron's part of
8868 2006-03-03 Raja R Harinath <rharinath@novell.com>
8870 Fix performance regression.
8871 * loader.c (find_method_in_class): Add 'from_class' argument.
8872 Rename 'klass' argument to 'in_class'. The signature is compared
8873 against the method in 'in_class', and the corresponding method is
8874 returned from 'from_class'.
8875 (find_method): Walk both 'in_class' and 'from_class' in parallel.
8876 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
8877 type definition and generic instantiation in parallel.
8878 (mono_get_method_constrained): Update to changes.
8880 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8882 * threads.c: make sure the domain is correct, too when doing
8883 mono_thread_attach ().
8885 2006-03-01 Zoltan Varga <vargaz@gmail.com>
8887 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
8888 windows. Fixes #77683.
8890 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8892 * object.h, *: introduced specific way to set elements of an array
8893 of references to be used as write barrier. Still need to audit the
8894 uses of mono_array_addr.
8896 2006-03-01 Miguel de Icaza <miguel@novell.com>
8898 * object-internals.h: New field to cache the assmebly name, patch
8899 from Tambet Ingo (tambet@ximian.com)
8901 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
8903 * decimal.h, class-internals.h, metadata-internals.h,
8904 file-io.h: mark a few function declarations as internal, to
8905 reduce the number of PLT entries.
8907 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8909 * file-io.c: fix typo in warning message.
8911 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
8913 * loader.c: on unix, lookup the "*A" version of a function
8914 if charset is auto as a second option before failing.
8916 2006-02-28 Raja R Harinath <rharinath@novell.com>
8918 * class.h (mono_class_inflate_generic_method): Revert to two
8920 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
8921 (mono_class_inflate_generic_method_full): Add.
8922 * class.c (mono_class_inflate_generic_method_full): Rename from
8923 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
8924 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
8925 * loader.c, reflection.c: Update to changes.
8927 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
8929 * icall.c: const fixes and small improvements.
8931 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8933 * threadpool.c: for asynchronous connect(), enable the same workaround
8934 for BSD 6 as for the Mac. Fixes bug #77637.
8936 2006-02-24 Zoltan Varga <vargaz@gmail.com>
8938 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
8939 formatted classes. Fixes #77524.
8941 2006-02-24 Raja R Harinath <rharinath@novell.com>
8943 * class.c (inflate_generic_type): Add a couple more
8944 micro-optimizations.
8945 (inflate_generic_context): Don't use the 'gmethod' from
8947 (mono_class_inflate_generic_method): If the method has generic
8948 parameters, but the passed-in context doesn't have a 'gmethod',
8949 create one. Use the possibly simplified generic instantiation
8950 from the declaring class instead of the one passed in.
8952 2006-02-24 Raja R Harinath <harinath@gmail.com>
8954 Make generic method signature and method header handling lazy.
8955 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
8956 (inflate_generic_header): Likewise.
8957 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
8958 parameter to avoid inflating types.
8959 (mono_get_inflated_method): Empty out.
8960 * class.h (mono_class_inflate_generic_method): Update to changes.
8961 * loader.c (mono_get_method_from_token): Don't parse signature for
8962 generic methods, nor methods of generic classes.
8963 (mono_method_signature): Rename from 'mono_method_signature'.
8964 Inflate signature on demand.
8965 (mono_method_get_header): Inflate method header on demand.
8966 * reflection.c: Update to changes.
8968 2006-02-23 Raja R Harinath <rharinath@novell.com>
8970 * metadata.c (mono_metadata_inflate_generic_inst): If the
8971 instantiation is closed, don't bother expanding it in the new
8973 * class.c (inflate_generic_class): If the generic instantiation
8974 doesn't change after inflation, return the argument itself.
8975 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
8977 (inflate_generic_context): If neither the generic class nor the
8978 generic method instantiations change, return the original context.
8979 * reflection.c (mono_method_get_object): Do
8980 'mono_get_inflated_method' before accessing the ->klass field.
8981 (inflate_mono_method): Don't create a MonoGenericMethod unless
8983 (inflate_method): Don't pass a constructed type as the declaring
8984 type of a methodbuilder.
8986 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
8988 * object.c: fix memory overwrite.
8990 2006-02-22 Dick Porter <dick@ximian.com>
8992 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
8993 it doesn't work any more.
8994 (mono_threads_request_thread_dump): Fix unused variable warnings.
8996 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8998 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
8999 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
9000 the public header file.
9002 2006-02-21 Zoltan Varga <vargaz@gmail.com>
9004 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
9006 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9008 * class-internals.h, object.c: reduce the size of MonoVTable
9009 and store the interface_offsets array at negative offsets.
9011 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
9013 * metadata.c: tweak table descriptors data structures to reduce
9014 size and runtime relocations.
9016 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9018 * marshal.c: fix some types and opcodes to be type-safe
9019 in marshaling wrappers.
9021 2006-02-21 Ankit Jain <jankit@novell.com>
9023 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
9025 2006-02-21 Raja R Harinath <rharinath@novell.com>
9027 * metadata.c (get_constraints): Relax debugging checks for monodis.
9029 2006-02-21 Ankit Jain <jankit@novell.com>
9031 * metadata.c (mono_metadata_load_generic_params): Move the code
9032 checking for ambiguous generic params from here to mono/dis/get.c
9033 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
9035 2006-02-21 Raja R Harinath <harinath@gmail.com>
9037 Fix assertion triggered when compiling nemerle.
9038 * class.c (mono_get_shared_generic_inst): Rename from
9039 get_shared_inst and make non-static.
9040 * loader.c (mono_get_shared_generic_method): New. Used to create
9041 the MonoGenericContext-equivalent of a MonoGenericContainer.
9042 (mono_get_method_from_token): Initialize the 'context' field of
9043 the created MonoGenericContainer.
9044 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
9045 * metadata.c (get_constraints): Add sanity check.
9046 * class-internals.h: Add new internal methods.
9048 * reflection.c (verify_safe_for_managed_space): New sanity check.
9049 Currently checks that owner-less generic parameters aren't allowed
9051 (mono_type_get_object): Use it.
9052 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
9053 that are now in mono_type_get_object.
9054 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
9056 2006-02-19 Raja R Harinath <harinath@gmail.com>
9058 * metadata.c (mono_type_create_from_typespec): Rename from
9059 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
9060 argument and caching of types in the generic container.
9061 (unwrap_arrays, find_generic_param): Remove.
9062 * metadata-internals.h: Update.
9063 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
9065 2006-02-18 Zoltan Varga <vargaz@gmail.com>
9067 * class.c (mono_class_get_exception_for_failure): Fix a warning.
9069 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
9070 return values. Fixes #77581.
9072 * class.c (mono_fnptr_class_get): Switch name and name_space.
9074 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
9075 classes and add support for [In, Out] attributes.
9076 (mono_marshal_free_asany): Ditto. Fixes #77524.
9078 2006-02-18 Raja R Harinath <harinath@gmail.com>
9080 * class.c (mono_class_from_generic_parameter): Make more robust to
9081 incomplete MonoGenericContainers from monodis.
9083 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
9085 * class-internals.h: added some more exception types.
9086 * class.c, metadata.c: added a few checks to handle missing
9089 2006-02-17 Raja R Harinath <rharinath@novell.com>
9091 Use owner-less generic-params some more.
9092 * class.c (my_mono_class_from_generic_parameter): Remove.
9093 (mono_class_from_generic_parameter): Handle null image,
9094 param->name and param->owner.
9095 (mono_class_from_mono_type): Update.
9096 (mono_class_create_from_typespec): Remove 'container' parameter.
9097 If that parameter is non-null, the result is always inflated by
9098 'mono_class_get_full' anyway.
9099 (mono_class_get): Rename from _mono_class_get. Remove 'container'
9101 (mono_class_get_full): Update.
9103 * class.c (inflate_generic_type) [GENERICINST]: If the generic
9104 instance is not open, don't bother inflating.
9105 (mono_class_setup_fields): Hoist some loop-invariants. Don't
9106 parse metadata for inflated classes.
9107 (_mono_class_get): Change GenericContext* parameter to
9109 (mono_class_create_from_typespec): Likewise. Simplify, and
9110 implement trivially. All the cases are handled in
9111 mono_class_from_mono_type. Don't inflate returned class.
9112 (mono_class_get_full): Delegate GENERICINST optimization to
9113 inflate_generic_type.
9114 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
9116 2006-02-16 Dick Porter <dick@ximian.com>
9118 * socket-io.c (create_object_from_sockaddr): Fix typo.
9119 (create_sockaddr_from_object): Check array lengths before
9120 potentially accessing items off the end.
9121 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
9122 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
9123 (ves_icall_System_Net_Sockets_Socket_Send_internal)
9124 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
9125 length checks to avoid wraparound overflows.
9126 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
9127 contents of the array of sockets
9128 (hostent_to_IPHostEntry2)
9129 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
9130 Check return value of inet_ntop ().
9131 (addrinfo_to_IPHostEntry): Fix typo
9133 2006-02-16 Raja R Harinath <rharinath@novell.com>
9135 Type metadata parsing doesn't use generic-instantiation information.
9136 * metadata.c (mono_metadata_parse_array_full): Change
9137 MonoGenericContext* parameter to MonoGenericContainer*.
9138 (mono_metadata_parse_type_full): Likewise.
9139 (mono_type_create_from_typespec_full): Likewise.
9140 (mono_metadata_parse_mh_full): Likewise.
9141 (mono_metadata_parse_generic_inst): Likewise.
9142 (do_mono_metadata_parse_generic_class): Likewise.
9143 (do_mono_metadata_parse_type): Likewise.
9144 * metadata-internals.h: Update to changes.
9145 * class.c (mono_class_find_enum_basetype): Likewise.
9146 (mono_class_setup_fields): Likewise.
9147 (mono_class_create_from_typespec): Likewise.
9148 * loader.c (method_from_methodspec): Likewise.
9149 (mono_get_method_from_token): Likewise.
9150 (mono_method_get_header): Likewise.
9152 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9154 * marshal.c: handle additional GENERICINST case (patch from
9155 Thong Nguyen <tum@veridicus.com>).
9156 Fix a few cases where LDIND_I/STIND_I was used for references.
9158 2006-02-16 Raja R Harinath <rharinath@novell.com>
9160 * reflection.c (mono_reflection_get_token): Remove unused variable.
9162 2006-02-16 Martin Baulig <martin@ximian.com>
9164 * reflection.c (mono_reflection_get_token): Add support for fields
9165 in instantiated generic types.
9168 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
9170 2006-02-15 Martin Baulig <martin@ximian.com>
9173 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
9174 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
9175 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
9176 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
9178 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
9180 * class.c, metadata.c, metadata.h, object.c, icall.c,
9181 marshal.c: changed mono_type_get_underlying_type () to do
9182 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
9183 Fixed handling of instantiated generic valuetypes (bug #75479).
9185 2006-02-15 Raja R Harinath <rharinath@novell.com>
9187 * metadata.c (mono_metadata_decode_signed_value): Simplify.
9188 Delegate to mono_metadata_decode_value, and work on the returned value.
9190 * icall.c (ves_icall_MonoType_GetGenericArguments):
9191 Add consistency check here too.
9193 2006-02-15 Ankit Jain <jankit@novell.com>
9195 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
9198 2006-02-15 Ankit Jain <jankit@novell.com>
9200 * metadata.c (mono_metadata_decode_signed_value): New function to decode
9201 signed values, used only for representing lower bounds of arrays.
9202 (mono_metadata_parse_array_full): Use new
9203 mono_metadata_decode_signed_value to decode lower bounds.
9205 2006-02-14 Martin Baulig <martin@ximian.com>
9208 (mono_reflection_get_token): Support "MonoGenericMethod" and
9209 "MonoGenericCMethod" and allow generic instances / methods.
9211 2006-02-11 Zoltan Varga <vargaz@gmail.com>
9213 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
9214 to obtain the terminal size using an ioctl.
9216 * object.c (mono_nullable_init): Revert this as nullable reference
9217 types are not valid.
9218 (mono_nullable_box): Ditto.
9220 2006-02-09 Dick Porter <dick@ximian.com>
9222 * threads.c (mono_thread_detach): Drop a reference to the thread
9225 2006-02-09 Zoltan Varga <vargaz@gmail.com>
9227 * object.c (mono_nullable_init): Handle nullable reference types.
9228 (mono_nullable_box): Ditto. Fixes #77446.
9230 2006-02-07 Martin Baulig <martin@ximian.com>
9232 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
9234 2006-02-07 Ankit Jain <jankit@novell.com>
9236 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
9237 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
9238 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
9239 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
9240 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
9241 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
9243 2006-02-02 Zoltan Varga <vargaz@gmail.com>
9245 * class.c (mono_class_create_generic): Set type_token as well.
9247 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
9250 2006-02-02 Martin Baulig <martin@ximian.com>
9252 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
9253 has never been used so far.
9255 2006-02-02 Martin Baulig <martin@ximian.com>
9257 * mono-debug-debugger.h: Changed comment at the top of this file;
9258 the header is not installed, but it's safe to #include it from
9261 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
9262 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
9264 2006-02-02 Martin Baulig <martin@ximian.com>
9267 (MonoSymbolTable): Removed the `metadata_info' field.
9270 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
9272 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
9273 (mono_debugger_add_builtin_types): Removed.
9274 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
9275 (mono_debugger_create_notification_function): We now operate on a
9276 pre-allocated area; take a `gpointer' and return `void'.
9278 * mono-debug-debugger.c
9279 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
9280 (mono_debugger_add_builtin_types): Removed.
9282 2006-02-02 Martin Baulig <martin@ximian.com>
9284 * threads.c (mono_debugger_create_all_threads): New public method.
9286 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
9288 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
9289 breaks on several platforms.
9291 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
9293 * assembly.c: the VS.NET build doesn't supply default values for
9294 MONO_ASSEMBLIES and MONO_CFG_DIR.
9296 2006-02-01 Zoltan Varga <vargaz@gmail.com>
9298 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
9301 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
9303 * loader.c (method_from_memberref): Fix a warning.
9305 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
9307 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
9308 with explicit layout. Fixes #77433.
9310 2006-01-31 Zoltan Varga <vargaz@gmail.com>
9312 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
9313 max_interface_id is initialized before using it. Fixes #77398.
9314 (ves_icall_Type_GetInterfaces): Ditto.
9316 2006-01-30 Raja R Harinath <rharinath@novell.com>
9318 * metadata.c (mono_metadata_parse_method_signature_full): Don't
9319 allocate memory for parameter attributes when parsing memberref
9321 * loader.c (mono_loader_set_error_method_load): Don't warn.
9322 (method_from_memberref): Ensure MissingMethodException gets thrown
9323 if method is not found. Make warning more informative.
9325 2006-01-29 Raja R Harinath <harinath@gmail.com>
9328 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
9329 return true if is byref.
9330 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
9331 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
9332 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
9334 2006-01-27 Raja R Harinath <rharinath@novell.com>
9336 Fix tests/find-method.2.il
9337 * loader.c (find_method, find_method_in_class): Remove is_inflated
9338 argument. Revert 2006-01-18 change.
9339 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
9340 is generic, search for method in its generic definition.
9341 * class.c (mono_class_setup_vtable_general): Print generic
9342 arguments of generic types in debugging printf.
9344 2006-01-26 Zoltan Varga <vargaz@gmail.com>
9346 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
9348 * threads.c (mono_threads_request_thread_dump): New helper function.
9350 2006-01-25 Raja R Harinath <rharinath@novell.com>
9352 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
9354 2006-01-25 Ankit Jain <jankit@novell.com>
9356 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
9357 move definition to ..
9358 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
9360 2006-01-25 Ankit Jain <jankit@novell.com>
9361 Raja R Harinath <rharinath@novell.com>
9363 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
9364 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
9367 2006-01-25 Martin Baulig <martin@ximian.com>
9369 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
9370 `MonoDebuggerThread' into debug-debugger.c.
9372 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9374 * profiler.c: fix printing of data.
9376 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
9378 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
9379 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
9381 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
9383 * object.c: fix deadlock related to string interning.
9385 2006-01-23 Martin Baulig <martin@ximian.com>
9387 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
9389 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
9391 2006-01-23 Martin Baulig <martin@ximian.com>
9393 * mono-debug.h: Moved the prototypes of some functions which are
9394 used by the JIT here from mono-debug-debugger.h.
9396 2006-01-21 Martin Baulig <martin@ximian.com>
9398 * Makefile.am: Don't install mono-debug-debugger.h.
9400 2006-01-21 Martin Baulig <martin@ximian.com>
9402 * mono-debug-debugger.h: Enforce the private status of this header
9403 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
9404 Moved some stuff from mono-debugger-jit-wrapper.h here.
9406 2006-01-20 Raja R Harinath <rharinath@novell.com>
9408 * class.c (mono_class_from_typeref): Add a sanity test to help
9409 catch lack of assembly load/search hooks.
9411 2006-01-19 Zoltan Varga <vargaz@gmail.com>
9413 * marshal.c (emit_struct_conv): Relax the fields with same offset
9414 check even more. Fixes #77230.
9416 2006-01-18 Martin Baulig <martin@ximian.com>
9418 * loader.c (find_method_in_class): Added `gboolean is_inflated'
9419 argument; if false, we compare the uninstantiated signatures.
9420 (method_from_memberref): Compare the uninstantiated signatures;
9423 2006-01-18 Robert Jordan <robertj@gmx.net>
9425 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
9426 Clear the weak link. Fixes bug #77170.
9428 * gc.c (mono_gchandle_free):
9429 Reflect *-gc.c changes (tiny optimization).
9431 2006-01-18 Zoltan Varga <vargaz@gmail.com>
9433 * metadata.c (mono_metadata_signature_dup): Applied patch from
9434 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
9437 2006-01-17 Zoltan Varga <vargaz@gmail.com>
9439 * marshal.c (emit_struct_conv): Allow fields with the same offset when
9440 marshalling from native to managed code. Fixes #77230.
9442 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9444 * threadpool.c: fix problem (Mac only) when more than one asynchronous
9445 connect. Fixes bug #77020.
9447 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
9449 * class.c: fixed id assignement for nested interfaces (bug #77275).
9450 Added also better info for --print-vtable debugging.
9452 2006-01-12 Martin Baulig <martin@ximian.com>
9454 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
9455 interfaces on-the-fly; fixes #76625.
9458 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
9459 don't need that anymore.
9461 2006-01-12 Miguel de Icaza <miguel@novell.com>
9464 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
9465 To avoid initing the nested_classes when not needed I turned the
9466 PeerCredData as a toplevel internal class, as it has to be shared
9469 Fixes the CASA issue.
9471 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
9473 * domain.c: Accessors for MonoJitInfo
9475 * profiler-private.h: Add jitinfo to the end jit hook
9477 * profiler.[ch]: Define new hooks, called after jitting which give
9478 the MonoJitInfo that was compiled
9480 2006-01-10 Martin Baulig <martin@ximian.com>
9482 * class.c (mono_class_setup_events): Add support for generic
9483 classes; fixes #76440.
9485 2006-01-06 Raja R Harinath <rharinath@novell.com>
9488 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
9489 on passed-in method.
9491 2006-01-03 Zoltan Varga <vargaz@gmail.com>
9493 * object.c (mono_runtime_invoke_array): Add Nullable support.
9495 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
9497 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
9499 * file-io.c: Don't consider sockets as directory and avoid an endless
9500 loop. Fix bug #76966.
9502 2006-01-03 Zoltan Varga <vargaz@gmail.com>
9504 * object.c (mono_nullable_init): New helper function.
9505 (mono_nullable_box): Ditto.
9507 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
9509 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
9511 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
9513 2006-01-02 Zoltan Varga <vargaz@gmail.com>
9515 * class.c (mono_class_is_assignable_from): Make T assignable to
9518 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
9520 * appdomain.c: Bump corlib version to 46.
9521 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
9522 serialization purpose) and changed ves_icall_System_Reflection_
9523 Assembly_get_code_base signature to accept a boolean (to escape, or
9524 not, the assembly code base).
9526 2005-12-23 Dick Porter <dick@ximian.com>
9530 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
9531 CreateEvent icall now returns "created" boolean parameter.
9533 2005-12-22 Zoltan Varga <vargaz@gmail.com>
9535 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
9538 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
9539 when attr_klass is an interface. Fixes #77045.
9541 2005-12-20 Zoltan Varga <vargaz@gmail.com>
9543 * marshal.c (emit_struct_conv): Fix previous patch.
9545 * marshal.c (emit_struct_conv): Add a check for fields with the same
9548 2005-12-20 Raja R Harinath <rharinath@novell.com>
9550 Fix regression in Mono.C5.
9551 * class.c (mono_class_create_generic): If 'klass' is an interface
9552 set up the interface offsets.
9553 (mono_class_is_assignable_from): Don't throw away generic arguments.
9555 2005-12-19 Raja R Harinath <rharinath@novell.com>
9557 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
9560 2005-12-15 Raja R Harinath <rharinath@novell.com>
9562 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
9564 (do_mono_metadata_parse_generic_class): Don't pass the current
9565 generic context when parsing the type being instantiated: it
9566 cannot use it, anyway.
9568 * loader.c (method_from_memberref): Don't inflate a signature if
9569 it doesn't contain any type parameters.
9571 2005-12-15 Zoltan Varga <vargaz@gmail.com>
9573 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
9575 2005-12-14 Martin Baulig <martin@ximian.com>
9578 (mono_type_get_name_recurse): Don't return null for type
9579 parameters and open generic classes.
9580 (mono_class_setup_methods): Don't exclude generic instances.
9581 (mono_get_unique_iid): Use different IDs for different
9582 instantiations of the same generic type.
9583 (mono_class_setup_vtable): Only use setup_generic_vtable() for
9584 open generic instances; create a normal vtable for closed generic
9586 (mono_class_setup_vtable_general): We're now also called for
9587 closed generic instances.
9590 (mono_reflection_bind_generic_parameters): Correctly use
9591 mono_metadata_lookup_generic_inst() everywhere.
9593 2005-12-14 Zoltan Varga <vargaz@gmail.com>
9595 * object.c (mono_class_create_runtime_vtable): Call
9596 mono_class_setup_vtable ().
9598 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
9600 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
9603 * loader.c (mono_loader_set_error_type_load): Print the type load
9604 warnings to the console so they are more visible to the user.
9605 (mono_loader_set_error_method_load): Ditto.
9607 * reflection.c (ensure_runtime_vtable): Revert the last change as it
9610 * reflection.c (ensure_runtime_vtable): Fix build.
9612 * reflection.c (ensure_runtime_vtable): Disable an optimization which
9613 doesn't work in all cases.
9615 2005-12-13 Zoltan Varga <vargaz@gmail.com>
9617 * object.c (mono_array_new_full): Treat a single dimensional array
9618 with 0 lower bounds as an szarray. Fixes #76973.
9620 * reflection.c (custom_attr_visible): Really fix this.
9622 2005-12-12 Zoltan Varga <vargaz@gmail.com>
9624 * reflection.c (custom_attr_visible): Allow nested public attributes
9627 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
9630 2005-12-12 Raja R Harinath <harinath@gmail.com>
9632 * class.c (set_generic_param_owner): Delete.
9633 (mono_class_create_from_typedef): Don't set ->owner field of
9634 generic parameters to "param containers" of enclosing classes.
9635 * reflection.c (mono_reflection_initialize_generic_parameter):
9638 2005-12-11 Zoltan Varga <vargaz@gmail.com>
9640 * reflection.c (custom_attr_visible): Fix build.
9642 2005-12-10 Zoltan Varga <vargaz@gmail.com>
9644 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
9647 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
9648 handling of null parameter defaults.
9650 2005-12-09 Raja R Harinath <rharinath@novell.com>
9652 * class.c (mono_class_from_generic_parameter): Don't set
9653 klass->generic_container.
9654 (my_mono_class_from_generic_parameter): Likewise.
9656 2005-12-07 Zoltan Varga <vargaz@gmail.com>
9658 * reflection.c (load_public_key): Fix a warning.
9659 (method_encode_code): Fix unaligned accesses.
9661 2005-12-07 Martin Baulig <martin@ximian.com>
9663 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
9666 (write_generic_param_entry): Encode our custom attrs.
9668 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
9670 2005-12-07 Martin Baulig <martin@ximian.com>
9672 * reflection.c (encode_new_constraint): Removed; we don't use the
9673 `NewConstraintAttribute' anymore.
9675 2005-12-06 Zoltan Varga <vargaz@gmail.com>
9677 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
9678 not fire a TypeResolve event when Assembly.GetType () is called.
9680 2005-12-05 Ben Maurer <bmaurer@ximian.com>
9682 Beginning of support for nullable types in the runtime. Parts of
9683 this patch are from Martin.
9685 * appdomain.c (MONO_CORLIB_VERSION): Bump
9687 * domain.c (mono_init_internal): get the nullable type
9689 * class.c (mono_class_is_nullable): New method
9690 (mono_class_get_nullable_param): New mehod
9691 (mono_class_create_generic): In types T? set cast_class to T
9693 * class-internals.h (MonoDefaults): new nullable default class
9694 (mono_class_get_nullable_param, mono_class_get_nullable_param):
9697 2005-12-05 Raja R Harinath <rharinath@novell.com>
9699 * metadata.c (select_container): New. Refactor code to select the
9700 appropriate GenericContainer given the type of generic parameter
9702 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
9703 not a MonoGenericContext. Use select_container. Update parameters.
9704 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
9706 (unwrap_arrays): Remove duplicate tests.
9707 (find_generic_param): Rename from 'has_same_context'. Now walks a
9708 generic instantiated class to find any arguments that are generic
9710 (mono_type_create_from_typespec_full): Use find_generic_param to
9711 avoid evicting some generic instantiations from the typespec
9714 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
9716 * reflection.c: fixed writing of doubles on ARM FPA.
9718 2005-12-02 Robert Jordan <robertj@gmx.net>
9720 * icall.c: Fixed EventInfo.ReflectedType (#76829).
9722 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9724 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
9725 least on SUSE 10 they are not the same (on debian, they are just the
9728 2005-12-01 Raja R Harinath <rharinath@novell.com>
9730 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
9731 DeclaringType for VARs and MVARs.
9732 * class.c (set_generic_param_owner): Fix initialization of owner
9735 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
9737 * icall.c: fixed Enum.ToObject() to correctly convert the values.
9739 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9741 * threadpool.c: workaround for a bug that shows up on the Mac:
9742 select()+connect() on a blocking socket is not like it should
9743 be, so we proceed to connect() in that case, wasting the I/O
9744 threadpool thread until connect succeedes. Fixes bug #75436.
9746 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9748 * threadpool.c: fix typo when setting file descriptor states.
9750 2005-11-28 Raja R Harinath <rharinath@novell.com>
9752 * class-internals.h (MonoGenericContainer.is_signature): Remove.
9753 * metadata.c (mono_metadata_parse_method_signature_full): Don't
9754 create a temporary signature container.
9755 (mono_metadata_parse_generic_param): Update to changes.
9756 (mono_type_create_from_typespec_full): Update to changes.
9757 * loader.c (method_from_memberref): Don't use a
9758 MonoGenericContainer while parsing a memberref signature.
9759 (method_from_methodspec): Remove dead-store of the 'container'
9760 variable. It's overwritten before use.
9762 * metadata.c (mono_type_create_from_typespec_full): Make debugging
9764 (mono_metadata_parse_generic_param): Likewise.
9765 * loader.c (find_method_in_class): Does not need a
9766 MonoGenericContainer. Use 'mono_method_signature' rather than
9767 'mono_method_signature_full'.
9768 (find_method, mono_get_method_constrained, method_from_memberref):
9771 * metadata.c (mono_type_create_from_typespec_full): Ensure that
9772 owner-less generic-parameters are never evicted from the typespec
9775 * loader.c (method_from_memberref): Don't use the current context
9776 when parsing signatures.
9777 (method_from_methodspec, mono_get_method_from_token): Update to changes.
9779 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
9780 side-effects in g_assert.
9781 * loader.c (mono_get_method_from_token): Resolve klass earlier so
9782 that we don't potentially lose information.
9784 2005-11-26 Dick Porter <dick@ximian.com>
9787 * threads.c: icalls to implement basic (ie, not named)
9788 System.Threading.Semaphore.
9790 2005-11-24 Dick Porter <dick@ximian.com>
9793 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
9794 Use GetProcessId() if it's available.
9796 2005-11-23 Zoltan Varga <vargaz@gmail.com>
9798 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
9800 2005-11-23 Raja R Harinath <rharinath@novell.com>
9801 Ankit Jain <jankit@novell.com>
9803 * loader.c (mono_get_method_from_token): Initialize 'method' field
9804 of all generic parameters before parsing the signature. Remove
9805 code that "fixed"-up MVAR references.
9807 2005-11-23 Ankit Jain <jankit@novell.com>
9809 * metadata.c (mono_metadata_has_generic_params):
9810 (mono_metadata_load_generic_param_constraints):
9811 (mono_metadata_load_generic_params): Move duplicate code ...
9812 (mono_metadata_get_generic_param_row): ... here. Returns the
9813 first row-id in GenericParam table for a given owner (token).
9814 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
9817 2005-11-23 Raja R Harinath <rharinath@novell.com>
9818 Ankit Jain <jankit@novell.com>
9820 * metadata.c (mono_metadata_class_equal): Pass signature_only when
9822 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
9823 type->data.generic_param only if the type is an MVAR.
9824 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
9825 leak owner-less VARs and MVARs into managed space.
9827 2005-11-21 Martin Baulig <martin@ximian.com>
9830 (MonoMethod): Moved the `generic_container' here from
9831 `MonoMethodNormal' since we now also need it for
9832 `MonoMethodPInvoke';
9833 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
9834 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
9835 an union containing both `MonoMethodNormal' and
9836 `MonoMethodPInvoke'.
9839 (mono_get_method_from_token): Allow implementing generic methods
9843 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
9846 2005-11-17 Dick Porter <dick@ximian.com>
9850 * process.c: Split the Process Start_internal icall into
9851 ShellExecuteEx_internal and CreateProcess_internal, which are
9852 called depending on whether UseShellExecute is true. Fixes bug
9855 * appdomain.c (MONO_CORLIB_VERSION): Incremented
9857 2005-11-17 Zoltan Varga <vargaz@gmail.com>
9859 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
9860 'msize' parameters, use the information in 'mspec' instead.
9861 (emit_object_to_ptr_conv): Ditto.
9863 * marshal.c (emit_struct_conv): Handle explicit layout structs with
9864 fields out of order. Fixes #76733.
9866 2005-11-17 Ankit Jain <jankit@novell.com>
9868 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
9870 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
9872 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
9875 2005-11-16 Zoltan Varga <vargaz@gmail.com>
9877 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
9878 for types with non-auto layout. Fixes #76717.
9880 2005-11-16 Ankit Jain <jankit@novell.com>
9882 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
9883 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
9884 if generic_context is null.
9885 (mono_metadata_generic_param_equal): param->owner can be null.
9886 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
9889 2005-11-16 Zoltan Varga <vargaz@gmail.com>
9891 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
9894 2005-11-15 Martin Baulig <martin@ximian.com>
9896 * object.c (set_value): Use mono_class_from_mono_type() instead of
9897 the hack for generic instances; fixes #76136.
9899 2005-11-15 Zoltan Varga <vargaz@gmail.com>
9901 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
9904 * image.c (load_metadata_ptrs): Initialize the new fields.
9906 * reflection.c (create_dynamic_mono_image): Ditto.
9908 * reflection.c (build_compressed_metadata): Use the new fields.
9910 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
9913 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
9916 2005-11-15 Ankit Jain <jankit@novell.com>
9917 Raja R Harinath <harinath@gmail.com>
9919 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
9920 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
9921 new per-generic_container cache if the cached MonoType's context matches
9922 the current context.
9923 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
9924 to the expected context.
9925 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
9927 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
9929 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
9930 we changed the signature of an icall.
9931 * icall.c: Modify to mono_double_ParseImpl return true/false
9932 depending on the success, instead of throwing the exception. This will
9933 help us in Double.TryParse methods.
9935 2005-11-14 Zoltan Varga <vargaz@gmail.com>
9937 * marshal.c (emit_marshal_object): Throw an exception when
9938 marshalling 'object' instead of crashing. Fixes #76696.
9940 2005-11-11 Zoltan Varga <vargaz@gmail.com>
9942 * class-internals.h: Add prototype for mono_type_get_full_name ().
9944 2005-11-11 Dick Porter <dick@ximian.com>
9946 * threads.c (mono_thread_manage): Make sure the main thread has
9947 abandoned all its mutexes when cleaning up. Fixes bug 74680.
9949 2005-11-11 Zoltan Varga <vargaz@gmail.com>
9951 * loader.c (mono_loader_set_error_type_load): Log a warning to the
9952 console about the missing type.
9953 (mono_loader_set_error_method_load): Ditto.
9955 2005-11-09 Miguel de Icaza <miguel@novell.com>
9957 * mono-config.c (mono_get_config_dir): Set the system defaults if
9960 * assembly.c (mono_set_dirs): New API entry point to set the
9961 assembly and the config directory in one call
9963 2005-11-09 Zoltan Varga <vargaz@gmail.com>
9965 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
9966 the ftnptr was created from a delegate in a domain other than the
9967 current domain. Fixes #75377.
9969 * exception.h exception.c: Add mono_get_exception_not_supported ().
9971 2005-11-08 Martin Baulig <martin@ximian.com>
9973 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
9975 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
9977 * security-manager.h: Added definitions to deal with strongname key
9978 pairs bigger (and smaller) than 1024 bits.
9979 * reflection.c: Remove hardcoded strongname size (128 bytes) and
9980 adjust wrt the public key length being used.
9982 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
9984 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
9985 Windows build (r51396-51397).
9987 2005-11-03 Martin Baulig <martin@ximian.com>
9989 * class.c (mono_class_setup_vtable_general): Also add generic
9990 methods to the vtable; fixes #76581.
9992 2005-11-01 Miguel de Icaza <miguel@novell.com>
9994 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
9995 sure that we lookup GetString method from the System.Text.Encoding
9996 class, not the derived class or we get an empty method.
10000 2005-10-25 Miguel de Icaza <miguel@novell.com>
10002 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
10003 if it has been previously set (embedders).
10005 Make mono_set_rootdir available also on Unix.
10007 005-10-24 Robert Jordan <robertj@gmx.net>
10009 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
10011 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
10013 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
10014 only calls which are made to native code use this flag.
10016 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
10018 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
10020 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
10021 Add support for FieldBuilders.
10023 2005-10-29 Martin Baulig <martin@ximian.com>
10026 (mono_debug_using_mono_debugger): New public method; returns
10027 whether we're running inside the debugger.
10029 2005-10-27 Zoltan Varga <vargaz@gmail.com>
10031 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
10032 for Method/Constructor/FieldBuilders.
10034 2005-10-26 Zoltan Varga <vargaz@gmail.com>
10036 * reflection.c (module_add_cattrs): Save custom attributes for global methods
10037 and fields as well.
10039 2005-10-26 Martin Baulig <martin@ximian.com>
10041 * mono-debug-debugger.c
10042 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
10044 2005-10-24 Raja R Harinath <harinath@gmail.com>
10046 * icall.c (base64_to_byte_array): Don't pass an out-of-range
10047 integer to isspace.
10049 2005-10-21 Zoltan Varga <vargaz@gmail.com>
10051 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
10052 when passing valuetypes byref. Fixes #76502.
10054 2005-10-19 Jackson Harper <jackson@ximian.com>
10056 * profiler.c: Don't put a . in front of types that are not in a
10059 2005-10-18 Zoltan Varga <vargaz@gmail.com>
10061 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
10063 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
10065 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
10067 (mono_marshal_get_ldflda_wrapper): Fix a warning.
10069 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
10071 * assembly.c metadata-internals.h icall.c: Define an additional
10072 parameter for mono_assembly_name_parse_full, so we can avoid creating
10073 S.R.AssemblyName.Version when no version info wasn't passed.
10075 2005-10-09 Miguel de Icaza <miguel@novell.com>
10077 * class.c (mono_type_get_full_name): Reimplement method that was
10080 * image.c: Some docs
10082 2005-10-10 Zoltan Varga <vargaz@gmail.com>
10084 * profiler.c (output_newobj_profile): Fix printing of Total memory
10087 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
10089 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
10091 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
10093 * threads.c: remove debug output.
10095 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
10097 * threads.c (mono_thread_manage): Fix crashes if more than 64
10098 threads need to be aborted. Hopefully fixes #75899.
10100 * assembly.c (mono_stringify_assembly_name): New helper function.
10102 * class.c: Use mono_stringify_assembly_name instead of the similar
10105 * assembly.h assembly.c: Add support for calling a postload search
10106 hook if an assembly cannot be loaded.
10108 * appdomain.c: Register new search hooks which call the AssemblyResolve
10109 events in AppDomain. Fixes #75231
10111 2005-10-07 Martin Baulig <martin@ximian.com>
10113 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
10114 methods without debug info.
10116 2005-10-07 Zoltan Varga <vargaz@gmail.com>
10118 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
10121 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10123 * file-io.c: now that we return symlinks, use lstat and, when the file
10124 is a symbolic link, stat, to get the file attributes. Also avoid the
10125 conversion to/from utf16/external.
10127 2005-10-06 Zoltan Varga <vargaz@gmail.com>
10129 * class.c (mono_class_layout_fields): Compute klass->has_references
10130 correctly if an embedded valuetype is not yet initialized. Fixes
10133 2005-10-04 Martin Baulig <martin@ximian.com>
10136 (mono_metadata_load_generic_param_constraints): New public
10137 function; splitted the constraints loading out from
10138 mono_metadata_load_generic_params().
10140 * class.c (mono_class_create_from_typedef): Call
10141 mono_metadata_load_generic_param_constraints() after setting up
10142 the type and creating our parent; fixes #75329.
10144 2005-10-04 Martin Baulig <martin@ximian.com>
10146 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
10147 non-dynamic parent classes.
10149 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
10151 * file-io.c : win32 build fix (ETXTBSY seems not found).
10153 2005-10-04 Martin Baulig <martin@ximian.com>
10156 (mono_image_get_methodspec_token): Make the cache actually work;
10159 2005-10-04 Martin Baulig <martin@ximian.com>
10161 * class.c (mono_class_name_from_token): Removed the unneccessary
10162 `MonoGenericContext *' argument.
10164 2005-10-04 Martin Baulig <martin@ximian.com>
10167 (method_from_methodspec): Make the caching work again; fixes the
10168 performance regression from #76262.
10170 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10174 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
10175 GetFileSystemEntries that performs the same work but without going
10176 into io-layer, locking, etc.
10178 2005-09-30 Zoltan Varga <vargaz@gmail.com>
10180 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
10181 ThreadState_Stopped as well. Fixes #76047.
10183 2005-09-29 Martin Baulig <martin@ximian.com>
10186 (inflate_generic_context): If the new context has a `gmethod', set
10187 its `container' that that gmethod's `container'.
10190 (mono_metadata_parse_generic_param): Simplify things;
10191 `generic_container = generic_context->container;' is just fine.
10193 * loader.c (method_from_methodspec): Code cleanups.
10195 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
10197 * decimal.c: fix warning (and let gcc generate correct
10198 code on ARM with optimizations).
10200 2005-09-28 Martin Baulig <martin@ximian.com>
10203 (method_from_memberref): Added `MonoGenericContext *class_context'
10204 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
10205 (method_from_methodspec): If we're a memberref, use the enclosing
10206 context when parsing its parent. Fixes #76262; see gtest-206.cs.
10208 2005-09-28 Martin Baulig <martin@ximian.com>
10210 * object.c (mono_runtime_invoke_array): Added support for
10211 MONO_TYPE_GENERICINST; fixes #75917.
10213 2005-09-27 Martin Baulig <martin@ximian.com>
10215 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
10216 `k->byval_arg.type' to determine the actual type.
10218 * loader.c (method_from_methodspec): Removed some hacks.
10220 2005-09-27 Ben Maurer <bmaurer@ximian.com>
10222 * class-internals.h (mono_field_is_deleted): Do the test for
10223 rtspecialname before we check the actual name of the field. This
10224 prevents us from dereferencing a pointer into the string table,
10225 saving us from accessing a few pages
10227 * *.c: Replace the use of {Enter,Leave}CriticalSection with
10228 macros. This will allow a deadlock debugger to easily be plugged
10231 2005-09-27 Martin Baulig <martin@ximian.com>
10233 * loader.c (method_from_methodspec): Create a "signature"
10234 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
10236 2005-09-27 Martin Baulig <martin@ximian.com>
10239 (inflate_generic_class): Correctly set the new context's
10243 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
10244 instead of a `MonoGenericContext *'.
10245 (mono_method_signature_full): Take a `MonoGenericContainer *'
10246 instead of a `MonoGenericContext *'.
10249 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
10250 instead of a `MonoGenericContext *'.
10251 (mono_metadata_parse_method_signature_full): Likewise.
10253 2005-09-26 Martin Baulig <martin@ximian.com>
10256 (mono_class_from_generic_parameter): Set `klass->generic_container'
10257 (mono_class_from_generic_parameter): Likewise.
10258 (mono_bounded_array_class_get): We inherit the generic container
10259 from the element class.
10262 (find_method, find_method_in_class): Take a `MonoGenericContext *'
10263 argument rather than computing it here.
10264 (method_from_memberref): Correctly set the generic context before
10265 parsing the signature. Fixes #75681.
10267 2005-09-26 Zoltan Varga <vargaz@gmail.com>
10269 * object.c (mono_class_has_special_static_fields): Fix warnings.
10271 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
10273 * assembly.c: Add parse_public_key function, to
10274 par the public keys. Also added mono_assembly_name_parse_full,
10275 to define it the parsed key should be freed or not.
10276 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
10277 to parse a long format assembly name.
10278 * metadata-internals.h: Keep mono_assembly_name_parse_full as
10279 private, since calling it to preserve the key requires
10280 freeing it manually.
10282 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
10284 * locales.c : removed HAVE_ICU part.
10286 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
10288 * object.c (mono_class_create_runtime_vtable): Avoid calling
10289 field_is_special_static if the klass has no special static fields.
10291 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
10292 (MonoCachedClassInfo): Likewise.
10294 * object.c (mono_class_has_special_static_fields): New helper function.
10296 2005-09-23 Zoltan Varga <vargaz@gmail.com>
10298 * class.c (mono_class_create_from_typedef): Don't call
10299 interfaces_from_typedef_full for enums.
10300 (mono_class_create_from_typedef): Compute the base types of enums directly
10301 without calling mono_class_setup_fields ().
10302 (mono_class_find_enum_basetype): New helper function.
10304 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
10305 one place inside the string heap.
10307 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
10309 * class.c: locking fixes, code cleanups, some docs added.
10310 Allocate some data structures in the image mempool.
10312 2005-09-23 Zoltan Varga <vargaz@gmail.com>
10314 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
10317 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
10319 * class-internals.h, class.c, reflection.c: reduce memory taken by
10322 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
10324 * metadata.c, metadata.h, loader.h: documentation updates, code and
10327 2005-09-23 Zoltan Varga <vargaz@gmail.com>
10329 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
10332 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
10333 page faults caused by the runtime while reading metadata.
10335 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10337 * socket-io.c: the field names were changed 3 months ago and no one
10338 realized until bug #76077 got filed!
10340 2005-09-20 Martin Baulig <martin@ximian.com>
10342 * icall.c (assembly_icalls): Removed some unused debugger icalls.
10344 2005-09-20 Martin Baulig <martin@ximian.com>
10346 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
10347 write the rank into the class entry.
10349 2005-09-20 Martin Baulig <martin@ximian.com>
10351 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
10353 2005-09-19 Zoltan Varga <vargaz@gmail.com>
10355 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10357 * icall.c (custom_attrs_defined_internal): New icall.
10359 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
10361 (mono_custom_attrs_construct_by_type): New helper function.
10363 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
10365 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
10366 terminate the resulting string. Fixes #76123.
10368 2005-09-16 Martin Baulig <martin@ximian.com>
10371 (mono_debug_add_method): Ignore inflated methods for the moment.
10373 2005-09-14 Martin Baulig <martin@ximian.com>
10375 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
10377 2005-09-13 Zoltan Varga <vargaz@gmail.com>
10379 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
10380 return a success/failure indication.
10381 (mono_metadata_interfaces_from_typedef_full): Ditto.
10382 (get_constraints): Ditto.
10384 2005-09-12 Zoltan Varga <vargaz@gmail.com>
10386 * marshal.c (emit_marshal_array): Fix handling of null arrays.
10388 * marshal.c (emit_marshal_array): Add support for returning string
10389 arrays from delegates. Fixes #76063.
10391 * marshal.c: Use the emit_ldloc/stloc macros where possible.
10393 2005-09-11 Zoltan Varga <vargaz@gmail.com>
10395 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
10398 2005-09-09 Zoltan Varga <vargaz@gmail.com>
10400 * reflection.c icall.c: Fix after mono_get_exception_type_load
10403 * assembly.c (mono_assembly_get_assemblyref): New helper function.
10404 (mono_assembly_load_reference): Use the new helper.
10406 * class-internals.h (MonoLoaderError): New structure containing
10407 information about type loading errors.
10409 * class-internals.h loader.c: Add APIs to store per-thread loader
10412 * loader.c class.c: Set the loader error if needed.
10414 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
10416 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
10418 * decimal.c: fixed to handle the broken ARM fp format.
10420 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
10422 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
10425 2005-09-06 Martin Baulig <martin@ximian.com>
10427 * domain.c (supported_runtimes): Added v2.0.50727.
10429 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
10431 * culture-info.h: reduce the size of some structures.
10433 2005-09-05 Martin Baulig <martin@ximian.com>
10435 Reflect latest API changes in the August CTP.
10438 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
10439 ("MonoType.HasGenericArguments"): Removed.
10440 ("MonoMethod.BindGenericParameters"): Renamed to
10441 "MakeGenericMethod".
10442 ("MethodBuilder.BindGenericParameters"): Renamed to
10443 "MakeGenericMethod".
10445 2005-09-05 Martin Baulig <martin@ximian.com>
10447 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
10449 2005-09-05 Martin Baulig <martin@ximian.com>
10451 Applying a patch from Michal Moskal <malekith@nemerle.org>.
10453 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
10454 generic_container is non-NULL.
10456 2005-09-05 Martin Baulig <martin@ximian.com>
10458 Applying a patch from Michal Moskal <malekith@nemerle.org>.
10460 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
10462 2005-08-29 Michal Moskal <malekith@nemerle.org>
10464 * reflection.c (encode_locals,
10465 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
10466 for large generic types.
10468 2005-09-05 Martin Baulig <martin@ximian.com>
10470 Applying a patch from Michal Moskal <malekith@nemerle.org>.
10472 * class.c (mono_dup_array_type): New public method.
10473 (mono_metadata_signature_deep_dup): New public method.
10474 (dup_type): Correctly duplicate array and function types.
10476 2005-09-05 Martin Baulig <martin@ximian.com>
10478 Applying a patch from Michal Moskal <malekith@nemerle.org>.
10480 * reflection.c (get_default_param_value_blobs): Handle generic types
10481 and generic methods.
10483 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
10485 * class.c: Fixed error reporting (method/class were inversed) for
10486 inheritance demands.
10487 * security-manager.c|h: Added the AppDomain when calling the managed
10488 System.Security.SecurityManager.InheritanceDemand method.
10490 2005-09-01 Raja R Harinath <rharinath@novell.com>
10492 * reflection.c (encode_marshal_blob): 'marshaltype' and
10493 'marshaltyperef' are alternate sources for the custom marshaler
10496 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
10498 * class.c: fix creation of array classes with rank == 1
10499 (patch by Ankit Jain <jankit@novell.com>).
10501 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
10503 * object.c: fix check for creating the bound data for arrays vs
10506 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10508 * object.c: configuration file name is now based on the executable name,
10509 not the image name. Fixes bug #75931.
10511 2005-08-29 Zoltan Varga <vargaz@gmail.com>
10513 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
10514 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
10516 2005-08-25 Zoltan Varga <vargaz@gmail.com>
10518 * rand.c: Use wincrypt.h instead of WinCrypt.h.
10520 2005-08-24 Ankit Jain <jankit@novell.com>
10521 Raja R Harinath <rharinath@novell.com>
10523 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
10524 called by it recursively.
10525 (mono_class_init): Remove special case in pending_init handling, since it's
10526 superseded by the fix to mono_class_from_typeref.
10528 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
10530 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
10531 BROKEN_THREAD_START stuff.
10533 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
10535 * class-internals.h object.c: Add a new kind of trampoline called a delegate
10538 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
10540 * object.c (mono_delegate_ctor): Replace the original function address with
10541 a delegate trampoline.
10543 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
10545 * icall.c: add boolean argument to base64_to_byte_array and
10546 InternalFromBase64String to control whether a whitespace-only string
10547 is allowed (or should casue a FormatException to be thrown). We need
10548 this as the behavior has changed between MS.NET 1.x and 2.0, and we
10549 to match the MS behaviour in both profiles.
10550 * appdomain.c: Bump corlib version.
10552 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
10554 This patch implements a big portion of publisher policy
10555 support, used to bind assembly versions and redirect
10556 one assembly from version A to version B.
10559 New GSList loaded_assembly_bindings, for storing the cached
10561 (assembly_binding_maps_name): New static function for checking if a
10562 assembly binding information maps an assembly name.
10563 (mono_assembly_binding_info_free): New function for freeing
10564 assembly binding information resources.
10565 (get_publisher_policy_info): New static function for retrieving
10566 assembly binding information from a MonoImage.
10567 (compare_versions): New static function for comparing an assembly
10568 binding information data and the version of an assembly name.
10569 (check_policy_versions): New static function for checking if an
10570 assembly binding info mapping an assembly name is valid for it.
10571 (mono_assembly_load_publisher_policy): New static function for
10572 loading the 'policy.major.minor.MyAssembly' image for an assembly
10573 with an assembly name 'aname'.
10574 (mono_assembly_bind_version): New static function for updating
10575 assembly redirection.
10576 (mono_assembly_apply_binding): New static function for applying
10578 (search_binding_loaded): New static function for searching
10579 loaded assembly binding infos in the cache domain.
10580 (mono_assembly_load_full): Don't apply assembly binding for
10581 reflection only assemblies.
10583 * metadata-internals.h: Add MonoAssemblyBindingInfo,
10584 which contains information about assembly binding. Also
10585 declare signature for mono_config_parse_publisher_policy ()
10586 function, used to retrieve pub policy info.
10589 (publisher_policy_start): New static function used to parse publisher
10590 policy config files.
10591 (publisher_policy_parser): New static MonoParseHandler containing
10592 the functions used when parsing config files.
10593 (mono_config_parse_publisher_policy): New function for parsing
10594 publisher policy files.
10596 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
10598 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
10600 * marshal.c (mono_delegate_free_ftnptr): Ditto.
10602 * object.c (mono_get_addr_from_ftnptr): New helper function.
10604 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
10606 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10608 2005-08-19 Dick Porter <dick@ximian.com>
10610 * threads.c, threads.h, appdomain.c, appdomain.h,
10611 profiler-private.h, monitor.c, object.c, object-internals.h,
10612 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
10613 store the thread ID, so it can hold a 64 bit value if needed.
10615 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
10617 * reflection.c (mono_reflection_create_dynamic_method): Store the
10618 handle class into the method references as well so ldtoken works in
10621 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
10624 2005-08-19 Ankit Jain <jankit@novell.com>
10627 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
10628 here rather than using the method signature of a arbitrary function
10629 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
10631 Hack done with Harinath.
10633 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10635 * threadpool.c: disable printing stack traces when we get a exception
10636 in a threadpool thread. I need to do more testing to figure out which
10637 cases actually print this. Fixes bug #75828.
10639 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10641 * icall.c: there might be ignored whitespace after the last '='. This
10642 fixes length computation and bug #75840.
10644 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
10646 * assembly.c (mono_assembly_load_full): Consider .exe extension as
10647 well. Fixes #75809.
10649 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
10652 * reflection.c (create_custom_attr_data): Ditto.
10654 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
10656 * locales.c, culture-info.h : removed RegionLCIDMap.
10657 * culture-info-tables.h : regenerated.
10659 2005-08-16 Martin Baulig <martin@ximian.com>
10661 * class.c (mono_type_get_name_recurse): Small fix.
10663 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
10665 * locales.c : indentation fixie.
10667 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
10669 * object-internals.h,
10673 icall.c : added RegionInfo table support.
10674 * culture-info-table.h : regenerated for region support.
10676 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
10678 * reflection.c (resolve_object): handle all kinds of MonoMethod
10679 including generic ones
10681 2005-08-12 Ankit Jain <jankit@novell.com>
10683 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
10684 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
10686 2005-09-12 Lluis Sanchez <lluis@ximian.com>
10688 * process.c: Don't close a thread handle when it's NULL. This is a
10689 workaround for bug #75733.
10691 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
10693 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
10695 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
10697 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
10699 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10701 * threadpool.c: if a work item in the thread pool has a callback that
10702 catches a exception, don't propagate it after invoking the callback.
10705 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
10707 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
10709 * class-internals.h (MonoCachedClassInfo): Add some new fields.
10711 * class.c (mono_class_init): Load field info lazily in the AOT case.
10713 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
10715 2005-08-03 Ankit Jain <jankit@novell.com>
10718 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
10719 PInvoke calling convention is 0.
10721 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
10723 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
10724 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
10726 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
10728 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
10729 to handle threads not started by the GC (patch by Michael Meeks
10730 <michael.meeks@novell.com>).
10732 2005-07-31 Kamil Skalski <nazgul@omega.pl>
10734 * reflection.c: Make buffer used in emitting types larger for some
10735 big generic types (patch by Michal Moskal).
10737 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
10739 * mono-debug.c: Fix some (not all) alignment problems.
10741 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
10743 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
10744 Invoke mono_image_load_from_data_full passing the refonly
10748 (mono_assembly_open_from_bundle): Add the refonly argument,
10749 in order to pass it to other methods it calls to.
10750 (do_mono_assembly_open): Add the refonly argument, in order
10751 to pass it to other methods it calls to.
10752 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
10753 the refonly parameter to it.
10755 * image.c: Add loaded_images_refonly_hash and
10756 loaded_images_refonly_guid_hash to cache the reflection
10757 only loaded images.
10758 (mono_images_init): Initialize the hash tables used for
10759 caching the reflection only images.
10760 (load_modules): Invoke mono_image_open_full passing the refonly
10761 parameter to load the modules the correct way.
10762 (build_guid_table): Add the refonly argument, to re-build the
10763 correct hash table.
10764 (do_mono_image_open): Added the refonly argument, in order to
10765 define it for the loaded image.
10766 (mono_image_loaded_full): New function, which receives an
10767 additional parameter to look for the image in the refonly or
10768 non-refonly section.
10769 (mono_image_loaded): Updated, using mono_image_loaded_full.
10770 (mono_image_loaded_by_guid_full): The same case that happens
10771 with mono_image_loaded_full.
10772 (mono_image_loaded_by_guid): Likewise.
10773 (register_image): Use the ref_only variable inside MonoImage
10774 to decide in which hash table store the current image.
10775 (mono_image_open_from_data_full): Rename
10776 mono_image_open_from_data to mono_image_open_from_data_full,
10777 adding the refonly argument, to define the ref_only variable
10779 (mono_image_open_from_data): Return
10780 mono_image_open_from_data_full.
10781 (mono_image_open_full): Rename mono_image_open to
10782 mono_image_open_full, receiving the new refonly argument,
10783 to pass it to inner methods.
10784 (mono_pe_file_open): Update this function, to open
10785 a MonoImage as a non-refonly image.
10786 (mono_image_close): Use the refonly variable inside
10787 MonoImage to remove the image from the correct caches.
10789 * image.h: Add the signatures of mono_image_open_full,
10790 mono_image_open_from_data_full, mono_image_loaded_full,
10791 mono_image_loaded_by_guid_full.
10793 * metadata-internals.h: Add the ref_only field to
10796 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
10798 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
10799 Fix the last behavior, which used to load the assemblies and
10800 extract MonoReflectionAssemblyName information, instead of
10801 extract it from the metadata tables. Needed for Reflection
10804 2005-07-29 Martin Baulig <martin@ximian.com>
10806 * mono-debug-debugger.c
10807 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
10811 (mono_debug_address_from_il_offset): Check whether we have
10812 debugging support before attempting to take the lock.
10813 (mono_debug_source_location_from_address): Likewise.
10814 (mono_debug_source_location_from_il_offset): Likewise.
10815 (mono_debug_il_offset_from_address): Likewise.
10816 (mono_debug_address_from_il_offset): Likewise.
10818 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
10820 * class.c (mono_class_from_name_case): Add support for dynamic images.
10823 * object.c (mono_class_compute_gc_descriptor): Add a workaround
10826 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
10828 * reflection.c (mono_method_get_object): Fix warning.
10830 2005-07-28 Martin Baulig <martin@ximian.com>
10833 (mono_debug_add_wrapper): Also write the wrapper type.
10835 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
10837 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
10839 * class.c (mono_class_init): Avoid reading nested classes if the AOT
10840 data indicates the class has none.
10842 2005-07-26 Ben Maurer <bmaurer@ximian.com>
10844 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
10845 loader lock with the debugger lock. Prevents deadlocks for beagle.
10847 Beagle can now run on an smp box for a weekend without any
10850 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
10852 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
10853 in a module. Fixes #75629.
10855 2005-07-26 Martin Baulig <martin@ximian.com>
10857 * mono-debug.c (mono_debug_add_wrapper): New static method.
10858 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
10859 interncall or a wrapper.
10861 * mono-debug.h (MonoDebugWrapperData): New public typedef.
10862 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
10863 (MONO_DEBUGGER_VERSION): Bump to 51.
10865 * mono-debug-debugger.c
10866 (mono_debugger_add_type): Removed this empty function.
10867 (mono_debugger_add_method): Likewise.
10869 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
10871 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
10872 before accessing method->slot.
10874 2005-07-21 Jb Evain <jbevain@gmail.com>
10876 * reflection.c (method_encode_clauses/class): Handle filters clauses.
10879 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
10881 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
10884 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
10886 * image.h image.c: Add mono_image_get_guid () API function.
10888 2005-07-19 Ben Maurer <bmaurer@ximian.com>
10890 There were issues when multiple threads tried to load
10891 assemblies. A deadlock was created between assemblies_mutex and
10892 mono_domain_assemblies_lock. This fixes the issue by making the
10893 assembly ref counting be lock free. See bug 75586.
10895 * image.c (mono_image_close): The add ref function here was using
10896 Interlocked operations while the unref was using a mutex and a
10897 --. I don't think this was ever a bug that would be exposed in a
10898 non-pendantic way (ie, by an embedder doing a ref on one thread
10899 and an unref on another), but for the sake of correctness, this is
10902 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
10903 (mono_assembly_load_reference): Call mono_assembly_addref rather
10904 than touching the refcount ourselves.
10905 (mono_assembly_close): Use InterlockedDecrement to unref the
10906 assembly. Don't acquire the lock unless it is actually needed.
10908 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
10910 * class.c (mono_class_layout_fields): Fix calculation of has_references
10913 2005-07-12 Martin Baulig <martin@ximian.com>
10915 Applying a patch from Michal Moskal <malekith@nemerle.org>.
10918 (mono_type_hash): Provide better hashing for generic instances.
10919 (mono_generic_inst_hash): Improve hashing.
10920 (mono_generic_class_hash): Likewise.
10922 * reflection.c (mymono_metadata_type_hash): Improve hashing for
10925 2005-07-12 Martin Baulig <martin@ximian.com>
10927 * reflection.c (mono_reflection_create_runtime_class): Remove the
10928 hack for generic type definitions and non-`Run' assemblies.
10929 (mono_reflection_bind_generic_parameters): Also use
10930 `klass->wastypebuilder' to check for TypeBuilders.
10932 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
10934 * class.c (mono_class_layout_fields): Fix calculation of has_references
10937 * class.c (inflate_generic_class): Fix a leak.
10938 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
10941 2005-07-11 Martin Baulig <martin@ximian.com>
10943 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
10946 2005-07-11 Martin Baulig <martin@ximian.com>
10948 * loader.c (find_method): Also lookup in
10949 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
10951 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
10953 * appdomain.c (mono_domain_unload): Don't free the error message
10954 before passing it to mono_get_exception_...
10956 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
10958 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
10960 * threads.c: try to better guess an available RT signal (bug #75387).
10962 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
10964 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
10967 2005-07-07 Martin Baulig <martin@ximian.com>
10969 * class.c (mono_type_get_name_full): Return NULL for
10970 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
10973 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
10975 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
10976 exit the appdomain as well being aborted.
10978 * threadpool.c: Create all threadpool threads inside the root appdomain, and
10979 change back to the root domain after calling managed code. This enables
10980 appdomains using threadpools to be unloaded.
10982 2005-07-07 Martin Baulig <martin@ximian.com>
10984 * class-internals.h
10985 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
10986 into `MonoDynamicGenericClass' since we only need it for dynamic
10989 * reflection.c (mono_class_bind_generic_parameters): We don't need
10990 to compute the `parent' here.
10992 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
10994 * culture-info-table.h : regenerated.
10996 2005-07-06 Martin Baulig <martin@ximian.com>
10999 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
11001 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
11003 2005-07-06 Martin Baulig <martin@ximian.com>
11005 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
11006 we're doing a signature-only comparision; fixes #74945.
11008 2005-07-06 Martin Baulig <martin@ximian.com>
11010 * class-internals.h (MonoGenericClass): Moved some things out into
11011 a new `MonoInflatedGenericClass' type.
11012 (MonoInflatedGenericClass): New type; the `klass' of a
11013 `MonoGenericClass' is now computed lazyly in
11014 mono_get_inflated_generic_class().
11016 * class.c (mono_get_inflated_generic_class): New public function.
11017 (mono_class_inflate_generic_method): Removed the unused
11018 `MonoClass *' argument.
11019 (setup_generic_vtable): Don't call mono_get_inflated_method() on
11021 (mono_class_create_generic): Make this static and merge it with
11022 mono_class_create_generic_2(); we're now called automatically from
11023 mono_get_inflated_generic_class().
11025 * loader.c (mono_method_signature): Call
11026 mono_get_inflated_method() here.
11028 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
11030 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
11031 type of fields with RVA.
11033 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
11034 for this pseudo class.
11035 (my_mono_class_from_generic_parameter): Likewise.
11036 (mono_class_init): Allow interfaces to have cctors.
11038 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
11040 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
11041 lazily for AOT methods.
11043 2005-07-05 Martin Baulig <martin@ximian.com>
11045 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
11046 returns FALSE for a successful match, not TRUE.
11048 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
11050 * loader.c (mono_method_get_index): Optimize this a bit.
11052 2005-07-04 Martin Baulig <martin@ximian.com>
11055 (class_compute_field_layout): Move the check for generic type
11056 definitions into mono_class_layout_fields(). Fixes #74684.
11057 (mono_class_from_generic_parameter): Correctly compute
11058 `klass->parent'; fixes #75457.
11060 * reflection.c (register_assembly, register_module): Make sure
11061 `domain->rejobject_hash' is already created.
11063 2005-07-02 Martin Baulig <martin@ximian.com>
11065 * class-internals.h
11066 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
11067 `MonoDynamicGenericClass'.
11069 2005-07-01 Lluis Sanchez <lluis@ximian.com>
11071 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
11072 returned by a field getter is null, since null is a valid value.
11074 2005-07-01 Martin Baulig <martin@ximian.com>
11076 * reflection.c (mono_reflection_generic_class_initialize): Update
11077 the `dgclass->fields [i].parent' to the correct class.
11078 (mono_image_get_fieldref_token): Use the declaring type, not the
11081 2005-07-01 Martin Baulig <martin@ximian.com>
11083 * loader.c (find_method): Also look in the interfaces; fixes #75429.
11085 2005-06-30 Ben Maurer <bmaurer@ximian.com>
11087 * threads.c (thread_cleanup): assert that thread != NULL
11088 (wait_for_tids_or_state_change): We were using the wrong variable
11089 when accessing wait->threads. `i' was always out of the bounds of
11092 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11094 * loader.c: map user32 and kernel32 to libMonoSupportW
11096 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
11098 * appdomain.c (unload_thread_main): Mark this as WINAPI.
11100 2005-06-28 Martin Baulig <martin@ximian.com>
11102 * loader.c (method_from_methodspec): Fix #75334.
11104 2005-06-28 Martin Baulig <martin@ximian.com>
11106 Fix #74953 - Arrays now implement the generic IList<T> interface
11107 on the 2.0 platform.
11109 * class-internals.h (MonoDefaults): Added `generic_array_class'.
11111 * reflection.c (mono_class_bind_generic_parameters): New public
11112 function; similar to mono_reflection_bind_generic_parameters(),
11113 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
11115 * domain.c (mono_init_internal): Try to initialize.
11116 `mono_defaults.generic_array_class' here; this'll only succeed if
11117 we're using the 2.0 corlib.
11120 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
11121 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
11122 (mono_lookup_internal_call): Added support for nested classes.
11125 (mono_get_method_from_token): Set `result->signature->pinvoke' if
11126 we're an interncall and have generic arguments.
11129 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
11130 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
11131 instance of System.Array.InternalArray<T> for arrays, so they
11132 implement the generic IList<T> interface.
11134 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
11136 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
11137 (chastamar@yahoo.com). Fixes #75374.
11139 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
11141 * culture-info-table.h: regenerated.
11143 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11145 * icall.c: handle spaces correctly for base64 strings.
11147 2005-06-26 Ben Maurer <bmaurer@ximian.com>
11149 * *.c: Kill some warnings.
11151 2005-06-23 Duncan Mak <duncan@novell.com>
11153 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
11154 that this builds on Solaris 10 (x86).
11156 2005-06-23 Martin Baulig <martin@ximian.com>
11159 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
11160 generic type definitions.
11162 2005-06-23 Martin Baulig <martin@ximian.com>
11166 * metadata.c (mono_class_get_overrides): Renamed to
11167 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
11168 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
11169 pass it to mono_get_method_full().
11171 2005-06-22 Ben Maurer <bmaurer@ximian.com>
11173 * reflection.c (mono_reflection_create_runtime_class): take the
11174 mono_domain_lock in this method. Prevents deadlocks
11176 2005-06-22 Martin Baulig <martin@ximian.com>
11178 * loader.c (method_from_methodspec): Fix #75330.
11180 2005-06-22 Martin Baulig <martin@ximian.com>
11182 * reflection.c (type_get_qualified_name): Use
11183 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
11184 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
11185 argument; use it if we don't have an assembly name.
11187 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
11189 * object.c: In mono_message_init, set "copy out" flag for in
11190 parameters with the [Out] flag.
11192 2005-06-21 Martin Baulig <martin@ximian.com>
11195 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
11198 2005-06-21 Martin Baulig <martin@ximian.com>
11200 * class.c (mono_class_init): Don't initialize `class->fields' for
11201 generic instances since they're initialized again in
11202 compute_field_layout().
11203 (compute_field_layout): Set the field's `generic_info' here; fix
11206 2005-06-21 Martin Baulig <martin@ximian.com>
11208 * class-internals.h
11209 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
11211 * metadata.c (mono_metadata_generic_method_equal): Also
11212 distinguish the `generic_class'; fixes #75334.
11214 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11218 * domain-internals.h:
11219 * reflection.c: 'domain_assemblies' field is now protected by its own
11220 lock. Don't call into managed code to run the AssemblyLoad event if we
11221 now there are no registered delegates for it.
11223 2005-06-20 Martin Baulig <martin@ximian.com>
11225 * class.c (mono_class_is_assignable_from): Use a custom version of
11226 mono_class_has_parent() to make things work for generic instances;
11229 2005-06-20 Martin Baulig <martin@ximian.com>
11231 * loader.c (method_from_methodspec): Apply a patch from
11232 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
11234 2005-06-20 Martin Baulig <martin@ximian.com>
11236 * class.c (mono_class_init): Reverted Zoltan's last change; it
11239 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
11241 * threads.c (wait_for_tids_or_state_change): Add missing locking.
11243 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11245 * socket-io.c: fix the index in the socket array for writable/error
11246 sockets. Fixes bug #75306.
11248 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
11250 * class.c (mono_class_init): Allow interfaces to have static ctors.
11252 2005-06-17 Martin Baulig <martin@ximian.com>
11254 * loader.c (method_from_methodspec): Use `context->container' when
11255 parsing the `gmethod->inst'.
11257 2005-06-17 Martin Baulig <martin@ximian.com>
11259 * class.c (mono_type_get_name_recurse): Don't add the assembly
11260 name for type arguments.
11262 2005-06-15 Martin Baulig <martin@ximian.com>
11264 * reflection.c (mono_image_get_inflated_method_token): Encode
11265 correct klass; fixes #75260.
11267 2005-06-13 Michal Moskal <malekith@nemerle.org>
11269 * icall.c: Make GetCorrespondingMethod/Constructor take
11270 MonoReflectionMethod method not MonoMethod. Removed
11271 MonoType.GetCorrespondingField, and make
11272 MonoGenericType.GetCorrespondingField take name not
11275 2005-06-13 Michal Moskal <malekith@nemerle.org>
11277 * reflection.c (field_encode_signature, encode_locals):
11278 Make sizes of buffers for types larger (for big generic types).
11279 (create_generic_typespec,
11280 mono_reflection_sighelper_get_signature_local,
11281 mono_reflection_sighelper_get_signature_field):
11282 Add asserts for too small buffers.
11284 2005-06-15 Martin Baulig <martin@ximian.com>
11286 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
11287 if our parent is not a dynamic type.
11289 2005-06-15 Martin Baulig <martin@ximian.com>
11291 * class-internals.h (MonoTypeNameFormat): New enum.
11294 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
11295 (mono_type_get_full_name): Removed.
11296 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
11297 argument instead of the boolean's.
11299 * icall.c (ves_icall_System_MonoType_getFullName):
11300 Added `gboolean assembly_qualified'.
11303 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
11305 * reflection.c (mono_reflection_parse_type): Parse the new type
11308 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11310 * icall.c: no need to convert from utf16 to utf8 and then back again
11311 after the call to GetLogicalDrives.
11313 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11315 * icall.c: frombase64. Fix problems exposed by new tests.
11317 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11319 * icall.c: added internal calls for converting char [] and strings in
11320 base64 into byte [].
11322 2005-06-10 Martin Baulig <martin@ximian.com>
11324 * class.c (mono_class_create_generic_2): Read the nested classes
11325 from the metadata rather than from `gklass->nested_classes' since
11326 `gklass' might not be initialized yet.
11328 2005-06-09 Duncan Mak <duncan@novell.com>
11330 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
11331 all public headers. Fixes #74919.
11333 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
11335 * domain.c: The key for proxy_vtable_hash is now a pointer
11336 array. Added new GHashFunc and GCompareFunc functions for this.
11338 * class.h: The list of interfaces in MonoRemoteClass is known in
11339 advance and can't grow (we create a new MonoRemoteClass if needed),
11340 so now the interface array can be allocated together with
11343 * object.c: Added a new method create_remote_class_key.
11344 Fixed mono_remote_class so it does not depend on
11345 mono_upgrade_remote_class.
11346 Removed extend_interface_array.
11347 Added new method clone_remote_class(), which makes a copy of a remote
11348 class and adds a new interface or class to it.
11349 mono_upgrade_remote_class() now creates a new remote class (or gets
11350 it from the cache) if an vtable upgrade is needed. In this way
11351 we make sure that other objects sharing the same remote class
11352 don't get the new vtable with unwanted interfaces.
11354 * object-internals.h:
11355 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
11357 * marshal.c: Track changes in mono_upgrade_remote_class().
11359 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
11360 * icall.c: Add runtime methods for obtaining members of inflated
11361 class, which were created from supplied non-inflated members. It
11362 is used in internal Get{Method,Constructor,Field} methods in
11365 2005-06-09 Martin Baulig <martin@ximian.com>
11368 (mono_reflection_bind_generic_method_parameters): Fix #75169.
11370 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
11371 * reflection.c (mono_image_basic_init): Define
11372 Version in MonoDynamicAssembly.
11374 2005-06-08 Martin Baulig <martin@ximian.com>
11379 (mono_method_signature_full): New public method; takes a
11380 `MonoGenericContext *'.
11381 (find_method): Use mono_method_signature_full() and pass the
11382 klass'es context to it.
11384 * class.c (mono_class_is_inflated_method): Use
11385 mono_method_signature_full() and pass the context to it.
11387 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
11389 * object.c: add proper locking in mono_remote_class_vtable(),
11390 fixes possible memory corruption.
11392 2005-06-08 Michael Meeks <michael.meeks@novell.com>
11394 * marshal.c (mono_remoting_marshal_init): set
11395 initialized after initialization.
11397 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
11399 * locales.c : hush.
11401 2005-06-06 Michael Meeks <michael.meeks@novell.com>
11403 * object.c (extend_interface_array): fix really silly
11404 memory corrupting / comparison bug.
11406 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
11408 * reflection.c: Functions added to support the creation
11409 of CustomAttributeData, which includes Attribute data
11410 used by ReflectionOnly methods.
11412 * reflection.h: mono_reflection_get_custom_attrs_data and
11413 mono_custom_attrs_data_construct added (functions exposed).
11415 * icall.c: Added mono_reflection_get_custom_attrs_data
11418 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
11420 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
11423 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
11425 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
11427 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
11428 dynamic DllImportAttribute.
11430 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
11431 dynamic DllImportAttribute.
11433 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
11436 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11438 * threads.c: avoid segfault when an unstarted thread is aborted.
11440 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
11442 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
11443 Returns the name and version of the runtime for reporting.
11445 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11447 * appdomain.c: bump corlib version.
11448 * object-internals.h: new field in MonoReflectionAssembly.
11450 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11452 * object-internals.h: Carlos forgot to add this field.
11454 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
11456 * icall.c: Added create_version to create instances
11457 of Version of MonoReflectionAssemblyName. This change helps
11458 the AssemblyName tests to keep running fine.
11460 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
11462 * object.c (mono_method_return_message_restore): A somehow less
11463 intrusive fix for #75138.
11465 2005-06-03 Raja R Harinath <rharinath@novell.com>
11467 * object.c (mono_method_return_message_restore): Fix computation
11468 of expected number of out args.
11470 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
11472 * reflection.c (mono_image_get_method_info): Fix the case when the
11475 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
11477 * object.c: Added missing null check in
11478 mono_method_return_message_restore.
11480 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
11482 * reflection.c (mono_image_get_method_info): Handle the case when
11485 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
11487 * object.c: When creating the vtable for a proxy, take into account
11488 all inherited interfaces, not only the ones registered in
11489 iclass->interfaces. This fixs bug #74996.
11490 Also, in mono_method_return_message_restore, verify that the array
11491 of out args has the expected lengh.
11493 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11495 * socket-io.c: update the timeout in Poll when the call is interrupte.
11497 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11499 * socket-io.c: support abort/suspend in Select_internal after last
11502 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11504 * threadpool.c: remove warning.
11506 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11509 * socket-io.[ch]: Select_internal uses poll() now when available, thus
11510 removing the 1024 limit from select(). Runtime part of the fix for
11513 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11515 * socket-io.c: when resolving the addresses for the same
11516 host returned by gethostname(), get the local IPs from the interface
11517 list. Loopback addresses are discarded if the are interfaces up with
11518 non-loopback ones. Fixes bug #63265.
11520 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
11522 * appdomain.c, verify.c, object-internals.h, reflection.c:
11523 bumped corlib number to 36, and added new extra_flags field
11524 to ReflectionMethodBuilder and friends. Fixes #75060.
11526 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
11528 * gc.c: register a new weak link only if the object is non-null
11531 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
11533 * culture-info.h : short time pattern too.
11535 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
11537 * culture-info.h : expand long time pattern string length.
11539 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
11541 * culture-info-table.h : update (more French date format; #72788).
11543 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
11545 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
11546 the method is static. Fixes #75029.
11548 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
11550 * reflection.c: Update the table_idx field of method builders after
11551 saving the module, since it can change. This is a workaround for
11554 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
11556 * culture-info-table.h : update (additional French date format).
11558 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
11560 * icall.c (ves_icall_type_Equals): Revert last change.
11562 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
11564 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
11566 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
11568 * class-internals.h: Added executioncontext_class field to
11569 MonoDefaults structure.
11570 * domain.c: Cache System.Threading.ExecutionContext class in
11572 * object.c: Capture the ExecutionContext for asynchroneous calls in
11573 mono_async_result_new.
11574 * object-internals.h: Added execution_context and original_context
11575 fields to MonoAsyncResult. Added execution_context to MonoThread.
11576 * security-manager.c|.h: Added mono_get_context_capture_method to
11577 return the capture method (if required by the security manager or by
11578 the framework version used).
11579 * threadpool.c: Apply capture (if present) ExecutionContext in
11580 mono_async_invoke and revert to original context after it completes.
11582 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
11584 * culture-info-table.h : updated (real hacky solution for zh-CHT).
11586 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
11588 * culture-info-table.h : zh-CHT related workaround.
11590 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
11592 * marshal.c (emit_marshal_custom): Add some error checking and call the
11593 methods in the ICustomMarshaler interface. Fixes #74875.
11595 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
11596 native->managed wrappers.
11598 2005-05-12 Martin Baulig <martin@ximian.com>
11600 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
11601 here and use the loader lock.
11603 * mono-debug.c: Properly lock when the debugger is not attached.
11604 (mono_debug_init): Release the initial lock if we're not running
11607 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
11609 * marshal.c (emit_marshal_custom): Pass through NULL values without
11610 calling the custom marshalling routines.
11612 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
11613 conversion in structures. Fixes #74882.
11615 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
11617 * culture-info-table.h : zh-* cultures were missing.
11619 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
11621 * threads.c: Added a new event background_change_event which is signaled
11622 when a thread changes its background mode.
11623 Moved here several checks previously done in managed code. The checks
11624 require the thread lock, and using the thread lock in managed code
11625 can result in deadlocks.
11626 Merged Start_internal and Thread_internal into a single method. Now
11627 Thread_internal does all work of creating and starting a thread.
11628 Added icalls for setting and getting the state of the object. Moved from
11629 managed code to avoid locking there.
11630 Added wait_for_tids_or_state_change() which is called instad of
11631 wait_for_tids when waiting for non-backround threads to end. This method
11632 will return if one of the threads ends or the background_change_event
11634 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
11635 the background mode. This method signals the background_change_event
11638 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
11639 removed Start_internal.
11641 2005-05-11 Martin Baulig <martin@ximian.com>
11643 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
11644 to order of some fields to get proper alignment on 64-bit machines.
11646 2005-05-11 Martin Baulig <martin@ximian.com>
11648 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
11649 changes as they're broken and completely fuck up the debugger.
11651 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
11653 2005-05-10 Martin Baulig <martin@ximian.com>
11655 * reflection.c (mono_reflection_generic_class_initialize): Don't
11656 call mono_class_setup_parent() here.
11658 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11660 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
11661 send/receive timeout use an integer in milliseconds. We were using a
11664 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11667 (internal_get_cultures): reserve the first slot of the array for the
11668 InvariantCulture, which will be filled in managed code.
11670 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
11672 * reflection.c (mono_image_fill_module_table): Initialize the
11673 GENERATION field as well.
11675 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11677 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
11678 Monitor.Enter on the object.
11680 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
11682 * threads.c: Enable the wait for running threads when exiting.
11683 * icall.c: Suspend all threads before exiting.
11685 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
11687 * assembly.c (mono_assembly_load_reference): Fix warning.
11689 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11691 * threadpool.c: changed the default number of threads per cpu. From now
11692 on, the default will be 20 + (5 * number of cpus) instead of 50.
11694 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
11696 * loader.c (mono_method_get_signature_full): Add locking here.
11698 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
11700 * appdomain.c: Moved methods for parsing and freeing assembly
11701 names to assembly.c.
11702 * assembly.c, domain-internals.h: Created public methods for parsing
11703 assembly names. Fixed mono_assembly_load_with_partial_name:
11704 it now finds the best match, taking into account the version,
11705 token and culture specified in the partial name. Also return
11706 the latest version if no version information is specified.
11708 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
11710 * threadpool.c: replace check for SocketAsyncCall class.
11712 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11714 * threadpool-internals.h:
11715 * Makefile.am: added threadpool-internals.h
11717 * threadpool.c: call mono_unhandled_exception on exceptions not handled
11718 that happen in threadpool threads (tested on MS).
11719 (mono_thread_pool_remove_socket): new function that dispatch any pending
11720 AIO call on a socket that is closing. By now only epoll really needs it,
11721 as select/poll wake up when the socket closes.
11724 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
11726 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
11728 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
11730 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
11732 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
11734 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
11736 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
11737 has an abort request, convert it into a suspend request.
11739 2005-04-30 Ben Maurer <bmaurer@ximian.com>
11741 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
11742 warning for the usage of `UnmanagedFunctionPointerAttribute' which
11743 is not supported yet.
11745 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11747 * image.c: register assemblies loaded from data (bundles) in the loaded
11748 assemblies hash. Fixes bug #74772.
11750 2005-04-29 Martin Baulig <martin@ximian.com>
11752 * class.c (mono_type_get_name_recurse): Update to the new naming
11753 schema from the latest .NET 2.x beta2.
11754 (mono_class_setup_vtable_general): If we're a generic instance,
11755 copy the vtable from our generic type definition and inflate all
11758 * loader.c (find_method): Update to the new naming schema from the
11759 latest .NET 2.x beta2.
11761 2005-04-29 Raja R Harinath <harinath@gmail.com>
11763 * class.c (mono_class_init): Add a mono_loader_unlock to the
11766 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
11768 * icall.c (ves_icall_System_Environment_Exit): Remove the
11769 suspend_all_other_threads () call for the time being, since it can hang.
11771 * threads.c (mono_thread_manage): Similarly, disable the waiting for
11772 the background threads to exit, since it can also hang.
11774 * class.c (mono_class_init): Applied patch from Ankit Jain
11775 (radical@gmail.com). Avoid pending init errors when a field refers
11776 to a nested class using a typeref. Fixes #74734.
11778 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
11779 this for dynamic modules.
11781 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11783 * threads.c: don't wait for threads that are in the process of aborting
11784 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
11785 and waiting for background threads to finish. This makes xsp and
11786 mod-mono-server exit without random length delays and/or hangs.
11788 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11790 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
11792 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
11794 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
11795 dynamic types to prevent infinite loops. Fixes #74727.
11797 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
11798 ..._is_assignable_to.
11800 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
11802 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
11804 2005-04-25 Martin Baulig <martin@ximian.com>
11806 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
11809 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
11811 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
11813 * reflection.c (build_compressed_metadata): Set metadata header
11816 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
11818 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
11819 number into an integral and a decimal part. Fixes #70473.
11821 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
11823 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
11825 * culture-info-table.h : reflected the latest locale-builder output.
11827 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11829 * threadpool.c: check for SuspendRequested too when deciding if
11830 mono_thread_interruption_checkpoint should be called.
11832 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11834 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
11835 * threads.c: remove interruption_mutex and use Interlocked instead. When
11836 suspending all the threads, wait for all the suspended events at once.
11837 If we're shutting down and get an APC that is going to be queued,
11838 call mono_thread_execute_interruption immediately, as the thread might
11839 be sleeping on a pthread condition or mutex.
11841 * icall.c: call mono_runtime_set_shutting_down before suspending the
11844 Fixes bug #74693. And now xsp is happier when exiting.
11846 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
11848 * loader.c (mono_stack_walk): Fix #74690.
11850 2005-04-22 Martin Baulig <martin@ximian.com>
11852 * mono-debug.h (MonoDebugMethodJitInfo): Added
11853 `MonoDebugMethodJitInfo *jit'.
11855 * mono-debug.c (mono_debug_read_method): Cache the
11856 MonoDebugMethodJitInfo in `address->jit'.
11857 (mono_debug_free_method_jit_info): New public method.
11859 2005-04-22 Martin Baulig <martin@ximian.com>
11861 * class.c (mono_class_is_assignable_from): Disallow
11862 type parameter -> interface.
11864 2005-04-21 Dick Porter <dick@ximian.com>
11866 * threads.c (mono_thread_create): Turn an assertion into an error.
11868 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
11870 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
11872 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
11873 Fix some gcc 4.0 warnings.
11875 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
11877 * file-io.c: fix alt dir separator char on unix systems
11878 and cleanup (fixes bug #71214).
11880 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
11882 * marshal.c: Use CALLVIRT instead of CALL when dispatching
11883 a call to a remote domain, since the method may be an
11884 interface method in the client domain. This fixes bug #74192.
11886 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11888 * threadpool.c: recv/send are now performed before going back to managed
11889 code to save one transition.
11891 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11893 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
11895 * metadata/threadpool.c: removed hack to workaround the bug above.
11899 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
11901 * reflection.c reflection.h: Fix handling of parameter defaults in
11902 dynamic methods. Also fixes handling of parameter attributes.
11905 * mono-debug.c (mono_debug_close_image): Fix warning.
11907 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11909 * socket-io.h: replaced old unused field with new 'blocking'.
11910 * threadpool.c: restore socket blocking state on windows(tm).
11912 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
11914 * icall.c: don't return the codebase in the AssemblyName[] returned by
11915 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
11916 * object-internals.h: Removed FIXME (fields were presents) and fixed
11917 versioncompat declaration.
11919 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11921 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
11922 not closed, so don't cleanup when it happens.
11924 2005-04-13 Chris Toshok <toshok@ximian.com>
11926 * mono-debug-debugger.h: change prototype for
11927 mono_debugger_lookup_type.
11929 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
11930 this function, although it should probably be named
11931 mono_debugger_init_type.
11933 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11935 * threadpool.c: fix non-AIO case.
11937 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
11939 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
11940 the built-in profiler to measure just JIT compilation times.
11942 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11944 * threadpool.c: the epollfd might be closed by another thread at
11945 any time, so ignore EBADF at treat it as a "we're closing" sign.
11947 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11949 * threadpool.c: release the semaphores with a count equals to the number
11950 of working threads in both IO and regular pools. Fixed typo that messed
11951 up the count of IO pool threads. Don't initialize the pipe handles if
11954 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11956 * threadpool.c: some systems don't like a NULL when deleting the socket
11959 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11961 * threadpool.c: fix semaphore allocation.
11963 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11965 * threadpool.c: added epoll() based implementation for asynchronous IO
11966 that is used instead of the default poll() when available.
11967 It can be disabled by setting MONO_DISABLE_AIO.
11969 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11971 * threadpool.c: windows needs 'closesocket' and instead of returning
11972 0 when the stream is closed while in select, it returns -1. Fixes bug
11975 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
11977 * class.c (class_compute_field_layout): Fix the regression caused by
11980 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11982 * threadpool.c: separate pool for socket async. IO.
11983 * threadpool.h: mono_max_worker_threads is not a global any more.
11985 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
11987 * class.c (class_compute_field_layout): Fix #74549.
11989 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11991 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
11992 use 2 connected sockets instead.
11994 2005-04-08 Miguel de Icaza <miguel@novell.com>
11996 * mono-config.c: Add new entry point for mkbundle
11997 mono_config_parse_memory.
11999 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12001 * threadpool.c: removed another unused function.
12003 2005-04-08 Ankit Jain <radical@corewars.org>
12005 * reflection.c (get_default_param_value_blobs): Add 'types'
12006 parameter to get the types encoded in the constant table.
12007 (mono_param_get_objects): Use the type from the constant table,
12008 not the type of the parameter, when creating default values.
12009 Handle null default values correctly.
12011 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12018 * socket-io.c: removed dead code for async IO.
12020 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12022 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
12024 * threadpool.c: intercept socket async. calls and pass them to a thread
12025 that is polling and dispatching the job items to the threadpool as
12026 socket become ready. Fixes bugs #71217, #71933.
12028 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
12029 between char and short/ushort arrays.
12031 * socket-io.c: remove dead code.
12033 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
12036 icall.c : removed InternalToUpper_Comp() and
12037 InternalToLower_Comp().
12039 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
12041 * char-conversions.h : The tables were incorrectly generated. Should
12042 be generated against invariant culture.
12044 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
12046 * object.c (mono_runtime_invoke_array): Fix return value when
12047 passing pre-created valuetype objects to ctors.
12049 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
12050 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
12053 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
12055 * domain.c: removed g_assert for runtimesecurityframe_class. This is
12056 only used with --security and hides the wrong corlib version error.
12058 2005-03-30 Joshua Tauberer <tauberer@for.net>
12060 * class.c: Changed mono_class_name_from_token so that types
12061 outside of a namespace don't have an initial period. Improved
12062 the g_warning message used in _mono_class_get when loading
12064 * assembly.c: In mono_assembly_load_reference, when an assembly
12065 can't be found, "No such file or directory" is misleading and
12066 unhelpful because a few paths were checked for the presence of
12067 the assembly. When that happens (ENOENT), display a nicer
12068 message indicating the directories that were searched. In all
12069 cases, the warning is made easier to read for non-hackers.
12071 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
12073 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
12075 * appdomain.h|domain.c: Removed inline from functions.
12076 * appdomain.c: Reduced warnings when compiling on windows.
12077 * icall.c: Fixed output_debug declaration to gunichar2*.
12078 * mono-config.c: Reduced warnings when compiling on windows.
12079 * rand.c: Added missing "windows.h". Added missing return value.
12080 * rawbuffer.c: Added missing winsock2.h for windows.
12081 * sysmath.h: Added mono-compiler.h header to allow/ease
12082 compilation with non-GCC compilers.
12083 * threads.c: Fixed declarations to compile with VS.NET C compiler.
12084 Removed cast warnings.
12086 Adapted from the work of J Lothian (for VC6).
12088 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
12090 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
12093 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
12095 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
12098 2005-03-27 Raja R Harinath <harinath@gmail.com>
12100 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
12101 has to be in $(exec_prefix). $(prefix) is for arch-independent
12102 stuff, and it would probably use $(prefix)/share rather than
12105 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12107 * console-io.c: added 2 includes that might be missing.
12109 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
12111 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
12114 * reflection.c (create_custom_attr): Allocate the params array using
12115 alloca so it gets GC tracking.
12117 2005-03-23 Chris Toshok <toshok@ximian.com>
12119 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
12122 2005-03-24 Raja R Harinath <rharinath@novell.com>
12124 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
12125 changes to pick up any changes in prefix, etc.
12127 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
12129 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
12131 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
12132 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
12134 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
12136 * class-internals.h object-internals.h class.c reflection.c: Extend the
12137 mono_lookup_dynamic_token () function to return the class of the
12140 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
12141 well. Fixes #73848.
12143 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
12145 * security-manager.c: Skip inheritance checks for intra-corlib
12146 class inheritance and method overrides. This skips a lot of checks
12147 and (anyway) permissions cannot work until corlib is loaded.
12149 2005-03-23 Martin Baulig <martin@ximian.com>
12151 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
12152 MONO_TYPE_GENERICINST.
12154 2005-03-23 Martin Baulig <martin@ximian.com>
12156 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
12158 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
12160 * class.c: added locking comments to some functions.
12161 Cache the interface offsets arrays (saves about 20 KB
12162 of runtime memory in a typical app).
12163 Reduce the time overhead in mono_class_setup_supertypes ().
12165 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
12167 * icall.c: speedup and fix leaks in GetMethodsByName and
12168 GetPropertiesByName.
12170 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
12172 * reflection.c: some locking fixes.
12174 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
12176 * metadata.c: added missing break in case statement.
12178 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
12180 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
12181 typedbyref return values. Fixes #73941.
12183 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
12185 * security-manager.c|h: Added demandunmanaged method and
12186 suppressunmanagedcodesecurity class to MonoSecurityManager.
12187 Renamed aptc class to allowpartiallytrustedcallers.
12189 2005-03-17 Martin Baulig <martin@ximian.com>
12191 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
12193 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12195 * file-io.c: disabled file async. IO using aio_*. It uses the
12196 threadpool now. Workaround for bug #73718.
12198 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
12200 * assembly.h, mono-config.c: added code to deal with bundled configs
12201 for bundled assemblies.
12203 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
12205 * *.c, private.h: cleanup, removing old private.h header file.
12207 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
12209 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
12210 and throw_on_unmappable_char attributes.
12212 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
12214 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
12215 _ProcessName_internal.
12217 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
12219 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
12222 * icall.c threads.c threads-types.h: Remove slothash icalls as they
12223 are no longer used.
12225 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
12227 * object.c (compute_class_bitmap): Add support for generics. Fixes
12230 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
12232 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
12234 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12236 * filewatcher.c: commented out the code for windows watcher, as we don't
12237 use it (we use the managed implementation instead).
12239 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
12241 * object-internals.h (MonoThread): Remove 'unused1' field.
12243 * appdomain.c: Bump corlib version.
12245 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
12247 * reflection.c (mono_reflection_create_runtime_class): Remove the
12248 AssemblyBuilder.Save optimization since it causes too many problems.
12250 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
12252 * exception.c|h: Added mono_get_exception_reflection_type_load to
12253 create a ReflectionTypeLoadException object.
12254 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
12255 to return NULL is a InheritanceDemand fails during reflection. Updated
12256 ves_icall_System_Reflection_Assembly_GetTypes to throw a
12257 ReflectionTypeLoadException if an InheritanceDemand fails during
12258 reflection. Added icall mapping for GetLinkDemandSecurity.
12259 * security-manager.c|h: Added ves_icall_System_Security_
12260 SecurityManager_GetLinkDemandSecurity internal call to return the
12261 class and methods permissions set for a LinkDemand. Removed unused
12262 fields in MonoSecurityManager.
12264 2005-03-10 Martin Baulig <martin@ximian.com>
12266 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
12267 it's a generic instance.
12269 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
12271 * reflection.c (mono_get_object_from_blob): Applied patch from
12272 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
12274 * class.c (mono_class_is_assignable_from): Another try at fixing
12275 #73469 without breaking anything.
12277 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
12279 * class.c: (mono_class_is_assignable_from): Revert the last changes
12280 since they don't work with generics.
12282 * class.c (mono_class_is_assignable_from): Fix build bustage.
12284 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
12285 the managed IsAssignableFrom method. Fixes #73469.
12287 * reflection.c (mono_reflection_call_is_assignable_from): New helper
12290 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
12292 * object.c (mono_load_remote_field_new): Fix returning uninitialized
12293 memory when the remoting callback does not sets the out arguments.
12296 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
12299 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
12301 * object-internals.h (MonoStackFrame): Sync with managed object layout.
12303 * appdomain.c: Bump corlib version.
12305 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
12307 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
12310 * threads.c (mono_thread_attach): Detect threads which are not started
12311 by the GC pthread wrappers.
12313 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
12315 * icall.c: Added new icall for RNG.
12316 * rand.c|h: Added new icall to open the RNG. This allows to share a
12317 single handle on Linux to access /dev/urandom and fix #73183.
12319 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
12321 * object.c: setting the new vtable in a transparent proxy object must
12322 not change the GC descriptor.
12324 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
12326 * object.c: fixed compilation without GCJ support.
12327 * reflection.c: for runtime-created types ensure klass->has_references
12328 is correct (bug #73215).
12330 2005-03-02 Martin Baulig <martin@ximian.com>
12332 * class.c (mono_class_is_assignable_from): Make this work if
12333 `oklass' is a generic instance; fixes #72831.
12335 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
12337 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
12340 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
12342 * marshal.c: Reorganize native->managed marshalling code to also use
12343 the emit_marshal_... functions.
12345 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
12347 * object.c: typed allocs have issues with bitmap sizes > 30,
12348 so check for max_set >= 30.
12350 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
12352 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
12353 managed code. Fixes #73012.
12355 * metadata.h (MonoMarshalSpec): Add elem_mult field.
12357 * metadata.c reflection.c: Load/Emit elem_mult as well.
12359 * metadata.h (MonoMarshalSpec): Add comment.
12361 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
12363 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
12364 num_elem to -1 if not given.
12366 * object-internals.h (MonoReflectionMarshal): Add has_size field.
12368 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
12371 2005-03-01 Marek Safar <marek.safar@seznam.cz>
12373 * null-gc.c (mono_gc_free_fixed): Was not compilable.
12375 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
12377 * reflection.c (encode_marshal_blob): Encode param_num field as well.
12379 * object-internals.h (MonoReflectionMarshal): Add param_num field.
12381 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
12383 * object.c: generalized the reference bitmap creation
12384 and added hooks for the new GC.
12385 * class-internals.c: removed the gc_bitmap field from MonoClass.
12387 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
12389 * domain.c: help the compiler to produce better code
12390 in mono_jit_info_table_find ().
12392 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
12394 * object.c: make all allocations look typed.
12396 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
12398 * socket-io.c: load Mono.Posix if it's not loaded already
12401 2005-02-24 Martin Baulig <martin@ximian.com>
12403 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
12404 * reflection.c (dup_type): Likewise.
12406 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
12408 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
12409 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
12411 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
12413 * domain.c, threads.c, object-internals.h: make the critical thread
12414 local vars use the fast access mode (even when we're compiled in
12415 a lib). Provide accessors to be used by the jit during codegen.
12417 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
12419 * appdomain.c: Changed hook functios behavior to include
12420 support for the reflection only assemblies. Some icalls were changed
12421 to support the mentioned assemblies too. Signatures of static methods
12422 try_assembly_resolve and real_load now have an additional parameter:
12425 * assembly.c: General changes to mono_assembly_ methods to support
12426 reflection only api. Functions mono_assembly_open, mono_assembly_load,
12427 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
12428 suffix, to support an additional gbool parameter to specify whether
12429 the assembli is reflection only or not. Created some new hook functions
12430 to add support for reflection only assemblies. Signatures of static
12431 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
12432 have now an additional parameter: refonly.
12434 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
12435 indicating whether the assembly is reflection only or not.
12437 * exception.c: Add mono_get_exception_invalid_operation.
12439 * icall.c: Throw an InvalidOperationException when trying to invoke
12440 a property/method/event, or trying to set/get the value of a field.
12441 Also add an icall to retrieve the ref_only flag to the
12442 MonoReflectionAssembly.
12444 2005-02-23 Chris Toshok <toshok@ximian.com>
12446 Part of fix for #72827.
12447 * mono-debug.c (mono_debug_add_method): add lexical block data to
12448 the info we write. Kind of a hack at the moment - we copy the
12449 lexical block info from the MonoDebugMethodInfo to the
12450 MonoDebugMethodJitInfo here, before writing it.
12451 (mono_debug_read_method): read the lexical block info.
12453 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
12455 * debug-mono-symfile.h: add lexical block support.
12457 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
12460 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
12462 * loader.c (mono_lookup_pinvoke_call): Fix warning.
12464 * object.c (mono_runtime_free_method): Call mono_free_method () and
12465 put the TODOs there.
12467 * loader.c (mono_free_method): Free up most memory allocated for
12470 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
12472 * reflection.c: properly flag a Type argument to a
12473 named custom attr value (bug #72248).
12475 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
12477 * reflection.c: reduce code duplication in named custom
12478 attribute encoding.
12480 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
12482 * reflection.c: properly encode custom attrs of type object
12485 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
12487 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
12489 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
12491 * socket-io.c: load System.dll if it's not loaded already
12492 (bug #72850 and #70477).
12494 2005-02-21 Martin Baulig <martin@ximian.com>
12496 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
12499 2005-02-21 Martin Baulig <martin@ximian.com>
12501 * reflection.c (mono_image_build_metadata): We also need to
12502 "fixup" the MethodImpl table after we computed the final method
12503 indices. Call fixup_methodimpl() to do that.
12504 (fixup_methodimpl): New private method.
12506 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
12508 * assembly.c: special case mscorlib.dll (bug#72536),
12509 patch from Carlos Alberto Cortez.
12511 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
12513 * threads-types.h threads.c: Fix build bustage.
12515 * threads.c: Use a union for long<->double conversions.
12517 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
12518 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
12520 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
12521 containing the checkpoint call with NOT_TAKEN.
12523 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
12524 checkpoint before pushing the arguments, so they won't have to be
12527 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
12529 * domain.c, assembly.c, domain-internals.h: make some data
12530 const and relocation-free.
12532 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
12534 * object.c, appdomain.c, class-internals.h: introduce the
12535 MonoClassRuntimeInfo structure to hold the info needed to
12536 use a class at runtime. Made mono_class_vtable() lock-free
12537 for all the appdomains.
12539 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
12541 * metadata-internals.h, image.c: introduce a per-image mempool to
12542 be used for memory that has the same lifetime as the image.
12544 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
12546 * domain.c: In mono_init_internal(), instead of selecting the first
12547 runtime version supported by an executable, get a list of all
12548 supported versions and select the one for which an mscorlib exists
12549 (since even if the runtime supports a given version, it doesn't mean
12550 that the framework for that version is installed).
12551 Modified get_runtimes_from_exe to support this behavior.
12552 In supported_runtimes, added information about additional system
12555 * assembly.c: Added support for more than one system assembly version
12556 per runtime version. Updated the assembly list.
12557 In mono_assembly_remap_version, removed the initial version check,
12558 since we don't know to which version we need to compare until we
12559 get the version set on which the assembly is based.
12560 Moved the code for loading corlib into the new method
12561 mono_assembly_load_corlib(), so it can be used by the initialization
12564 * domain-internals.h: Updated data structures and added declaration
12565 for mono_assembly_load_corlib.
12567 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
12569 * reflection.c (resolve_object): Fix the creation of the signature in
12570 the SignatureHelper case.
12572 * assembly.c (mono_assembly_remap_version): Fix binary search.
12574 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
12576 * class.c: Added inheritance check when a method is overloaded (from a
12577 virtual method or when implementing an interface) and when a class is
12578 inherited. Added functions to set a failure for a class and to
12579 retreive the exception from a failure.
12580 * class-internals.h: Added fields to MonoClass to keep the exception
12581 information status for inheritance (or other exceptions) to be thrown
12582 later (i.e. not at load time).
12583 * object.c: Throw the inheritance SecurityException when a type is to
12584 be created with either class or method inheritance violations.
12585 * reflection.c|h: Fix when getting declsec from a class. Removed
12586 unrequired code for class. Improved sanity in parameter naming.
12587 * security-manager.c|h: Added functions to check for class and method
12590 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
12592 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
12593 and has_finalize in dynamic types as well.
12595 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
12597 * culture-info-table.h : fixed currency format for en-GB (and so on).
12599 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
12601 * gc.c: ensure the GC handles never have 0 as a value.
12603 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
12605 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
12606 a pointer to a struct to unmanaged code. Fixes #72625.
12608 2005-02-16 Martin Baulig <martin@ximian.com>
12610 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
12612 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
12614 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
12616 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
12618 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
12620 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
12621 UnmanagedFunctionPointerAttribute, use it for determining calling convention
12624 * reflection.c (mono_custom_attrs_get_attr): New helper function.
12626 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
12628 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
12630 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
12631 changes to make the current context a field in MonoThread.
12633 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
12635 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
12638 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
12639 extracted from mono_marshal_get_native_wrapper.
12641 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
12642 to create wrappers around native functions.
12644 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
12645 delegates for arbitrary function pointers. Fixes #71472.
12647 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
12649 * threads.c: cleaned up the code a little.
12651 2005-02-15 Martin Baulig <martin@ximian.com>
12653 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
12656 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
12657 allocate larger chunks if needed.
12659 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
12661 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
12664 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
12666 * domain.c: keep the domains in an array and ensure the domain ids
12667 are kept small, so they can be used as indexes to domain-specific data
12668 with a small memory overhead.
12670 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
12672 * icall.c: Handle byref types in Type icalls. Fixes #72544.
12674 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
12676 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
12678 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
12680 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
12682 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
12685 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
12687 2005-02-12 Ben Maurer <bmaurer@ximian.com>
12689 * domain-internals.h: add the hashtable here.
12691 * class-internals.h: Remove `info' from MonoMethod
12693 * domain.c: Add a new hashtable, jit_trampoline_hash
12695 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
12697 * object.c: don't set the value of static fields
12700 2005-02-11 Martin Baulig <martin@ximian.com>
12702 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
12703 (mono_debug_add_method): Silently ignore the method if it's too big.
12704 (mono_debug_add_type): Likewise.
12706 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
12708 * threads.c, appdomain.c: remove #ifdefs from the code.
12710 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
12712 * metadata-internals.h: Added flags to MonoAssembly to cache the most
12713 common security informations. This allows us to stay in unmanaged code
12714 when doing LinkDemand and it's special cases (except for the first
12715 time for initialization). The flags a very much used with --security.
12716 * reflection.c|h: Added code to get declarative security attributes
12717 for LinkDemand and InheritanceDemand. This required to refactor the
12718 existing code for Demand.
12719 * security-manager.c|h: Added new method fields for the special cases
12722 2005-02-10 Martin Baulig <martin@ximian.com>
12724 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
12725 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
12727 2005-02-10 Martin Baulig <martin@ximian.com>
12729 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
12730 debugging code; this is almost a complete rewrite.
12732 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
12734 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
12736 * domain.c, object.h: expose mono_string_equal () and
12737 mono_string_hash ().
12738 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
12739 it's implemented in managed code.
12741 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
12743 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
12744 lo leak objects between appdomains.
12746 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
12748 * assembly.c: old compilers compilation fix from
12749 robertj@gmx.net (Robert Jordan).
12751 2005-02-09 Ben Maurer <bmaurer@ximian.com>
12753 * class-internals.h: Little reminder for the future.
12755 * debug-helpers.c: Fix up wrapper_type_names
12757 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
12759 * image.c, metadata-internals.h: when loading an image from a file,
12760 mmap all of it and use the same codepaths as when using a
12761 in-memory image: the code is simpler and we use less memory
12762 (both writable and readonly).
12764 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
12766 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
12767 API to alloc runtime data structures that need to be tracked by the
12768 GC and contain pointers.
12769 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
12770 make the code more readable and eventually use a different GC.
12772 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
12774 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
12777 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
12779 * object.c: In release_type_locks(), don't release the cctor lock
12780 if it has already been released. This fixes a crash in the
12783 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
12785 * gc.c, marshal.c, icall.c: register a delegate for finalization
12786 only when the native function pointer has been allocated for it.
12788 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
12790 * object.c: cleaned up some code, allocate objects that are
12791 pointer free with the atomic malloc variant. Allocate memory
12792 for static data from the mempool if it's pointer-free.
12793 Allocate the bounds array at the end of the array data, when needed.
12794 * object-internals.h, object.h: move a private function in a private
12796 * class.c: handle missing case in tracking references in fields.
12798 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
12800 * class.c, class-internals.h: keep track if a type has
12801 reference fields in either the instance or static fields.
12803 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
12805 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
12806 and renamed to MonoRuntimeInfo. Added fields to store the expected
12807 framework assembly version. Changed mono_get_framework_version and
12808 mono_get_runtime_version for a single mono_get_runtime_info method.
12810 * assembly.c: Added method to remap system assembly versions to the
12811 current executing runtime version. Removed old mapping code.
12812 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
12814 * icall.c, reflection.c: Track api changes.
12816 2005-02-06 Miguel de Icaza <miguel@novell.com>
12818 * loader.c (method_from_memberref): Improve error reporting,
12819 produce the class name instead of the typeref/typedef index.
12821 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
12823 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
12825 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
12827 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
12828 stdcall and charset name mangling. Reorganize the code and add
12829 some tracing stuff.
12831 2005-02-05 Ben Maurer <bmaurer@ximian.com>
12833 * monodiet.c: More iters!
12835 * marshal.c: Iter usage.
12837 * icall.c: Iter usage.
12839 * object.c: Use iters.
12841 * debug-helpers.c: More iters
12843 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
12845 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
12848 2005-02-05 Ben Maurer <bmaurer@ximian.com>
12850 * mono-debug-debugger.c: use iters
12852 * class.c, class-internals.h: mono_class_setup_events is static
12855 * All callers: use iters
12857 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
12859 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
12860 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
12862 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
12864 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
12866 * marshal.h: Add prototypes for ldfld/stfld_remote.
12868 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
12869 this is called during startup.
12871 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
12873 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
12874 MonoThreadsSync struct private in monitor.c. Changed the way
12875 MonoThreadsSync is allocated so it's faster and there is no
12876 need to keep track of it with a finalizer and it uses less memory.
12877 This also finally allows us to allocate mono objects as ptrfree when
12878 there are no reference fields.
12880 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
12882 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
12883 disappearing link to the GC interface and use them to simplify
12884 the gchandles code.
12886 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
12888 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
12889 stfld_remote which call mono_load/store_field_new. This allows methods
12890 calling ldfld/stfld wrappers to be AOTed.
12892 * console-io.c: Include sys/filio.h under solaris.
12894 * console-io.c: Include curses.h if needed correctly.
12896 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
12898 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
12899 method->klass as well.
12901 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
12903 * class.c (mono_class_init): Switch on lazy initialization of
12906 * class.c (mono_class_get_finalizer): Handle the case when the
12907 finalizer is inherited.
12909 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12911 * console-io.c: <curses.h> is needed by term.h on solaris.
12913 2005-02-03 Ben Maurer <bmaurer@ximian.com>
12915 * icall.c, class-internals.h, monodiet.c, class.c: Remove
12916 mono_class_setup_properties where possible. Remove this ftn from
12917 the header file, and make it static.
12919 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
12921 * loader.c: Add missing setup_... call.
12923 * class.c: Add missing setup_... calls.
12925 * class.c (mono_class_init): Switch on lazy initialization of
12926 the generic vtable.
12928 * class.c (mono_class_init): Fix generics broken by the recent changes.
12930 * monodiet.c (handle_type): Add missing setup_... calls.
12932 * class.c: Back out garbage in previous patch.
12934 * class.c: Add missing setup_... calls.
12936 * class.c (mono_class_get_method_from_name_flags): Avoid calling
12937 mono_class_setup_methods () if possible.
12939 * class-internals.h (MonoClass): Add 'has_cctor' flag.
12941 * class-internals.h (MonoCachedClassInfo): New structure.
12943 * class.c: Initialize properties and events fields of MonoClass lazily.
12945 * class.c: Add infrastructure for lazily initializing the methods and
12946 vtable fields of MonoClass. Not yet used.
12948 * class.c (mono_class_get_finalizer): New helper function.
12950 * class.c: Add infrastructure for loading some class related data from
12953 * object.c: Add infrastructure for initializing the vtable from data
12956 * gc.c (run_finalize): Use mono_class_get_finalizer ().
12958 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
12959 appropriate initialization function before accessing parts of the
12960 MonoClass structure.
12962 * marshal.c: Fix warnings.
12964 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
12966 * mono-debug-debugger.c (get_exception_message): Use
12967 mono_class_get_method_from_name_flags ().
12969 2005-02-02 Ben Maurer <bmaurer@ximian.com>
12971 * reflection.c, appdomain.c: Replace a few manual searches that
12972 Zoltan missed. (Paolo approved this part of my initial patch).
12974 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
12976 * profiler.c: disable recording statistical events at report time.
12978 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
12980 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
12981 to byteswap arrays of enum values, too (bug #72080).
12983 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
12985 * appdomain.c (set_domain_search_path): Allow this to be called if
12986 domain->setup is not yet set.
12988 * loader.c (mono_method_get_index): New helper function.
12990 * loader.c reflection.c: Use mono_method_get_index ().
12992 * class.c (mono_class_get_method_from_name_flags): New helper method.
12994 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
12997 * class.c (mono_class_get_cctor): New helper method.
12999 * string-icalls.c object.c class.c marshal.c reflection.c: Use
13000 mono_class_get_method () to look up methods.
13002 2005-02-01 Miguel de Icaza <miguel@novell.com>
13004 * console-io.c: Fix the build, this should work on Windows.
13006 2005-01-31 Ben Maurer <bmaurer@ximian.com>
13008 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
13009 be set to null to keep things valid
13011 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13013 * icall.c: added Console 2.0 icalls.
13014 * Makefile.am: added console-io.[ch]
13015 * console-io.[ch]: internal calls for Console 2.0 API.
13017 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
13019 * class.c: make sure we consider all the interfaces
13020 when calculating max_interface_id (bug found by
13021 Jeroen Frijters running ikvm).
13023 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
13025 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
13026 valuetype fields to null.
13028 * object.c (set_value): Ditto. Fixes #71669.
13030 2005-01-31 Martin Baulig <martin@ximian.com>
13032 * metadata.c (mono_metadata_has_generic_params): New public
13033 function; checks whether something is a generic method.
13035 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13037 * appdomain.c: fix infinite recursion when adding assemblies.
13039 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
13041 * object.c: Fix small typo to return all items for Environment.
13042 GetCommandLineArgs.
13044 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
13046 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
13047 reflection.c: more domain and assembly-unload related fixes
13048 and memory leaks plugs.
13050 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
13052 * 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.
13054 2005-01-29 Ben Maurer <bmaurer@ximian.com>
13056 * loader.c (mono_method_signature): Make this method lazy
13057 (mono_get_method_from_token): Don't computate the signature here.
13059 Doing this saves quite a bit of memory. I got 90 kb on starting up
13060 monodoc. It should also save some disk reads on startup.
13062 * *: MonoMethod->signature might be NULL now. You *MUST* use
13063 mono_method_signature.
13065 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
13067 * object.c (mono_runtime_get_main_args): Return an array from the
13068 current domain here. Fixes #71938.
13070 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
13072 * monitor.c: formatting changes to comply with the
13073 mono coding style and remove #ifdefs from the code.
13075 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
13077 * metadata.c, private.h: remove some unneeded data
13078 and use a more compact representation for table schemas.
13080 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
13082 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
13083 to get a better distribution in hash tables.
13084 * *.c: use mono_aligned_addr_hash() where appropriate.
13085 * assembly.c: make var static.
13087 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
13089 * domain-internals.h: Put MonoJitInfo on a diet.
13091 * domain.c: Fix a warning.
13093 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
13095 * gc.c: rework the gc handles code to reuse handles
13098 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
13100 * domain.c: fixed long standing bug in mono_string_equal() which
13101 was brought to light with the ldstr changes.
13103 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
13105 * reflection.c: Remove warning by adding missing include for marshal.h
13107 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
13109 * domain.c, object.c: change the ldstr_table to hold
13110 MonoString* as keys: makes the runtime isinterned lookup
13111 faster and simplifies memory management.
13113 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
13115 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
13116 possible to add imperative security checks before calling the icall.
13117 * reflection.c: Return security attributes on the original MonoMethod
13118 (and not the wrapped one). This fix permissions on icalls.
13120 2005-01-25 Dick Porter <dick@ximian.com>
13122 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
13123 the check for mktime() support actually test the mktime() return
13124 value. "Fixes" bug 71682, though the output is still different to
13127 2005-01-25 Martin Baulig <martin@ximian.com>
13129 * class.c (mono_class_is_assignable_from): Make this work for
13132 2005-01-24 Ben Maurer <bmaurer@ximian.com>
13134 * marshal.c (mono_string_utf8_to_builder)
13135 (mono_string_builder_to_utf16): We might not have ownership of the
13136 string. In thise case, we need to create a new buffer.
13138 * object-internals.h (mono_stringbuilder_capacity): sb->str might
13139 be null, in which case, use the default capacity.
13141 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
13143 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
13144 GC events to the profiler.
13146 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
13148 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
13149 if you don't want the GC to run.
13151 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
13153 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
13154 start providing a GC API and keeping different implementations in
13156 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
13158 2005-01-22 Ben Maurer <bmaurer@ximian.com>
13160 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
13161 mmap rather than allocating a huge buffer.
13162 (mono_debug_close_mono_symbol_file): Free the buffer allocated
13165 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
13167 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
13168 and CheckExecutionRights.
13169 * reflection.c|h: Keep the index of the declarative security to be
13170 used, instead of the pointer, when AOT compiler is used. Also add
13171 class initialization when requesting demands.
13172 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
13173 CheckExecutionRights. Both properties are now FALSE by default, and
13174 unmodifiable, unless the --security option is used.
13176 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
13178 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
13179 reflection.c: properly refcount images and assemblies, many leaks fixed.
13181 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13183 * threadpool.c: increase the timeout for threads in the thread pool to
13184 10s. Fixes bug #67159.
13186 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
13188 * class-internals.h: Sun's compiler insists on explicit
13189 signed on bit fields to handle then correctly.
13191 2005-01-19 Miguel de Icaza <miguel@ximian.com>
13193 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
13194 Make the size of the array fit only the number of invalid path
13195 chars that we have.
13197 * class.c (_mono_class_get): Improve the error reporting when a
13198 class referenced is not found, to assist debugging.
13200 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
13202 * threads.c: fix off-by-one error.
13203 * domain.c: free data allocated in the domain.
13205 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
13207 * reflection.c (mono_method_body_get_object): Fill out exception info
13210 * object-internals.h: Add MonoReflectionExceptionHandlingClause
13213 2005-01-19 Martin Baulig <martin@ximian.com>
13215 * loader.c (mono_get_method_constrained): Make this work again.
13217 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
13219 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
13220 guint16 to match the managed side.
13222 * reflection.c (mono_reflection_body_get_object): Fill out local
13225 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
13228 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
13229 'local_var_sig_token'.
13231 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
13233 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
13236 * reflection.c (mono_method_body_get_object): Handle abstract and
13239 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
13241 * marshal.c, loader.c, class-internals.h, reflection.c:
13242 store the emthod data for a wrapper in an array instead of a list.
13244 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
13246 * marshal.c: change the code to allocate memory more
13247 conservatively for method wrappers.
13249 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
13251 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
13252 fields from MonoClass to the marshal info structure where they belong.
13254 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
13256 * class.c, object.c, class-internals.h, marshal.c: rearrange
13257 some fields and tweak some types to lower memory usage.
13259 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
13261 * threads.c (signal_thread_state_change): Handle the case when the
13262 target thread is the current thread.
13264 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
13266 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
13267 emit_ptr_to_object_conv.
13269 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
13270 marshalling. Fixes #71352.
13272 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
13274 * metadata.h, blob.h: move table enum to blob.h so it can be included
13276 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
13277 cut the size of MonoImage/MonoDynamicImage.
13279 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
13281 * profiler.c (mono_profiler_install_simple): Fix default arguments.
13283 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
13285 * reflection.c, reflection.h, icall.c: add a function to check
13286 if an attribute type is defined for a metadata object.
13288 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
13290 * object-internals.h: Added some needed fields from StringBuilder class.
13291 * marshal.c: Set the maxCapacity when creating a StringBuilder.
13293 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
13295 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
13296 threads before shutting down the runtime.
13298 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
13300 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
13302 * object-internal.h, threads.c: implement stacksize and
13303 parameterized thread start functionality (requires
13304 matching corlib). Marked broken code for later removal.
13306 2005-01-12 Martin Baulig <martin@ximian.com>
13308 * class-internals.h (MonoGenericClass): Moved the `initialized'
13309 flag to MonoDynamicGenericClass, removed `init_pending'.
13310 (MonoGenericInst): Added `is_reference' flag.
13312 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
13314 * reflection.c (mono_image_create_pefile): Only set the pe_offset
13315 inside the MSDOS header. Fixes #71201.
13317 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
13319 (mono_domain_finalize): Ditto.
13321 2005-01-12 Martin Baulig <martin@ximian.com>
13323 * class.c (mono_get_shared_generic_class): Use the cache for
13324 non-dynamic generic classes.
13326 * class-internals.h (mono_class_create_generic_2): Removed
13327 function prototype, this function is now static inside class.c.
13329 * class.c (mono_class_create_generic_2): Made this static, only
13330 call it from mono_class_init() and mono_class_setup_parent().
13331 (collect_implemented_interfaces_aux): Call mono_class_init() on
13332 the interfaces we collect.
13333 (mono_class_setup_vtable): Call mono_class_init (class->parent).
13335 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
13337 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
13338 it a real thread handle.
13340 * domain-internals.h: Move exvar_offset from MonoJitInfo to
13341 MonoJitExceptionInfo, since each catch clause needs its own variable.
13343 2005-01-11 Dick Porter <dick@ximian.com>
13345 * image.c (mono_pe_file_open): New variant on mono_image_open()
13346 that does not set up the CLI metadata; used for FileVersionInfo so
13347 it can get the data for windows binaries too.
13349 * process.c (process_read_string_block): Don't read off the end of
13350 the StringTable block.
13352 These both fix bug 70766.
13354 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
13356 * gc.c: set some fields to NULL at GC cleanup time.
13357 * threads.c: if we quit the main thread, call exit ().
13359 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
13361 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
13363 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
13365 * threads.h, threads.c, object.c: added accessor and settor for
13366 main_thread. Handle it specially when exiting from it: wait
13367 for other foreground threads to exit.
13369 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
13371 * process.c, verify.c: remove some bloat.
13373 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
13375 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
13376 the calling convention to cdecl under win32.
13378 2005-01-08 Ben Maurer <bmaurer@ximian.com>
13380 * object.c (mono_object_get_size): New function to get the size of
13381 an object instance.
13383 * profiler.c (simple_allocation): Use above.
13385 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
13387 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
13388 ves_icall_System_AppDomain_getRootDomain (as it's not required to
13389 get an appdomain by it's id and we can't assume the root's id is 0).
13390 * domain-internals.h: Change the function prototype to match.
13391 * icall.c: Change the icall table for AppDomain.
13393 2005-01-08 Miguel de Icaza <miguel@ximian.com>
13395 * locales.c (string_invariant_compare_char): Only compute
13396 GUnicodeTypes in the case where we need them. Test for ordinality
13397 first and return if so.
13402 * FIXME: here we must use the information from c1type and c2type
13403 * to find out the proper collation, even on the InvariantCulture, the
13404 * sorting is not done by computing the unicode values, but their
13405 * actual sort order.
13408 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13410 * loader.c: for P/Invoke methods, allow the "Internal" shared
13411 library name to refer to the calling process symbol namespace.
13413 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
13415 * Makefile.am: Add the security manager to the build.
13416 * security-manager.c|h: New. Initialization of the security manager.
13418 2005-01-07 Dick Porter <dick@ximian.com>
13421 * monitor.c: Update thread state during Monitor and WaitHandle
13422 waits. Fixes bug 71031.
13424 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
13426 * reflection.c (property_encode_signature): Correctly handle when the
13427 property has no methods.
13429 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
13431 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
13433 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
13434 fields from mb, not rmb. Fixes #71017.
13436 * marshal.c (emit_ptr_to_str_conv): Add support for
13437 ByValTStr -> string conversion. Fixes #71015.
13439 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
13441 * mempool.c (mono_mempool_contains_addr): New helper function.
13443 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
13445 * metadata.c (mono_metadata_compute_size): Fix size calculation of
13446 HasSematics encoded fields.
13448 * metadata.c (mono_type_to_unmanaged): Improve error message for
13449 invalid string marshalling.
13451 * metadata.c: Fix warnings.
13453 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
13455 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
13458 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
13460 * domain.c object.c domain-internals.h: Revert part of r38077 since the
13461 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
13464 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
13466 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
13467 so methods containing these can be AOTed.
13469 2005-01-03 Martin Baulig <martin@ximian.com>
13471 * loader.c (find_method): Removed the hack for generic instances.
13472 (method_from_memberref): If our parent is a generic instance, pass
13473 its generic type definition to find_method() and then inflate the
13475 (mono_get_method_constrained): Pass the generic type definition to
13476 find_method() and inflate the method later.
13478 * class-internals.h (MonoStats): Added `generic_class_count'.
13480 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
13481 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
13483 * reflection.c (mono_custom_attrs_from_params): Don't ignore
13484 generic type definitions.
13486 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
13488 * loader.c icall.c: Fix warnings.
13490 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
13492 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
13493 blittable types. Fixes #70864.
13495 2004-12-29 Martin Baulig <martin@ximian.com>
13498 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
13500 * reflection.c (mono_method_get_object): Create a
13501 "System.Reflection.MonoGenericMethod" for inflated methods; don't
13502 call mono_get_inflated_method().
13504 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
13506 2004-12-27 Martin Baulig <martin@ximian.com>
13508 * class-internals.h (MonoMethod): Added `is_inflated' flag.
13509 (MonoMethodInflated): Added `inflated' field.
13511 * class.c (mono_class_inflate_generic_method): Don't really
13512 inflate the method here; just set the `is_inflated' flag in the
13514 (mono_class_get_inflated_method): Actually inflate the method here
13515 if it's not already inflated; we use the MonoMethodInflated's new
13516 `inflated' field as a cache.
13518 2004-12-26 Martin Baulig <martin@ximian.com>
13521 (inflate_generic_class): Moved some code out of inflate_generic_type().
13522 (mono_class_inflate_generic_method): If we're already inflated,
13523 inflate the context and use the declaring method; ie. make sure
13524 the declaring method of an inflated method is always the generic
13526 (mono_class_create_from_typedef): Create
13527 `class->generic_container->context->gclass'.
13529 2004-12-24 Ben Maurer <bmaurer@ximian.com>
13531 * metadata-internals.h, marshal.c, reflection.c: More
13532 MonoGHashTable->GHashTable.
13534 * domain-internals.h, class.c: Change MonoGHashTable's into
13535 GHashTables for some cases where no gc stuff is used
13537 All users: update apis
13539 2004-12-23 Ben Maurer <bmaurer@ximian.com>
13541 * metadata.c (builtin_types): Make this `const'. Makes this get
13542 put into the shareable section.
13543 (mono_metadata_init): Casts to make gcc happy.
13545 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
13547 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
13549 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
13551 * icall.c: Added an internal call to retrieve the position and length
13552 of assembly-level declarative security attributes (RequestMinimum,
13553 RequestOptional and RequestRefuse). This is used by the Assembly class
13554 to re-create the corresponding permission sets.
13556 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
13558 * marshal.c: fix the stelemref wrapper to be type correct
13561 2004-12-20 Ben Maurer <bmaurer@ximian.com>
13563 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
13564 to do key & 0x7fffffff. Hashtable already does this. It just
13565 results in longer code.
13567 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
13569 * appdomain.c: Bump corlib version.
13570 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
13571 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
13572 * reflection.c|h: Add functions to get declarative security infos
13573 (blob position and length) for assemblies, classes and methods.
13575 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
13577 * reflection.c: sort the constant table (bug #70693).
13579 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
13581 * object-internals.h, threads.c, domain.c: add accessors for
13582 the MonoThread and MonoDomain tls keys.
13584 2004-12-18 Martin Baulig <martin@ximian.com>
13586 * class.c (inflate_generic_type): If we're inflating a generic
13587 instance, set `ngclass->context->container = context->container';
13588 ie. the container we inflated into.
13590 * metadata.c (mono_metadata_parse_generic_param): Reflect above
13591 inflate_generic_type() changes.
13593 2004-12-17 Martin Baulig <martin@ximian.com>
13595 * class-internals.h
13596 (MonoGenericClass): Replaced `MonoType *generic_type' with
13597 `MonoClass *generic_class'. Removed `dynamic_info'; if
13598 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
13599 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
13601 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
13603 * exception.c (mono_exception_from_token): New helper function.
13605 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
13607 * assembly.c (mono_assembly_load_with_partial_name): Call
13608 mono_assembly_loaded before invoking the preload hooks. Fixes
13611 * object-internals.h (MonoThread): Change culture_info and
13612 ui_culture_info into an array.
13614 * threads.c: Cache culture info objects from more than one appdomain.
13616 * threads.c threads-types.h icall.c: Add icalls for manipulating the
13617 current UI culture.
13619 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
13621 * threads.h threads.c appdomain.c: Clear the culture_info field of
13622 all threads during unloading if they point to an object in the dying
13625 2004-12-13 Ben Maurer <bmaurer@ximian.com>
13627 * culture-info.h (TextInfoEntry): New struct
13628 * object-internals.h: sync with managed
13629 * locales.c: fill the `text_info_data' field
13630 * culture-info-tables.h: update
13632 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
13634 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
13637 2004-12-12 Ben Maurer <bmaurer@ximian.com>
13639 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
13640 (ves_icall_ModuleBuilder_getMethodToken): Ditto
13642 2004-12-12 Martin Baulig <martin@ximian.com>
13644 * mono-debug-debugger.c (write_type): If we're an enum and the
13645 builtin types have already been initialized, call mono_class_init().
13647 2004-12-11 Martin Baulig <martin@ximian.com>
13649 * metadata.c (mono_metadata_load_generic_params): Added
13650 `MonoGenericContainer *parent_container' argument; automatically
13651 compute `container->is_method'; pass the correct owner to
13654 * reflection.c (compare_genericparam): Sort the GenericParam table
13655 according to increasing owners.
13657 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
13659 * profiler.c: allow disabling the default profiler.
13661 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
13663 * decimal.c, icall.c: allow disabling System.Decimal support.
13665 2004-12-09 Marek Safar <marek.safar@seznam.cz>
13667 * reflection.c: Add support for null attribute arguments.
13669 2004-12-09 Martin Baulig <martin@ximian.com>
13671 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
13672 names to get rid of compiler warnings.
13674 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
13676 * marshal.c (mono_marshal_get_struct_to_ptr): Call
13677 mono_marshal_load_type_info (). Fixes #69625.
13678 (mono_marshal_get_ptr_to_struct): Likewise.
13680 2004-12-08 Martin Baulig <martin@ximian.com>
13682 * mono-debug.h: Bumped version number to 47.
13684 * mono-debug-debugger.c
13685 (mono_debugger_event_handler, mono_debugger_event): Take two
13686 guint64 arguments insteed of a gpointer and a guint32.
13688 2004-12-08 Martin Baulig <martin@ximian.com>
13690 * debug-mono-symfile.h
13691 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
13692 `address' to `native_offset'.
13694 2004-12-08 Martin Baulig <martin@ximian.com>
13696 * class.c (mono_class_create_from_typespec): Only inflate if we
13697 either have `context->gclass' or `context->gmethod'.
13699 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
13701 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
13703 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
13705 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
13707 * reflection.c (mono_assembly_get_object): Remove the workaround put
13708 in for the release.
13710 * appdomain.c: Use the corlib_internal field from MonoAssembly.
13712 * appdomain.c: Bump corlib version.
13714 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
13715 be visible in other appdomains.
13717 2004-12-07 Ben Maurer <bmaurer@ximian.com>
13719 * threads.c: Interlocked inc and dec for longs were messed up,
13720 use a KISS based impl for this. Fixes 70234
13722 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
13724 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
13726 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
13728 * icall.c: fix to follow policy not to allow struct
13729 arguments in icalls.
13731 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13733 * process.c: make the patch that handles spaces in file paths work
13734 on mono/windows too.
13736 2004-12-06 Martin Baulig <martin@ximian.com>
13738 * class.c (mono_class_create_generic): Call
13739 mono_class_setup_supertypes() if we're dynamic.
13740 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
13742 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
13744 * object-internals.h: Add new fields to MonoThread.
13746 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13748 * icall.c threads-types.h threads.c: Add new icalls.
13750 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
13752 * object-internals.h (MonoReflectionAssembly): Sync object layout with
13755 * appdomain.c: Bump corlib version.
13757 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
13758 internal assemblies. Fixes #69181.
13760 2004-12-05 Martin Baulig <martin@ximian.com>
13762 * class.c (mono_class_inflate_generic_signature): Make this a
13763 no-op if `context' is NULL or we don't have any type parameters;
13764 also copy `sentinelpos'.
13766 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
13768 * image.c: Add unbox_wrapper_cache.
13770 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
13772 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
13773 function generator.
13775 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
13778 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
13780 2004-12-04 Martin Baulig <martin@ximian.com>
13782 * loader.c (mono_method_get_signature_full): New public function;
13783 like mono_method_get_signature(), but with an additional
13784 `MonoGenericContext *' argument.
13786 * class.c (mono_class_inflate_generic_signature): Formerly known
13787 as inflate_generic_signature(); make this public.
13789 2004-12-04 Martin Baulig <martin@ximian.com>
13792 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
13793 instead of a `MonoGenericContainer *'.
13794 (mono_metadata_parse_array_full): Likewise.
13795 (mono_metadata_parse_signature_full): Likewise.
13796 (mono_metadata_parse_method_signature_full): Likewise.
13797 (mono_metadata_parse_generic_inst): Likewise.
13798 (mono_metadata_parse_generic_param): Likewise.
13799 (mono_metadata_parse_mh_full): Likewise.
13800 (mono_type_create_from_typespec_full): Likewise.
13802 2004-12-03 Martin Baulig <martin@ximian.com>
13804 * class-internals.h (MonoGenericContainer): Replaced the
13805 `MonoGenericContext * pointer with a `MonoGenericContext'
13806 structure and made it the first element.
13808 2004-12-03 Martin Baulig <martin@ximian.com>
13811 (inflate_generic_type): Set the `context->container' when creating
13812 a new MonoGenericContext.
13813 (mono_class_inflate_generic_method): Likewise.
13814 (mono_class_create_from_typespec): Just use `context->container'
13815 to get the container.
13817 * loader.c (method_from_methodspec): Set `context->parent' from
13818 `context->container' - and if that's a method container, use its
13819 parent. Also set the `context->container' when creating a new
13820 MonoGenericContext.
13821 (mono_get_method_from_token): Use just `context->container' to get
13824 * metadata.c (do_mono_metadata_parse_generic_class): Also set
13825 `gclass->context->container'.
13827 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
13828 the `context->container' when creating a new MonoGenericContext.
13830 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
13832 * reflection.c (compare_genericparam): Sort params with identical
13833 owner by their number. Fixes gen-111 on sparc.
13835 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
13837 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
13838 around the domain changes.
13840 * appdomain.c (mono_domain_unload): Handle the case when the thread
13841 calling Unload is itself being aborted during unloading. Fixes #70022.
13843 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
13845 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
13846 checkpoint_func as an icall so it gets a wrapper.
13847 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
13848 in the cross-appdomain wrappers too.
13850 * threads.c (mono_thread_has_appdomain_ref): Make this public.
13852 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
13854 * reflection.c: Fix some memory leaks.
13856 2004-12-02 Martin Baulig <martin@ximian.com>
13858 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
13860 * metadata.c (generic_class_cache): New static hashtable.
13861 (mono_metadata_lookup_generic_class): New public method.
13863 2004-12-02 Martin Baulig <martin@ximian.com>
13865 * class.c (mono_class_create_from_typedef): Call
13866 mono_class_setup_parent() and mono_class_create_mono_type() before
13867 parsing the interfaces.
13869 2004-12-02 Martin Baulig <martin@ximian.com>
13871 * metadata.c (generic_inst_cache): New static hashtable.
13872 (mono_metadata_lookup_generic_inst): New public function.
13873 (mono_metadata_inflate_generic_inst): New public function.
13874 (mono_metadata_parse_generic_inst): New public function.
13875 (do_mono_metadata_parse_generic_class): Use the new
13876 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
13877 since this'll also use the cache.
13879 * reflection.c (mono_reflection_bind_generic_method_parameters):
13880 Use mono_metadata_lookup_generic_inst() to use the new cache.
13882 * class.c (inflate_mono_type): Use
13883 mono_metadata_inflate_generic_inst() to inflate a generic
13884 instance; this'll also use the new cache.
13886 * loader.c (method_from_methodspec): Use
13887 mono_metadata_parse_generic_inst() and
13888 mono_metadata_inflate_generic_inst() rather than parsing it
13889 manually, so we can use the new cache.
13891 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
13893 * threads.c (wait_for_tids): Do not incorrectly free threads when
13894 the wait times out.
13896 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13898 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
13899 iter->args based on whether parameters are passed in registers (i.e.
13900 MONO_ARCH_REGPARMS is defined)
13902 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
13904 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
13905 the exception message. Fixes #70070.
13906 (method_from_methodspec): Fix warnings.
13908 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13910 * process.c: (complete_path) return the path quoted
13912 2004-12-01 Martin Baulig <martin@ximian.com>
13914 * class-internals.h (MonoGenericInst): New structure.
13915 (MonoGenericClass): Replaced `type_argc', `type_argv' and
13916 `is_open' with `MonoGenericInst *inst'.
13917 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
13918 `is_open' with `MonoGenericInst *inst'.
13920 2004-11-30 Martin Baulig <martin@ximian.com>
13922 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
13924 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
13925 to `generic_class_cache'.
13928 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
13929 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
13930 (mono_generic_inst_is_valuetype): Renamed to
13931 mono_generic_class_is_valuetype().
13933 * class-internals.h
13934 (MonoGenericInst): Renamed to MonoGenericClass.
13935 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
13936 (MonoClass): Renamed `generic_inst' to `generic_class'.
13937 (MonoGenericContext): Renamed `ginst' to `gclass'.
13939 * object-internals.h
13940 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
13942 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
13943 mono_reflection_generic_class_initialize().
13945 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
13946 now known as "System.Reflection.MonoGenericClass".
13947 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
13949 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
13951 * class-internals.h: Added a flag field to MonoClass to cache the
13952 declarative security attributes actions associated with the class.
13953 * domain-internals.h: Added booleans to MonoJitInfo to cache the
13954 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
13955 applicable to the JITted method.
13956 * reflection.c|h: Added functions to extract (as flags) which security
13957 actions are available (declaratively) for a method, class or assembly.
13958 * metadata.c|h: Added functions to search the declarative security
13959 table in the metadata.
13961 2004-11-29 Ben Maurer <bmaurer@ximian.com>
13963 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
13964 EXPORTEDTYPES are already in the class name cache, so there is no
13965 need to add extra code here to look at them. Just removes a bit of
13968 (ves_icall_System_Environment_get_TickCount): No need for #if
13969 WINDOWS. We already have the code in io-layer.
13971 2004-11-28 Martin Baulig <martin@ximian.com>
13974 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
13977 2004-11-27 Miguel de Icaza <miguel@ximian.com>
13979 * assembly.c (do_mono_assembly_open): Instead of having a
13980 conditional WITH_BUNDLE, incorporate support for bundles here, by
13981 having a global `bundles' variable holding a pointer to the actual
13984 (mono_register_bundled_assemblies): New API call used by the
13987 See mkbundle.1 for details.
13989 2004-11-27 Martin Baulig <martin@ximian.com>
13991 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
13992 the vtable for generic methods.
13994 2004-11-26 Martin Baulig <martin@ximian.com>
13997 (mono_metadata_generic_method_hash): New public function.
13998 (mono_metadata_generic_method_equal): Likewise.
14000 * class-internals.h
14001 (MonoGenericContainer): Added `GHashTable *method_hash'.
14003 * reflection.c (ReflectionMethodBuilder): Added
14004 `MonoGenericContainer *generic_container'.
14005 (reflection_methodbuilder_to_mono_method): Don't create a new
14006 MonoGenericContainer each time we're called.
14007 (mono_reflection_bind_generic_method_parameters): Use
14008 `container->method_hash' to cache the results so we don't create a
14009 different method if we're called several times with the same
14012 * loader.c (method_from_methodspec): Use the new
14013 `container->method_hash' here, too.
14015 2004-11-26 Martin Baulig <martin@ximian.com>
14017 * class.c (inflate_generic_signature): Correctly compute
14018 `res->has_type_parameters'.
14019 (mono_class_vtable): Use the `has_type_parameters' flag to
14020 determine whether we're a generic method.
14022 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
14024 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
14026 * object.c (mono_runtime_run_main): Fix a small memory leak.
14028 2004-11-25 Martin Baulig <martin@ximian.com>
14030 * class.c (set_generic_param_owner): Fixed the loop.
14032 2004-11-25 Martin Baulig <martin@ximian.com>
14034 * object.c (mono_class_vtable): Don't create any JIT wrappers for
14037 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
14039 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
14040 names. Fixes #69787.
14042 2004-11-24 Martin Baulig <martin@ximian.com>
14044 * class.c (mono_class_create_generic_2): If we don't have a
14045 `ginst->parent', inflate `gklass->parent' to get our parent.
14047 2004-11-24 Martin Baulig <martin@ximian.com>
14049 * reflection.c (compare_genericparam): Correctly sort the
14050 GenericParam table; fixes #69779.
14052 2004-11-23 Ben Maurer <bmaurer@ximian.com>
14054 * reflection.c: When writing a PE file, don't create a huge
14055 buffer in memory. Just write the arrays we have to the file.
14056 This reduces memory usage.
14058 * metadata-internals.h: MonoDynamicStream pefile is no longer used
14061 2004-11-17 Martin Baulig <martin@ximian.com>
14063 * class.c (mono_class_init): Don't setup `class->parent' for
14064 dynamic instances; moved this to mono_class_generic_2().
14065 (mono_class_create_generic): Also set `klass->inited' for dynamic
14067 (mono_class_create_generic_2): Don't do anything for dynamic
14068 generic instances. Set `klass->parent' here and also call
14069 mono_class_setup_parent() here.
14071 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
14072 `MonoType *parent' argument; set `ginst->parent' before calling
14073 mono_class_create_generic_2(), so we set the correct parent.
14075 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
14077 * reflection.c: allow getting attributes from ModuleBuilder
14080 2004-11-17 Martin Baulig <martin@ximian.com>
14082 * class.c (mono_class_create_from_typedef): If a type parameter is
14083 inherited from an outer class, set its owner to that class.
14085 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
14087 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
14088 for (int*) written size. This fixes bug #69592.
14090 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
14092 * icall.c: Added IsAuthenticodePresnet internal call.
14093 * image.c|h: New function that check a MonoImage for an Authenticode
14094 signature in the certificate PE data directory.
14095 * security.c|h: New internal call to ask the runtime if an
14096 Authenticode signature seems referenced in the PE header.
14098 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
14100 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
14102 * reflection.c (mono_image_create_pefile): Free the assembly streams
14103 after writing out the assembly file.
14105 * object.c (mono_runtime_run_main): Fix small memory leak.
14107 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
14108 property access modifiers. Fixes #69389.
14110 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
14112 * domain.c, object.c, object-internals.h, domain-internals.h,
14113 object.h, marshal.c: keep dynamic code info per domain.
14115 2004-11-15 Martin Baulig <martin@ximian.com>
14117 * class.c (mono_type_get_name_recurse): Put type arguments in
14118 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
14121 2004-11-15 Martin Baulig <martin@ximian.com>
14123 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
14124 (mono_class_setup_vtable): When computing `the_cname' for a
14125 generic instance, don't include the namespace since we'd otherwise
14128 2004-11-15 Martin Baulig <martin@ximian.com>
14130 * class.c (mono_class_create_generic): Changed return type to void.
14131 (mono_class_create_generic_2): New public function; setup
14132 `class->method', `class->field' and `class->interfaces' here
14133 instead of in mono_class_init().
14135 * class.h (mono_class_create_generic): Moved to class-internals.h.
14137 2004-11-14 Ben Maurer <bmaurer@ximian.com>
14139 * reflection.c (mono_image_create_pefile): take a file HANDLE.
14140 rather than writing to memory, write to this file. Right now,
14141 we are just writting into a buffer, and copying that. However
14142 we can avoid the buffer later.
14144 (mono_dynamic_stream_reset): new function
14146 * icall.c, object-internals.h: update for the above.
14148 2004-11-13 Ben Maurer <bmaurer@ximian.com>
14150 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
14151 have been using gc'd memory. First it is slower, unlikely
14152 the comment in the source code said, secondly, it increases
14153 our footprint to do it in the gc.
14155 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
14156 the method so that it does not have to copy to managed code.
14158 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
14160 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
14162 2004-11-12 Martin Baulig <martin@localhost>
14164 * reflection.c (mono_image_create_token): Allow generic method
14165 definitions here, since they may appear in an `.override'; see
14166 gen-98/gen-99 for an example.
14168 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
14170 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
14173 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
14176 2004-11-11 Martin Baulig <martin@ximian.com>
14178 * class.c (mono_class_setup_vtable): In an explicit interface
14179 implementation, the method name now includes the arity.
14181 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
14183 * object.c (mono_array_full_copy): Fix warning.
14185 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
14187 * appdomain.c: Removed look_for_method_by_name(). Use the new method
14188 mono_class_get_method_from_name() instead.
14190 * class-internals.h: Added two new types of wrappers.
14191 Added MonoRemotingTarget enum. Added new trampoline function type, which
14192 takes an additional MonoRemotingTarget value as parameter, so it is
14193 possible to request a trampoline for a specific target.
14195 * class.c: Added new mono_class_get_method_from_name() method.
14197 * class.h: In MonoRemoteClass, we can have now to vtables, one for
14198 general remoting sinks and one specific for cross domain calls.
14200 * debug-helpers.c: Added new wrapper names.
14202 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
14205 * image.c: Porperly delete value objects form the remoting invoke hashtable.
14207 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
14208 with several other methods (mono_marshal_get_xappdomain_dispatch,
14209 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
14210 and others) can generate a fast remoting wrapper for cross domain calls.
14211 More information can be found in docs/remoting.
14212 Other changes: Removed mono_find_method_by_name, and used
14213 mono_class_get_method_from_name instead.
14214 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
14215 is stored in the remoting invoke hashtable.
14217 * marshal.h: published the new method for getting the xdomain wrapper,
14218 and also added a method for getting the adequate wrapper for a given
14221 * object-internals.h, object.c: Added a couple of methods for capying and
14223 Modified mono_install_remoting_trampoline, which takes the new remoting
14224 trampoline that has a remoting target as parameter.
14225 mono_class_proxy_vtable now also takes a remoting target as parameter, and
14226 will return the most suitable vtable for the target.
14227 Added mono_remote_class_vtable, which returns the vtable of a remote class
14228 (which can be the normal remoting vtable or the xdomain vtable).
14230 * threads.c: the xdomain invoke and dispatch wrappers must also be
14231 protected against interruptions.
14233 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14235 * icall.c: use memmove in BlockCopyInternal when the source and
14236 destination arrays are the same.
14238 2004-11-09 Martin Baulig <martin@ximian.com>
14240 * class-internals.h (MonoGenericContainer): Removed `method' and
14241 `signature', replaced them with `is_method' and `is_signature'
14242 flags. Added `context'.
14244 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
14245 instead of a `MonoGenericContainer *'.
14247 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
14248 for dynamic type parameters.
14249 (mono_metadata_load_generic_params): Setup `container->context'.
14251 * reflection.c (mono_reflection_setup_generic_class): Setup
14252 `tb->generic_container->context'.
14253 (do_mono_reflection_bind_generic_parameters): Use
14254 mono_class_inflate_generic_type() to correctly inflate types,
14255 rather than using our own hack just for MONO_TYPE_VAR.
14257 2004-11-09 Martin Baulig <martin@ximian.com>
14259 * class.c (mono_class_inflate_generic_method): Small fix; don't
14263 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
14264 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
14265 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
14266 (ves_icall_Type_BindGenericParameters): Likewise.
14267 (ves_icall_Type_get_IsGenericInstance): Likewise.
14268 (ves_icall_Type_GetGenericParameterPosition): Likewise.
14269 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
14270 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
14271 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
14273 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
14275 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
14276 assembly versions and public key tokens. Fixes #69113.
14278 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
14280 * metadata.c: fix bug introduced with the type cache changes
14283 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
14285 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
14286 the MonoClass pointer instead of the token in exception clauses.
14287 * reflection.c: updates for the above and make the code not depend
14288 on the structure of MonoExceptionClause.
14290 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
14292 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
14293 Add support for dynamic assemblies. Fixes #69114.
14295 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
14297 2004-11-07 Ben Maurer <bmaurer@ximian.com>
14299 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
14300 since most only those methods use it. the code member of
14301 MonoMethodPInvoke was dead, so that can be removed too. Also,
14302 remove inline_count (again, not used), and move slot so that it
14303 can share bits with some other flags. This saves 8 bytes in the
14304 structure and gives us about 50 kb back for mcs helloworld.cs
14306 * *.[ch]: Do naming changes for the above.
14308 * loader.c (mono_method_get_header): Lazily init the header
14310 (mono_get_method_from_token): don't init the header here
14311 (mono_free_method): the header may never be allocated
14313 Overall, this saves 150 kb of unmanaged allocations
14314 for mcs helloworld.cs. That accounts for 10% of the unmanaged
14317 * loader.c, loader.h (mono_method_get_header): new accessor.
14319 * *.[ch]: use the above method. Prepares us to lazily load
14322 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
14323 three warnings, which are actual bugs (see 69206).
14325 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
14326 unused. Saves a cool 4 bytes / method.
14328 2004-11-06 Ben Maurer <bmaurer@ximian.com>
14330 * metadata.c (builtin_types): Add types for System.Object here.
14331 (mono_metadata_parse_type_full): Cache MonoType*'s that are
14332 for a class or valuetype from klass->this_arg or klass->byval_arg.
14334 On mcs for a hello world, this gets us down from 21836 MonoType's
14337 (mono_metadata_free_type): Account for the above change.
14339 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
14341 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
14342 exception instead of asserting if name is null.
14343 (ves_icall_System_AppDomain_GetData): Ditto.
14345 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
14347 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
14350 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
14351 Return NULL when the domain does not have entry_assembly set.
14353 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
14354 Add a 'resource_modules' argument.
14355 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
14357 * reflection.c (mono_reflection_create_runtime_class): Move setting
14358 of wastypebuilder here, so mono_get_type_object () returns a MonoType
14361 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
14362 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
14363 Throw an ArgumentNullException if 'ptr' is null.
14365 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
14366 assemblies here. Fixes #69020.
14368 2004-11-05 Geoff Norton <gnorton@customerdna.com>
14370 * reflection.c (build_compressed_metadata): Fix the previous patch for
14371 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
14374 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
14376 * assembly.c (mono_assembly_names_equal): Allow a match if one of
14377 the cultures is false. Fixes #69090.
14379 * reflection.c (build_compressed_metadata): Fix invalid memory read
14380 detected by valgrind.
14382 * reflection.c (mono_reflection_get_type): Avoid triggering a
14383 TypeResolve multiple times for the same type. Fixes #65577.
14385 2004-11-04 Ben Maurer <bmaurer@ximian.com>
14387 * marshal.c: Avoid using ldftn to call managed functions. It is
14388 much slower than just a call.
14390 * reflection.c (mono_module_get_object): free the basename we
14391 allocate here from glib.
14393 * reflection.c (ensure_runtime_vtable): make sure to free
14394 overrides. Also, we were allocating an array of MonoMethod not an
14395 array of MonoMethod*.
14397 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
14399 * image.c (mono_image_close): free image->guid here.
14401 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
14403 * reflection.c: Fix some spec conformance issues with the PE file
14404 structures so mcs compiled apps run on the Net 2.0 beta.
14406 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
14408 * string-icalls.c (ves_icall_System_String_ctor_encoding):
14409 Implement this. Fixes #67264.
14411 * debug-helpers.h debug-helpers.c marshal.c: Move
14412 mono_find_method_by_name to debug-helpers.c.
14414 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
14416 * object.c (mono_release_type_locks): type_initialization_hash is
14419 * reflection.c object.c object-internals.h: Fix warnings.
14421 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
14422 without accessors. Fixes #61561.
14424 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
14425 application base from the root domain if not set. Fixes #65641.
14426 (mono_runtime_init): Fix warning.
14428 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14430 * appdomain.c: call mono_thread_pool_init.
14431 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
14432 of worker threads based on the number of CPUs and the environment
14433 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
14434 for non-windows (windows) systems.
14436 2004-10-27 Chris Toshok <toshok@ximian.com>
14438 * mono-debug-debugger.c (write_class): don't call mono_class_init
14439 here, as even with the check for (!klass->init_pending), we get
14440 into a situation where we're hitting cycles in class
14441 initialization. Fixes #68816.
14443 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
14445 * image.c: Avoid overwriting values in the loaded_images_hash when an
14446 assembly is loaded multiple times. Fixes #61152.
14448 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
14449 so multiple satellite assemblies for the same name can be loaded.
14452 * mono_domain_assembly_preload: Actually return the loaded assembly,
14455 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
14456 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
14458 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
14459 pending finalizers are not invoked after the appdomain has been
14460 unloaded. Fixes #67862.
14462 2004-10-22 Martin Baulig <martin@ximian.com>
14464 * mono-debug-debugger.c
14465 (mono_debugger_runtime_invoke): Don't box valuetypes.
14467 2004-10-22 Chris Toshok <toshok@ximian.com>
14469 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
14470 don't hide private methods.
14472 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
14474 * icall.c: Allows the runtime to "share" (when known) the public key
14475 token of an assembly. This avoid the need to recalculate the token
14476 (from the public key) in managed code.
14478 2004-10-21 Chris Toshok <toshok@ximian.com>
14480 * debug-helpers.c (append_class_name): argh, revert last patch.
14482 2004-10-21 Chris Toshok <toshok@ximian.com>
14484 * debug-helpers.c (append_class_name): use '+' as the delimiter,
14485 not '/', so that it matches what the debugger uses to look up
14488 2004-10-21 Martin Baulig <martin@ximian.com>
14490 * mono-debug-debugger.c (mono_debugger_throw_exception): New
14491 public method; this is called each time an exception is thrown and
14492 allows the debugger to use exception catch points.
14494 2004-10-21 Martin Baulig <martin@ximian.com>
14496 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
14497 the stack pointer and the exception object in some struct and pass
14498 that to the debugger.
14500 2004-10-21 Chris Toshok <toshok@ximian.com>
14502 * mono-debug-debugger.c (do_write_class): add instance/static
14503 event support. We don't expose "raise" or "other" yet.
14504 (event_is_static): new method.
14506 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
14508 * mono-debug-debugger.c
14509 (mono_debugger_handle_exception): Remove
14510 bogus return value for fussy compilers.
14512 2004-10-20 Martin Baulig <martin@ximian.com>
14514 * mono-debug-debugger.c
14515 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
14516 (mono_debugger_handled_exception): Likewise.
14518 2004-10-20 Martin Baulig <martin@ximian.com>
14520 * mono-debug-debugger.h (MonoDebuggerEvent): Added
14521 MONO_DEBUGGER_EVENT_EXCEPTION.
14523 * mono-debug-debugger.c (mono_debugger_handle_exception): New
14524 public function to send the debugger a notification for an
14525 exception and inform it about a catch/finally clause.
14527 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
14529 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
14530 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
14533 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
14535 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
14537 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
14538 marshalled as [In,Out]. Fixes #58325.
14540 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
14542 * reflection.c (mono_method_body_get_object): Implement some fields.
14544 2004-10-12 Martin Baulig <martin@ximian.com>
14546 * reflection.c (mono_reflection_bind_generic_parameters): Small
14547 fix, correctly retrieve our parent from a generic instance.
14549 2004-10-12 Martin Baulig <martin@ximian.com>
14551 * metadata.c (mono_metadata_generic_param_equal): We always have
14555 (mono_class_from_generic_parameter): We need to have an owner.
14556 (my_mono_class_from_generic_parameter): Likewise.
14558 * reflection.c (mono_reflection_setup_generic_class): Renamed to
14559 mono_reflection_create_generic_class() and added a new
14560 mono_reflection_setup_generic_class().
14561 (mono_reflection_initialize_generic_param): If we're a nested
14562 generic type and inherited from the containing class, set our
14563 owner to the outer class.
14565 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
14567 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
14569 * reflection.c (mono_method_body_get_object): New function to create
14570 a MethodBody object.
14572 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
14574 2004-10-11 Martin Baulig <martin@ximian.com>
14576 * metadata.c (_mono_metadata_type_equal): Renamed to
14577 do_mono_metadata_type_equal() and made static.
14579 2004-10-11 Martin Baulig <martin@ximian.com>
14581 * appdomain.c: Bump corlib version number to 28.
14583 2004-10-10 Martin Baulig <martin@ximian.com>
14585 * class-internals.h
14586 (MonoGenericInst): Added `MonoGenericContainer *container'.
14587 (MonoGenericMethod): Likewise.
14588 (MonoGenericContext): Likewise.
14589 (MonoGenericParam): Added `MonoGenericContainer *owner'.
14592 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
14593 (do_mono_metadata_parse_generic_inst): Likewise.
14594 (mono_metadata_parse_type_full): New public method. This is the actual
14595 mono_metadata_parse_type() implementation - with an additional
14596 `MonoGenericContainer *' argument.
14597 (mono_metadata_parse_array_full): Likewise.
14598 (mono_metadata_parse_signature_full): Likewise.
14599 (mono_metadata_parse_method_signature_full): Likewise.
14600 (mono_metadata_parse_mh_full): Likewise.
14601 (mono_type_create_from_typespec): Likewise.
14602 (mono_metadata_interfaces_from_typedef_full): New public method;
14603 this is similar to the other _full() methods, but we take a
14604 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
14605 (mono_metadata_parse_generic_param): Take an additional
14606 `MonoGenericContainer *' argument and lookup the MonoGenericParam
14607 from that container.
14608 (mono_metadata_generic_param_equal): New static method to compare
14609 two type parameters.
14610 (_mono_metadata_type_equal): New static method; takes an
14611 additional `gboolean signature_only' argument - if true, we don't
14612 compare the owners of generic parameters.
14613 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
14614 with a TRUE argument - do a signature-only comparision.
14616 * loader.c: Use the new _full() methods and pass the
14617 MonoGenericContainer to them.
14619 * object-internals.h (MonoReflectionTypeBuilder): Added
14620 `MonoGenericContainer *generic_container' field.
14621 (MonoReflectionMethodBuilder): Likewise.
14623 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
14625 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
14626 case initial images of dynamic assemblies.
14628 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
14630 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
14632 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
14633 length of event->other array.
14634 (typebuilder_setup_events): Ditto.
14636 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
14637 'assembly_by_name' and add an 'assemblies' list.
14639 * assembly.h assembly.c: Add a new search hook for determining whenever
14640 an assembly is already loaded. Use this instead of searching in the
14641 loaded_assemblies list.
14643 * domain.c appdomain.c: Implement the new search hook so loaded
14644 assemblies are now scoped by appdomain. Fixes #67727.
14646 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
14648 * threads.c (mono_thread_attach): Initialize synch_lock field so
14649 mono_thread_detach works again.
14651 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
14652 'lib' too. Fixes #63130.
14654 2004-10-06 Jackson Harper <jackson@ximian.com>
14656 * culture-info-tables.h: regenerated.
14658 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
14660 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
14661 implemented by other interfaces in the result. Fixes #65764.
14663 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
14664 Handle unloadable modules without crashing.
14666 * image.c (load_modules): Revert the previous patch since modules must
14667 have a fixed index inside the array.
14669 * image.c (load_modules): Don't include native modules in the modules
14672 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
14674 * reflection.h: Add param_defaults field.
14676 * reflection.c: Add support for parameter defaults in dynamic methods.
14679 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
14680 an empty string when a type has no namespace. Fixes #64230.
14682 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
14684 * tabledefs.h: Added "internal" security actions to support non-CAS
14685 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
14686 Note: they do not seems to be used anymore in 2.0 (new metadata format)
14688 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
14690 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
14691 constructor of abstract class. Fixes #61689.
14693 2004-10-04 Martin Baulig <martin@ximian.com>
14695 * class-internals.h (MonoGenericContainer): New type.
14696 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
14697 `MonoGenericContainer *generic_container'.
14698 (MonoClass): Replaced `gen_params' and `num_gen_params' with
14699 `MonoGenericContainer *generic_container'.
14701 * metadata.c (mono_metadata_load_generic_params): Return a
14702 `MonoGenericContainer *' instead of a `MonoGenericParam *';
14703 removed the `num' argument.
14705 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
14707 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
14708 for dynamic images.
14710 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
14713 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
14715 * reflection.c: Save pe_kind and machine values into the generated
14718 * appdomain.c: Bump corlib version number.
14720 * object-internals.h: Reorganize layout of LocalBuilder.
14722 * class-internals.h class.c (mono_class_get_implemented_interfaces):
14723 New helper function.
14725 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
14726 created MonoType for dynamic types. Fixes #66180.
14728 2004-10-02 Ben Maurer <bmaurer@ximian.com>
14730 * threadpool.c: the ares hashtable needs a critical section around it.
14731 this prevents some nasty segfaults
14733 2004-10-02 Massimiliano Mantione <massi@ximian.com>
14735 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
14736 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
14739 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
14741 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
14743 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
14745 * image.c: Always canonicalize image file names, to avoid loading
14746 the same assembly twice when referenced using a relative path.
14748 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
14750 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
14752 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
14754 * marshal.c: Fix warnings.
14756 2004-09-29 Geoff Norton <gnorton@customerdna.com>
14758 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
14759 attempting to marshal the delegate_trampoline as the method_addr.
14760 This patch has a static hashtable of marshalled delegates so that
14761 we can map delegate_trampoline addresses back to delegates. This
14762 allows a delegate passed to managed code to be passed back into native
14765 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
14767 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
14769 * reflection.c (method_encode_code): Align method headers properly.
14772 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
14774 * marshal.c: In the runtime invoke wrapper, reset the abort
14775 exception if it is cached. This avoids the automatic rethrowal of
14776 the exception after the catch of the wrapper. Also check for pending
14777 interruptions before calling the managed method. This is done using
14778 the new method emit_thread_force_interrupt_checkpoint, since the
14779 normal checkpoint method is ignored when running the invoke wrapper.
14780 * object.c: If the abort exception is rethrown, set the abort_exc
14781 field of the thread, so it will be rethrown aftere every catch.
14782 * threadpool.c: Only run an interruption checkpoint if what has been
14783 requested is a stop of the thread (aborts will be ignored).
14784 * threads.c: By default, a thread will now never be interrumped while
14785 running the runtime invoke wrapper (this ensures that runtime_invoke
14786 will always return to the caller if an exception pointer is provided).
14787 There is a new special method mono_thread_force_interruption_checkpoint()
14788 to force an interruption checkpoint even if running a protected
14789 wrapper, which is used by the same runtime invoke wrapper to do a check
14792 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
14794 * object.c, object-internals.h: Implemented mono_release_type_locks,
14795 which releases the cctor locks held by a thread.
14796 * threads.c, threads.h: In thread_cleanup, release cctor locks held
14797 by a thread. Added mono_thread_exit() method to be used to safely stop
14800 2004-09-28 Raja R Harinath <rharinath@novell.com>
14802 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
14803 Move null check before dereference. Avoid indexing beyond the end
14804 of the 'modules' array.
14806 2004-09-28 Raja R Harinath <rharinath@novell.com>
14808 * metadata-internals.h (MonoImage): Add module_count field.
14809 * image.c (load_modules): Set image->module_count.
14810 (mono_image_load_file_for_image): Use image->module_count.
14811 * reflection.c (mono_image_load_module): Append to image->modules array
14812 of dynamic assembly.
14813 (mono_module_get_object): Fix loop to actually increment index.
14814 Use image->module_count.
14815 * assembly.c (mono_assembly_load_references): Use image->module_count.
14816 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
14819 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
14821 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
14822 Avoid assert on generic types.
14824 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
14826 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
14828 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
14830 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
14831 function to convert a MarshalSpec structure to its managed counterpart.
14833 * reflection.c: Fix warnings.
14835 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
14838 * icall.c (mono_create_icall_signature): Fix build.
14840 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
14842 * icall.c: Add MakePointType icall.
14844 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
14847 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14849 * threadpool.c: reuse allocated slots in the queue.
14851 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
14853 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
14855 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
14857 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
14860 * tabledefs.h: Add constants for pinvoke attributes BestFit and
14861 ThrowOnUnmappableChar.
14863 * icall.c (ves_icall_Type_GetPacking): New icall.
14865 2004-09-24 Martin Baulig <martin@ximian.com>
14867 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
14869 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14872 (mono_domain_set): allow setting a domain that is being unloaded.
14873 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
14876 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
14878 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
14879 the GetCustomAttributes icall.
14881 2004-09-23 Martin Baulig <martin@ximian.com>
14883 * object-internals.h (MonoReflectionGenericParam): Replaced
14884 'has_ctor_constraint', `has_reference_type' and `has_value_type'
14885 with `guint32 attrs'.
14887 2004-09-23 Martin Baulig <martin@ximian.com>
14889 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
14891 2004-09-23 Martin Baulig <martin@ximian.com>
14893 * object-internals.h (GenericParameterAttributes): New enum.
14895 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
14897 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
14899 * class.c (init_events): Fill out event->other field.
14901 * class.c: Fix warnings.
14903 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
14905 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
14907 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
14908 walk which doesn't supply the IL offset.
14910 2004-09-22 Martin Baulig <martin@ximian.com>
14912 * reflection.c (mono_reflection_setup_internal_class): If we're
14913 System.ValueType, System.Object or System.Enum, set
14914 `klass->instance_size' and create the vtable.
14915 (mono_reflection_create_internal_class): If we're an enum type,
14916 get the base class from our current corlib.
14918 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
14920 * reflection.h (MonoResolveTokenError): New type.
14922 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
14925 * icall.c: Add an 'error' argument to the ResolveToken icalls.
14927 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
14929 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
14930 Support also calling constructors, but only for already allocated objects.
14932 2004-09-17 Geoff Norton <gnorton@customerdna.com>
14934 * reflection.c (type_get_qualified_name): If the klass is null
14935 return the typename to avoid a NullRefEx.
14936 (encode_cattr_value): Get the qualified name of the boxed type,
14937 not the underlying enumtype. Fixes #62984.
14939 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
14941 * marshal.c: Fix problems with previous checkin.
14943 2004-09-21 <vargaz@freemail.hu>
14945 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
14946 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
14948 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
14950 2004-09-21 Geoff Norton <gnorton@customerdna.com>
14952 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
14953 should only return a type for pointers, arrays, and passbyref types.
14956 2004-09-21 Martin Baulig <martin@ximian.com>
14958 * domain.c (mono_debugger_check_runtime_version): New public
14961 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
14963 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
14965 * reflection.c: Added missing sort to the declarative security
14966 attributes table. MS implementation stops seeing the attributes if the
14967 token number regress in the table (as shown by ildasm and permview).
14969 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
14971 * object-internals.h (MonoReflectionModule): Add 'token' field.
14973 * reflection.c (mono_reflection_get_token): Add support for Module
14975 (mono_module_get_object): Set 'token' field.
14976 (mono_module_file_get_object): Set 'token' field.
14978 * icall.c: Add new Assembly and Module icalls.
14980 * appdomain.c: Bump corlib version.
14982 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
14984 * loader.h loader.c class.h class.c: Add helper functions for obtaining
14985 tokens of metadata objects.
14987 * reflection.h reflection.c (mono_reflection_get_token): New function
14988 to obtain the token of a metadata object.
14990 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
14992 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
14994 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
14996 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
14998 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
15000 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
15001 * object-internals.h: Added 3 MonoArray* members to MonoReflection
15002 AssemblyBuilder to access the permissions set in the class lib.
15003 * reflection.c: Added security attributes encoding step in
15004 mono_image_build_metadata.
15005 * tabledefs.h: Added new security actions defined in 2.0:
15006 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
15008 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
15010 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
15013 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
15015 * locales.c: nullify the ICU_collator member of CompareInfo when it is
15016 finalized. There where random SIGSEVs at program termination, when
15017 an object being finalized was trying to do a string comparison and
15018 the current culture was already finalized.
15020 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15022 * threads.c: call thread_cleanup before finishing the thread if we get
15025 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
15027 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
15028 assemblies from the parent. Fixes #65665.
15030 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
15032 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
15035 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
15037 * reflection.h: add prototype for mono_get_dbnull_object
15038 * reflection.c: add prototypes for get_default_param_value_blobs
15039 and mono_get_object_from_blob for fussier compilers
15041 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
15043 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
15044 false deadlock checks in class initialization.
15046 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
15048 * image.c (mono_image_addref): Fix comment.
15050 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
15053 2004-09-12 Jambunathan K <kjambunathan@novell.com>
15055 * reflection.c (mono_param_get_objects): Modified to return
15056 ParameterInfo.DefaultValue object.
15058 (get_default_param_value_blobs):
15059 (mono_get_object_from_blob):
15060 (mono_get_dbnull_object): New helper routines.
15062 * object.c (mono_get_constant_value_from_blob): New helper routine
15063 carved out from get_default_field_value ()
15065 * object-internals.h (mono_get_constant_value_from_blob): Added
15066 function declaration.
15068 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
15070 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
15071 referenced assemblies. Fixes #62135.
15073 * exception.h exception.c (mono_get_exception_file_not_found2): New
15076 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
15078 * class.h class.c: Add mono_type_get_underlying_type ().
15080 2004-09-09 Geoff Norton <gnorton@customerndna.com>
15082 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
15083 Fix GetTypes() to support dynamically created assemblies.
15085 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
15087 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
15089 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
15092 * reflection.h reflection.c loader.c: Allow dynamic construction of
15093 pinvoke methods. Fixes #65571.
15095 * reflection.c (mono_reflection_get_type): Revert previous change since
15096 it causes regressions.
15098 2004-09-08 Martin Baulig <martin@ximian.com>
15100 * class.c (class_compute_field_layout): Don't call
15101 mono_class_layout_fields() for open generic instances.
15103 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
15104 * threads.c appdomain.c: fix typo in GC macro
15106 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15108 * threads.c: don't call mono_thread_detach() in start_wrapper(),
15109 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
15111 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
15113 * image.c (mono_image_close): Applied patch from
15114 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
15115 assembly is loaded multiple times from data.
15117 * image.c (mono_image_open): Fix warning.
15119 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
15121 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
15122 once. Fixes #58334.
15124 * reflection.c (mono_reflection_create_runtime_class): Initialize
15125 klass->nested_classes. Fixes #61224.
15127 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
15129 * threads.c: sched_yield() on exit, to allow threads to quit.
15131 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
15133 * object.c (mono_unhandled_exception): Remove leftover debug code.
15135 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
15137 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
15139 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
15141 * marshal.c (emit_marshal_array): Really null terminate string arrays.
15143 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
15145 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
15147 * marshal.c (emit_marshal_array): Null terminate string arrays.
15149 * marshal.c (raise_auto_layout_exception): Fix warning.
15151 * reflection.c (mono_param_get_objects): Initialize the default value
15152 with DBNull.Value, not null. Fixes #62123.
15154 2004-09-01 Miguel de Icaza <miguel@ximian.com>
15156 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
15157 throw an exception with a cute explanation.
15159 2004-09-06 Dick Porter <dick@ximian.com>
15161 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
15162 Close the new process's thread handle, as we don't use it. The
15163 handle stays around forever otherwise.
15165 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
15167 * object.c (arith_overflow): Fix warning.
15169 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
15170 calling conventions in method refs. Fixes #65352.
15172 * reflection.c: Fix warnings.
15174 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
15176 * icall.c: Add a new icall for Array.Clear
15178 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
15180 * object.c: When allocating an array, we have to throw
15181 an overflow exception if any of the lengths are < 0.
15183 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
15185 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
15186 properly. Also move implementation of string array marshalling to
15187 managed code. Fixes #42316.
15189 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15191 * assembly.c: provide more information when loading an assembly fails.
15193 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15195 * filewatcher.c: don't expect the development fam package to be
15198 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
15200 * marshal.c: Make a copy of the signature cookie since it will be
15201 freed by the caller.
15203 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
15205 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
15207 * metadata.c (mono_metadata_free_marshal_spec): New function to free
15210 * marshal.c: More refactoring.
15212 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
15215 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
15217 * object.c: In mono_message_invoke, fill the output parameter array after
15218 calling the managed method (it was done before the call). This fixes
15221 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
15223 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
15226 2004-09-02 Martin Baulig <martin@ximian.com>
15228 * class.c (mono_class_instance_size): Don't allow generic type
15229 definitions or open generic instances.
15230 (mono_class_array_element_size): If we're a value type, call
15231 mono_class_instance_size() on the original class.
15233 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
15234 handle generic instances.
15236 * mono-debug-debugger.c (write_type): Handle generic instances
15239 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
15241 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
15242 the allocation request fails. Fixes #65089.
15244 * object.c (mono_runtime_free_method): Do not call mono_free_method.
15246 * object.c (mono_runtime_free_method): New function to free a dynamic
15249 * marshal.c (mono_delegate_free_ftnptr): New function to free the
15250 delegate trampoline.
15252 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
15253 with hasthis as dynamic,
15255 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
15257 * domain.c (mono_jit_info_table_remove): New function to remove an
15258 entry from the jit info table.
15260 * class-internals.h (MonoMethod): Add 'dynamic' field.
15262 * loader.c: Fix warnings.
15264 2004-09-01 Martin Baulig <martin@ximian.com>
15266 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
15267 instead of mono_debugger_lock() because the latter one is a no-op
15268 unless running in the debugger.
15270 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
15272 * class.c (class_compute_field_layout): Classes with auto-layout or
15273 reference fields are not blittable.
15275 2004-09-01 Dick Porter <dick@ximian.com>
15277 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
15278 mono_image_get_filename() to get the assembly location.
15281 * metadata.h: Fix compile warnings
15283 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
15285 * class.c (class_compute_field_layout): System.Object is blittable.
15287 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
15288 as in/out. Fixes #59909.
15290 2004-09-01 Martin Baulig <martin@ximian.com>
15292 * metadata.h (MONO_TYPE_ISREFERENCE): Call
15293 mono_metadata_generic_inst_is_valuetype() if we're a generic
15294 instance to check whether our underlying type is a reference type.
15296 2004-09-01 Martin Baulig <martin@ximian.com>
15298 * metadata.c (mono_type_size): If we're a generic instance, call
15299 mono_class_value_size() for value types.
15301 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
15303 * marshal.c: Implement more custom marshalling functionality. Fixes
15306 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
15308 * mono-debug.c, debug-mono-symfile.c: add some locking love.
15310 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
15312 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
15314 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
15316 * icall.c: Fix some warnings.
15318 * threads.c (abort_appdomain_thread): Fix unref errors.
15319 (mono_thread_current): Fix THREAD_DEBUG define.
15321 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
15323 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
15325 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
15327 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
15329 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
15332 2004-08-28 Martin Baulig <martin@ximian.com>
15335 (mono_metadata_generic_inst_is_valuetype): New public function.
15337 * metadata.h (MONO_TYPE_ISSTRUCT): Call
15338 mono_metadata_generic_inst_is_valuetype() if we're a generic
15339 instance to check whether our underlying type is a valuetype.
15341 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
15343 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
15346 2004-08-25 Martin Baulig <martin@ximian.com>
15348 * loader.c (mono_get_method_from_token): Abstract methods can also
15349 be generic and thus have type parameters.
15351 * metadata-internals.h
15352 (MonoDynamicImage): Added `GPtrArray *gen_params'.
15354 * reflection.c (mono_image_get_generic_param_info): Don't create a
15355 metadata row, just add an entry to the `gen_params' array.
15356 (build_compressed_metadata): Sort the `gen_params' array and then
15357 actually create the metadata.
15359 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15361 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
15363 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
15365 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
15367 2004-08-24 Martin Baulig <martin@ximian.com>
15369 * class.cs (mono_class_is_subclass_of): Like an interface, a
15370 generic instance also derives from System.Object.
15372 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
15374 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
15375 custom modifiers to be in any order. Fixes #61990.
15377 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
15379 * object.c: Register mono_object_new_fast icall.
15381 * object.c (mono_class_get_allocation_ftn): Return to calling
15382 mono_object_new_fast, since it seems faster to compute the object
15383 size in unmanaged code than passing it as a parameter.
15385 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
15387 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
15388 this function with Boehm as the oom handler, so we don't have to check
15389 the result of GC_malloc.
15391 * object.c: Remove checks for oom.
15393 * object.h object.c (mono_class_get_allocation_ftn): New function to
15394 return the icall which can be used to allocate an instance of a given
15397 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
15399 * class-internals.h: Add 'enabled' field.
15401 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
15403 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
15405 2004-08-18 Jambunathan K <kjambunathan@novell.com>
15406 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
15409 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
15411 * appdomain.c: use the Tls function for appdomain too,
15412 at Zoltan's request. Actually return in mono_context_get
15414 * appdomain.c, profiler.c, threads.c: use __thread
15416 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
15418 * appdomain.c threads.c: Call GC_CreateThread on windows.
15420 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
15421 multiple libraries since this don't work on windows.
15423 2004-08-18 Martin Baulig <martin@ximian.com>
15425 * class-internals.h
15426 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
15429 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
15430 MonoMethodNormal since we also need it for abstract and interface
15434 (build_compressed_metadata): Sort the GenericParam table.
15435 (mono_image_create_token): Added `gboolean create_methodspec'
15436 argument; this is false when generating a MethodImpl token.
15437 (reflection_methodbuilder_to_mono_method): Abstract and interface
15438 methods may also have generic parameters.
15440 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
15442 * appdomain.c: thread local alloc
15444 2004-08-17 Martin Baulig <martin@ximian.com>
15446 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
15449 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
15452 * class.c (mono_type_get_full_name): New public function.
15453 (mono_type_get_name): Don't include the type arguments.
15455 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
15457 * Makefile.am: Build static versions of libmetadata and libmonoruntime
15458 for inclusion into the mono executable.
15460 2004-08-16 Martin Baulig <martin@ximian.com>
15462 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
15463 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
15465 2004-08-14 Martin Baulig <martin@ximian.com>
15467 * class.c (dup_type): Also copy the `byref' field.
15469 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
15471 * reflection.c (create_dynamic_mono_image): Revert the last change
15472 since it breaks bootstrap.
15474 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
15476 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
15478 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
15479 not free them with g_free.
15481 2004-08-11 Martin Baulig <martin@ximian.com>
15483 * reflection.c (mono_reflection_setup_internal_class): Also call
15484 mono_class_setup_mono_type() if we already have a `tb->type.type'.
15486 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
15488 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
15489 called during default (first) AppDomain creation. Keep track of
15490 Evidence when loading assemblies.
15492 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
15494 * opcodes.c, opcodes.h: reduce runtime relocations.
15496 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
15498 * culture-info.h, locales.c: fixes and chages to sue the new
15499 optimized format of the locale data.
15500 * culture-info-tables.h: regenerated.
15502 2004-08-06 Geoff Norton <gnorton@customerdna.com>
15504 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
15506 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
15508 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
15509 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
15510 * domain-internals.h: icall declaration.
15511 * icall.c: icall registration.
15512 * object-internals.h: New fields in MonoAssembly for CAS.
15514 2004-08-05 Duncan Mak <duncan@ximian.com>
15516 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
15519 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
15521 * reflection.c: fix to deal with object[] arrays in custom ctors
15524 2004-08-05 Martin Baulig <martin@ximian.com>
15526 * class.c (mono_class_array_element_size): Added support for
15527 generic instances and correctly handle "recursive" types.
15529 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
15531 * assembly.c: Fix warnings.
15533 2004-08-04 Martin Baulig <martin@ximian.com>
15536 (mono_type_get_name_recurse): Added `gboolean include_arity'
15537 argument specifying whether or not we should include the generic
15538 arity in the type name.
15539 (_mono_type_get_name): New static function.
15540 (mono_class_setup_vtable): If we're a generic instance, don't
15541 include the generic arity in the names of explicit method
15544 2004-08-03 Martin Baulig <martin@ximian.com>
15546 * class.c (mono_type_get_name_recurse): Enclose the generic type
15547 arguments in `<', '>'.
15549 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
15551 * gc.c: make GC warning messages use the trace API, they are just
15552 noise to most of the users.
15554 2004-08-03 Martin Baulig <martin@ximian.com>
15556 * debug-mono-symfile.c (read_string): Correctly read the string.
15558 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15560 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
15562 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
15564 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
15566 2004-07-30 Martin Baulig <martin@ximian.com>
15568 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
15569 Reflect latest symbol writer changes.
15571 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
15573 * object.c: always create an object if null is passed
15574 to Invoke() where a valuetype is expected.
15576 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
15578 * marshal.c (mono_marshal_init): make managed
15579 signatures match native ones better for 64bits.
15581 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15583 * appdomain.c: hack to build correctly the private bin path on windows.
15586 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
15588 * assembly.c: Load mscorlib from the correct framework directory
15589 (mono/<version>/mscorlib.dll).
15590 * appdomain.h: Added prototypes for new functions.
15591 * internals.h: Added some prototypes.
15592 * domain.c: When initializing the runtime, get from the executable and
15593 the configuration files the runtime version that the app supports.
15594 Added support methods for reading app.exe.config. Added list of versions
15595 supported by the JIT. Added two new methods: mono_init_from_assembly,
15596 which initializes the runtime and determines the required version from
15597 the provided exe file, and mono_init_version, which initializes
15598 the runtime using the provided version.
15599 * icall.c: Get machine.config from version-specific directory.
15600 * reflection.c: When generating an image, embed the version number
15601 of the current runtime.
15603 2004-07-28 Dick Porter <dick@ximian.com>
15606 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
15607 returned sockaddr size before creating the remote address object.
15608 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
15611 2004-07-28 Dick Porter <dick@ximian.com>
15613 * locales.c (string_invariant_compare_char): Fix invariant char
15614 compares between upper and lower cases. Fixes bug 61458.
15616 2004-07-27 Ben Maurer <bmaurer@ximain.com>
15618 * marshal.c: actually cache stelem.ref wrappers.
15620 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15622 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
15623 sections and remove the mono_cli_rva_map () function.
15625 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
15627 * debug-mono-symfile.c: fix one more endianess issue, from a patch
15628 by Geoff Norton (<gnorton@customerdna.com>).
15630 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
15632 * class.c: fix class loads for pointer types (typeof(int) !=
15635 2004-07-27 Martin Baulig <martin@ximian.com>
15637 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
15638 reading the debugging information from an external ".mdb" file.
15640 2004-07-24 Martin Baulig <martin@ximian.com>
15642 * reflection.c (mono_image_get_type_info): Only write a class
15643 layout entry if we actually have a size or a packing size.
15645 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
15647 * reflection.c (type_get_fully_qualified_name):
15648 insert cast to get type checking of ?: with non-gcc compilers
15650 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
15652 * rand.c: use g_getenv for both lookups of
15655 2004-07-17 Martin Baulig <martin@ximian.com>
15657 * reflection.c (mono_reflection_bind_generic_method_parameters):
15658 Set `gmethod->reflection_info'.
15660 2004-07-17 Martin Baulig <martin@ximian.com>
15662 * class.c (mono_class_create_from_typedef): Insert the newly
15663 created class into the hash table before computing the interfaces
15664 since we could be called recursively.
15666 2004-07-16 Ben Maurer <bmaurer@ximain.com>
15668 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
15669 function to implement stelem.ref in managed code
15670 * class-internals.h, debug-helpers.c: a new wrapper type
15673 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
15675 * gc.c: allow GC handles to work even when no GC is compiled in.
15676 Fix part of bug #61134 (GetAddrOfPinnedObject).
15678 2004-07-13 Peter Williams <peter@newton.cx>
15680 * process.c (complete_path): Make sure we don't attempt to execute
15683 2004-07-12 Geoff Norton <gnorton@customerdna.com>
15685 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
15686 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
15687 and will add/subtract the hour if needed
15689 2004-07-12 Martin Baulig <martin@ximian.com>
15691 * reflection.c (mono_field_get_object): If we have
15692 `field->generic_info', take the attributes from
15693 `field->generic_info->generic_type'.
15695 2004-07-12 Martin Baulig <martin@ximian.com>
15697 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
15698 This function must be called before initializing the runtime.
15699 (mono_debug_init_1): New function; call this after initializing
15700 the runtime, but before loading the assembly. It tells the
15701 debugger to load corlib and the builtin types.
15703 * mono-debug-debugger.c: Did some larger changes in the debugging
15704 code; support recursive class declarations, make sure we actually
15707 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15709 * debug-helpers.c: undo my previous patch and fixed the real issue in
15710 ../mini/exceptions-x86.c
15712 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15714 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
15715 when no HOME env. variable was set and a NullRef was thrown in a .cctor
15716 called from other .cctors.
15718 2004-07-09 Miguel de Icaza <miguel@ximian.com>
15720 * loader.c: Removed the mono_loader_wine_init hack now that we are
15721 doing a managed version of Windows.Forms.
15723 2004-07-09 Ben Maurer <bmaurer@ximian.com>
15725 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
15726 threadpool.c, threads.c: remove static data from rootset.
15728 2004-07-09 Dick Porter <dick@ximian.com>
15730 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
15731 Don't do any more processing if the matched length was 0. It was
15732 increasing the size of the string before. Fixes bug 61167.
15734 2004-07-09 Dick Porter <dick@ximian.com>
15738 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
15739 Add support for SO_PEERCRED if its available.
15741 2004-07-09 Peter Bartok <pbartok@novell.com>
15742 * loader.c: winelib.exe.so error message is now only displayed if
15743 MONO_DEBUG is set. To help us avoid questions when people are trying
15744 out the new Managed.Windows.Forms.
15746 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
15748 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
15749 for isinst and castclass wrappers.
15751 * class-internals.h icall.c: Move registration and lookup of JIT icalls
15752 to libmetadata from the JIT, so they could be used by the marshalling
15753 code and the interpreter.
15755 * marshal.c: Register marshalling related JIT icalls here instead of
15756 in mini.c. Use CEE_MONO_ICALL instead of the family of
15757 CEE_MONO_PROC<x> opcodes to call marshalling functions.
15759 * metadata.h: Remove unneeded marshalling conversions.
15761 * opcodes.c: Update for new opcodes.
15763 2004-07-08 Martin Baulig <martin@ximian.com>
15765 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
15766 (mono_debug_get_domain_data): Make this function static.
15768 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
15770 * gc.c, object.h: add nice GC handle API for embedders.
15772 2004-07-06 Ben Maurer <bmaurer@ximian.com>
15774 * reflection.c: more changes for the new api
15776 * object.c: When we reflect on a field w/ a constant value, it
15777 will not have a memory location, so we must access metadata. Also,
15778 allow easier reading of strings so that we can read them from
15781 * class.c (mono_class_layout_fields): no need for literal fields here.
15783 * class-internals.h: api changes for const fields
15785 * icall.c (ves_icall_get_enum_info): use new apis for const fields
15787 2004-07-06 Martin Baulig <martin@ximian.com>
15789 * mono-debug.h: Increment version number to 44.
15791 * mono-debug.c (mono_debug_add_wrapper): The second argument is
15792 now a gpointer, rewrote this whole method.
15794 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
15795 function. Add information about the wrapper in a new "misc table".
15797 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
15798 for the new misc table.
15800 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
15802 * metadata-internals.h image.c: Add a cache for helper signatures.
15804 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
15806 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
15808 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
15809 delegates from a delegate. Fixes #61033.
15811 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
15812 marshalling of stringbuilder arrays. Fixes #59900.
15814 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
15816 * icall.c: Add EnumBuilder:setup_enum_type icall.
15818 2004-06-30 Ben Maurer <bmaurer@ximian.com>
15820 * icall.c: Added a new icall for the property version of
15821 OffsetOfStringData.
15823 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
15825 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
15826 it has a constant size across platforms.
15828 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
15831 2004-06-29 Martin Baulig <martin@ximian.com>
15833 * mono-debug.c (mono_debug_add_method): Protect the whole function
15834 in mono_debugger_lock(), not just parts of it.
15836 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
15838 * reflection.c: make sure padding bytes in heaps are zeroed.
15840 2004-06-24 David Waite <mass@akuma.org>
15842 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
15843 image.c, loader.c, locales.c, marshal.c, metadata.c,
15844 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
15845 string-icalls.c, threads.c: change to C90-style comments from C99 /
15848 2004-06-24 Dick Porter <dick@ximian.com>
15851 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
15852 return createdNew. Fixes bug 60412.
15855 * icall.c: Add createdNew parameter to CreateMutex icall
15857 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15859 * reflection.c, object-internals.h: save default value in params.
15861 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15863 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
15864 no need to build a new path combining that with the application base.
15867 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
15869 * reflection.c: fixed minor standard compliance issues.
15871 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
15873 * reflection.c: fixed issue with encoding some custom attributes
15874 (arrays in properties and fields, bug #60411).
15876 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15878 * reflection.c: fix start address when copying the public key token.
15880 2004-06-23 Martin Baulig <martin@ximian.com>
15882 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
15883 the `exc' object in a static object to put it into the GC's root set.
15885 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
15887 * reflection.c: make mono_reflection_setup_internal_class ()
15888 callable a second time to setup a new parent class.
15890 2004-06-23 Dick Porter <dick@ximian.com>
15892 * threads.c: Check for WAIT_IO_COMPLETION return values.
15894 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
15896 * appdomain.c: Removed the g_free on the public key token. Now copy
15897 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
15898 * assembly.c: Added public key token string value when loading
15899 assemblies. Fix bug #60439.
15900 * icall.c: Added missing informations (like public key) in
15901 GetReferencedAssemblies. Fix #60519.
15902 * image.h: Changed definition for public key token from const char*
15903 public_tok_value to guchar public_key_token [17];
15904 * reflection.c: Updated for changes to public key token.
15906 2004-06-22 Lluis Sanchez Gual
15908 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
15909 for the field in base classes.
15911 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
15913 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
15914 mark headers as not supported, they are installed only for use by the
15917 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
15919 * *.c, *.h: avoid namespace pollution in public headers.
15921 2004-06-21 Martin Baulig <martin@ximian.com>
15923 * exception.c (mono_get_exception_security): It's in
15924 "System.Security", not in "System".
15926 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
15927 the exception classes.
15929 2004-06-21 Martin Baulig <martin@ximian.com>
15931 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
15932 Protect the exception object from being finalized.
15934 2004-06-21 Martin Baulig <martin@ximian.com>
15936 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
15939 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
15941 * reflection.c: Load the assembly in mono_reflection_type_from_name,
15942 if it was not loaded before. Fix parts of #60439.
15944 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
15946 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
15947 code that was broken since Ben's change: wrappers are now
15948 dependent on the method signature only again.
15950 2004-06-21 Martin Baulig <martin@ximian.com>
15952 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
15953 added interface support.
15955 2004-06-21 Martin Baulig <martin@ximian.com>
15957 * class.c (mono_vtable_get_static_field_data): New public method.
15959 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
15961 * filewatcher.c : Windows build fix to be compliant with API changes.
15963 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
15965 * class.h, class.c: more accessors.
15966 * metadata.h, metadata.c: prepare for hiding MonoType and
15967 MonoMethodSignature: people should use the accessors from now on
15968 outside of the tree.
15970 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
15972 * *.c, *.h: more API cleanups.
15974 2004-06-18 Jackson Harper <jackson@ximian.com>
15976 * assembly.c: Trace loading assemblies.
15977 * loader.c: Trace loading native libraries.
15978 * mono-config.c: Trace loading config files.
15980 2004-06-18 Dick Porter <dick@ximian.com>
15982 * locales.c: Tell ICU the lengths of strings, it can cope with
15983 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
15985 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
15987 * image.c: swapped name/filename;
15989 2004-06-18 Martin Baulig <martin@ximian.com>
15991 * mono-debug-debugger.c (write_class): Write the parent class at
15992 the end of the header.
15994 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
15996 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
15998 2004-06-17 Raja R Harinath <rharinath@novell.com>
16000 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
16001 (bundle_obj): New conditional define.
16002 (BUILT_SOURCES): Remove.
16003 ($(bundle_srcs)): Make parallel-make safe.
16004 (libmonoruntime_la_LIBADD): Make unconditional.
16005 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
16006 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
16008 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
16010 * culture-info-tables.h: It was inconsistent with the latest
16013 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
16015 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
16018 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
16021 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
16023 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
16024 cleaned up public header threads.h.
16026 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
16028 * Makefile.am, *.c, *.h: more API cleanups.
16030 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16032 * Makefile.am: removed monosn from compilation.
16033 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
16034 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
16035 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
16036 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
16037 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
16038 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
16040 2004-06-15 Jackson Harper <jackson@ximian.com>
16042 * assembly.c: Make locales lower case when searching the GAC for
16043 assemblies. gacutil will always make locales lowercase when
16044 installing so this effectively makes them case insensitive.
16046 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
16048 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
16049 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
16050 parameter which allows to choose whether the wait can be interrupted or
16051 not. Also added the method mono_monitor_enter(), which locks the monitor
16052 using an infinite wait and without allowing interruption.
16053 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
16055 * object.h: Added new fields in MonoThread. suspend_event holds the event
16056 used to susped/resume the thread. synch_lock is the lock object to use for
16057 modifying the thread state.
16058 * threads.c: Use the new synch_lock object for locking, instead of "this",
16059 which can generate deadlocks.
16060 Moved thread state change in Thread.Sleep and Thread.Join from managed
16061 to unmanaged code. This avoids a deadlock when the thread was suspended
16062 just after acquiring the thread lock.
16063 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
16064 Implemented Thread.Suspend using an event instead of ThreadSuspend,
16065 which is not fully implemented in the io-layer.
16066 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
16068 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
16070 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
16071 threads-types.h: more API cleanups.
16073 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
16075 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
16076 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
16077 threadpool.c, threads.c: first pass at the exported API cleanup.
16079 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
16081 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
16083 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16085 * icall.c: added internalGetHome.
16087 2004-06-14 Dick Porter <dick@ximian.com>
16089 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
16090 possible to return successfully when '.' or '..' were the only
16091 entries in a directory, but were skipped. The MonoIOStat was not
16092 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
16095 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
16097 * reflection.c: make binaries run on .Net 1.1 by default.
16099 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
16101 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
16103 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
16105 * marshal.c: keep track of struct size with explicit layout
16108 2004-06-12 Martin Baulig <martin@ximian.com>
16110 * mono-debug-debugger.c: Comment out a debugging g_message().
16112 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
16114 * reflection.c, reflection.h: do not free custom attrs that are cached.
16115 * icall.c: use braces to make code clearer.
16117 2004-06-11 Martin Baulig <martin@ximian.com>
16119 * class.h (MonoInflatedField): New type.
16120 (MonoClassField): Replaced `MonoType *generic_type' with
16121 `MonoInflatedField *generic_info'.
16124 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
16126 2004-06-11 Martin Baulig <martin@ximian.com>
16128 * reflection.c (mono_image_create_method_token): Correctly encode
16131 2004-06-11 Martin Baulig <martin@ximian.com>
16133 * metadata.c (mono_metadata_parse_method_signature): When parsing
16134 a MethodDef which has VarArgs, also set sentinelpos if we don't
16135 have any parameters.
16137 2004-06-11 Martin Baulig <martin@ximian.com>
16139 * verify.c (mono_method_verify): In CEE_CALL, use
16140 mono_method_get_signature() to get the method's signature, unless
16141 we're a PInvoke method.
16143 2004-06-10 Jackson Harper <jackson@ximian.com>
16145 * assembly.c: Use <path>/lib/mono/gac for the extra paths
16146 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
16147 logical name as the supplied path is just a prefix to the gac not
16148 the direct path to it.
16150 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
16152 * reflection.c: make the token for a created method match
16153 the token of the MethodBuilder it was created from
16154 (IKVM requires this behaviour now).
16156 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
16158 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
16159 reflection.c, socket-io.c: leak fixes.
16161 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
16163 * icall.c: handle sentinel pos in vararg methods in position different
16166 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16168 * culture-info-tables.h: freshly generated.
16170 2004-06-09 Martin Baulig <martin@ximian.com>
16172 * loader.c (mono_get_method_constrained): Call `mono_class_init
16173 (constrained_class)'.
16175 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
16177 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
16178 any methods. Fixes #59629.
16180 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
16182 * culture-info-tables.h: reflecting locale-builder updates.
16184 2004-06-08 Dick Porter <dick@ximian.com>
16187 * locales.c: Fixed compile warnings, including a real bug in
16188 CompareInfo_internal_compare.
16190 2004-06-08 Dick Porter <dick@ximian.com>
16193 (ves_icall_System_Globalization_CompareInfo_internal_index):
16194 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
16195 Double-check the resuls of usearches, because ICU currently
16196 ignores most of the collator settings here. Fixes bug 59720.
16198 2004-06-08 Dick Porter <dick@ximian.com>
16201 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
16202 Fix memory leak and segfault-causing typo. No idea how this one
16203 lasted so long without being noticed.
16205 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
16207 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
16208 any methods. Fixes #59629.
16210 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16213 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
16214 own the critical section before). Removed dead code (that's done
16215 in the preload hook).
16217 (mono_assembly_load_with_partial_name): call the preload hook.
16219 2004-06-08 Martin Baulig <martin@ximian.com>
16221 * metadata.c (mono_metadata_signature_alloc): Default
16222 `sentinelpos' to -1.
16224 * reflection.c (mono_image_get_array_token): Likewise.
16226 2004-06-08 Martin Baulig <martin@ximian.com>
16228 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
16230 * metadata.c (mono_metadata_parse_method_signature): When parsing
16231 a MethodDef which has VarArgs, set sentinelpos.
16233 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
16234 `gint16' since we're using -1 for non-varargs methods.
16237 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
16238 (method_encode_signature): Added varargs support.
16239 (method_builder_encode_signature): Likewise.
16240 (mono_image_get_varargs_method_token): New static method.
16241 (mono_image_create_method_token): New public method; this is
16242 called via an icall instead of mono_image_create_token() when
16243 calling a varargs method.
16245 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
16247 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
16249 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
16251 * culture-info-tables.h : Reflecting the latest locale-builder that
16252 fixed empty array representation ({} to {0}).
16254 2004-06-07 Jackson Harper <jackson@ximian.com>
16256 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
16257 looking up extra gac paths. This allows MONO_GAC_PATH to act
16258 exactly like a prefix.
16260 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
16262 * reflection.c (mono_reflection_type_from_name): Make a copy of the
16263 type name before modifying it. Fixes #59405.
16265 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
16267 * culture-info.h: added fields for "all datetime patterns".
16268 * locales.c: ( ves_icall_System_Globalization_CultureInfo
16269 _construct_datetime_format ()): fill xxx_patterns fields.
16270 * object.h: added fields for "all datetime patterns" to
16271 MonoDateTimeFormatInfo.
16272 * culture-info-tables.h: reflecting locale-builder updates.
16274 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
16276 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
16277 the event has no add and remove methods. Fixes #59629.
16279 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
16281 * object.c: Fixed possible integer overflow when allocating large
16284 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
16286 * culture-info-tables.h: reflecting locale-builder updates.
16288 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
16290 * culture-info-tables.h: reflecting locale-builder updates.
16292 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
16294 * culture-info-tables.h: reflecting locale-builder updates.
16296 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
16298 * threads.c: Made Thread.Sleep abortable.
16300 2004-06-02 Martin Baulig <martin@ximian.com>
16302 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
16304 * debug-mono-symfile.h: Bumped symbol file version number to 37.
16306 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
16308 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
16310 2004-05-30 Jackson Harper <jackson@ximian.com>
16312 * reflection.c: Do not hardcode assembly versions or public key
16313 tokens anymore. All of this except the corlib section was dead
16316 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
16318 * object.c (mono_runtime_invoke_array): Automatically create boxed
16319 objects for byref valuetypes if needed. Fixes #59300.
16321 * object.c (mono_method_return_message_restore): Handle
16322 MONO_TYPE_OBJECT as well.
16324 2004-05-28 Jackson Harper <jackson@ximian.com>
16326 * reflection.c: The modified type encoding was causing build
16327 problems. Reverted for now.
16329 2004-05-28 Jackson Harper <jackson@ximian.com>
16331 * reflection.c/h: Take an assembly ref so that we dont create
16332 fully qualified names when encoding types in the same assembly as
16333 the custom attribute being emitted.
16334 * appdomain.c: Increment version number.
16336 2004-05-26 Duncan Mak <duncan@ximian.com>
16339 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
16340 Set the full version number (major, minor, build, revision).
16342 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
16344 * marshal.c (emit_struct_conv): increment src/dst after blit
16345 (mono_marshal_get_managed_wrapper,
16346 mono_marshal_get_native_wrapper): make sure we have marshalling
16347 info before marshalling params (info computation affects
16350 * class.c (class_compute_field_layout): correctly deal with
16352 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
16353 value types (as per what windows dows by default)
16354 (mono_class_setup_mono_type): System.ValueType is blittable
16355 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
16358 * marshal.c (mono_marshal_load_type_info): flag types as
16359 non-blittable if the native layout doesn't match the managed
16362 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16364 * appdomain.c: don't add stuff in the private search path that is
16365 above the application base. If application base is not set, there's
16366 no private search path.
16368 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
16370 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
16371 byref struct arguments in native->managed marshalling.
16373 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
16375 * marshal.c (mono_marshal_get_runtime_invoke): correctly
16376 cache methods using signature (special case for methods
16377 that are value type or string class)
16379 * image.c (mono_image_close): clean up allocated GSList's
16380 in runtime_invoke_cache.
16382 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16384 * mono-config.c: set the correct path for mono_cfg_dir on windows when
16385 there's no MONO_CFG_DIR environment variable defined.
16387 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16389 * threads.c: windows version must be >= 0x0500 to include OpenThread.
16391 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
16393 * threadpool.c: Really wait for 500ms after the async call, even if the wait
16395 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
16396 before waiting for it, and call CloseHandle after the wait to unref it.
16397 This will make sure that handles are not disposed too early.
16399 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16404 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
16407 * object.c: se the application_base only for the domain that runs
16408 Main. Fixes bug #59216,
16410 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16413 * object.c: only the domain in which Main is run have
16414 SetupInformation.ConfigurationFile set, so moved a few lines from
16415 appdomain.c to object.c.
16417 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16419 * appdomain.c: we tried to load [name].(dll|exe), but according
16420 to bug #57710, we must also try [culture]/[name].(dll|exe) and
16421 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
16422 There's a test case attached to bug #58922.
16424 2004-05-27 Dick Porter <dick@ximian.com>
16427 * file-io.c: Implemented icalls for locking and unlocking regions
16429 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
16430 FALSE on error (fixes both compiler warning and real bug.)
16432 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
16434 * culture-info-tables.h: reflecting locale-builder updates.
16436 (Added missing ChangeLog entry for 05/26)
16438 2004-05-27 Jackson Harper <jackson@ximian.com>
16440 * locales.c: Fix some cut and paste errors.
16442 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16444 * mono-config.c: set the correct path for config. directory on windows.
16446 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
16448 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
16451 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
16453 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
16454 from pinvoke functions.
16456 * marshal.c (mono_ftnptr_to_delegate): Implement this.
16458 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
16460 * culture-info-tables.h: reflecting locale-builder updates.
16462 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
16464 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
16467 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
16469 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
16470 * icall.c: Modified icalls for RNG.
16471 * rand.c|h: Changed RNG interface to allow thread-safe usage under
16472 Windows (CryptoAPI).
16474 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
16476 * locales.c: Fix build.
16478 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
16480 * culture-info-tables.h: reflecting locale-builder updates.
16482 2004-05-25 Jackson Harper <jackson@ximian.com>
16484 * locales.c: When creating the current culture use the $LANGs
16485 specific culture. So DateTimeFormat and NumberFormat entries are created.
16487 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
16489 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
16490 a char array as parameter.
16492 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
16494 * image.c: In mono_image_open(), always use an absolute path name to
16495 look for already loaded images.
16497 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
16499 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
16500 missing in the windows build (like older cygwin include files).
16502 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
16504 * icall.c: Fixed check for possible integer overflow in Buffer_
16505 BlockCopy icall. Replaced comments style // by /* */.
16507 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
16509 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
16511 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
16512 check after MONO_VTADDR. Fixes pinvoke2.exe.
16514 * marshal.h marshal.c metadata.h: Add beginnings of support for
16515 ftnptr -> delegate marshalling.
16517 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
16519 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
16520 * threads.c: Fix warnings.
16522 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
16524 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
16525 * icall.c: Registered icalls for Suspend and Resume.
16526 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
16528 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
16529 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
16530 * process.c: Use WaitForSingleObjectEx.
16531 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
16533 * threads.c, threads.h: Make use of new Ex wait methods. Improved
16534 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
16535 for Suspend and Resume. Added new mono_thread_stop, used for stoping
16536 background threads. Added basic support for Abort in Windows.
16537 Start new threads using a managed delegate invoke wrapper. This wrapper
16538 has an interruption checkpoint that is needed since an interruption
16539 can be requested before the thread leaves the unmanaged code that starts
16541 * marshal.c: Added interruption checkpoint after every native call, and
16542 also before managed calls for wrappers called from unmanaged code to
16543 go into managed code.
16544 * object.h: Added new field in MonoThread to keep track of interruption
16547 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
16549 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
16552 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16559 * rand.c: getenv -> g_getenv (windows!)
16561 * process.c: complete_path is also used on non-windows platforms.
16563 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16565 * icall.c: new signature for Process_Start.
16567 * process.[ch]: new signature for Process_Start. If we're on windows
16568 and UseShellExecute is false, we have to search for the program by
16569 ourselves if we don't get a full path.
16571 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
16573 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
16574 marshalling and call CleanUpNativeData if needed. Fixes #58646.
16576 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16578 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
16581 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16583 * process.c: use double quotes to quote program name and arguments on
16584 windows. Fixes bug #58575.
16586 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16588 * file-io.c: don't return "." and ".." when using windows Find*File.
16590 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
16592 * marshal.c: Don't pass wrappers to message init because method
16593 addressed used to lookup metadata. part of remoting[2|3] fix.
16595 2004-05-15 Jackson Harper <jackson@ximian.com>
16597 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
16598 path is essentially the same as MONO_PATH except that it points to
16599 GACs instead of lib directories.
16600 * loader.h: The user gac is gone so we dont need function to
16602 * mono-config.c: user gac option is now gone.
16604 2004-05-15 Jackson Harper <jackson@ximian.com>
16606 * culture-info.h: Make defines more consistent, add calendar data
16607 to the culture info table.
16608 * culture-info-tables.h: Add basic calendar data. Basically
16609 everyone gets default gregorian until all the data is
16611 * locales.c: Use the new consistent defines. Set calendar data for
16612 culture info objects.
16613 * object.h: add a field for calendar data to CultureInfo
16615 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
16617 * image.c: image->runtime_invoke_cache is keyed on signatures now.
16618 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
16620 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
16621 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
16622 an extra param that is the pointer of the method to invoke. The IL for
16623 the invoke method is no longer specific to the method, but to the
16624 signature of the method. Thus, we can share the same code for multiple
16625 methods. This reduces the number of methods that have to be compiled.
16627 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
16629 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
16631 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16633 * icall.c: Optimize Buffer.BlockCopy.
16635 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16637 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
16638 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
16639 quote). Changed them to "MMMM yyyy".
16641 2004-05-12 Miguel de Icaza <miguel@ximian.com>
16644 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
16646 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
16648 * reflection.h: Updated after changes to managed structures.
16650 * appdomain.c: Bump corlib version.
16652 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16654 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
16657 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16659 * Makefile.am: link to ../os/libmonoos.la on windows.
16662 -If MONO_DEBUG, warn about non-existing directories in
16664 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
16665 compile time variable.
16666 -Removed init_default_path and call mono_set_rootdir from
16667 libmonoos.a instead (windows only).
16669 * assembly.h: declare mono_assembly_getrootdir().
16672 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
16674 * loader.c: s/getenv/g_getenv/
16676 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
16678 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
16680 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
16682 * metadata.h: Add new marshalling conversions.
16684 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
16687 * reflection.c (mono_reflection_get_type): Lookup the type in all
16688 modules of a multi-module assembly. Fixes #58291.
16690 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
16692 * threads.c: Before aborting a background, set the StopRequested
16693 state. This avoids throwing the Abort exception.
16694 In mono_thread_manage, don't continue with the shutdown until all
16695 aborted threads have actually stopped.
16697 2004-05-10 Jackson Harper <jackson@ximian.com>
16699 * locales.c: Remove the modifier from culture names.
16701 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16703 * Makefile.am: monosn is not installed any more. It has been deprecated
16706 2004-05-07 Jackson Harper <jackson@ximian.com>
16709 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
16710 Fix array construction, add bailout if the length is 0.
16712 2004-05-07 Dick Porter <dick@ximian.com>
16714 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
16715 machine doesn't have a DNS entry. Patch by Urs Muff
16716 (umuff@quark.com), fixes bug 57928.
16718 2004-05-06 Jackson Harper <jackson@ximian.com>
16720 * reflection.c: Handle null PublicTokens properly. alloc mem for
16721 assembly names culture so we dont crash when freeing it.
16723 2004-05-06 Jackson Harper <jackson@ximian.com>
16725 * assembly.c: Check the usergac when loading with partial names.
16727 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
16729 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
16730 does nothing for now (not required for Linux/Windows) but the class
16731 library can call it (and a newer or modified runtime could need it).
16732 * icall.c: Registred icall.
16734 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16736 * loader.c: prints a message on module loading error we set MONO_DEBUG
16737 environment variable.
16739 2004-05-05 Jackson Harper <jackson@ximian.com>
16741 * appdomain.c: Handle PublicKeyToken=null properly.
16743 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
16745 * environment.c|h: Added icall ves_icall_System_Environment_
16746 GetOSVersionString to get the current OS version as a string.
16747 * icall.c: Registred icall.
16749 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
16751 * object.c: in mono_object_get_virtual_method(), take into account that
16752 non-virtual methods don't have a slot in the vtable. Check needed when
16753 the object is a proxy.
16755 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
16757 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
16758 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
16760 * object.c (mono_class_compute_gc_descriptor): Fix warning.
16762 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
16763 passed when a valuetype is expected.
16765 * object.c (mono_unhandled_exception): Only set the exit code if the
16766 exception happens in the main thread. Fixes thread5.exe.
16768 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
16769 invalid names. Fixes #58047.
16771 2004-05-03 Jackson Harper <jackson@ximian.com>
16773 * assembly.c: This line was committed accidently and is unneeded.
16775 2004-05-03 Jackson Harper <jackson@ximian.com>
16777 * icall.c: Add new icall for Assembly::LoadWithPartialName
16778 * assembly.c/.h: new function that probes the GAC to load partial
16779 assembly names by Paolo Molaro.
16781 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16783 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
16784 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
16785 (type_get_fully_qualified_name): Added PublicKeyToken when building a
16788 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16790 * appdomain.c: fixed check for 'neutral' culture and removed warning.
16791 * reflection.c: fix bug when parsing a full type name and Version is not
16792 the last thing in the string.
16794 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
16796 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
16797 crashes when it is freed.
16799 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16801 * assembly.c: print the compat warning to stderr.
16803 2004-05-01 Miguel de Icaza <miguel@ximian.com>
16805 * assembly.c (mono_assembly_load_references): Add a compatibility
16806 hack to run old applications that might be still referencing the
16807 3300-based assemblies, only do this for System.xxx.
16809 2004-05-01 Jackson Harper <jackson@ximian.com>
16811 * appdomain.c: If the culture is neutral we set it to "".
16813 2004-04-29 Jackson Harper <jackson@ximian.com>
16815 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
16817 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
16819 * string-icalls.c: added low overhead function for copying chars
16820 * icall.c: added needed icall for the above function
16822 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16824 * icall.c: fix return value of get_global_assembly_cache. Implemented
16825 Environment.GetLogicalDrives.
16827 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
16829 * rand.c: try and talk to egd or prngd
16830 for random bytes if opening devices fail.
16832 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
16834 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
16835 alignment for the type using the native alignment of its members
16836 instead of using klass->min_align.
16838 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
16840 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16843 * socket-io.c: added check for sys/aio.h.
16845 2004-04-28 Dick Porter <dick@ximian.com>
16847 * threads.c: Don't abort a thread thats already aborting, when
16848 terminating everything.
16850 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16852 * icall.c: added 2 new async calls for Socket.
16854 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
16855 IO on *nix systems.
16857 * threadpool.c: removed unused variable.
16859 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
16861 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
16863 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
16865 * locales.c: put back string_invariant_tolower () and
16866 string_invariant_toupper ().
16868 2004-04-26 David Waite <mass@akuma.org>
16873 * unicode.h: remove comma from end of enumeration declarations
16875 2004-04-26 David Waite <mass@akuma.org>
16877 * debug-mono-symfile.h:
16880 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
16883 2004-04-26 Jackson Harper <jackson@ximian.com>
16885 * appdomain.c: Increment version number.
16887 2004-04-26 Jackson Harper <jackson@ximian.com>
16889 * appdomain.c: Set assembly references public token value when
16890 PublicKeyToken is specified, not the hash_value. Free public token
16891 values when free assembly name data. Previously the public key
16892 token was hex decoded, however we are using hex encoded public key
16893 tokens, so this is not neccasary.
16894 * assembly.c: Lookup assemblies in the gac if their public token
16895 value is set. Add function to allow enabling user gac
16896 lookups. Specify whether or not the assembly was loaded from the
16897 GAC. Compare full assembly names when checking the cache for
16898 assemblies (Temporarily disabled see comment in code). Remove
16899 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
16900 specifies trace-loader they get extra info to stdout on the
16901 loading of assemblies.
16902 * image.h: Add a field for an assembly references public token
16903 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
16904 whether an assembly has been loaded from the GAC.
16905 * image.c: Remove a corlib -> mscorlib name mapping.
16906 * loader.h: Add function to enable/disable the user gac.
16907 * mono-config.c: Check if the usergac is enabled in the config
16909 * icall.c: New icall to determine whether or not an assembly has
16910 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
16911 * tabldefs.h: Add constant for assemblyref flag that specifies a
16912 full public key is used instead of a public token.
16913 * reflection.c: Remove mscorlib -> corlib mappings. Set
16914 PublicTokenValue instead of hash value. This value is a hex
16915 string so it does not need to be expanded.
16917 2004-04-26 Martin Baulig <martin@ximian.com>
16919 * mono-debug-debugger.c (mono_debugger_initialize): Set
16920 `mono_debugger_initialized' before calling mono_debug_lock().
16922 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
16924 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
16925 InternalToUpper/InternalToLower.
16926 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
16927 removed invariant culture shortcut. This is now done in managed code.
16928 * locales.c: (string_invariant_toupper/tolower) removed.
16930 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16932 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
16933 Added Poll internal call.
16935 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
16936 call for Poll. Select was too heavy for polling a single socket.
16938 * threadpool.[ch]: added mono_threadpool_cleanup.
16939 * threads.c: use it. Don't use Thread_Abort on windows.
16941 2004-04-23 Martin Baulig <martin@ximian.com>
16943 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
16945 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
16947 * icall.c: Registred new icalls for key pair protection and added an
16948 icall for Environment.GetFolderPath on Windows.
16949 * security.c|h: Added new icalls for key pair protection.
16951 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16953 * socket-io.c: don't display the non-supported family warning for known
16954 families. Now this is not displayed on windows when checking support
16957 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16959 * class.c: don't display the layout warning for static fields.
16961 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
16963 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
16964 * locales.c, locales.h: Added new icalls for culture-specific
16965 Char.ToLower and Char.ToUpper.
16967 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16969 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
16972 2004-04-20 Martin Baulig <martin@ximian.com>
16974 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
16975 of the type name before passing it to mono_reflection_type_from_name().
16977 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
16979 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
16980 encodings here. Fixes #56965.
16982 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
16984 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
16985 fix test on strstr result not that I can see anything that
16986 relies on the result.
16988 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
16990 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
16993 * marshal.c (mono_marshal_get_string_encoding): New helper function.
16995 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
16996 function to determine which marshalling to use for strings. Fixes
16999 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
17001 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
17003 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
17005 * icall.c: #include mono-config.h
17007 2004-04-15 Jackson Harper <jackson@ximian.com>
17009 * culture-info-tables.h: Fix date formats for en-US culture.
17011 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
17013 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
17014 ThreadPool.SetMinThreads.
17015 * threadpool.c: Implemented ThreadPool.GetMinThreads and
17016 ThreadPool.SetMinThreads.
17018 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
17020 * mono-config.c: also load the .config file in the directory
17021 where the assembly was found.
17023 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
17025 * assembly.c: load per-assembly config files.
17026 * icall.c: decrapified code to get the config dir and moved to
17028 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
17029 per-assembly config files. When doing a dll map lookup give precedence
17030 to the per-assembly data.
17032 2004-04-14 Martin Baulig <martin@ximian.com>
17034 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
17035 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
17036 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
17038 * mono-debugger-debugger.c: While the debugger is locked, remember
17039 whether the symbol tables have changes and send one single
17040 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
17042 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
17044 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
17046 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
17049 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
17050 account when marshalling string arrays. Fixes #56965.
17052 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
17054 * icall.c: Add new icalls mapping for security.
17055 * security.c|h: Add internal calls for WindowsIdentity,
17056 WindowsImpersonationContext and WindowsPrincipal.
17058 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
17060 * class.c: Added comment to ensure the System.MonoDummy class
17061 is removed when no longer necessary
17063 2004-04-13 Miguel de Icaza <miguel@ximian.com>
17065 * appdomain.c: Pass arguments to the bootstraping exceptions to
17066 minimize JITed methods at boot
17068 * metadata.c (mono_exception_from_name_two_strings): Allow for the
17069 second string to be null.
17071 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
17072 Change the protocol to minimize the JIT methods at startup. Now
17073 it Returns the internal codepage, if the value of "int_code_page"
17074 is 1 at entry, and we can not compute a suitable code page
17075 number, returns the code page as a string.
17077 2004-04-13 Jackson Harper <jackson@ximian.com>
17079 * culture-info-tables.h: Fix number of decimal digits for all
17082 2004-04-13 Jackson Harper <jackson@ximian.com>
17084 * icall.c: Clairfy out of sync error message. It is not always
17085 your corlib that is out of sync.
17087 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
17089 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
17090 properties when only the set accessor is overriden. Fixes #55874.
17092 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
17094 * assembly.c (mono_assembly_load_references): Make this thread safe.
17097 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
17099 * monosn.c: Add missing initialization calls.
17101 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
17104 ves_icall_System_Globalization_CultureInfo_construct_number_format
17105 Fix g_assert so it compiles on fussier compilers re int/ptr
17108 2004-04-08 Dick Porter <dick@ximian.com>
17111 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
17112 53992. Also rearrange the code so that the internal calls return
17113 an error value and exceptions are thrown from managed code.
17115 * icall.c: Add type info to the socket icalls.
17117 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17119 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
17122 2004-04-07 Martin Baulig <martin@ximian.com>
17124 * class.c (mono_class_from_generic_parameter): Don't default
17125 `klass->parent' to `mono_defaults.object_type'.
17127 2004-04-07 Martin Baulig <martin@ximian.com>
17129 * reflection.c (mono_reflection_initialize_generic_parameter): Set
17130 `param->pklass->reflection_info'.
17132 2004-04-07 Jackson Harper <jackson@ximian.com>
17134 * culture-info-tables.h: Fix date separator symbol.
17136 2004-04-07 Martin Baulig <martin@ximian.com>
17138 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
17139 from System.Type to System.MonoType.
17141 2004-04-07 Martin Baulig <martin@ximian.com>
17144 (MonoReflectionGenericParam): Added `has_reference_type' and
17145 `has_value_type' fields.
17147 * reflection.c (mono_image_get_generic_param_info): Encode the
17148 correct flags if we have the `class' or `struct' constraint.
17150 2004-04-07 Martin Baulig <martin@ximian.com>
17153 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
17155 2004-04-07 Jackson Harper <jackson@ximian.com>
17157 * appdomain.c: Revert extra patches, just wanted to bump the
17160 2004-04-07 Jackson Harper <jackson@ximian.com>
17162 * Makefile.am: Add culture-info private headers.
17163 * icall.c: Add new icalls for contructing locales.
17164 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
17165 * locales.h: Declare new culture info construction methods.
17166 * object.h: Add new fields used to avoid the CultureMap to
17168 * culture-info.h: Definition of structs used in the culture info
17170 * culture-info-tables.h: Autogenerated tables that contain culture
17171 info data. This file was generated with the locale-builder tool.
17172 * appdomain.c: Incement corlib version number.
17174 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
17176 * appdomain.c: (mono_runtime_init) move mono_thread_init
17177 to before mono_object_new calls so critical sections
17178 are initialized before use.
17180 2004-04-07 Martin Baulig <martin@ximian.com>
17183 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
17184 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
17185 (ves_icall_MonoGenericParam_initialize): Removed.
17186 (monogenericparam_icalls): Removed.
17187 (generictypeparambuilder_icalls): Added new table for
17188 System.Reflection.Emit.GenericTypeParameterBuilder.
17191 (mono_reflection_define_generic_parameter): Removed.
17192 (mono_reflection_initialize_generic_parameter): This is now called
17193 from GenericTypeParameterBuilder's .ctor.
17195 2004-04-06 Martin Baulig <martin@ximian.com>
17197 * class.c (mono_class_init): Don't inflate nested classes in a
17199 (mono_type_get_name_recurse): Include the generic arguments for
17200 generic instances and generic type declarations.
17201 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
17202 (_mono_class_get_instantiation_name): Removed.
17203 (mono_class_create_generic): Always use `gklass->name' as our name.
17205 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
17207 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
17208 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
17209 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
17210 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
17211 closed generic methods here.
17214 (mono_reflection_generic_inst_get_nested_types): Removed.
17215 (inflate_mono_method): Copy the generic parameters from the
17216 MonoMethodHeader into out MonoGenericMethod.
17218 2004-04-06 Martin Baulig <martin@ximian.com>
17221 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
17223 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
17225 * reflection.c (build_compressed_metadata): If we have any entries
17226 in the GenericParam, MethodSpec or GenericParamConstraint tables,
17227 set the header version to 1.1.
17229 2004-04-06 Martin Baulig <martin@ximian.com>
17231 * class.c (mono_class_init): If we're a generic instance,
17232 initialize our nested classes, too.
17233 (_mono_class_get_instantiation_name): Deal with the new `!%d'
17236 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17238 * process.c: quote the argument passed to the shell on windows.
17240 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
17242 * threads.c (mono_alloc_special_static_data): Allow this to be
17243 called during startup.
17245 2004-04-02 Martin Baulig <martin@ximian.com>
17248 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
17250 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
17252 * icall.c: Fix build.
17254 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
17256 * Makefile.am: Added security.c|h.
17257 * icall.c: Added icall for get_UserName;
17258 * security.c: New file for security related icalls. Added function
17259 get_UserName for System.Environment (fix #56144).
17260 * security.h: New. Header file for security.c
17262 2004-04-02 Dick Porter <dick@ximian.com>
17264 * icall.c: Deleted the icalls that were obsoleted some time ago
17265 by the ICU string code, and which were mixed into the icall
17266 rearranging. Fixes bug 55969.
17269 * string-icalls.c: Deleted the code that those icalls reference.
17271 2004-04-01 Martin Baulig <martin@ximian.com>
17273 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
17275 * class.c (mono_class_from_generic_parameter): Don't set
17276 TYPE_ATTRIBUTE_INTERFACE.
17277 (my_mono_class_from_generic_parameter): Likewise.
17279 2004-04-01 Martin Baulig <martin@ximian.com>
17281 * loader.c (find_method): Added an optional `MonoClass *ic'
17282 argument to search in a specific interface.
17283 (mono_get_method_constrained): New public function.
17285 2004-04-01 Martin Baulig <martin@ximian.com>
17287 * reflection.c (mono_image_get_generic_field_token): Use the
17288 `handleref' cache here.
17290 2004-04-01 Martin Baulig <martin@ximian.com>
17292 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
17294 * reflection.c (create_generic_typespec): Use the `typespec' hash
17295 here, not the `typeref' one.
17297 2004-04-01 Martin Baulig <martin@ximian.com>
17299 * class.c (mono_class_inflate_generic_type): Moved the
17300 functionality into a new static inflate_generic_type() which
17301 returns NULL if it didn't do anything. Only increment the
17302 `mono_stats.inflated_type_count' if we actually inflated
17304 (mono_class_get_full): Check the classes type to see whether we
17305 need to inflate it; also inflate MONO_TYPE_(M)VAR.
17307 2004-04-01 Jackson Harper <jackson@ximian.com>
17309 * reflection.c: Set culture for assembly references.
17311 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
17313 * reflection.[ch], icall.[ch], Fix support for pinning variables.
17315 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17318 (do_mono_assembly_open): the critical section also covers
17319 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
17321 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17324 (mono_manage_threads): abort the background threads when finishing.
17327 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17329 * gc.c: only close the done_event handle if there was no timeout.
17332 2004-03-30 Martin Baulig <martin@ximian.com>
17334 * icall.c (icall_entries): It's called "System.Activator", not
17335 "System.Activation".
17337 2004-03-30 Martin Baulig <martin@ximian.com>
17339 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
17340 (mono_class_create_from_typespec): Likewise.
17342 2004-03-30 Martin Baulig <martin@ximian.com>
17344 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
17345 `has_ctor_constraint' and `initialized'.
17347 2004-03-30 Martin Baulig <martin@ximian.com>
17349 * reflection.c (encode_new_constraint): New static function to add
17350 the constructor constraint attribute to a type parameter.
17351 (encode_constraints): Call encode_new_constraint() if necessary.
17354 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
17356 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
17358 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
17360 * reflection.c, icall.c: add support for pinning variables.
17362 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
17364 * marshal.c (mono_marshal_get_managed_wrapper):
17365 init bool local with zero rather than null.
17367 2004-03-29 Martin Baulig <martin@ximian.com>
17369 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
17370 the "official" behavior here.
17371 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
17373 2004-03-29 Martin Baulig <martin@ximian.com>
17375 * icall.c: Reflect latest API changes.
17377 2004-03-29 Martin Baulig <martin@ximian.com>
17379 * loader.c (mono_get_method_from_token): Also call
17380 mono_metadata_load_generic_params () for abstract and interface
17381 methods; replace the type arguments in the method signature with
17382 the ones which are loaded from the metadata.
17384 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
17386 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
17387 of the lock is not the current thread. MS.NET don't do it, in spite of
17388 what the documentation says. See bug #56157.
17390 2004-03-28 Martin Baulig <martin@ximian.com>
17392 * class.c (mono_class_init): Don't call init_properties() and
17393 init_events() for generic instances; set `prop->parent' when
17394 inflating properties.
17396 * reflection.c (mono_generic_inst_get_object): Call
17397 `mono_class_init (ginst->klass)'.
17398 (mono_type_get_object): Only create a MonoGenericInst if your
17399 generic type is a TypeBuilder.
17400 (do_mono_reflection_bind_generic_parameters): Only set
17401 `ginst->is_dynamic' if our generic type is a TypeBuilder.
17403 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
17405 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
17408 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17410 * icall.c: added Kill_internal icall.
17411 * process.[ch]: added Kill_internal icall.
17413 2004-03-25 Martin Baulig <martin@ximian.com>
17415 * class.h (MonoStats): Added `generic_instance_count',
17416 `inflated_method_count', `inflated_type_count' and
17417 `generics_metadata_size'.
17419 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17421 * reflection.c: no warnings now.
17423 2004-03-25 Martin Baulig <martin@ximian.com>
17425 * class.c (mono_class_get_full): New public function; does a
17426 mono_class_get(), but also takes a `MonoGenericContext *'.
17428 * loader.c (mono_field_from_memberref): Renamed to
17429 `field_from_memberref', made static and added `MonoGenericContext *'
17431 (mono_field_from_token): Added `MonoGenericInst *' argument.
17432 (method_from_memberef): Likewise.
17433 (mono_get_method_from_token): Likewise.
17434 (mono_get_method_full): New public function; does a
17435 mono_get_method(), but also takes a `MonoGenericContext *'.
17437 * verify.c (mono_method_verify): Get the method's generic context
17438 and pass it to mono_field_from_token(), mono_get_method_full() and
17439 mono_class_get_full().
17441 2004-03-25 Martin Baulig <martin@ximian.com>
17443 * class.c (mono_class_inflate_generic_type): Take a
17444 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
17445 `MonoGenericMethod *'.
17447 2004-03-25 Martin Baulig <martin@ximian.com>
17449 * loader.h (MonoMethodInflated): Store the MonoGenericContext
17450 instead of the MonoGenericMethod here.
17452 2004-03-25 Martin Baulig <martin@ximian.com>
17454 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
17455 each time we create a new MonoGenericInst, we also create a new
17456 context which points back to us.
17458 * class.c (inflate_method): Use `ginst->context' instead of
17459 creating a new context.
17461 * loader.c (method_from_memberref): Use
17462 `klass->generic_inst->context' instead of creating a new context.
17464 2004-03-25 Martin Baulig <martin@ximian.com>
17466 * class.h (MonoGenericContext): New struct.
17467 (MonoGenericMethod): Removed `generic_inst'.
17469 * class.c (mono_class_inflate_generic_method): Take a
17470 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
17472 2004-03-25 Martin Baulig <martin@ximian.com>
17474 * loader.h (MonoMethodInflated): New typedef.
17476 * metadata.h (MonoMethodSignature): Removed `gen_method', make
17477 `generic_param_count' consume just 30 bits, added `is_inflated'
17478 and `has_type_parameters' flags (one bit each).
17480 * class.c (mono_class_inflate_generic_method): Create a
17481 MonoMethodInflated instead of a MonoMethodNormal and set
17482 `is_inflated' in the method signature.
17484 * class.h (MonoGenericMethod): Removed `generic_method'.
17486 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
17488 * image.c: Make sure the name of a MonoImage is always an absolute path.
17489 This fixes bug #54415.
17491 2004-03-24 Martin Baulig <martin@ximian.com>
17493 * class.c (mono_class_setup_vtable): If we're a generic instance,
17494 use our generic type's vtable size.
17496 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
17498 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
17499 MONO_NO_UNLOAD env var as a temporary workaround for unloading
17502 2004-03-23 Martin Baulig <martin@ximian.com>
17504 * class.h (MonoDynamicGenericInst): Added `int count_events' and
17505 `MonoEvent *events'.
17507 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
17508 (typebuilder_icalls): Added "get_event_info"; calls
17509 mono_reflection_event_builder_get_event_info().
17511 * reflection.c (mono_reflection_generic_inst_initialize): Added
17512 `MonoArray *events'.
17513 (mono_reflection_event_builder_get_event_info): New function.
17515 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
17517 * object.h: add mono_type_initialization_init
17519 * object.c (mono_runtime_class_init):
17520 implement class constructor synchronization rules
17521 to cope with threading issues.
17522 add mono_type_initialization_init
17524 * appdomain.c (mono_runtime_init): call
17525 mono_type_initialization_init
17527 * class.h: removing initializing field from MonoVTable
17529 2004-03-23 Martin Baulig <martin@ximian.com>
17531 * class.c (my_mono_class_from_generic_parameter): Use
17532 `param->name' if it's not NULL.
17534 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
17536 * class.c: do not insert non-virtual methods in the vtable.
17537 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
17538 that means the method is non-virtual. This never would have
17541 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
17543 * profiler.c: Added lock for accessing coverage_hash.
17545 2004-03-22 Martin Baulig <martin@ximian.com>
17547 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
17548 `method->method->signature->generic_param_count != 0' to make it
17549 work for interface methods.
17551 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17553 * process.c: quote the string passed to the shell using g_shell_quote.
17555 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17558 (mono_threads_manage): don't remove the finalizer thread and self
17559 from the threads hash table so that mono_thread_manage can be called
17562 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17564 * process.c: quote the arguments when UseShellExecute is true. Fixes
17567 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17569 * threads.c: set mono_thread_detach as a cleanup routine for every
17570 thread. This way it's always executed upon thread termination, either
17571 aborted or finished normally. No more xsp hangs!
17573 2004-03-17 Martin Baulig <martin@ximian.com>
17575 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
17576 `int count_nested' and a `MonoType **nested'.
17578 * reflection.c (mono_reflection_bind_generic_parameters): Moved
17579 most of the functionality into a new static
17580 do_mono_reflection_bind_generic_parameters() and don't take a
17581 `MonoType *nested_in' argument any more. Don't compute nested
17583 (mono_reflection_generic_inst_get_nested_types): New public method
17584 to get nested types.
17586 * class.c (mono_class_create_generic): Set `klass->nested_in' if
17587 we're a nested class.
17589 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
17590 mono_reflection_generic_inst_get_nested_types() to compute the
17593 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
17595 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
17596 descriptive error message under windows.
17598 2004-03-17 Martin Baulig <martin@ximian.com>
17600 * class.c (dup_type): Added `const MonoType *original' argument;
17601 copy the attrs from the original type.
17603 2004-03-17 Martin Baulig <martin@ximian.com>
17605 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
17606 `m->generic_inst_cache' here.
17608 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
17610 * exception.h exception.c: Add stack_overflow_exception.
17612 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17615 (overlapped_callback): call SetEvent *after* invoking the callback.
17616 No need to call CloseHandle.
17618 2004-03-16 Martin Baulig <martin@ximian.com>
17620 * reflection.c (mono_image_get_fieldref_token): Take a
17621 `MonoReflectionField *' instead of a `MonoClassField *' and a
17622 `MonoClass *'; store the `MonoReflectionField *' in the hash.
17624 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17626 * appdomain.c: don't add the culture to the filename we're looking for
17627 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
17629 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17631 * locales.c: don't ignore symbols when doing case insensitive compares.
17632 Thanks Dick! Fixes bug #54046.
17634 * threads.c: surround 'threads' usage with enter/leave in
17635 mono_thread_manage.
17637 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
17639 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
17640 implicitly marshalled as [Out]. Fixes #55450.
17642 (mono_marshal_get_runtime_invoke): Zero out the result if there is
17645 2004-03-16 Martin Baulig <martin@ximian.com>
17647 * class.c (mono_class_from_generic_parameter): Use the actual
17650 2004-03-16 Martin Baulig <martin@ximian.com>
17652 * reflection.c (type_get_signature_size): New static function.
17653 Compues the size of the type in a method signature.
17654 (method_get_signature_size): New static function; calls
17655 type_get_signature_size() to compute the actual size of the
17656 method's signature.
17657 (method_encode_signature): Use method_get_signature_size() to get
17658 the signature's size rather than using `nparams * 10'.
17660 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17662 * file-io.h: define here WapiOverlapped on windows. I don't want the
17663 regular OVERLAPPED one.
17666 * threadpool.c: somehow, BindIoCompletionCallback is not found.
17667 Disabling AIO on windows.
17669 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17671 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
17674 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17676 * appdomain.c: upgraded corlib version.
17678 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
17679 and BeginWrite. Allow opening files for asynchrnous operations.
17681 * file-io.h: new struct that maps FileStreamAsyncResult.
17682 * icall.c: added new icalls.
17683 * process.[ch]: support setting child process environment variables
17684 and use the SHELL or COMSPEC when UseShellExecute is true.
17686 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
17687 callback for async. IO is here and also BindHandle.
17689 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
17692 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
17694 * reflection.c (create_custom_attr): Allow len == 0.
17696 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
17697 computation on big-endian machines.
17699 2004-03-13 Martin Baulig <martin@ximian.com>
17701 * class.h (MonoGenericInst): Added `int count_ifaces'.
17703 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
17704 `ginst->count_ifaces' instead `klass->interface_count' since we
17705 may get called before the vtable is created.
17707 * loader.c (mono_method_get_param_names): If we're a generic
17708 instance, return and don't initialize the class.
17710 * reflection.c (mono_reflection_setup_generic_class): Don't call
17711 ensure_runtime_vtable().
17712 (mono_reflection_bind_generic_parameters): Set
17713 `ginst->count_ifaces'.
17715 2004-03-11 Jackson Harper <jackson@ximian.com>
17719 * unicode.h: Remove unused System.Char icalls.
17721 2004-03-11 Miguel de Icaza <miguel@ximian.com>
17723 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
17724 code when we P/Invoke the first library in Windows.Forms, instead
17725 of when we first open the assembly.
17727 * assembly.c: Drop the lookup from here.
17729 2004-03-10 Martin Baulig <martin@ximian.com>
17731 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
17732 class for properties, fields and events. Finally fixes #54945.
17734 2004-03-10 Martin Baulig <martin@ximian.com>
17736 * metadata.c (mono_metadata_class_equal): New static function;
17737 checks whether two generic instances or two generic parameters are
17739 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
17742 2004-03-10 Martin Baulig <martin@ximian.com>
17744 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
17746 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
17747 argument and write it into the `reflection_info' field.
17750 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
17751 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
17753 2004-03-09 Jackson Harper <jackson@ximian.com>
17755 * char-conversions.h: use 8 bits for numeric data its all we need
17756 * icall.c: numeric data is only 8 bits now.
17758 2004-03-09 Martin Baulig <martin@ximian.com>
17760 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
17762 * class.c (init_properties, init_events): Initialize the new
17765 * reflection.c (typebuilder_setup_properties): Likewise.
17766 (typebuilder_setup_events): Likewise.
17768 * reflection.h (MonoEventInfo): Replaced `parent with
17769 `declaring_type' and `reflected_type'.
17771 * icall.c (ves_icall_get_property_info): Distinguish between
17772 declaring and reflected type.
17773 (ves_icall_get_event_info): Likewise.
17775 2004-03-09 Martin Baulig <martin@ximian.com>
17777 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
17778 (ves_icall_Type_GetField): Correctly set field->klass.
17780 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
17782 * loader.h: Fix warning.
17784 2004-03-08 Miguel de Icaza <miguel@ximian.com>
17786 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
17787 library routine if present. Notice that it will still continue
17788 executing even if its missing, for those working on the Gtk#
17789 edition of Windows.Forms.
17791 * assembly.c (do_mono_assembly_open): If loading the
17792 System.Windows.Forms call mono_loader_wini_init.
17794 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
17796 * class.h: Added MonoRemoteClass struct.
17797 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
17798 function for MonoStrings.
17799 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
17800 Added internal call for getting the proxy type.
17801 * marshal.c: Get the type of transparent proxies from its remote_class.
17802 Added methods that generate the IL for type checks and casts:
17803 mono_marshal_get_isinst, mono_marshal_get_castclass,
17804 mono_marshal_get_proxy_cancast.
17805 * marshal.h: Declaration of the previous new methods.
17806 * object.c: Added new moethods for creating and updating MonoRemoteClass
17807 instances: mono_remote_class, mono_upgrade_remote_class,
17808 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
17809 * verify.c: FIx transparent_proxy_fields layout.
17810 * appdomain.c: Bump corlib version.
17812 2004-03-04 Jackson Harper <jackson@ximian.com>
17814 * icall.c: Add icall to access char conversion tables.
17815 * char-conversions.h: Character conversion tables.
17816 * Makefile.am: Add char-conversions.h private header file.
17818 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
17820 * appdomain.c (unload_thread_main): Increase unloading timeout to
17821 10 sec as a temporary workaround for Nant problems.
17823 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
17825 * gc.c: Add checks for GC_enable and GC_disable.
17827 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
17828 (jaak@zd.com.pl). Fix memory corruption in String.Replace
17831 2004-02-27 Martin Baulig <martin@ximian.com>
17833 * reflection.c (mono_reflection_bind_generic_parameters): Take a
17834 `MonoReflectionType *' instead of a `MonoType *'.
17836 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
17838 * gc.c (run_finalize): Avoid finalizing the object representing the
17840 (finalizer_thread): Fix warning.
17842 2004-02-25 Martin Baulig <martin@ximian.com>
17844 * class.c (_mono_class_get_instantiation_name): Added `int offset'
17845 argument for nested types.
17846 (mono_class_create_generic): Added support for nested generictypes.
17848 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
17851 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
17853 * reflection.c (method_encode_signature): Increase the minimum
17854 value of `size' from 10 to 11.
17855 (mono_reflection_bind_generic_parameters): Take `int type_argc'
17856 and `MonoType **types' arguments instead of the `MonoArray
17857 *types'; added `MonoType *nested_in'. Recursively instantiate
17860 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
17862 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
17863 stack_overflow_ex members which are used by exception handling.
17865 * appdomain.c (mono_runtime_init): Initialize the new members.
17867 * gc.c (mono_gc_enable): New helper function.
17868 * gc.c (mono_gc_disable): New helper function.
17870 2004-02-23 Martin Baulig <martin@ximian.com>
17872 * icall.c: I must have been really stupid - make it actually work
17875 2004-02-23 Martin Baulig <martin@ximian.com>
17877 * loader.c (method_from_memberref): Only inflate the method if
17878 it's in another klass.
17880 2004-02-23 Martin Baulig <martin@ximian.com>
17882 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
17883 (mono_class_init): If we're a generic instance and an interface,
17884 compute `class->interface_id'; also create `class->interfaces'
17885 here and inflate them.
17887 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
17889 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
17891 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
17893 2004-02-15 Miguel de Icaza <miguel@ximian.com>
17895 * reflection.c (method_encode_code): Improved the error message
17896 generated by the exception.
17898 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17900 * icall.c: Martin did not do what he said in the ChangeLog for
17901 2004-02-18, but put back the changes for properties and events.
17902 Commenting those changes out again and adding comment to bug #54518.
17904 * process.c: removed warning.
17906 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
17908 * marshal.c (emit_struct_conv): Print an error message instead of
17909 asserting when a type does not have the StructLayout attribute.
17911 2004-02-20 Martin Baulig <martin@ximian.com>
17913 * reflection.c (mono_type_get_object): Also use the cache for
17915 (mono_reflection_bind_generic_parameters): Always compute
17918 2004-02-20 Martin Baulig <martin@ximian.com>
17920 * class.h (MonoGenericMethod): Removed `klass'.
17922 * class.c (mono_class_inflate_generic_method): Added `MonoClass
17925 2004-02-20 Martin Baulig <martin@ximian.com>
17927 * reflection.c (method_encode_methodspec): Actually use the
17928 uninflated signature for the memberref.
17930 2004-02-20 Martin Baulig <martin@ximian.com>
17932 * class.h (MonoGenericMethod): Removed `declaring'.
17934 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
17935 is NULL, compute it here.
17937 2004-02-20 Martin Baulig <martin@ximian.com>
17939 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
17941 * metadata.c (mono_metadata_generic_inst_hash): New method.
17942 (mono_metadata_generic_inst_equal): New method.
17944 * reflection.c (mono_reflection_bind_generic_parameters): Use the
17945 `klass->image->generic_inst_cache' cache to avoid creating
17946 duplicate MonoGenericInst's.
17948 * class.c (mono_class_inflate_generic_type): Use the cache.
17950 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
17952 * object.c: fixed gc descriptor calculation for embedded valuetypes.
17954 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17956 * icall.c: added Socket.WSAIoctl icall.
17958 * socket-io.[ch]: implemented
17959 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
17961 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
17963 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
17965 2004-02-18 Urs C Muff <umuff@quark.com>
17967 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
17968 this work on PPC and other big-endian architectures.
17970 * debug-mono-symfile.h: Prepended the names of all the `guint32'
17971 fields with an underscore to make sure they're only accessed by
17972 the read32() macro.
17974 2004-02-18 Martin Baulig <martin@ximian.com>
17976 * icall.c: Put the klass->refclass changes back for methods and
17977 fields, but not for properties and events. We're currently not
17978 distinguishing between DeclaringType and ReflectedType for
17979 properties and events, that's what caused the regressions.
17981 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17984 (mono_async_result_new): the handle can be NULL.
17986 * threadpool.c: Use an event instead of a semaphore, don't initialize
17987 it until needed. This saves quite a few semaphores from being created
17988 when using the threadpool.
17990 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
17992 * object.c (mono_string_is_interned_lookup): Fix interning of long
17993 strings. Fixes #54473.
17995 * domain.c (ldstr_equal): Optimize if the two strings are equal.
17997 * icall.c: Revert the klass->refclass changes since they introduce
17998 regressions (bug #54518).
18000 2004-02-18 Martin Baulig <martin@ximian.com>
18002 * class.c (mono_class_init): If we're a generic instance and don't
18003 come from a TypeBuilder, inflate our members here.
18004 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
18005 (mono_class_create_generic): New public method.
18006 (mono_class_initialize_generic): Removed.
18007 (get_instantiation_name): Renamed to
18008 _mono_class_get_instantiation_name() and made it public.
18010 2004-02-18 Martin Baulig <martin@ximian.com>
18012 * class.c (mono_class_inflate_generic_type): Clear the new
18013 instance's `nginst->klass' when inflating a generic instance.
18014 (mono_class_is_subclass_of): Added (basic) support for generic
18017 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
18019 * appdomain.h, domain.c: use a MonoCodeManager instead of a
18020 MonoMempool to hold compiled native code.
18022 2004-02-17 Martin Baulig <martin@ximian.com>
18024 * class.h (MonoDynamicGenericInst): Added `count_properties' and
18027 * reflection.c (mono_reflection_generic_inst_initialize): Added
18028 `MonoArray *properties' argument.
18030 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
18032 2004-02-17 Martin Baulig <martin@ximian.com>
18034 * icall.c (ves_icall_Type_GetFields): Renamed to
18035 ves_icall_Type_GetFields_internal() and added a
18036 `MonoReflectionType *rtype' argument; pass it to
18037 mono_field_get_object() to set the field's "reflected" type.
18038 (ves_icall_Type_GetConstructors): Likewise.
18039 (ves_icall_Type_GetEvents): Likewise.
18040 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
18041 argument; pass it to mono_method_get_object() to set the method's
18044 2004-02-17 Martin Baulig <martin@ximian.com>
18046 * class.h (MonoDynamicGenericInst): New type.
18047 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
18049 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
18050 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
18051 (ves_icall_MonoGenericInst_GetFields): New interncall.
18053 * class.c (mono_class_from_generic): Don't call
18054 mono_class_initialize_generic() if this is a dynamic instance;
18055 ie. it's being created from a TypeBuilder.
18056 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
18057 `class->byval_arg.type'.
18059 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
18060 to `inflate_method' and made static.
18061 (mono_reflection_inflate_field): Removed.
18062 (mono_reflection_generic_inst_initialize): New public method.
18064 * reflection.h (MonoReflectionGenericInst): Removed `methods',
18065 `ctors' and `fields'; added `initialized'.
18067 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
18069 * debug-helpers.c (mono_method_full_name): Fix output for empty
18072 2004-02-12 Martin Baulig <martin@ximian.com>
18074 * class.h (MonoClassField): Added `MonoType *generic_type'.
18076 * reflection.c (mono_image_get_fieldref_token): Added support for
18077 instantiated generic types.
18078 (field_encode_inflated_field): Removed.
18079 (mono_image_get_inflated_field_token): Removed.
18080 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
18082 * reflection.h (MonoReflectionInflatedField): Removed.
18084 2004-02-12 Martin Baulig <martin@ximian.com>
18086 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
18087 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
18089 * reflection.c (mono_image_get_methodspec_token): Take a
18090 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
18091 (mono_image_create_token): Check whether we have a
18092 `method->signature->gen_method' and call
18093 mono_image_get_methodspec_token() if appropriate.
18094 (inflated_method_get_object): Removed.
18095 (mono_reflection_bind_generic_method_parameters): Return a
18096 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
18097 (mono_reflection_inflate_method_or_ctor): Likewise.
18099 * reflection.h (MonoReflectionInflatedMethod): Removed.
18101 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
18103 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
18104 for custom valuetype marshalling.
18106 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
18108 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18110 * icall.c: fixed WSAGetLastError_internal name.
18112 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
18114 * threads.c (mono_thread_attach): Allow this to be called multiple
18115 times for a thread.
18117 * threads.c (build_wait_tids): Do not wait for ourselves.
18119 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
18120 appdomain list is empty.
18122 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
18123 memory returned by mono_string_builder_to_utf16, since it points into
18124 managed memory. Thanks to Bernie Solomon for noticing this.
18126 * icall.c: Add AppDomainSetup icalls.
18128 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
18130 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
18133 * reflection.c (reflection_methodbuilder_to_mono_method): Save
18134 custom attributes to the method_aux struct. Also fix array indexes etc.
18136 * loader.c (mono_method_get_param_names): Make dynamic case work again.
18138 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
18140 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
18141 (both static and runtime) and reduce startup time.
18143 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
18145 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
18146 AsAny marshalling conversion instead of crashing.
18148 * marshal.c: Fix warnings.
18150 2004-02-09 Martin Baulig <martin@ximian.com>
18152 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
18154 * reflection.h (MonoReflectionInflatedMethod): Removed the
18155 `declaring' field, it's now in the unmanaged MonoGenericMethod.
18157 * reflection.c (method_encode_methodspec): Removed the `method'
18158 argument; we get it from `gmethod->declaring'.
18159 (inflated_method_get_object): Removed the `declaring' argument.
18161 2004-02-09 Martin Baulig <martin@ximian.com>
18163 * class.h (MonoGenericMethod): New type.
18164 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
18167 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
18168 a `MonoGenericMethod *gen_method' one.
18170 * class.c (mono_class_inflate_generic_type): Take an additional
18171 `MonoGenericMethod * argument. This is only non-NULL if we're
18172 inflating types for a generic method.
18173 (mono_class_inflate_generic_signature): Renamed to
18174 inflate_generic_signature() and made static; take a
18175 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
18176 (inflate_generic_header): Take a `MonoGenericMethod *' argument
18177 instead of a `MonoGenericInst *' one.
18178 (mono_class_inflate_generic_method): Likewise.
18180 * reflection.c (encode_generic_method_sig): Take a
18181 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
18182 (method_encode_methodspec): Likewise.
18183 (inflated_method_get_object): Likewise.
18185 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
18186 field with a `MonoGenericMethod *gmethod' one.
18188 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
18190 * class.h (mono_class_has_parent): add parens to expansion
18193 2004-02-08 Martin Baulig <martin@ximian.com>
18195 * image.h (MonoImage): Removed `generics_cache'.
18197 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
18198 instead of a `MonoType *' argument; removed the `inflate_methods'
18199 argument. Don't inflate methods here.
18201 * loader.c (find_method): If it's a generic instance, call
18202 mono_class_init() on the `sclass->generic_inst->generic_type'.
18204 * metadata.c (mono_type_size): Make this work on uninitialized
18205 generic instances; call it on the `ginst->generic_type's class.
18207 * reflection.c (mono_reflection_bind_generic_parameters): Call
18208 mono_class_from_generic() to create the `ginst->klass'.
18210 2004-02-08 Martin Baulig <martin@ximian.com>
18212 * class.h (MonoClass): Changed type of `generic_inst' from
18213 `MonoType *' to `MonoGenericInst *'.
18215 2004-02-08 Martin Baulig <martin@ximian.com>
18217 * icall.c (ves_icall_Type_BindGenericParameters): Just call
18218 mono_type_get_object(), this is now creating a `MonoGenericInst'
18219 for MONO_TYPE_GENERICINST.
18220 (ves_icall_MonoGenericInst_GetParentType): Likewise.
18221 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
18223 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
18224 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
18225 (inflated_method_get_object): Added `MonoClass *refclass' argument.
18226 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
18227 and reflected type.
18229 * reflection.h (MonoReflectionInflatedMethod): Removed
18230 `declaring_type' and `reflected_type'.
18232 2004-02-08 Martin Baulig <martin@ximian.com>
18234 * class.h (MonoGenericInst): Added `MonoType *parent' and
18235 `MonoType **ifaces'.
18237 * reflection.h (MonoReflectionGenericInst): Removed `klass',
18238 `parent' and `interfaces'.
18240 * reflection.c (mono_reflection_bind_generic_parameters): Take a
18241 `MonoType *' argument and return a `MonoType *'.
18244 (ves_icall_MonoGenericInst_GetParentType): New interncall.
18245 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
18247 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
18249 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
18250 valuetype marshalling.
18252 2004-02-06 Martin Baulig <martin@ximian.com>
18255 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
18256 (my_mono_class_from_generic_parameter): Likewise.
18258 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
18260 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
18261 contents of the symbol files lazily.
18263 * object.h (MonoThread): Add 'name' and 'name_len' fields.
18265 * threads.h threads.c icall.c: New icalls for getting and setting the
18268 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
18270 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
18271 Raise an exception when the domain is not found.
18273 2004-02-03 Martin Baulig <martin@ximian.com>
18275 * reflection.c (mono_image_get_methodspec_token): Use the
18276 uninflated signature; fixes gen-33.
18278 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
18280 * gc.c threads.c: Make the finalizer thread a normal managed thread so
18281 the finalizer code can use thread functionality.
18283 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
18284 the finalizer thread.
18286 * threads.c: Make some functions more robust.
18288 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
18290 * metadata.h: Add new marshalling conventions.
18292 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
18293 stringbuilder marshalling. Fixes #53700.
18295 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
18297 * reflection.c (mono_image_get_type_info): Save declarative security
18300 * reflection.c (mono_image_get_field_info): Handle uninitialized
18301 unmanaged fields as well.
18303 * appdomain.c: Bump corlib version.
18305 2004-02-01 Martin Baulig <martin@ximian.com>
18307 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
18308 method type arguments.
18310 2004-01-30 Duncan Mak <duncan@ximian.com>
18312 * marshal.h: Add prototype for
18313 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
18315 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
18318 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
18320 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
18321 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
18323 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
18325 * marshal.c (mono_marshal_get_native_wrapper): Add support for
18326 custom marshalling of valuetypes.
18328 * marshal.c: Fix some warnings.
18330 2004-01-29 Martin Baulig <martin@ximian.com>
18332 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
18333 for generic method parameters.
18335 * reflection.c (method_encode_methodspec): Write the uninflated
18336 signature into the methodspec table.
18337 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
18338 is always the uninflated method.
18339 (reflection_methodbuilder_to_mono_method): Copy the generic
18340 parameters from the MethodBuilder into `header->gen_params'.
18342 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
18344 * class.c (mono_class_from_generic_parameter): Fix warning.
18346 2004-01-27 Martin Baulig <martin@ximian.com>
18348 * class.c (mono_class_from_generic_parameter): Don't create
18349 `klass->methods' here.
18351 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
18353 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
18354 extension since it does not work with libraries named lib<FOO>.dll.so.
18356 2004-01-25 Martin Baulig <martin@ximian.com>
18358 * class.c (mono_class_inflate_generic_type): Added support for
18359 MONO_TYPE_GENERICINST.
18361 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
18362 inflate methods on open constructed types.
18364 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18366 * object.c: fire ProcessExit event in the root AppDomain after running
18367 Main. Fixes bug #53299.
18369 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
18371 * socket-io.c: include the new socket-wrappers.h header.
18372 Use the wrappers instead of the unix socket functions to make the code
18375 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
18377 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
18379 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
18382 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
18384 * reflection.c (mono_image_create_pefile): Handle the case when the
18385 entry point is not a MethodBuilder.
18387 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
18388 field to ReflectionMethod since it is not allways a builder.
18390 * reflection.c (type_get_fully_qualified_name): New helper function to
18391 return the fully qualified name of a type.
18393 * reflection.c (encode_marshal_blob): Always emit the fully qualified
18394 type name for custom marshallers.
18396 * reflection.c (mono_marshal_spec_from_builder): Ditto.
18398 * class.c (mono_class_setup_vtable): If a parent class already
18399 implements an interface, use the implementing methods from that class.
18402 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18404 * threadpool.c: just return instead of ExitThread to allow for thread
18407 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
18409 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
18410 when closing resource modules.
18412 * reflection.c (mono_image_create_pefile): Handle the case when the
18413 entry point is not a MethodBuilder.
18415 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
18416 field to ReflectionMethod since it is not allways a builder.
18418 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
18420 * marshal.c (mono_marshal_get_managed_wrapper):
18421 mono_marshal_alloc takes native int so CONV_I
18422 the arg for 64bits.
18424 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
18426 * reflection.c (fixup_cattrs): New function to fixup the methoddef
18427 tokens in the cattr table. Fixes #53108.
18429 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18431 * loader.c: don't trim ".dll" before looking up in the config file.
18432 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
18434 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
18436 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
18437 Return the module which contains the resource as well.
18438 (ves_icall_System_Reflection_Module_Close): New icall.
18440 * appdomain.c: Bump corlib version number.
18442 * image.c (mono_image_addref): New public function.
18444 * assembly.c: Call mono_image_addref.
18446 * reflection.c (mono_module_get_object): Increase reference count of
18449 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
18452 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
18453 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
18454 proper exceptions on DllImport problems.
18456 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
18458 * class.c, metadata.c: eliminate CSIZE macro.
18460 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
18462 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
18463 * object.h: Added async_callback field in MonoAsyncResult.
18464 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
18465 * verify.c: Added async_callback in MonoAsyncResult layout.
18467 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
18469 * reflection.c (mono_reflection_get_custom_attrs): Add support
18472 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
18474 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
18476 (mono_marshal_method_from_wrapper): Add null pointer check.
18478 2004-01-16 Martin Baulig <martin@ximian.com>
18480 * debug-mono-symfile.h: Set version number to 36 and reflect
18481 latest symbol writer changes.
18483 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
18485 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
18486 multi-dimensional arrays.
18487 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
18488 (mono_class_from_mono_type): Use bounded_array_class_get.
18490 * class.c (mono_bounded_array_class_get): New function which takes
18491 a 'bounded' bool argument to distinguish vectors from one dimensional
18494 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
18495 bounded_array_class_get if the array has bounds.
18497 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
18498 Search modules loaded using AssemblyBuilder:AddModule as well.
18500 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18502 * appdomain.c: increased corlib version.
18503 * filewatcher.c: removed g_print.
18505 (get_property_info): only allocate what is actually requested.
18506 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
18508 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18510 * Makefile.am: added filewatcher.[ch]
18511 * filewatcher.[ch]: FileSystemWatcher runtime support.
18512 * icall.c: added new FSW icalls.
18514 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
18516 * string-icalls.c: fix stringbuilder regression as suggested by
18517 Iain McCoy <iain@mccoy.id.au>.
18519 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
18521 * process.c (process_read_stringtable_block): Recognize '007f' as
18522 a language neutral stringtable block.
18524 2004-01-12 Patrik Torstensson
18526 * object.h (MonoStringBuilder) : Changed layout to support our
18527 new stringbuilder class.
18528 * marshal.c: Change marshalling to support the new layout of
18530 * appdomain.c: increased version number because new layout of
18533 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
18535 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
18536 assembly name as an string instead of an AssemblyName, since it is
18537 easier to extract info from it.
18539 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
18540 the culture subdirectories too. Fixes #52231.
18542 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18544 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
18545 It takes 2 new parameters with an optional name for the method to look
18546 for and case ignoring info.
18548 * threadpool.c: removed unused variable.
18550 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18552 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
18553 It takes 2 new parameters with an optional name for the property to look
18554 for and case ignoring info.
18557 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
18559 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
18562 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18565 * assembly.c: escape the uri before passing it to g_filename_from_uri.
18568 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
18570 * reflection.c: Add support for more than one unmanaged resource.
18572 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
18573 in field->def_value, as done in all other cases.
18575 * reflection.c (mono_reflection_get_custom_attrs): Add support for
18578 * reflection.c (mono_reflection_create_runtime_class): Remove
18579 errorneous assignment to klass->element_class, since it is already
18580 done in mono_reflection_setup_internal_class.
18582 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18584 * gc.c: added missing LeaveCriticalSection.
18585 * icall.c: indented a couple of lines.
18586 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
18587 if we call EndInvoke inside a callback. Fixes bug #52601.
18589 2004-01-07 Martin Baulig <martin@ximian.com>
18591 * mono-debug-debugger.h
18592 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
18594 2004-01-06 Miguel de Icaza <miguel@ximian.com>
18596 * appdomain.c: Use messages in NotImplementedException.
18598 * exception.c (mono_get_exception_not_implemented): Now this takes
18599 a message argument.
18601 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
18602 exception instead of g_asserting an aborting when something is not
18605 Add some inline docs.
18607 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
18609 * reflection.h: Update after changes to object layout.
18611 * reflection.c: Implement saving of unmanaged aka win32 resources.
18613 * appdomain.c: Bump version number.
18615 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
18616 Handle missing domains gracefully.
18618 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
18620 * file-io.c : On Windows, there are much more invalid_path_chars.
18622 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
18624 * class.h, object.c: prepare for GetType () speedup.
18626 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
18628 * profiler.c: workaround for --profile null reference exception on
18629 cygwin. Patch by Patrik Torstensson.
18631 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
18633 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
18634 make work for unaligned access.
18636 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
18638 * class.c: small cleanup (class->fields [i] -> field).
18639 * image.c: check address of metadata is valid.
18641 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
18643 * assembly.h assembly.c (mono_assembly_loaded): New public function to
18644 search the list of loaded assemblies.
18646 * reflection.c (mono_reflection_type_from_name): Use
18647 mono_assembly_loaded instead of mono_image_loaded.
18649 * reflection.c: Fix warnings.
18651 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
18653 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
18654 is dynamic. This is needed since an assembly can contain both dynamic and
18655 non-dynamic images.
18657 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
18660 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
18662 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
18663 to store modules loaded using AddModule.
18665 * reflection.c (mono_image_fill_file_table): Generalize this so it works
18668 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
18670 * reflection.c (mono_image_fill_export_table_from_module): New function to
18671 fill out the EXPORTEDTYPES table from a module.
18673 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
18674 into a separate function. Also handle loaded non-dynamic modules.
18676 * reflection.c (mono_image_basic_init): Fix memory allocation.
18678 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18680 * assembly.c (mono_assembly_load_references): Make this public.
18682 2003-12-19 Martin Baulig <martin@ximian.com>
18684 * class.c (mono_class_initialize_generic): Made this static, take
18685 a `MonoGenericInst *' instead of a `MonoClass *'.
18686 (mono_class_from_generic): Call mono_class_initialize_generic()
18687 unless we're already initialized or being called from
18688 do_mono_metadata_parse_generic_inst().
18690 * class.h (MonoGenericInst): Added `initialized' and
18691 `init_pending' flags.
18693 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
18694 `mono_class_init (gklass)' or mono_class_initialize_generic()
18695 here; set `generic_inst->init_pending' while parsing the
18698 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
18700 * locales.c: include string.h for memxxx prototypes
18702 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
18704 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
18705 constructor when accessing literal fields.
18707 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
18709 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18711 * reflection.c (assembly_add_resource_manifest): New function to fill
18712 the MANIFESTRESOURCE table.
18714 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
18716 * reflection.h: Update to changes in class layout.
18718 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
18719 Reenable call to mono_runtime_is_shutting_down ().
18721 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
18722 determine if the runtime is shutting down.
18724 2003-12-16 Jackson Harper <jackson@ximian.com>
18726 * icall.c: comment out call to mono_runtime_is_shutting_down to
18729 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
18731 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
18732 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
18734 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
18736 * reflection.c: move definition of swap_with_size
18737 to before its first call
18739 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
18741 * appdomain.c (mono_runtime_is_shutting_down): New public function.
18743 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
18746 * object.c: Fix warnings.
18748 * icall.c (ves_icall_Type_Get...): Only consider inherited static
18749 members if FlattenHierarchy is set.
18751 * reflection.c (mono_image_add_decl_security): New function to emit
18752 declarative security.
18754 * reflection.h reflection.c: Add support for declarative security.
18756 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
18758 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
18760 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
18762 * appdomain.c verify.c: Moved corlib version checking into its own
18763 function in appdomain.c since it needs to create vtables etc.
18765 2003-12-13 Patrik Torstensson <p@rxc.se>
18767 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
18768 instead of unwrapped server.
18770 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
18772 * verify.c (check_corlib): Fix field index.
18774 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
18776 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
18779 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
18781 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
18782 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
18783 cope with sizeof(size_t) != sizeof(guint32).
18785 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18787 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
18788 in case of failure.
18790 2003-12-10 Mark Crichton <crichton@gimp.org>
18792 * icall.c: removed the GetNonZeroBytes. We now handle this case
18795 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
18797 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
18799 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
18802 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
18804 * verify.c (check_corlib): Handle the case when the version field is
18805 initialized by a static constructor.
18807 2003-12-08 Patrik Torstensson <p@rxc.se>
18809 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
18811 2003-12-08 Martin Baulig <martin@ximian.com>
18813 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
18814 a MonoReflectionGenericParameter, also take the parameter index
18815 and name as arguments.
18816 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
18817 (ves_icall_MonoGenericParam_initialize): New interncall.
18818 (ves_icall_Type_make_byref_type): New interncall.
18820 * reflection.h (MonoReflectionGenericParam): Derive from
18821 MonoReflectionType, not just from MonoObject. Added `refobj' and
18824 * reflection.c (mono_reflection_define_generic_parameter): Create
18825 and return a new MonoReflectionGenericParam; don't initialize the
18827 (mono_reflection_initialize_generic_parameter): New public method;
18828 initializes the constraints and creates the `param->pklass'.
18830 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
18832 * reflection.h reflection.c: Use the new fields 'num_types',
18833 'num_fields' and 'num_methods' to track the number of types etc.
18835 * verify.c (check_corlib): Check corlib version number.
18837 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
18839 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
18840 function works on all methods.
18842 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
18844 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
18845 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
18846 the custom_type_info flag of the transparent proxy.
18847 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
18848 objects that supports IRemotingTypeInfo.
18849 * object.h: Added custom_type_info field in transparent proxy.
18851 2003-12-06 Martin Baulig <martin@ximian.com>
18853 * class.c (mono_class_create_from_generic): Removed.
18854 (mono_class_from_generic): Check `ginst->klass' before doing
18855 anything else. This is important to fully support "recursive"
18858 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
18859 empty `generic_inst->klass' before doing anything else.
18861 2003-12-06 Dick Porter <dick@ximian.com>
18866 * locales.c: Use C structs to access class fields. Don't do a
18867 conversion between MonoString and UChar because both are
18868 platform-endian UTF-16. Compare now takes startindex and count
18869 parameters. Add a char overload for IndexOf. Speed up the
18870 invariant string IndexOf.
18872 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
18874 * Makefile.am (monosn_LDADD): Fix parallel build.
18876 2003-12-04 Martin Baulig <martin@ximian.com>
18879 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
18880 (ves_icall_Type_make_array_type): New interncall.
18882 2003-12-04 Martin Baulig <martin@ximian.com>
18884 * locales.c: also change it in the !HAVE_ICU case.
18886 2003-12-04 Dick Porter <dick@ximian.com>
18889 * locales.c: construct_compareinfo is now in CompareInfo, not
18892 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
18894 * image.c (mono_image_load_file_for_image): Cache loaded images in the
18895 image->files array.
18897 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
18900 * assembly.c (mono_assembly_load_references): Only load references
18903 * class.c (mono_class_from_name): Avoid linear search of the
18904 EXPORTEDTYPE table.
18906 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
18908 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
18910 * image.h (MonoImage): Add 'field_cache' field.
18912 * loader.c (mono_field_from_token): Cache field lookups.
18914 * reflection.c (mono_module_get_object): Fix name property.
18916 * icall.c (ves_icall_get_enum_info): Update after changes to
18917 mono_metadata_get_constant_index ().
18919 * icall.c: Get rid of get_type_info icall, use a separate icall for
18920 each type property to avoid needless memory allocations. Fixes #51514.
18922 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
18923 to avoid needless binary searches.
18925 * class.c (class_compute_field_layout): Move the initialization of
18926 field->def_value to mono_class_vtable ().
18928 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
18931 * object.c (mono_object_allocate): Make it inline.
18933 * object.c (mono_object_allocate_spec): Make it inline.
18935 2003-12-02 Dick Porter <dick@ximian.com>
18937 * locales.c (create_NumberFormat): NumberFormatInfo construction.
18938 Patch by Mohammad DAMT (mdamt@cdl2000.com).
18940 2003-12-01 Dick Porter <dick@ximian.com>
18942 * threads.c: Fix signature and call in CreateMutex and
18945 2003-12-01 Dick Porter <dick@ximian.com>
18948 * locales.c: Implement string compares and searching
18950 * object.h: Add extra Thread field
18952 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
18954 * reflection.c (fixup_method): Add support for MonoCMethod.
18956 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
18958 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
18960 * reflection.c (assembly_name_to_aname): Allow extra characters in
18961 assembly names. Fixes #51468.
18963 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
18965 * exception.c (mono_exception_from_name_domain): New helper function.
18967 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
18968 exception object in the correct domain.
18970 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
18971 formatting + make a copy a the input data.
18973 * loader.c (mono_get_method_from_token): Methods which contain
18974 native code do not have entries in the ImplMap.
18976 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
18977 Thanks to Gonzalo for spotting this.
18979 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
18980 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
18982 * assembly.h (mono_assembly_load_from): Split the second part of
18983 assembly loading into a new public function.
18985 * exception.h (mono_get_exception_bad_image_format): New function.
18987 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
18989 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
18990 Enumerate all modules inside a dynamic assembly. Fixes #51293.
18992 * icall.c: Add new icall for creating dynamic methods.
18994 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
18996 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
18998 * reflection.c (mono_reflection_create_dynamic_method): New icall to
18999 create a dynamic method.
19001 * reflection.c (resolve_object): New helper function.
19003 * reflection.c: Generalize ReflectionMethodBuilder and the functions
19004 which manipulate it so they can also work on dynamic methods.
19006 * reflection.c (reflection_method_builder_to_mono_method): Avoid
19007 creating the MonoReflectionMethodAux structure if it is not needed.
19009 * reflection.h verify.c: Update after changes to object layout.
19011 * reflection.c (method_builder_encode_signature): Fix compilation on
19014 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
19016 * appdomain.h: Added support for context static fields. Added static_data
19017 field to MonoAppContext and renamed thread_static_fields to a more
19018 generic special_static_fields in MonoAppDomain, since it can now contain
19019 context static fields.
19020 * domain.c: Updated hashtable name.
19021 * object.c: Replaced field_is_thread_static() for a more generic
19022 field_is_special_static() which also checks for context static attribute.
19023 In mono_class_vtable(), added support for static context fields.
19024 * threads.c: Changed methods that manage thread static fields to more
19025 generic methods so they can be reused both for thread and context static
19027 * threads.h: Declared some new methods.
19029 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
19031 * reflection.h: Update after changes to the managed types.
19033 * reflection.c (encode_custom_modifiers): New helper function.
19035 * reflection.c (method_encode_signature): Emit custom modifiers.
19037 * reflection.c (field_encode_signature): Emit custom modifiers.
19039 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
19041 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
19043 * icall.c (ves_icall_System_ValueType_Equals): New optimized
19046 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
19049 * object.c (mono_field_get_value_object): New function.
19051 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
19054 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
19056 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
19057 return a preallocated out-of-memory exception instance.
19059 * object.c (out_of_memory): Use the new function.
19061 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
19062 flag is before the custom modifiers. Fixes #49802.
19064 2003-11-16 Martin Baulig <martin@ximian.com>
19066 * class.c (mono_class_is_open_constructed_type): Implemented the
19067 MONO_TYPE_GENERICINST case.
19069 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
19071 * assembly.c (mono_assembly_fill_assembly_name): New function to
19072 fill out the MonoAssemblyName structure.
19073 (mono_assembly_open): Use the new function.
19075 * icall.c (fill_reflection_assembly_name): New helper function.
19077 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
19080 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
19082 2003-11-15 Martin Baulig <martin@ximian.com>
19084 * class.c (mono_class_is_open_constructed_type): New public
19085 function; checks whether a type is an open constructed type,
19086 ie. whether it still contains type parameters.
19087 (mono_class_inflate_generic_type): If we're a type parameter and
19088 the inflated type is also a MONO_TYPE_(M)VAR, return the original
19091 * class.h (MonoGenericInst): Added `guint32 is_open'.
19093 * loader.c (method_from_methodspec): Check whether we're an open
19094 or closed constructed type and set `ginst->is_open'.
19096 * reflection.c (mono_reflection_bind_generic_parameters): Check
19097 whether we're an open or closed constructed type and set
19099 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
19100 from open constructed types.
19102 2003-11-15 Martin Baulig <martin@ximian.com>
19104 * reflection.c (mono_reflection_bind_generic_parameters): If we're
19105 a generic instance (instead of a generic type declaration) with
19106 unbound generic parameters, bind them to our actual types.
19108 2003-11-14 Martin Baulig <martin@ximian.com>
19110 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
19112 * reflection.c (mono_reflection_bind_generic_parameters): If we're
19113 an interface type, populate `res->interfaces' with instantiated
19114 versions of all the interfaces we inherit.
19116 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
19118 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
19119 when MONO_PATH is set but doesn't contain the install dir.
19121 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19124 (ves_icall_Type_GetInterfaces): don't return an interface twice when
19125 it's also implemented in base classes. Fixes bug #50927.
19127 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
19129 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
19130 if this method is called from a finalizer. Fixes #50913.
19132 2003-11-12 Miguel de Icaza <miguel@ximian.com>
19134 * threads.c: Implement VolatileRead/VolatileWrite
19136 * icall.c: Add new icalls for VolatileRead/VolatileWrite
19138 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
19140 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
19141 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
19144 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
19145 from Peter Ross (pro@missioncriticalit.com).
19147 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
19149 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
19151 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
19153 * assembly.c (mono_assembly_load_references): Disable check because it
19154 triggers on older corlibs which lots of people have.
19156 2003-11-12 Jackson Harper <jackson@ximian.com>
19158 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
19159 load corlib.dll if mscorlib.dll is not found.
19160 * assembly.h: Remove corlib name define.
19163 * image.c: Change corlib name to mscorlib.
19165 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
19167 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
19169 2003-11-11 Miguel de Icaza <miguel@ximian.com>
19171 * appdomain.h: Added loader_optimization here to sync with the C#
19172 code, and add disallow_binding_redirects field.
19174 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
19176 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
19178 * reflection.c (mono_image_build_metadata): Fix crash on modules
19181 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
19183 * icall.c (ves_icall_get_method_info): Return callingConvention as
19186 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
19187 namespaces from the EXPORTEDTYPE table as well.
19189 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
19190 from all modules inside the assembly.
19192 2003-11-11 Martin Baulig <martin@ximian.com>
19194 * reflection.c (mono_reflection_bind_generic_parameters): Make
19195 this work for interfaces.
19197 2003-11-11 Martin Baulig <martin@ximian.com>
19199 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
19201 2003-11-11 Martin Baulig <martin@ximian.com>
19203 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
19204 "MonoInflatedMethod" and "MonoInflatedCtor".
19206 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
19208 * reflection.c (resolution_scope_from_image): Use the assembly table
19209 from the manifest module, since other modules don't have it.
19211 * debug-helpers.c (mono_type_full_name): New helper function.
19213 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
19215 * image.c (mono_image_load_file_for_image): New public function which
19216 is a replacement for the load_file_for_image in class.c.
19218 * assembly.c (mono_assembly_load_module): A wrapper for the function
19219 above which does assembly association and reference loading too.
19221 * class.c (mono_class_from_name): Call mono_assembly_load_module.
19223 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19225 * appdomain.c: not all of the attributes for the full assembly name
19226 are required and the order doesn't matter. Fixes bug #50787.
19228 2003-11-10 Dick Porter <dick@ximian.com>
19230 * locales.c: Use platform-endian UTF16
19232 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
19234 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
19236 2003-11-10 Martin Baulig <martin@ximian.com>
19239 (mono_metadata_load_generic_params): Make this actually work.
19241 * reflection.c (mono_reflection_bind_generic_parameters): If our
19242 parent is a generic instance, pass all the `types' to it, no
19243 matter whether it has the same number of type parameters or not.
19245 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
19247 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
19249 * assembly.c (mono_assembly_load_references): Move the image<->assembly
19250 assignment code to this function so it gets called recursively for all
19253 * image.c (load_modules): Remove the assembly assignment since it is
19254 now done by mono_assembly_load_references.
19256 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
19257 Add 'module' argument.
19258 (mono_module_get_types): New helper function.
19259 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
19261 2003-11-08 Martin Baulig <martin@ximian.com>
19263 * class.c (mono_class_inflate_generic_method): Interface method
19264 don't have a header.
19266 * reflection.c (mono_image_get_methodspec_token): Take an
19267 additional `MonoGenericInst *' argument instead of reading it from
19268 the header; this is necessary to support interfaces.
19269 (mono_image_create_token): Pass the `MonoGenericInst *' from the
19270 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
19271 (inflated_method_get_object): Take an additional `MonoGenericInst *'
19274 * reflection.h (MonoReflectionInflatedMethod): Added
19275 `MonoGenericInst *ginst'.
19277 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
19279 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
19281 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
19283 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
19285 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
19288 (reflection_methodbuilder_from_method_builder):
19289 (reflection_methodbuilder_from_ctor_builder): New helper functions to
19290 initialize a ReflectionMethodBuilder structure.
19291 (mono_image_get_methodbuilder_token):
19292 (mono_image_get_ctorbuilder_token): New functions to emit memberref
19293 tokens which point to types in another module inside the same assembly.
19295 * reflection.c: Use the new helper functions.
19297 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
19299 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
19300 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
19302 * reflection.c (resolution_scope_from_image): Emit a moduleref if
19305 * reflection.c (mono_image_build_metadata): Emit metadata only for the
19306 current module. Emit the manifest only for the main module.
19308 * reflection.c (mono_image_create_token): Add assertion when a
19309 memberref needs to be created.
19311 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
19313 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
19314 larger buffer for the custom attribute blob. Fixes #50637.
19316 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19318 * threadpool.c: notify listener on async processing handles after
19319 invoking the async callback. Thanks to Zoltan.
19321 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
19323 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
19324 avoid code duplication.
19326 * reflection.h (MonoDynamicImage): New type which is currently unused,
19327 but will be used through the ref.emit code in place of
19328 MonoDynamicAssembly.
19330 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
19333 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
19334 a MonoDynamicImage instead of just a MonoImage.
19336 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
19337 icalls to ModuleBuilder but keep their semantics, so they will work
19338 with moduleb->assemblyb. This will change later.
19340 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
19342 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
19345 * reflection.c (mono_image_build_metadata): Avoid creation of a default
19346 main module, since it is now done by the managed code.
19348 2003-11-03 Martin Baulig <martin@ximian.com>
19350 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
19351 `ginst->klass' here.
19352 (method_encode_methodspec): Don't use the `ginst->generic_method's
19353 klass if it's a generic instance, use `ginst->klass' in this case.
19355 2003-11-03 Martin Baulig <martin@ximian.com>
19357 * reflection.c (mono_image_get_generic_method_param_info):
19358 Removed, use mono_image_get_generic_param_info() instead.
19359 (mono_image_get_type_info): Write the GenericParam table before
19360 the Method table. This is neccessary because in the GenericParam
19361 table, type parameters of the class (ie. '!0' etc.) must come
19362 before the ones from its generic methods (ie. '!!0' etc).
19364 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
19366 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
19368 2003-11-02 Martin Baulig <martin@ximian.com>
19370 * reflection.c (create_generic_typespec): Take a
19371 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
19372 the generic parameters from it.
19374 2003-11-02 Martin Baulig <martin@ximian.com>
19376 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
19377 instead of a `MonoClassField *' since we just need the type.
19378 (create_generic_typespec): New static function. Creates a
19379 TypeSpec token for a generic type declaration.
19380 (mono_image_get_generic_field_token): New static function.
19381 (mono_image_create_token): If we're a FieldBuilder in a generic
19382 type declaration, call mono_image_get_generic_field_token() to get
19385 2003-11-02 Martin Baulig <martin@ximian.com>
19388 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
19389 `MonoReflectionGenericInst *declaring_type' and
19390 `MonoReflectionGenericInst *reflected_type' fields.
19392 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
19393 `MonoReflectionGenericInst *declaring_type' and a
19394 `MonoReflectionGenericInst *reflected_type' argument instead of a
19395 single `MonoReflectionGenericInst *type' one. Set
19396 `res->declaring_type' and `res->reflected_type' from them.
19397 (mono_reflection_inflate_field): Likewise.
19399 2003-11-02 Martin Baulig <martin@ximian.com>
19401 * class.c (mono_class_setup_vtable): Don't store generic methods
19404 2003-11-02 Martin Baulig <martin@ximian.com>
19406 * reflection.h (MonoReflectionGenericInst): Added
19407 `MonoReflectionType *declaring_type'.
19409 * reflection.c (mono_reflection_bind_generic_parameters): Use
19410 `if (tb->parent)' instead of `klass->parent'.
19412 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
19414 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
19415 with an empty ASSEMBLY table.
19417 * reflection.c (mono_image_build_metadata): Avoid using the same loop
19418 variable in the inner and outer loops.
19420 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
19422 * metadata.h (mono_metadata_make_token): Put parentheses around macro
19425 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
19427 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
19428 icalls. Instead, do everything in managed code. This is needed since
19429 it is hard to restore the original domain etc. in unmanaged code in the
19430 presence of undeniable exceptions.
19432 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
19433 New icalls to push and pop appdomain refs.
19435 2003-10-31 Martin Baulig <martin@ximian.com>
19437 * class.c (inflate_generic_type): Renamed to
19438 mono_class_inflate_generic_type() and made it public.
19440 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
19443 * loader.c (mono_field_from_memberref): Also set the retklass for
19446 * fielder.c (mono_image_get_inflated_field_token): New static
19447 method; creates a metadata token for an inflated field.
19448 (mono_image_create_token, fixup_method): Added support for
19449 "MonoInflatedField".
19450 (fieldbuilder_to_mono_class_field): New static function.
19451 (mono_reflection_inflate_field): New public function.
19454 (MonoReflectionGenericInst): Added `MonoArray *fields'.
19455 (MonoReflectionInflatedField): New typedef.
19457 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
19459 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
19460 for Solaris and other platforms without s6_addr16
19462 2003-10-30 Martin Baulig <martin@ximian.com>
19464 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
19465 argument instead of two.
19466 (mono_class_inflate_generic_signature): Likewise.
19467 (inflate_generic_header): Likewise.
19468 (mono_class_inflate_generic_method): Likewise. In addition, if
19469 `ginst->klass' is set, it becomes the new `method->klass'.
19471 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
19474 * reflection.c (encode_generic_method_sig): Write a 0xa as the
19475 first byte. [FIXME]
19476 (method_encode_methodspec): If we have generic parameters, create
19477 a MethodSpec instead of a MethodRef.
19478 (fixup_method): Added support for "MonoInflatedMethod" and
19479 "MonoInflatedCtor".
19480 (mono_image_create_token): Added support for "MonoInflatedMethod"
19481 and "MonoInflatedCtor".
19482 (inflated_method_get_object): New static function; returns a
19483 managed "System.Reflection.MonoInflatedMethod" object.
19484 (mono_reflection_bind_generic_method_parameters): Return a
19485 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
19486 (mono_reflection_inflate_method_or_ctor): Likewise.
19487 (mono_image_get_generic_method_param_info): Initialize unused
19489 (mono_image_get_generic_param_info): Likewise.
19491 * reflection.h (MonoReflectionInflatedMethod): New public
19492 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
19493 "S.R.MonoInflatedCtor" classes.
19495 * loader.c (method_from_memberref): If we're a TypeSpec and it
19496 resolves to a generic instance, inflate the method.
19498 2003-10-28 Dick Porter <dick@ximian.com>
19500 * object.c (mono_runtime_run_main): Convert command-line arguments
19501 into utf8, falling back to the user's locale encoding to do so.
19503 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
19505 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
19508 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
19510 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
19511 up icalls at method definition time. Partially fixes #33569.
19513 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
19515 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
19516 marshalling of arrays. Fixes #50116.
19518 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
19520 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
19521 points to a vtable in the dying appdomain.
19523 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
19524 listeners into unmanaged code inside the lock.
19526 * object.c (mono_class_vtable): Turn off typed allocation in non-root
19527 domains and add some comments.
19529 2003-10-25 Martin Baulig <martin@ximian.com>
19531 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
19533 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
19535 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
19536 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
19537 currently parsing. Create the generic class and store it in
19538 `generic_inst->klass' before parsing the type arguments. This is
19539 required to support "recursive" definitions; see mcs/tests/gen-23.cs
19541 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
19542 to support recursive typespec entries.
19544 * class.c (mono_class_setup_parent): If our parent is a generic
19545 instance, we may get called before it has its name set.
19546 (mono_class_from_generic): Splitted into
19547 mono_class_create_from_generic() and mono_class_initialize_generic().
19549 2003-10-25 Martin Baulig <martin@ximian.com>
19551 * icall.c (ves_icall_Type_BindGenericParameters): Return a
19552 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
19553 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
19554 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
19556 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
19557 (create_typespec): Likewise.
19558 (mono_reflection_bind_generic_parameters): Return a
19559 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
19560 (mono_reflection_inflate_method_or_ctor): New public function.
19562 * reflection.h (MonoReflectionGenericInst): New typedef.
19564 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
19566 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
19567 inside the domain lock. Fixes #49993.
19569 * object.c (mono_class_vtable): When typed allocation is used,
19570 allocate vtables in the GC heap instead of in the mempool, since the
19571 vtables contain GC descriptors which are used by the collector even
19572 after the domain owning the mempool is unloaded.
19574 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
19576 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
19577 reflect what it does. Also invalidate mempools instead of freeing
19578 them if a define is set.
19580 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
19583 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
19584 hold the finalizable objects in this domain.
19586 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
19589 * appdomain.c (mono_domain_set): New function to set the current
19590 appdomain, but only if it is not being unloaded.
19592 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
19593 appdomain which is being unloaded.
19595 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
19596 unloading of the root appdomain.
19598 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
19599 icall to execute a method in another appdomain. Intended as a
19600 replacement for InternalSetDomain, which can confuse the code
19601 generation in the JIT.
19603 * appdomain.c (mono_domain_is_unloading): New function to determine
19604 whenever an appdomain is unloading.
19606 * appdomain.c (mono_domain_unload): New function to correctly unload
19609 * assembly.c (mono_assembly_load_references): Check that an assembly
19610 does not references itself.
19612 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
19613 domain manually, it asks the finalizer thread to do it, then waits for
19614 the result. Also added a timeout.
19616 * icall.c: Register the new icalls.
19618 * threads.h threads.c: Export the mono_gc_stop_world and
19619 mono_gc_start_world functions.
19621 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
19622 function to fill out the mempool with 0x2a.
19624 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
19626 * reflection.h (MonoReflectionMethodAux): New structure to store
19627 information which is rarely used, thus is not in the MonoMethod
19630 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
19631 store the aux info.
19633 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
19634 and marshalling info into the aux structure.
19636 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
19637 from the aux structure.
19639 * loader.c (mono_method_get_param_names): Retrieve the param names from
19642 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
19644 * exception.h exception.c: Add AppDomainUnloadedException && fix
19647 2003-10-21 Dick Porter <dick@ximian.com>
19650 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
19651 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
19653 2003-10-21 Martin Baulig <martin@ximian.com>
19655 * reflection.c (mono_reflection_bind_generic_parameters):
19656 `klass->parent' is NULL for interfaces.
19658 2003-10-21 Martin Baulig <martin@ximian.com>
19660 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
19662 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
19664 * exception.c (mono_exception_from_name_msg): New helper function for
19665 creating exceptions and initializing their message field.
19667 * exception.c: Simplify functions using the new helper.
19669 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
19672 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
19673 mono_raise_exception, since otherwise gcc doesn't generate the function
19674 epilog for raise_exception, confusing the stack unwinding in the JIT.
19677 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
19678 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
19681 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19683 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
19686 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
19688 * icall.c: Removed GetUninitializedObject method because
19689 AllocateUninitializedClassInstance does the same.
19691 2003-10-18 Martin Baulig <martin@ximian.com>
19693 * class.c (inflate_generic_signature): Renamed to
19694 mono_class_inflate_generic_signature() and made it public.
19695 (my_mono_class_from_generic_parameter): New static function; if we
19696 don't already have the generic parameter's MonoClass, create a
19697 very simple one which is just used internally in the runtime and
19698 not passed back to managed code.
19700 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
19702 * metadata.h (MonoMethodSignature): Moved the
19703 `MonoGenericParam *gen_params' to the MonoMethodHeader.
19704 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
19706 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
19707 ves_icall_MonoMethod_GetGenericArguments(); this is now an
19708 interncall on the MonoMethod class, not on MethodInfo.
19709 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
19710 calling mono_reflection_bind_generic_method_parameters() directly.
19712 * loader.c (mono_method_get_signature): If this is a MethodSpec;
19713 return the already computed `method->signature'.
19714 (method_from_methodspec): New static function to load a method
19715 from a MethodSpec entry.
19716 (mono_get_method_from_token): Call the new method_from_methodspec()
19717 for MethodSpec tokens.
19718 (mono_get_method_from_token): If we're a generic method, load the
19721 * reflection.c (mono_image_get_memberref_token): Allow
19722 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
19724 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
19725 (mono_image_create_token): First check whether it's a generic
19726 method (so we'd need to create a MethodSpec), then do the other
19728 (mono_reflection_bind_generic_method_parameters): Return a
19729 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
19730 called directly from the interncall.
19732 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
19734 * reflection.c (load_public_key): Move loading of the public key
19737 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
19739 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
19742 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
19743 culture, hash_alg and public_key. Fixes #49555.
19745 2003-10-17 Martin Baulig <martin@ximian.com>
19747 * class.h (MonoGenericInst): Moved this declaration here and added
19748 `MonoMethod *generic_method'.
19751 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
19752 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
19754 * metadata.c (mono_metadata_type_equal): Two types of
19755 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
19756 index; ie. don't compare the address of the `MonoGenericParam'
19758 (mono_metadata_load_generic_params): Removed the `MonoMethod
19761 * metadata.h (MonoGenericInst): Moved declaration to class.h.
19762 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
19764 * reflection.c (method_encode_signature): Encode the number of
19765 generic parameters.
19766 (encode_generic_method_sig): New static function.
19767 (method_encode_methodspec): New static function; creates an entry
19768 in the MethodSpec table for a generic method.
19769 (mono_image_get_methodspec_token): New static function.
19770 (mono_image_create_token): Call mono_image_get_methodspec_token()
19771 for generic methods.
19772 (mono_reflection_bind_generic_method_parameters): New public
19773 function. Instantiates a generic method.
19775 2003-10-16 Martin Baulig <martin@ximian.com>
19777 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
19778 *gen_params' here from MonoMethodHeader.
19780 * metadata.c (mono_metadata_parse_method_signature): If we have
19781 generic parameters, initialize `method->gen_params' and then set
19782 the correct `type->data.generic_param' in all the parameters.
19784 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
19786 * threads.c (mono_threads_get_default_stacksize): New function to
19787 return the default stacksize.
19789 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
19790 termination of the finalizer thread, since the previous method had
19791 race conditions. Fixes #49628.
19793 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
19794 as for the other managed threads.
19796 2003-10-16 Martin Baulig <martin@ximian.com>
19798 * class.c (inflate_generic_signature): Copy `generic_param_count'
19801 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
19804 * metadata.c (mono_metadata_parse_method_signature): Actually set
19805 the `method->generic_param_count' here.
19806 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
19808 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
19810 * object.h: Add a new field to TypedRef to simplify the implementation
19811 of the REFANY opcodes in the JIT.
19813 * icall.c: Make use of the new field.
19815 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
19818 2003-10-15 Martin Baulig <martin@ximian.com>
19820 * class.c (mono_class_from_gen_param): Renamed to
19821 mono_class_from_generic_parameter() and moved most of the
19822 functionality from mono_reflection_define_generic_parameter()
19823 here; ie. we create a "real" class here.
19824 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
19825 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
19826 previously been called.
19828 * class.h (MonoGenericParam): Moved the declaration of this struct
19829 here from metadata.h and added `MonoMethod *method'.
19831 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
19834 * loader.c (mono_get_method_from_token): If we have any generic
19835 parameters, call mono_metadata_load_generic_params() to read them
19836 from the MONO_TABLE_GENERICPAR.
19838 * metadata.c (mono_metadata_load_generic_params): Added
19839 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
19841 * metadata.h (MonoMethodSignature): Replaced
19842 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
19843 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
19845 * reflection.c (mono_reflection_define_generic_parameter): Moved
19846 most of the functionality into the new
19847 mono_class_from_generic_parameter(); set the `method' field if
19848 we're a method parameter.
19850 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
19852 * marshal.c (emit_struct_conv): if native size is 0
19855 2003-10-14 Martin Baulig <martin@ximian.com>
19857 * icall.c: The generics API has changed in the spec since it was
19858 added to System.Type; these modifications make it match the spec
19860 (ves_icall_Type_GetGenericParameters): Renamed to
19861 `ves_icall_Type_GetGenericArguments'.
19862 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
19863 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
19864 `ves_icall_MonoType_get_HasGenericArguments'.
19865 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
19866 `ves_icall_MonoType_get_IsGenericParameter'.
19867 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
19868 this is no interncall anymore.
19869 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
19870 `ves_icall_TypeBuilder_get_IsGenericParameter'.
19872 2003-10-14 Martin Baulig <martin@ximian.com>
19874 * reflection.c (mono_reflection_bind_generic_parameters): Also
19875 inflate generic methods if we're reading the class from IL.
19877 2003-10-13 Martin Baulig <martin@ximian.com>
19879 * reflection.c (mono_reflection_define_generic_parameter): This
19880 method isn't called directly from the icall anymore; take a
19881 `MonoReflectionAssemblyBuilder *' so we can use this for type and
19882 method generic parameters.
19883 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
19884 (method_builder_encode_signature): Encode generic parameters.
19885 (mono_image_get_method_info): Write generic params to the
19886 MONO_TABLE_GENERICPARAM table.
19888 * reflection.h (MonoReflectionMethodBuilder): Added
19889 `MonoArray *generic_params'.
19891 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
19893 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
19894 wrapper for mono_reflection_define_generic_parameter().
19895 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
19897 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
19899 * marshal.h: Add missing function to fix build.
19901 * marshal.c (mono_marshal_get_native_wrapper): Add support for
19902 the SetLastError pinvoke attribute.
19904 * marshal.c (mono_marshal_set_last_error): New helper function called
19905 by the generated code.
19907 * marshal.c (mono_mb_emit_branch): New helper function.
19909 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
19911 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
19912 classes as parameters and return values of delegates. Fixes #29256.
19914 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
19916 * locales.c: use gint32 in non HAVE_ICU case
19918 2003-10-11 Martin Baulig <martin@ximian.com>
19920 * mono-debug.c (mono_debug_add_method): Added a workaround for
19923 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
19925 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
19926 delegates passed to native code must use the STDCALL calling
19927 convention. Fixes #35987.
19929 2003-10-10 Martin Baulig <martin@ximian.com>
19931 * class.c (inflate_generic_type): If we're inflating for a generic
19932 type instance (and not for a generic method), return
19933 MONO_TYPE_MVAR unchanged.
19935 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19937 * string-icalls.c: Join ignores null strings in the source array.
19938 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
19939 * threads.c: GetAvailableTheads is slightly more accurate.
19941 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
19943 * threads.h threads.c : add mono_threads_set_default_stacksize
19944 and pass default to CreateThread calls.
19946 2003-10-09 Dick Porter <dick@ximian.com>
19950 * locales.c: Internal calls for constructing CultureInfo and
19951 related objects from libicu (if its available.)
19953 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
19955 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
19957 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19959 * threadpool.c: added an argument to async_invoke_thread that is the
19960 item to process, pass the MonoAsyncResult to the thread start function
19961 when creating a new thread. This way we don't need to acquire any lock
19962 when we're creating a new thread. Readded a semaphore for faster
19963 response times (instead of that Sleep i added).
19965 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
19967 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
19968 get daylight change dates better on Windows, fix handling
19969 of platforms without tm_gmtoff.
19971 2003-10-06 Martin Baulig <martin@ximian.com>
19973 * class.c (inflate_generic_method): Renamed to
19974 mono_class_inflate_generic_method() and made public.
19975 (mono_class_init): Don't inflate the generic methods here.
19976 (mono_class_from_generic): Added `gboolean inflate_methods'
19977 argument. Inflate the methods here.
19979 * loader.c (mono_method_get_param_names): Ignore instances of
19980 generic types for the moment.
19982 * reflection.c (fixup_method): Added support for inflated methods.
19983 (mono_image_create_token): Use mono_image_get_methodref_token()
19984 for inflated methods.
19985 (mono_custom_attrs_from_param): Ignore instances of generic types
19987 (mono_reflection_bind_generic_parameters): New public function.
19988 Moved all the functionality from
19989 ves_icall_Type_BindGenericParameters() here and added support for
19991 (mono_reflection_define_generic_parameter): Initialize
19992 `klass->methods' here.
19994 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
19995 functionality into mono_reflection_define_generic_parameter().
19996 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
19997 TypeBuilder, return that TypeBuilder.
19999 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20001 * appdomain.c: removed mono_delegate_semaphore.
20004 (mono_thread_pool_add): moved hash table creation inside and the thread
20005 creation outside of the critical region.
20006 (mono_thread_pool_finish): removed obsolete code.
20007 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
20008 continue or exit the thread depending on the queue.
20010 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
20012 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
20013 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
20014 handle more bool marshalling options
20016 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
20018 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
20019 arrays of structs. Also add a more descriptive error message when
20020 a structure member is marshalled as LPArray.
20022 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
20024 * marshal.c (mono_marshal_get_native_wrapper): Add support for
20025 marshalling arrays of complex types. Fixes #29098. Also remove an
20026 usused and incomplete function.
20028 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
20030 * gc.c: report heap_size - free_bytes as total memory allocated
20033 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
20035 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
20036 fix timezone handling problems on Windows.
20038 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
20039 asserts when the year is outside the range handled by ms the functions.
20041 * class.c (setup_interface_offsets): If the class is an interface,
20042 fill out its interface_offsets slot.
20044 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20046 * threadpool.c: mark threadpool threads as background.
20048 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
20050 * decimal.c - define DECINLINE to nothing if not using GCC
20052 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
20054 * assembly.c: More refcount fixes.
20056 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20058 * string-icalls.c: if we're not trimming, return the same string.
20059 When not splitting, don't create a new string.
20061 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20064 (mono_image_open): increment the ref_count inside the critical section.
20066 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
20068 * image.c (mono_image_open): Fix reference counting bug.
20070 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
20072 * marshal.c (mono_marshal_type_size) struct alignment changed for
20073 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
20074 64bits. Avoid leak in mono_marshal_get_native_wrapper when
20075 mono_lookup_pinvoke_call throws.
20077 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
20079 * reflection.c (mono_reflection_parse_type): Fix #49114.
20081 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
20082 temporary workaround for cygwin header problem.
20084 * object.c (mono_object_isinst): Synchronize this with the code
20085 generated by the JIT for casts.
20087 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
20089 * reflection.c (encode_type): Fix #38332.
20091 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
20093 * marshal.c (mono_marshal_method_from_wrapper): New function to return
20094 the original method from the wrapper method.
20096 2003-09-25 Martin Baulig <martin@ximian.com>
20098 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
20099 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
20100 (ves_icall_Type_get_IsGenericInstance): New interncall.
20102 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
20104 * object.c: fix cast warning in big endian code.
20106 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
20108 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
20110 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20112 * assembly.c: don't call check_env from mono_assembly_load. It's
20113 already done once in mono_assemblies_init and may cause headaches when
20114 multiple threads are loading assemblies.
20116 2003-09-19 Martin Baulig <martin@ximian.com>
20118 * reflection.c (mono_reflection_define_generic_parameter): Don't
20119 allocate `klass->methods', set `klass->flags' to
20120 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
20122 2003-09-18 Martin Baulig <martin@ximian.com>
20124 * class.c (mono_class_init): Don't create `class->methods' if it's
20125 already initialized.
20127 * metadata.c (mono_metadata_load_generic_params): Make this
20130 * reflection.c (mono_reflection_define_generic_parameter): Set
20131 parent class and interfaces from the constraints.
20133 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
20134 to keep this struct in sync with the declaration in TypeBuilder.cs.
20136 2003-09-17 Martin Baulig <martin@ximian.com>
20138 * metadata.h (MonoType): Replaced the data's `int type_param'
20139 field with `MonoGenericParam *generic_param'.
20140 (MonoGenericParam): Added `MonoClass *klass'.
20142 * class.c (mono_class_from_gen_param): Removed the
20143 `MonoImage *image' and `int type_num' arguments.
20145 * metadata.c (mono_metadata_parse_generic_param): New static
20146 method; creates a MonoGenericParam which just contains the index.
20147 (do_mono_metadata_parse_type): Call
20148 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
20151 * reflection.c (mono_image_typedef_or_ref): Generic type
20152 parameters may be in the same assembly, but never use a typedef
20154 (mono_reflection_define_generic_parameter): We're now creating a
20155 "real" class for the type parameter; it's now safe to call
20156 mono_class_from_mono_type() on the class'es type, it'll do the
20159 2003-09-16 Martin Baulig <martin@ximian.com>
20161 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
20162 `symfile->range_entry_size' and `symfile->class_entry_size' here;
20163 the `symfile' data structure must be fully initialized before it
20164 gets added to the table.
20166 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
20168 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
20170 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
20171 class init trampolines.
20173 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
20175 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
20176 to the built-in profiler to turn off time and allocation profiling
20179 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
20181 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
20184 * debug-helpers.c (mono_method_full_name): Print the wrapper type
20185 in human readable form.
20187 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
20189 * reflection.c icall.c: Fixed warnings.
20191 * image.c (load_class_names): Use a temporary hash table to hold the
20192 namespaces in order to avoid doing many string comparisons.
20194 * image.h: Fix typo.
20196 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
20197 Pass NULL instead of g_direct_equal to the GHashTable constructor
20198 since the NULL case is short-circuited inside g_hash_table_lookup,
20199 leading to better performance.
20201 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
20202 obtain the first custom attribute for a given index. Depends on the
20203 CustomAttribute table being sorted by the parent field.
20205 * reflection.c (mono_custom_attrs_from_index): Use the new function
20206 for better performance.
20208 2003-09-07 Martin Baulig <martin@ximian.com>
20210 * class.c (mono_class_init): If we're a generic instance, inflate
20211 all our methods instead of loading them from the image.
20212 (mono_class_from_generic): Set `class->methods = gklass->methods'.
20214 2003-09-07 Martin Baulig <martin@ximian.com>
20216 * mono-debug-debugger.c: Added support for constructors.
20218 2003-09-06 Martin Baulig <martin@ximian.com>
20220 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
20223 * reflection.c (mono_reflection_setup_generic_class): Call
20224 ensure_runtime_vtable() to create the vtable.
20226 2003-09-05 Martin Baulig <martin@ximian.com>
20228 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
20231 2003-09-04 Martin Baulig <martin@ximian.com>
20233 * reflection.c (mono_reflection_define_generic_parameter): Generic
20234 parameters start with zero.
20236 2003-09-04 Martin Baulig <martin@ximian.com>
20238 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
20240 * reflection.h (MonoReflectionGenericParam): New typedef.
20241 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
20242 the generic parameters from the managed TypeBuilder.
20244 * reflection.c (mono_reflection_define_generic_parameter): New function.
20245 (mono_reflection_create_runtime_class): Encode generic parameters.
20246 (mono_reflection_setup_generic_class): New function; this is
20247 called after adding adding all generic params to the TypeBuilder.
20248 (encode_type): Added MONO_TYPE_VAR.
20250 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
20252 * class.h class.c (mono_class_needs_cctor_run): Moved this method
20255 * assembly.h assembly.c: Moved the AOT loading code into an assembly
20258 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
20260 * reflection.h reflection.c class.h class.c: Delete duplicate
20261 definition of mono_type_get_name () from reflection.c and export the
20264 * class.c: Class loading fixes from Bernie Solomon
20265 (bernard@ugsolutions.com).
20267 * reflection.c: Endianness fixes from Bernie Solomon
20268 (bernard@ugsolutions.com).
20270 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
20272 * assembly.h assembly.c: Define a file format version for AOT
20275 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
20277 * appdomain.h (MonoJitInfo): New field to determine whenever the
20278 code is domain neutral.
20280 2003-08-31 Miguel de Icaza <miguel@ximian.com>
20282 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
20284 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
20286 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
20287 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
20288 Avoid caching the result since strings must be domain specific. Fixes
20291 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
20293 * marshal.c (mono_marshal_init): Make this callable multiple times
20294 since it is hard to find a correct place to call it.
20296 * object.c (mono_runtime_class_init): Execute static constructors in
20297 the correct appdomain.
20299 * image.c (build_guid_table): Handle the case when multiple images have
20302 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20304 * icall.c: added a couple of icalls for System.Web.
20306 2003-08-28 Martin Baulig <martin@ximian.com>
20308 * icall.c (ves_icall_Type_BindGenericParameters): Use
20309 `klass->generic_inst' instead of `&klass->byval_arg' in the
20310 mono_type_get_object() call. The returned type must be
20311 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
20313 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
20317 * object.c (mono_class_proxy_vtable): Make it thread safe.
20319 * pedump.c: Fix warning.
20321 * object.c appdomain.h: Get rid of metadata_section.
20322 It is no longer needed and it was causing deadlocks with domain->lock.
20324 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
20326 2003-08-26 Martin Baulig <martin@ximian.com>
20328 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
20330 2003-08-26 Martin Baulig <martin@ximian.com>
20332 * pedump.c (main): Call mono_metadata_init(),
20333 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
20334 and mono_loader_init().
20336 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
20338 * loader.h: Add missing include to fix build.
20340 * image.h: mono_image_load_references is no more.
20342 * assembly.c: Reworked assembly loading to make it really thread safe.
20343 After these changes, the assembly returned by mono_assembly_open is
20344 fully initialized, i.e. all its references assemblies are loaded.
20346 * assembly.c (mono_image_load_references): Renamed to
20347 mono_assembly_load_references, and made private, since clients no
20348 longer need to call it.
20350 * class.c: Removed calls to mono_assembly_load_references, since it was
20351 a source of deadlocks.
20353 * loader.h loader.c class.h class.c: Protect data structures using a
20354 new lock, the loader lock.
20356 * class.c (mono_class_setup_vtable): Create temporary hash tables and
20357 GPtrArrays only when needed.
20359 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
20360 into empty structures by mcs. Fixes pinvoke7.cs.
20362 * domain.c (mono_init): Call a new initialization function.
20364 * appdomain.c (mono_runtime_init): Call the new initializer function
20365 of the marshal module.
20367 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
20368 inserted into empty structures by mcs. Fixes pinvoke7.cs.
20370 * marshal.h marshal.c: Added locks around the wrapper caches to make
20371 this module thread safe.
20373 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
20374 this argument. Fixes pinvoke1.exe.
20376 2003-08-25 Lluis Sanchez <lluis@ximian.com>
20378 * object.h: Added call_type field to MonoMethodMessage and the corresponding
20379 enumeration of values. Removed fields to store remote call output values in
20380 MonoAsyncResult. Not needed any more.
20381 * object.c: Initialize call_type and async_result fields in mono_message_init.
20382 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
20383 dispatching the message.
20384 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
20385 async call to finish. To do it use a message with EndInvoke call type.
20387 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
20389 * loader.h loader.c (mono_method_hash_marhal_info): New function which
20390 determines whenever a method has marshalling info.
20392 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20394 * assembly.c: fix the build on windows.
20396 2003-08-22 Lluis Sanchez <lluis@ximian.com>
20398 * object.cs: Fixed bug #47785.
20400 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
20402 * string-icalls.c (StringReplace): If their are no occurances of
20403 the old string found return a reference to the supplied
20404 string. This saves some memory and matches MS behavoir.
20406 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20408 * socket-io.c: fixed compilation for systems that define AF_INET6
20409 and don't define SOL_IP/SOL_IPV6.
20411 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
20413 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
20414 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
20416 * rawbuffer.c rawbuffer.h: Make this module thread safe.
20418 * domain.c: Make this module thread safe.
20420 * domain.c (mono_init): Call new initialization function.
20422 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
20423 reference types too. Fixes #38812.
20425 * image.c (mono_image_init): Fixed warnings.
20427 * class.c (mono_class_from_typeref): Handle assembly load failure
20430 * appdomain.c (add_assemblies_to_domain): Handle the case when
20431 the references of an assembly are not yet loaded.
20433 * metadata.c image.c assembly.c: Moved initialization of global
20434 variables to a separate function called at startup since lazy
20435 initialization of these variables is not thread safe.
20437 * image.c assembly.c: Made this module thread safe by adding locks in
20438 the appropriate places.
20440 * domain.c (mono_init): Call the new initialization functions of the
20443 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
20445 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
20446 make a direct call. It is proxy's work to make the call asynchronous.
20447 mono_delegate_end_invoke(): If the targe is a proxy, just collect
20449 * object.cs: mono_method_call_message_new(): read AsyncResult and
20450 state object from parameters list, if this info is requested.
20451 * object.h: Added fields to store remote call output values in
20452 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
20454 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
20456 * object.h: add needed fields to MonoThread.
20457 * threads.c, threads.h: allow registering a function to cleanup data
20458 allocated per thread by the JIT.
20460 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
20462 * loader.h: portability fix by Bernie Solomon
20463 * <bernard@ugsolutions.com>.
20465 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
20467 * reflection.h reflection.c (mono_param_get_objects): Changed this to
20468 return a MonoArray. This simplifies the code and also ensures that
20469 the cache allways contains an object reference as a value.
20471 * icall.c (ves_icall_get_parameter_info): Simplified using the new
20474 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20476 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
20477 fixes a problem with byte ordering when getting the address family for
20480 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
20482 * .cvsignore: Added monosn.
20484 * reflection.h reflection.c loader.c: Added support for parameter
20485 marshalling to dynamically created types. Fixes #47295.
20487 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
20489 * rand.c: remove useless warnings.
20491 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
20493 * class.c: implemented ldtoken for methods and fieldrefs.
20495 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20497 * threadpool.c: when mono_async_invoke was called, no one took care of
20498 monitoring the queue. So if the method invoked took some time and we
20499 got new async invoke requests after 500 ms (the thread created waited
20500 that long in WaitForSingleObject), the new async invoke was not called
20501 until the previous one finished.
20503 This is fixed now. Thanks to Totte for helping with it.
20505 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20507 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
20509 2003-08-11 Martin Baulig <martin@ximian.com>
20511 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
20513 2003-08-06 Martin Baulig <martin@ximian.com>
20515 * mono-debug-debugger.c: Added support for static fields,
20516 properties and methods.
20518 2003-08-06 Martin Baulig <martin@ximian.com>
20520 * mono-debug-debugger.c: Don't store the MonoString's vtable to
20521 make this work for applications with multiple application domains.
20523 2003-08-04 Martin Baulig <martin@ximian.com>
20525 * mono-debug-debugger.c: Completely reworked the type support; the
20526 most important thing is that we're now just using one single
20527 `MonoType' instance per type.
20529 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
20531 * mono-endian.h, mono-endian.c, icall.c: Added icall
20532 ves_icall_System_Double_AssertEndianity to assert double word endianity
20533 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
20535 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
20537 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
20538 support, icalls and fixes.
20540 2003-07-31 Miguel de Icaza <miguel@ximian.com>
20542 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
20543 classes that are a punctuation character in .NET is not the same a
20546 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
20548 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
20550 2003-07-29 Miguel de Icaza <miguel@ximian.com>
20552 * icall.c: Add new MemCopy internalcall.
20553 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
20554 Simplified code; It is not necessary to handle all the cases here,
20555 as the C# code takes care of it. Only handle the case of the name
20556 resource embedded into the assembly.
20558 Changed signature to return the data pointer and the size of the
20561 2003-07-26 Miguel de Icaza <miguel@ximian.com>
20563 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
20564 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
20566 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
20568 * socket-io.c: ignore EINTR error in select.
20570 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
20572 * class.h, class.c: removed unused subclasses field in MonoClass.
20574 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
20576 * icall.c: improve fix of get_base_definition(). If the parent class
20577 doesn't have the mehod, look at the parent of the parent.
20578 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
20579 to check if a parameter is an in or out parameter
20580 (PARAM_ATTRIBUTE_IN is not set by default).
20581 mono_method_return_message_restore(): Use mono_class_value_size to
20582 get the size of a value type. mono_type_stack_size (parameterType)
20583 does not return the correct value if parameterType is byRef.
20584 mono_load_remote_field(), mono_load_remote_field_new(),
20585 mono_store_remote_field(), mono_store_remote_field_new():
20586 raise exception if the remote call returns an exception.
20588 2003-07-28 Martin Baulig <martin@ximian.com>
20590 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
20591 method. This is a wrapper around mono_runtime_invoke() which
20592 boxes the instance object if neccessary.
20594 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
20596 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
20597 metadata.h, row-indexes.h, verify.c: first cut of generics support.
20599 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
20601 * icall.c: disable mcs bug workaround.
20603 2003-07-21 Miguel de Icaza <miguel@ximian.com>
20605 * object.c (mono_runtime_class_init): Take the metadata_section
20606 mutex before obtaining the domain mutex.
20608 * appdomain.h: Added definition of metadata_section mutex here.
20610 * object.c: define metadata_mutex here.
20612 2003-07-24 Ravi Pratap <ravi@ximian.com>
20614 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
20617 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
20619 * reflection.c: Fix bug #46669
20621 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20626 * object.h: fill in the type name for TypeLoadException.
20628 2003-07-23 Ravi Pratap <ravi@ximian.com>
20630 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
20631 relationship between TypeBuilders while compiling corlib) and bug
20632 45993 (Array types returned from the runtime while compiling
20633 corlib were from the loaded corlib).
20635 2003-07-22 Martin Baulig <martin@ximian.com>
20637 * mono-debug-debugger.c: Reworked the type support a bit more;
20638 distinguish between types and classes.
20640 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
20642 * icall.c: add IsArrayImpl icall.
20644 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
20646 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
20647 initializing real_size only once. Also fix bug #46602.
20649 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
20651 * object.c: Renamed mono_metadata_section to metadata_section.
20653 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
20655 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
20656 empty array if the type is an array. Fixed.
20657 ves_icall_MonoMethod_get_base_definition: if the base method
20658 is abstract, get the MethodInfo from the list of methods of
20660 * reflection.c: ParameterInfo.PositionImpl should be zero-based
20661 and it was 1-based. Fixed in mono_param_get_objects.
20663 2003-07-20 Martin Baulig <martin@ximian.com>
20665 * mono-debug.h: Set version number to 31.
20666 (mono_debug_init): Added `MonoDomain *' argument.
20668 * mono-debug-debugger.c: Reworked the type support; explicitly
20669 tell the debugger about builtin types; pass the `klass' address to
20672 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
20674 * image.c: Allow new metadata tables to be loaded without a
20675 warning. Also update the warning message to give the new constant value.
20677 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
20679 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
20680 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
20681 array type representation changes.
20683 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
20685 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
20686 on Environment.Exit () call.
20688 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
20690 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
20691 requires a matching corlib.
20693 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
20695 * Changelog: My editor decided to add a CR to each line. Sorry about that.
20696 Committed again without the CRs.
20698 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
20700 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
20701 getting it from the "this" socket instance. Did not work
20702 if the socket is a subclass of Socket.
20703 Also fixed bug #35371.
20705 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
20707 * metadata.c: fixed size for TypedByRef.
20708 * loader.c: when searching for a method, consider the vararg amrker.
20709 * unicode.c, decimal.c: constify some arrays.
20711 2003-07-15 Dick Porter <dick@ximian.com>
20713 * socket-io.c: Fixed compilation for gcc < 3.2.
20715 Fixed compilation for machines that don't have AF_INET6 (thanks to
20716 Bernie Solomon <bernard@ugsolutions.com> for that part.)
20718 Fixed compile warnings.
20720 Fixed formatting and line endings.
20722 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
20725 * socket-io.c: Added IPv6 support.
20727 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
20729 * class.c (mono_class_is_assignable_from): New function to implement
20730 the is_assignable_from logic. Used by mono_object_isinst,
20731 Type::IsAssignableFrom () and the interpreter.
20733 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
20734 Object, even interfaces.
20736 * object.c (mono_object_isinst): Implement in terms of
20737 is_assignable_from.
20739 * icall.c (ves_icall_type_is_assignable_from): New icall.
20741 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
20743 * domain.c (foreach_domain): fix compiler warning.
20745 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
20747 * image.c (load_metadata_ptrs): use g_strndup because strndup is
20748 not available on all plattforms
20750 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
20752 * image.h image.c: Store the metadata version string in MonoImage.
20753 * icall.c: New icall to retrieve the image version.
20754 * reflection.c (create_dynamic_image): Fill in the image version field
20755 * reflection.c (build_compressed_metadata): Use the image version
20756 from the image structure.
20758 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20760 * appdomain.c: modified comment.
20761 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
20762 That will be its last iteration when mono_gc_cleanup is called from
20763 mono_runtime_cleanup and before the domain is unloaded.
20767 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
20769 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
20772 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
20774 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
20775 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
20776 Bernie Solomon <bernard@ugsolutions.com>.
20778 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
20780 * object.c, object.h: provide mono_object_new_fast() for faster
20781 allocation in some special cases.
20783 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
20785 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
20786 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
20788 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
20790 * threadpool.c: fix leaks.
20792 2003-07-01 Dick Porter <dick@ximian.com>
20794 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
20795 using MonoGHashTables. Fixes threadpool bug posted to list.
20797 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
20799 * image.h, image.c: added support to load an assembly from a byte array.
20800 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
20801 assembly bundle support.
20803 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
20805 * threadpool.c (mono_thread_pool_add): keep a reference to the
20806 AsyncResult to prevent GC
20808 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
20810 * class.c: leak fix.
20812 2003-06-25 Dick Porter <dick@ximian.com>
20814 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
20815 for the async object, the WaitHandle object will close the handle.
20818 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
20820 * class.c: in mono_array_class_get (), lookup from the hash with the
20821 same type we insert: this works around a bug in
20822 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
20823 lluis. The real fix will have to wait for after the release.
20825 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
20827 * icall.c: fix memory leak when getting type members.
20829 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
20831 * reflection.c: added more pubtoken special cases.
20833 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
20835 * class.c: handle field offset correctly when class size
20836 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
20838 2003-06-20 Martin Baulig <martin@ximian.com>
20840 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
20843 2003-06-20 Martin Baulig <martin@ximian.com>
20845 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
20847 2003-06-20 Martin Baulig <martin@ximian.com>
20849 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
20850 just distinguish between variables in registers and variables at
20851 an offset relative to a register.
20853 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20855 * icall.c: #ifdef out latest changes until mcs is fixed.
20857 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
20859 * icall.c: return members in metadata order.
20861 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
20863 * icall.c: avoid infinite loop in GetTimeZoneData.
20865 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
20867 * icall.c: added Marshal.Prelink/All icalls.
20869 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
20871 * object.c, object.h: fix warnings and do some overflow checking
20872 when creating arrays.
20874 2003-06-17 Dick Porter <dick@ximian.com>
20877 * file-io.c: File attributes need to be tweaked slightly when
20878 passed from the managed to the w32 world.
20880 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
20881 * profiler.h profiler-private.h profiler.c: Rework last patch
20882 based on suggestion by Paolo.
20884 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
20886 * profiler.h profiler-private.h profiler.c: Added infrastructure for
20887 instruction level coverage data collection.
20888 * profiler.h profiler.c (: Added new callback function which can be
20889 used by the profiler to limit which functions should have coverage
20891 * profiler.c (mono_profiler_load): Call g_module_build_path to
20892 generate the file name of the profiler library.
20894 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
20896 * profiler.c, profiler.h, profiler-private.h: added basic block
20897 coverage profiling API.
20899 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
20901 * reflection.c (mono_reflection_create_runtime_class): Add support
20902 for events in dynamically generated code.
20904 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
20907 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
20909 * icall.c: when getting timezone info, return reasonable values if we
20910 can't get the actual data.
20912 2003-06-14 Dick Porter <dick@ximian.com>
20914 * threads.c (start_wrapper): Remove the reference to the thread
20915 object in the TLS data, so the thread object can be finalized.
20916 This won't be reached if the thread threw an uncaught exception,
20917 so those thread handles will stay referenced :-( (This is due to
20918 missing support for scanning thread-specific data in the Boehm GC
20919 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
20921 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
20923 * reflection.c: ensure streams and tables are first allocated with
20924 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
20926 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
20928 * icall.c: fixed GetElementType for byrefs (bug# 44792).
20930 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
20932 * reflection.c (mono_reflection_create_runtime_class): Add support for
20933 properties to dynamically created classes.
20934 * reflection.c: Fix a few places where non-MonoObjects were inserted
20935 into the tokens hashtable.
20937 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
20939 * object.c: some support to handle out of memory exceptions.
20941 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
20943 * marshal.c (mono_marshal_get_native_wrapper): support reference
20946 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
20948 * object.h, object.c: more portability stuff from Bernie Solomon.
20949 Unexport mono_object_allocate(). Added mono_object_unbox ().
20950 Set exitcode when an unhandled exception is thrown.
20952 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
20954 * marshal.c (mono_marshal_get_native_wrapper): use custom
20955 marshaler for return types.
20957 2003-06-10 Dick Porter <dick@ximian.com>
20959 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
20960 ip_mreq is available
20962 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
20964 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
20965 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
20966 by Bernie Solomon <bernard@ugsolutions.com>.
20968 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
20970 * gc.c (mono_gc_init): Avoid error message on shutdown when
20971 GC_DONT_GC=1 is used.
20973 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
20974 New icall to return the GUID of a module.
20976 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
20978 * class.c: ensure instance size always includes the parent's size
20979 even whem class size is set explicitly (fixes bug#44294).
20981 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
20983 * profiler.h, profiler.c: made the simple profiler thread-safe,
20984 get more accurate timing info. Allow the loading of an
20985 externally-developed profiler module.
20987 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
20989 * marshal.c (mono_marshal_get_native_wrapper): improved
20990 class/byref arguments.
20991 (mono_marshal_get_native_wrapper): better string marshaling support.
20993 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
20995 * class.c: ensure .pack and .size are handled correctly and
20996 simplified layout of static fields.
20998 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
21001 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
21003 * loader.c (mono_lookup_pinvoke_call): look for modules in the
21004 current directory (fix bug 44008)
21006 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
21008 * marshal.c (mono_marshal_get_native_wrapper): started support for
21010 (mono_delegate_to_ftnptr): consider marshalling specifications
21012 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
21014 * reflection.c, reflection.h: emit custom marshal info.
21016 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21018 * object.c: free the GError.
21019 * icall.c: added CloseEvent_internal.
21021 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
21024 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
21026 * loader.c (mono_method_get_signature): Add support for dynamic
21029 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
21031 * reflection.c: fixed bug #43905.
21033 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21035 * class.c, domain.c, icall.c, metadata.h, object.h: support for
21036 handling TypedReference and ArgIterator.
21037 * loader.c, loader.h: added function to get signature at call site.
21039 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
21041 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
21042 data readonly. Buglets and warning fixes. Some MethodSpec support.
21044 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
21046 * class.h, class.c, object.c: remove relative numbering support.
21048 2003-05-26 Miguel de Icaza <miguel@ximian.com>
21050 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
21051 free the string, until we get a chance to fix Gtk#
21053 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21055 * marshal.c: revert last patch.
21057 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
21059 * icall.c: updates for new mono_class_vtable() not calling
21060 the type constructor anymore.
21062 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
21064 * object.h, object.c: separate vtable creation from type
21065 initialization. Make running the .cctor thread safe.
21067 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
21069 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
21071 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
21073 * loader.c (mono_get_method): consider calling convention
21075 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
21077 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
21078 to return the invisible global type for a module.
21080 * reflection.c (mono_image_build_metadata): Emit global fields too.
21082 2003-05-20 Peter Williams <peterw@ximian.com>
21084 * loader.c (mono_lookup_internal_call): Add a few newlines.
21086 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
21088 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
21091 * appdomain.c (set_domain_search_path): Recalculate search path when
21092 AppDomainSetup.PrivateBinPath changes.
21094 * object.c (mono_class_compute_gc_descriptor): It turns out some
21095 parts of the class libs (like System.Thread) holds pointers to
21096 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
21097 to treat native int a pointer type here.
21099 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
21101 * appdomain.h, domain.c: add hashtable for jump target resolution.
21103 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
21105 * reflection.h reflection.c icall.c: Added new icalls
21106 GetManifestResourceInfoInternal, GetModulesInternal and support
21109 2003-05-16 Dick Porter <dick@ximian.com>
21113 * file-io.c: Implement System.IO.MonoIO::GetTempPath
21115 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
21117 * object.c: mono_store_remote_field: little fix to previous patch.
21119 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
21121 * class.c: add constructors to array classes.
21122 * icall.c: special case array construction for InternalInvoke (),
21124 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
21126 * class.h class.c reflection.c object.c: Added support for field
21127 defaults in dynamically generated classes.
21129 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
21131 * reflection.c: properly encode charset for ddlimport.
21133 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
21135 * threads.c: allow compiling without GC.
21137 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
21139 * appdomain.h, object.c, object.h, threads.c, threads.h: added
21140 handling of thread static data.
21142 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21144 * reflection.h, reflection.c: added mono_custom_attrs_free ().
21146 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
21148 * class.c (mono_array_class_get): always set the serializable flags
21149 (mono_array_class_get): always set the SEALED attribute for array types
21151 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
21153 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
21154 attributes (fix for bug 42021).
21156 2003-05-12 Dick Porter <dick@ximian.com>
21158 * gc.c: Don't run finalizers when the finalizer thread is
21159 finishing up, because the default domain has already been
21162 2003-05-11 Miguel de Icaza <miguel@ximian.com>
21164 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
21165 value is null, we should throw an exception. This is slightly
21166 different than the other conventions used for the constructor.
21168 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21170 * socket-io.c: fixed windows build.
21172 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21174 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
21176 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
21178 * object.c (mono_string_new_wrapper): Compatibility fix for MS
21181 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
21183 * class.c (mono_class_layout_fields): Add experimental GC aware
21184 auto layout facility. Requires class library changes to work correctly.
21186 (mono_class_setup_vtable): Avoid overriding explicit interface
21187 method implementations. Fixes iface3.exe test.
21189 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
21191 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
21192 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
21194 * metadata.h: Add new type classification macro which determines
21195 whenever the type holds an object reference.
21197 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
21199 * marshal.c (mono_marshal_get_native_wrapper): cleanups
21201 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
21203 * gc.c (finalizer_thread): Work around a GC bug.
21205 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
21207 * marshal.c (emit_struct_conv): allow unions
21209 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
21211 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
21213 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
21215 2003-05-06 Martin Baulig <martin@ximian.com>
21217 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
21219 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21222 (Select_internal): allow NULLs, don't create arrays if not needed.
21223 Coupled with Socket.cs changes.
21226 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
21227 register a finalizer for it that will close the semaphore handle. This
21228 fixes the leak and make Lupus' test run with > 4080 loops.
21230 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
21232 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
21233 Jerome Laban (bug #42287)
21235 2003-05-02 Martin Baulig <martin@ximian.com>
21237 * debug-mono-symfile.h
21238 (MonoSymbolFile): Moved declaration into mono-debug.h.
21239 (MonoDebugMethodJitInfo): Likewise.
21240 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
21242 (_mono_debug_address_from_il_offset): Take a
21243 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
21246 (MonoDebugDomainData): New struct.
21247 (mono_debug_get_domain_data): New function.
21248 (mono_debug_add_method): Take an additional `MonoDomain *'
21250 (mono_debug_source_location_from_address): Likewise.
21251 (mono_debug_il_offset_from_address): Likewise.
21252 (mono_debug_address_from_il_offset): Likewise.
21254 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
21256 * reflection.c: one more check for null type in custom attrs.
21258 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21260 * reflection.c: avoid warning (comparison is always false due to limited
21261 range of data type).
21263 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21265 * icall.c: throw an exception in Type.GetField if the argument 'name'
21268 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
21270 * reflection.c: fixed handling of enums in named arguments to custom
21271 attributes (bug #42123).
21273 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21275 * reflection.c: use the right array element type and handle
21276 a null for a Type argument, too.
21278 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
21280 * reflection.c: handle arrays as arguments to custom attributes.
21282 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
21284 * reflection.c: handle a string value in a custom attr
21285 ctor that takes an object.
21287 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
21289 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
21292 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
21294 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
21296 2003-04-27 Martin Baulig <martin@ximian.com>
21298 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
21299 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
21300 MONO_DEBUGGER_EVENT_BREAKPOINT.
21301 (mono_breakpoint_trampoline_code): Removed.
21302 (mono_debugger_event_handler): The last argument is now a
21304 (mono_debugger_insert_breakpoint_full): Removed the
21305 `use_trampoline' argument.
21306 (mono_debugger_method_has_breakpoint): Likewise.
21307 (mono_debugger_trampoline_breakpoint_callback): Renamed to
21308 mono_debugger_breakpoint_callback(); take the method and
21309 breakpoint number as arguments.
21311 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21313 * metadata.c: fix off by one when loading parameters attributes.
21315 2003-04-24 Martin Baulig <martin@ximian.com>
21317 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
21319 2003-04-24 Martin Baulig <martin@ximian.com>
21321 * mono-debug-debugger.c: Moved all code which interacts with the
21322 Mono Debugger here.
21324 * debug-mono-symfile.c: This code now just deals with the symbol
21325 file itself, the debugger code is now in mono-debug-debugger.c.
21327 2003-04-23 Martin Baulig <martin@ximian.com>
21329 * mono-debug.c (mono_debug_source_location_from_il_offset):
21330 New method; like mono_debug_source_location_from_address(), but
21331 takes an IL offset instead of a machine address.
21333 2003-04-23 Martin Baulig <martin@ximian.com>
21335 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
21336 `line' field; this is now computed by the debugger.
21338 2003-04-23 Martin Baulig <martin@ximian.com>
21340 * mono-debug.[ch]: New files. This is the new debugging interface.
21342 * mono-debug-debugger.[ch]: New files. Moved all code which
21343 interacts with the Mono Debugger here.
21345 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
21347 * domain.c (mono_init): initialize mono_defaults.monitor_class
21349 2003-04-21 Miguel de Icaza <miguel@ximian.com>
21351 * reflection.c (method_encode_code): Add a spicy exception to help
21352 future compiler authors.
21354 2003-04-21 Martin Baulig <martin@ximian.com>
21357 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
21358 Make this work with relative pathnames; g_filename_to_uri() needs
21359 an absolute filename.
21361 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
21363 * icall.c: Track name changes in Object and ValueType.
21365 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
21367 * metadata.c (mono_type_stack_size): size should be a multiple of
21370 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21373 (internal_domain_finalize): moved into mono_domain_finalize. No need
21374 to create another thread because the finalizers will be run in the
21377 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
21378 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
21379 to be run (MS does this too).
21381 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
21383 * object.c (mono_class_compute_gc_descriptor): Update comment.
21385 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
21387 * image.h: Add synchronized wrapper cache.
21389 * image.c (do_mono_image_open): Initialize cache.
21391 * reflection.c (create_dynamic_mono_image): Initialize cache.
21393 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21395 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
21396 ves_icall_System_Buffer_ByteLengthInternal.
21398 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
21400 * reflection.c: setup klass->nested_in earlier. Allow
21401 a dash in the assembly name.
21403 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
21405 * metadata.c (mono_type_to_unmanaged): dont access
21406 type->data.klass for MONO_TYPE_OBJECT
21407 (mono_type_to_unmanaged): consider System.Delegate class
21409 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
21411 * class.c: just setup supertypes in the proper place instead of
21412 initializing the full element class for arrays.
21414 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
21416 * class.c: ensure the element class of arrays is initialized.
21417 Setup the supertype info for array classes, too.
21419 2003-04-14 Miguel de Icaza <miguel@ximian.com>
21421 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
21423 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21425 * Makefile.am: re-added -m option when running cygpath. This way,
21426 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
21428 * mono-config.c: same codepath for locating mono config file for WIN32
21430 * assembly.c: if mono_assembly_setrootdir is called, don't override
21433 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21435 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
21436 MONO_ASSEMBLIES variable.
21438 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
21440 * icall.c: added Assembly::GetNamespaces() icall.
21442 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21444 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
21446 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
21448 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
21449 * object.c: fixed bug in the construction of vtable for proxies
21451 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
21453 * object.c (mono_array_new): Mark mono_array_new as an icall.
21455 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21457 * class.c: fixed test for public method when overriding interfaces.
21460 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21462 * appdomain.h, domain.c: added mono_domain_foreach() to
21463 be able to access the currently loaded appdomains.
21464 * object.c: make string interning work across sppdomains.
21465 Mark some functions for use as icalls.
21467 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
21469 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
21471 * reflection.h reflection.c: Allocate long living data using
21472 GC_MALLOC_ATOMIC so the collector does not need to scan it.
21474 * reflection.c: Double the allocation size in streams instead of
21475 increasing it, to prevent unneccesary copying on large assemblies.
21477 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
21478 creation if the assembly does not have the Run flag set.
21480 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21482 * class.h: avoid the C++ keywords in header files (Jerome Laban
21483 spotted and fixed this).
21485 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21488 (mono_unhandled_exception): fill in the arguments for the
21489 UnhandledException event. Only trigger that event for the default
21490 domain (as MS does).
21492 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
21494 * object.c: Improve typed allocation stuff based on suggestions from
21495 Paolo. Also turn it on if the GC library supports it.
21497 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
21499 * object.c object.h class.h: Added experimental typed allocation
21500 facility using the interfaces in gc_gcj.h.
21502 * os/gc_wrapper.h: Added new include files.
21504 2003-04-03 Martin Baulig <martin@ximian.com>
21506 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
21507 which is not yet enabled by default.
21509 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
21511 (mono_gc_lock, mono_gc_unlock): New static functions.
21513 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
21514 functions; stop/start the world for the garbage collector. This
21515 is using the windows API; we need to complete the SuspendThread()/
21516 ResumeThread() implementation in the io-layer to make this work on Unix.
21517 (mono_gc_push_all_stacks): New public function; tells the garbage
21518 collector about the stack pointers from all managed threads.
21520 2003-04-03 Martin Baulig <martin@ximian.com>
21522 * object.h (MonoThread): Added `gpointer stack_ptr'.
21524 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
21526 2003-04-03 Martin Baulig <martin@ximian.com>
21528 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
21530 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
21532 * reflection.c (typebuilder_setup_fields): Initialize field.first and
21535 2003-04-02 Miguel de Icaza <miguel@ximian.com>
21537 * loader.c (mono_lookup_internal_call): Report the corlib that is
21540 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
21542 * icall.c (ves_icall_type_GetTypeCode): fixed check for
21543 System.DBNull (it's class not valuetype).
21545 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
21547 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
21548 if the array method was already assigned a token (fixes bug#40646).
21550 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
21552 * reflection.c (mono_reflection_get_type): Attempt type resolve even
21553 if no assembly is given.
21555 2003-04-01 Miguel de Icaza <miguel@ximian.com>
21557 * metadata.h: Added the new tables.
21559 * row-indexes.h: Added definitions for new tables.
21561 * metadata.c: Add schemas for new tables, and add support for
21562 computing the sizes of them.
21564 * class.c: Update for handling the new type cases.
21566 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
21568 * metadata.h (MONO_TYPE_IS_VOID): new macro
21570 2003-03-31 Martin Baulig <martin@ximian.com>
21572 * threads.h (MonoThreadCallbacks): Added `thread_created'.
21574 * threads.c (mono_thread_new_init): Call `thread_created' in the
21575 mono_thread_callbacks.
21577 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
21579 * loader.h: added marshalbyrefobject_class to mono_defaults
21580 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
21581 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
21582 generation of output parameters.
21583 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
21584 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
21585 contextbound and the target object belongs to the context of the caller.
21586 * object.h: added context and unwrapped_server variables in MonoRealProxy.
21587 * object.c: Implemented support for interfaces and abstract classes
21588 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
21589 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
21591 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
21593 * class.h class.c (mono_class_is_subclass_of): New function.
21595 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
21596 routines for most common case (calls from ArrayList::ToArray).
21598 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
21599 routine so programs which call Environment::Exit() can be profiled.
21601 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
21602 Added MONO_ARCH_SAVE_REGS.
21604 * icall.c (ves_icall_type_is_subtype_of): Use new function.
21606 2003-03-29 Miguel de Icaza <miguel@ximian.com>
21608 * blob.h: Add a couple of new MonoType types definitions.
21610 * tabledefs.h: Add a couple of new call convs.
21612 2003-03-27 Zoltan Varga <vargaz@freemail.h>
21614 * reflection.h (MonoReflectionDynamicAssembly): track changes in
21615 the layout of the class.
21617 * reflection.c (alloc_table): double the size on overflow to avoid
21618 unnecessary copying.
21620 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
21621 avoid filling out metadata tables and blobs. Also set mb->ilgen to
21622 null so it can be garbage collected.
21624 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
21626 * reflection.c (mono_reflection_get_type): Return the resolved type
21627 only if it is in the assembly we searched.
21629 * reflection.c (ensure_runtime_vtable): Initialize method slots.
21631 * class.c (mono_class_setup_vtable): Set the slot of the overriding
21634 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21637 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
21638 the right one is 'file:///blah', but MS allows it.
21640 (mono_assembly_open): allow 'file://blah'
21642 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
21644 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
21646 * socket-io.c: fixes bug #40310.
21648 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
21650 * reflection.c (mono_reflection_parse_type): handle deeply nested
21653 * reflection.c (mono_image_create_token): Use unique token values
21654 since they will be put into a hash table.
21656 * class.c (mono_class_setup_vtable): If a method occurs in more than
21657 one place in the vtable, and it gets overriden, then change the
21658 other occurances too.
21660 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
21661 object as return type.
21663 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
21665 * icall.c: Deleted "ToString" implementation for double and float
21666 because they are full implemented in managed code.
21668 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
21670 * reflection.c, reflection.h: implemented and exported functions
21671 to retrieve info about custom attributes.
21673 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21675 * appdomain.c: moved Uri handling to assembly.c
21676 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
21677 work when using a file Uri in *nix and windows.
21679 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
21680 GetReferencedAssemblies.
21682 2003-03-18 Dick Porter <dick@ximian.com>
21684 * icall.c: Rename a couple of internal calls
21686 * threads.c: Set the thread state to Stopped when a thread exits.
21689 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
21691 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
21694 * object.c (mono_class_vtable): fix warning.
21696 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
21698 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
21700 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
21702 (method_encode_clauses): Create exception info structures in the right
21704 (mono_reflection_setup_internal_class): Initialize supertypes field.
21706 * class.c object.c: Handle interfaces which implement other interfaces
21709 * class.h class.c: Move the supertypes array initialization code into
21710 a separate function so it can be used for dynamic types too. Also call
21711 it earlier, in mono_class_init(), since it can be used before the
21712 type is initialized.
21714 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21718 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
21723 * object.c: remove warnings.
21725 2003-03-13 Martin Baulig <martin@ximian.com>
21727 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
21728 (MonoDebugLexicalBlockEntry): New types.
21730 * debug-mono-symfile.c
21731 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
21733 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21735 * process.c: ret can be any non-zero value accroding to MS doc.
21737 2003-03-07 Miguel de Icaza <miguel@ximian.com>
21739 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
21740 fixing a warning for a miss-used prototype, would have cause
21741 random memory corruption.
21743 2003-03-07 Martin Baulig <martin@ximian.com>
21745 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
21746 getting really annoying ....
21748 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
21750 * reflection.c (fixup_method): added support for array methods.
21752 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
21754 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
21755 (pointed out by Michael Adams).
21757 2003-03-04 Dick Porter <dick@ximian.com>
21759 * icall.c: Temporarily reverted the Double and Single ToString()
21760 change, because it broke nunit.
21762 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
21764 * object.h, threads.h: make include files compatible with C++
21765 (patch by Jerome Laban <jlaban@wanadoo.fr>).
21767 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
21769 * icall.c: Erased ToString helper functions for Double and Single.
21770 Now, that implementations ar all in managed code (Double and Single
21773 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
21775 * appdomain.c: Added method for initializing the default context of
21776 a domain. Added internal call for getting the default context.
21777 * appdomain.h: Added context variable in MonoDomain struct.
21778 * domain.c: mono_domain_set also sets the default context of the domain
21779 * icall.c: Mapped internal method InternalGetDefaultContext.
21780 * object.c: mono_object_get_virtual_method returns always a remoting
21781 wrapper if the object is a transparent proxy.
21782 mono_runtime_invoke_array: when creating an object by calling the
21783 constructor, if the created object is a proxy, then the constructor should
21784 be called using the a remoting wrapper.
21786 2003-03-03 Dick Porter <dick@ximian.com>
21788 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
21789 variable so it compiles on solaris. Problem spotted by
21790 Christopher Taylor <ct@cs.clemson.edu>
21792 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21795 (get_info_from_assembly_name): don't leak value.
21798 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
21801 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
21803 * assembly.c: export mono_image_load_references ().
21804 * class.c: handle function pointers. mono_class_from_name() now
21805 supports nested type names directly.
21807 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
21809 * reflection.h reflection.c: Encode already created dynamic methods
21810 and fields correctly as a DEF instead of a REF.
21812 * reflection.c: Get rid of the force_ref argument to
21813 mono_image_typedef_or_ref since it was wrong in the first place.
21815 * string-icalls.c: add error checking to string constructors according
21818 * reflection.c: Emit types in the order their TypeBuilders were
21819 created. Previously, a new table index was assigned to each type before
21820 the tables were emitted. This was wrong because the signature blob
21821 might already refer to a type by its original table index.
21823 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
21825 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
21828 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21830 * Makefile.am: make assemblies dir have \ instead of / on windows.
21832 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
21834 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
21835 iterate over the NESTEDCLASS table using a linear search since the
21836 table is not guaranteed to be sorted by the secondary key.
21838 * class.c (mono_class_create_from_typedef): fixed up call to
21839 mono_metadata_nesting_typedef.
21841 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
21843 * marshal.c (mono_string_to_byvalstr): clear the memory as
21844 suggested by Jerome Laban <jlaban@wanadoo.fr>
21846 2003-02-26 Dick Porter <dick@ximian.com>
21848 * process.c: Cope with padding in .rsrc blocks
21850 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
21852 * metadata.h: reverted the filter_len change, it breaks reflection
21854 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
21856 * metadata.h: added a new field to store the filter_len
21859 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
21861 * reflection.c: handle custom attributes for types and members
21862 created with Reflection.Emit (bug#38422).
21864 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
21866 * reflection.c: define RTSpecialName automatically for constructors for
21867 compatibility with MS.NET.
21869 * reflection.c (mono_reflection_create_runtime_class): initialize
21870 nested_in field of dynamically created classes.
21872 2003-02-22 Martin Baulig <martin@ximian.com>
21874 * debug-mono-symfile.h: Incremented version number.
21876 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
21878 * object.h icall.c process.c: fix warnings.
21880 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
21882 * appdomain.h appdomain.c:
21883 (mono_domain_try_type_resolve): split the
21884 name_or_tb argument into a name and a tb argument.
21885 (mono_domain_has_type_resolve): new function to check whenever the
21886 application has registered a TypeResolve event handler.
21888 * icall.c reflection.h reflection.c: move the type resolve logic into
21889 mono_reflection_get_type () so it will be invoked when
21890 Assembly::GetType () is called.
21893 (mono_reflection_get_type): renamed to get_type_internal.
21894 (mono_reflection_get_type): fixed type name generation so it works
21895 for nested types too.
21896 (mono_reflection_get_type): call has_type_resolve () to avoid the
21897 costly type name generation if there is no resolve event handler.
21899 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
21901 * class.c, image.c: load exported types from file references.
21903 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
21905 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
21906 used to cache the managed methods used to create proxies and make
21907 remote invocation of methods.
21908 * class.h: Added in MonoVTable a flag to indicate that a class needs
21909 to be remotely created.
21910 * object.c: Modified the method mono_class_vtable(). It now initializes
21911 the remote flag of the vtable. Modified mono_object_new_specific(),
21912 so now it checks the remote flag.
21913 * icall.c: Added a couple of internal methods, one for enabling instance
21914 creation interception for a type, and one for creating objects bypassing
21917 2003-02-18 Martin Baulig <martin@ximian.com>
21919 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
21920 New interncall to get a method's metadata token.
21922 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
21923 New interncall for the debugger.
21925 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
21927 * class.c (mono_class_setup_vtable): allocate supertype array
21929 2003-02-18 Martin Baulig <martin@ximian.com>
21931 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
21933 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21936 (assembly_name_to_aname): jump over unknown properties (i've found
21937 something like: 'type, assembly, version=xxx, custom=null, public...',
21938 so now will ignore custom=null and still get the rest of the values).
21940 2003-02-17 Dick Porter <dick@ximian.com>
21942 * threads.c: Have Thread.Start() wait for a semaphore to signal
21943 that the thread has set up all its local data. This fixes bug
21944 34323, where Abort() raced the new thread's TLS data.
21946 Also removes the handle_store() call from start_wrapper, because
21947 threads are now always created suspended and there is no longer a
21948 race between the parent and child threads to store the info.
21950 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
21952 * image.c: explain the #- heap issue in a message, hopefully
21953 avoiding FAQs on mono-list.
21955 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21958 (GetEntryAssembly): if the domain has not invoked
21959 AppDomain.ExecuteAssembly yet, return the assembly of the default
21962 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
21964 * class.c (mono_ldtoken): make it work in dynamic assemblies.
21966 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
21968 * metadata.c, reflection.c: simple speedup to type hash
21971 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
21973 * image.c, image.h, class.c, assembly.c: move module loading
21974 to MonoImage. When loading metadata, consider alignemnet from
21975 the start of metadata, not from the metadata address in memory.
21977 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
21979 * reflection.c (mono_reflection_get_custom_attrs): Added support for
21980 AssemblyBuilder objects. Factored out custom attribute creation into
21981 a separate function.
21982 (create_custom_attr): new function to create custom attributes.
21984 2003-02-12 Miguel de Icaza <miguel@ximian.com>
21986 * Makefile.am: Got tired of typing the full pathname to pedump.
21987 Until there is another option, am installing this.
21989 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
21991 * class.c (class_compute_field_layout): always set field->parent
21992 (mono_ldtoken): use mono_defaults.fieldhandle_class;
21994 2003-02-11 Dick Porter <dick@ximian.com>
21997 * monitor.c: Rewrote Monitor, making lock much faster and
21998 Pulse/Wait work as specified. Also uses much fewer handles, and only
21999 creates them as needed.
22001 * exception.c: Added SynchronizationLockException
22003 * threads.c: Deleted old Monitor implementation. The new one is
22006 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
22008 * class.c: handled TypedReference type code. Set the correct size for
22009 class data. Setup interface_offsets for interface classes, too.
22011 2003-02-09 Martin Baulig <martin@ximian.com>
22013 * debug-mono-symfile.h: Reflect latest symbol writer changes.
22015 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
22017 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
22018 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
22019 * object.c: fixed mono_object_get_virtual_method () for interfaces.
22020 * verify.c: check for code that runs after the end of the method.
22022 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
22024 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
22025 "System.Math::Round2".
22026 * sysmath.h: Added Floor, Round and Round2 definitions.
22027 * sysmath.c: Modified certain functions that were not 100% compliant
22028 with MS.NET (math precision) and added the implementation of Floor,
22031 2003-02-07 Martin Baulig <martin@ximian.com>
22033 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
22035 2003-02-07 Martin Baulig <martin@ximian.com>
22037 * debug-mono-symfile.c: Reflected latest symwriter changes.
22038 (mono_debug_create_mono_symbol_file): Removed.
22039 (mono_debug_open_mono_symbol_file): Take an argument which
22040 specifies whether to create a dynamic symbol file.
22042 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
22044 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
22046 2003-02-05 Martin Baulig <martin@ximian.com>
22048 * reflection.c (mono_image_build_metadata): Make this public,
22049 protect it against being called multiple times, don't create
22050 resources and don't build the compressed metadata here.
22051 (mono_image_create_pefile): Do this here.
22054 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
22056 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22058 * socket-io.c: fixed bug #36322.
22060 2003-02-06 Piers Haken <piersh@friskit.com>
22064 * debug-mono-symfile.c:
22070 * socket-io.c: warning cleanups
22072 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
22074 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
22075 function. works like remoting invoke, but does a check for the Proxy first.
22077 2003-02-05 Miguel de Icaza <miguel@ximian.com>
22079 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
22081 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
22083 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
22085 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
22086 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
22088 * object.c (mono_store_remote_field_new): used by the new jit
22089 instead of mono_store_remote_field
22090 (mono_load_remote_field_new): used by the new jit
22091 instead of mono_load_remote_field
22093 2003-02-05 Patrik Torstensson
22095 * appdomain.c: changed unload to take the domain id instead
22098 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
22101 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22103 * appdomain.c: don't look for assemblies in ApplicationBase if
22104 PrivateBinPathProbe is set.
22106 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22108 * object.c: make the first argument in main_args contain the absolute
22109 path to the assembly. Fixes bug #37511.
22111 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22113 * icall.c: get correct UTC offset for countries not using daylight
22114 time saving. Fixes bug #30030.
22116 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22118 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
22119 and 1 are the family).
22121 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
22123 * icall.c (ves_icall_InternalExecute): removed wrong assertion
22125 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
22127 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
22129 * reflection.c: added support for SignatureHelper tokens, which is
22130 needed by the Calli opcode.
22132 * reflection.h: track changes to SignatureHelper class.
22134 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
22136 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22138 * appdomain.c: fixed loading assemblies from PrivateBinPath.
22140 2003-02-03 Patrik Torstensson
22141 * appdomain.[c|h], domain.c :
22142 - Added support for getting a domain via domain id
22143 - Support for setting and getting domain from System.AppDomain
22144 (used in cross appdomain channel)
22145 - Added support for get/set for a MonoAppContext on a thread
22146 (Context class in System.Runtime.Remoting.Contexts),
22147 - Removed hack in Get/SetData and ExecuteAssembly.
22149 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
22150 the managed world to get control when a proxy is created.
22152 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
22154 2003-02-03 Miguel de Icaza <miguel@ximian.com>
22157 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
22158 Populate the codebase field as well.
22160 2003-02-02 Martin Baulig <martin@ximian.com>
22162 * debug-mono-symfile.c
22163 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
22164 (mono_debug_symfile_add_method): Allow interncalls.
22166 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22168 * icall.c: throw parse exception if strtod fails or the string is empty.
22170 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
22172 * marshal.c: handle object type separately from defined
22175 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
22177 * marshal.c: handle NATIVE_LPSTR for strings when it's
22178 explicitly specified.
22180 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
22182 * reflection.c, reflection.h, icall.c: setup the reflection
22183 handle cache for ModuleBuilders and AssemblyBuilders.
22185 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
22187 * reflection.c (reflection_methodbuilder_to_mono_method): set
22190 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22192 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
22194 2003-01-29 Dick Porter <dick@ximian.com>
22196 * threads.c: No need for the fake_thread kludge now that Thread
22197 doesn't run a class constructor
22199 2003-01-29 Dick Porter <dick@ximian.com>
22201 * threads.c: Use g_direct_hash instead of the rather bogus
22204 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
22206 * marshal.c (mono_marshal_get_native_wrapper): add check for null
22207 (fix pinvoke12.exe)
22208 (mono_marshal_get_struct_to_ptr): generate valid IL code
22209 (mono_marshal_get_ptr_to_struct): generate valid IL code
22210 (*): correctly set sig->pinvoke, we need to memdup the signature
22213 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
22215 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
22216 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
22218 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
22220 * profiler.c: provide more callers information.
22222 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
22224 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
22226 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
22228 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
22230 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
22232 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
22233 exception instead of going into an infinite loop on dates which it
22236 * string-icalls.c (ves_icall_System_String_get_Chars): raise
22237 out-of-range exception if needed.
22239 * class.c (mono_class_setup_vtable): allow a virtual method to provide
22240 an implementation for an interface method and to override an inherited
22241 method at the same time.
22242 Imagine a scenario when a virtual method is used to override a
22243 virtual abstract method in a parent class, and this same method
22244 provides an implementation for an method inherited from an interface.
22245 In this case, the interface resolution code will set im->slot, which
22246 means that the virtual method override pass will skip this method
22247 which means a pointer to the abstract method inherited from the parent
22248 will remain in the vtable of this non-abstract class.
22250 * class.c: (mono_class_setup_vtable): continue search for a real
22251 method if only an abstract method is found.
22253 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
22255 * reflection.c: add size to encoding for ByValStr and ByValArray
22256 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
22258 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
22260 * class.c (mono_class_setup_vtable): pass the override info as an
22263 * class.c (mono_class_setup_vtable): set the slot of overriding methods
22266 * reflection.c (ensure_runtime_vtable); add support for method
22269 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
22271 * reflection.c (resolution_scope_from_image): Hack to work to work with
22272 dynamic assemblies.
22274 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
22275 added a 'force_ref' argument to force this function to allways return
22276 a TypeRef. This is needed by mono_image_get_memberref_token ().
22278 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
22280 * reflection.c (mono_image_get_type_info): interfaces really don't have
22283 * reflection.c (mono_image_basic_init): fill out missing fields of
22286 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
22287 dynamic assemblies. This is required so dynamic assemblies show up in
22288 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
22289 Type::GetType() etc. This is consistent with MS behaviour.
22291 * image.c image.h reflection.c: add newly created classes to the name
22292 cache so mono_class_get () will find them.
22294 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
22296 First part of changes to get IKVM.NET running under mono.
22298 * appdomain.h, appdomain.c: added new function
22299 mono_domain_try_type_resolve() which will emit TypeResolve events.
22300 This function will call AppDomain::DoTypeResolve to do the actual work.
22302 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
22303 moved existing code dealing with dynamic tokens to a new function
22304 called mono_reflection_lookup_dynamic_token (). This function will
22305 raise TypeResolve events when appropriate. Since reflection.c is not
22306 part of libmetadata, a new hook function called
22307 mono_lookup_dynamic_token() is added to class.c which will call this.
22309 * assembly.h assembly.c: make the invoke_load_hook function public,
22310 so it can be called for dynamic assemblies.
22312 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
22314 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
22317 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
22318 MonoGHashTable, since it contains pointers to objects which the GC
22321 * assembly.c (search_loaded): remove unused variable.
22323 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
22325 * object.c: fixed issue exposed by gcc-generated IL programs
22326 that use RVA data for pointers.
22328 2003-01-25 Martin Baulig <martin@ximian.com>
22330 * threads.c (start_wrapper): Moved the initialization of
22331 `start_func' above the mono_new_thread_init() call to which we
22332 pass it as argument.
22334 2003-01-24 Martin Baulig <martin@ximian.com>
22336 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
22337 the MonoThread pointer.
22339 2003-01-21 Miguel de Icaza <miguel@ximian.com>
22341 * icall.c: Rename `PowImpl' to Pow.
22343 2003-01-23 Dick Porter <dick@ximian.com>
22345 * threads.c (start_wrapper): Create a Thread object if needed, so
22346 the Main() thread can do the class initialisation in a subthread
22347 that has been set up to allow managed code execution.
22349 Pass the thread ID instead of the MonoThread pointer to the thread
22350 start and attach callbacks. This change is required, because the
22351 jit thread start callback must be called _before_ the Thread
22352 object can be created.
22354 (mono_thread_init): Removed much object creation code that is no
22355 longer needed. No managed code is called from here now.
22357 * object.c (mono_runtime_exec_managed_code): Create a subthread
22358 for Main, and call back to the runtime to use it.
22359 Set the exit code when Main exits.
22361 * gc.c: Make sure domain finalisation happens in a subthread.
22362 Re-enable threaded GC, fixing bug 31333 (again).
22364 * environment.c: System.Environment internall calls (so far just
22365 ExitCode is here, the others are still in icall.c)
22367 * appdomain.c (mono_runtime_cleanup): All threads running managed
22368 code should have finished before mono_runtime_cleanup() is
22369 reached, so no need to clean up threads.
22371 2003-01-22 Martin Baulig <martin@ximian.com>
22373 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
22374 `gpointer func' arguments.
22375 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
22376 but added `MonoThread *thread' argument.
22377 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
22379 * threads.c (mono_new_thread_init): Added `gpointer func' argument
22380 and pass it to the mono_thread_start_cb callback.
22381 (mono_install_thread_callbacks): New public function to install a
22382 set of callbacks which are set by the debugger.
22383 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
22385 2003-01-22 Martin Baulig <martin@ximian.com>
22387 * Makefile.am: Install debug-mono-symfile.h.
22389 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
22391 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
22393 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
22395 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
22396 * class.c (mono_ptr_class_get): correctly set access levels of pointers
22397 (mono_array_class_get): correctly set access levels of arrays
22399 2003-01-20 Patrik Torstensson
22400 * image.h (MonoAssemblyName): changed major, minor, build, revision
22401 from signed to unsigned.
22403 2003-01-20 sean kasun <skasun@azstarnet.com>
22405 * reflection.c (load_cattr_value): Now this handles
22406 MONO_TYPE_SZARRAY. Fixes bug #35629
22408 2003-01-20 Miguel de Icaza <miguel@ximian.com>
22410 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
22413 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22415 * decimal.c: fixed bug #26056.
22417 2003-01-17 Martin Baulig <martin@ximian.com>
22419 * gc.c: Raise an ExecutionEngineException instead of using g_error().
22421 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22424 (mono_get_exception_type_initialization): new function.
22426 * object.c: throw a TypeInitializationException when an exception is
22427 thrown invoking the class constructor.
22429 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22431 * reflection.c: fixed attribute reading.
22433 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22436 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
22437 provided, look for the type in the calling assembly and then in
22438 mscorlib; if the assembly name is provided, only try that one.
22440 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
22442 * object.c: register the vtable before there is a chance it's
22443 queried again recursively.
22445 2003-01-13 Duncan Mak <duncan@ximian.com>
22447 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
22450 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
22452 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
22454 2003-01-11 Martin Baulig <martin@ximian.com>
22456 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
22457 this to 20 for the release.
22459 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
22461 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
22463 * loader.c (mono_method_get_marshal_info): bug fix
22465 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
22466 structures with explicit layout
22468 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
22470 * profiler.c: made the output more readable (and sorted).
22471 Added caller information for the allocation profiler.
22473 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
22475 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
22477 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22479 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
22480 to get value types.
22482 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
22484 * object.c, profiler.h, profiler.c, profiler-private.h:
22485 Added object allocation profiler.
22487 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
22489 * reflection.h, reflection.c: handle global methods.
22490 Compress blob entries.
22492 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
22494 * marshal.c: fix compilation.
22496 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
22498 * loader.c (mono_method_get_marshal_info): impl.
22500 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
22502 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22504 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
22505 for reference types.
22507 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
22509 * loader.c: fixed off by one error in loaded parameter names.
22511 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
22513 * marshal.c (mono_marshal_get_icall_wrapper): like
22514 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
22515 instead of a MonoMethod.
22517 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22519 * decimal.c: fixed bug #36537.
22521 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
22523 * marshal.c: throw a missing method exception if a
22524 P/Invoke method is not found.
22526 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
22528 * icall.c: allow a null this for constructors.
22530 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
22532 * icall.c: raise the proper exceptions if the arguments to the
22533 internal Invoke are incorrect.
22535 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
22537 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
22539 2003-01-03 Martin Baulig <martin@ximian.com>
22541 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
22543 2002-12-31 Martin Baulig <martin@ximian.com>
22545 * debug-mono-symfile.c: Completely rewrote the type section.
22546 Instead of using individual malloc()ed fields, we use one big
22547 continuous memory area and offsets into this area.
22548 See the comments in the source code for details.
22550 2002-12-30 Martin Baulig <martin@ximian.com>
22552 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
22554 2002-12-30 Martin Baulig <martin@ximian.com>
22556 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
22557 line number table in this data blob instead of using an external
22560 2002-12-28 Martin Baulig <martin@ximian.com>
22562 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
22564 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
22566 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
22567 as a boxed return type.
22569 2002-12-21 Miguel de Icaza <miguel@ximian.com>
22572 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
22573 g_build_filename to properly get separators on the filename created.
22575 * object.h: Small change, introduce MonoMarshalByRefObject to
22576 track the layout of that structure in the C# universe as we make
22579 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
22581 * object.c: removed assert to allow static fields on interfaces.
22582 * loader.c: a TypeSpec may be used for any type, not just arrays.
22584 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
22586 * class.c, class.h: added mono_class_array_element_size ().
22587 Ignore static methods in interfaces.
22589 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22591 * threads.c: fixed the build under cygwin.
22593 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
22595 * reflection.c: handle nullref constants. Allocate keys for
22596 reflection handles with the GC.
22598 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
22600 * threads.c, threads.h: added mono_thread_get_abort_signal()
22601 to get a suitable signal for thread abort.
22603 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
22605 * metadata.c: fix handling of ExportedType table.
22607 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22609 * icall.c: added WriteWindowsDebugString internal call.
22611 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22613 * reflection.h: added fields to match C# implementation.
22615 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22617 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
22619 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
22621 * gc.h, gc-internal.h: Rename header for GC internal calls to
22622 gc-internal.h from gc.h as to not clash with Boehm GC having its
22623 header installed as <gc.h> in outside include paths.
22624 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
22625 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
22627 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22629 * icall.c: assign minor, build and revision in FillName.
22631 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
22633 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
22634 Added support for running code generated by Reflection.Emit.
22636 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22638 * appdomain.c: check for NULL argument in LoadFrom.
22640 2002-12-10 Dick Porter <dick@ximian.com>
22642 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
22644 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22646 * appdomain.c: fix buglet when building exe file name. Handle full
22647 assembly name (needed after latest changes to AssemblyName).
22649 (mono_image_close): free some hashtables.
22651 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
22653 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
22654 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
22655 on some systems (redhat 7.3)
22657 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
22659 * threads.c: delete the critical section of a sync block,
22660 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
22662 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
22664 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
22666 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22668 * appdomain.[ch]: handle the assembly preload event to try loading the
22669 assemblies using the paths we have in the current domain.
22671 * assembly.[ch]: created an assembly preload hook that is called to try
22672 loading the assembly by other means that the ones provided here.
22674 * domain.c: initialize the domain search path.
22676 From now on, assemblies (TODO: except corlib and System) are loaded
22677 according to these rules when using mono_assembly_load ():
22679 1. It tries to load the assembly from the ApplicationBase
22680 of the current domain appending .dll and .exe (TODO: have to
22681 try loading from name/name.dll and name/name.exe).
22683 2. It tries the search path specified in PrivateBinPath for the
22684 current domain (if any).
22686 3. Previous behavior.
22688 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
22690 * icall.c: implemented GetInterfaceMap() related icall.
22691 * domain.c, loader.h: load MethodInfo in mono_defaults.
22693 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
22695 * gc.c: disable the finalizer thread for now, untill all the issues
22696 with it are resolved.
22698 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
22700 * string-icalls.c: handle embedded nulls in string ctor when the
22701 length is specified.
22703 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
22705 * class.c: look for explicit interface implementation in parent
22708 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
22710 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
22712 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
22714 * gc.c: protect handles with a critical section.
22716 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22719 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
22720 parameters. If no assembly specified, try getting the type from all
22721 the assemblies in the current domain, else, load the assembly and get
22724 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22726 * marshal.c: applied patch from Aleksey Demakov that fixes
22727 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
22729 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22731 * icall.c: fixed get_location.
22733 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
22735 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
22736 declarations to make it work with older gcc.
22738 * loader.c (mono_get_method): set signature->pinvoke for native calls
22740 2002-11-20 Dick Porter <dick@ximian.com>
22742 * threads.c (mono_thread_init): Set the main thread's handle
22744 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
22746 * gc.c: allow compilation without GC support. Changed to match the
22749 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
22751 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
22753 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
22755 * reflection.c: set a public key token on the core assemblies.
22757 2002-11-18 Dick Porter <dick@ximian.com>
22759 * threads.c: Split out some thread initialisation so that other
22760 files can set the start callback function.
22762 * gc.c: Run finalisers in a separate thread, to avoid stack
22763 overflow. Fixes bug 31333.
22765 * appdomain.c: Set up GC finalisation thread.
22769 * domain.c: Use gc.h macros for GC_malloc
22771 2002-11-15 Dick Porter <dick@ximian.com>
22775 * appdomain.c: Removed mono_runtime_init_with_attach(),
22776 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
22777 merging the extra parameter with the existing function. Removed
22778 unneeded code in mono_thread_attach().
22780 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
22782 * image.c (mono_image_loaded_by_guid): a method to get loaded
22784 (load_metadata_ptrs): we store the guid as string.
22786 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
22788 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
22790 * metadata.c (mono_guid_to_string): imported method form Zoltan
22791 Varga (slightly modified)
22793 * assembly.c (mono_assembly_open): load precompiled code
22795 * loader.h (MonoMethod): we store the method token for use in the
22798 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22800 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
22801 the hook function called when an assembly is loaded.
22803 * domain.c: Modified file.
22804 (mono_domain_assembly_load): removed hash table insertion of assemblies.
22808 2002-11-07 Miguel de Icaza <miguel@ximian.com>
22810 * reflection.c: Map PEFileKind to the value expected by the WinNT
22813 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22815 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
22816 Read until the buffer is filled completely.
22818 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22820 * icall.c: implemented MonoType.InternalGetEvent ().
22822 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22824 * appdomain.c: implemented InitAppDomainSetup. Delayed
22825 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
22826 the entry_assembly.
22828 * assembly.c: base_dir is now an absolute path ending with
22831 * icall.c: modified get_location according to the above changes.
22833 * object.c: init AppDomain.SetupInformation for the default domain after
22834 we have the entry assembly.
22836 * domain.c: when unloading a domain, setup = NULL.
22838 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
22840 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
22842 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
22844 * object.h, object.c: introduced mono_object_get_virtual_method ()
22845 to lookup the method invoked on an object when a callvirt is done on
22847 * icall.c: make MethodInfo::Invoke() always do a virtual call.
22849 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22851 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
22852 current domain when loaded an assembly and failed to load it.
22854 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
22856 2002-10-31 Dick Porter <dick@ximian.com>
22860 * file-io.c: Return the error status in a parameter, as the
22861 GetLastError() value has long since been blown away if we try and
22862 look it up in a subsequent internal call invocation. Delete the
22863 GetLastError() internal call, because it's useless.
22865 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
22867 * class.[ch]: added cast_class to fix bug 29517
22869 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
22871 * marshal.c: create valid IL code in the filter clause:
22872 the new JIT is less forgiving:-)
22874 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22876 * icall.c: removed get_property internal call.
22878 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
22880 * appdomain.h domain.c: Added an ID to appdomains.
22882 * threads.c threads.h icall.c: Implement icall
22883 Thread:GetDomainID(), and remove unused icall
22884 CurrentThreadDomain_internal.
22886 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22888 * icall.c: Don't recurse through the base types in GetConstructor.
22891 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
22893 * mempool.h, mempool.c: added mono_mempool_empty() and
22894 mono_mempool_stats().
22896 2002-10-23 Dick Porter <dick@ximian.com>
22900 * icall.c: Added MonoIO.GetFileType internal call
22902 2002-10-17 Dick Porter <dick@ximian.com>
22904 * appdomain.c (mono_runtime_cleanup): Don't signal the async
22905 delegate semaphore before waiting for all threads to finish,
22906 because new threads can also call async delegates. Fixes bug
22909 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
22910 of 3 seconds, in case another async job is queued. (This part is
22911 needed because the bug fix reintroduced the 3s exit lag.) This
22912 makes the mono_runtime_shutdown flag superfluous.
22914 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
22916 * reflection.c: include ehader size in method section headers.
22917 Really check for suplicated modules entries.
22919 2002-10-17 Martin Baulig <martin@gnome.org>
22921 * debug-mono-symfile.c: Added back support for locals.
22923 2002-10-14 Martin Baulig <martin@gnome.org>
22925 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
22928 2002-10-14 Martin Baulig <martin@gnome.org>
22930 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
22931 mono_class_get() instead of looking in the class cache.
22933 2002-10-13 Martin Baulig <martin@gnome.org>
22935 * debug-mono-symfile.c: Set version number to 28, include the
22936 signature in method names.
22938 2002-10-13 Martin Baulig <martin@gnome.org>
22940 * debug-mono-symfile.h: Set version number to 27.
22942 2002-10-11 Martin Baulig <martin@gnome.org>
22944 * gc.c: Don't register/unregister NULL pointers as disappearing links.
22946 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
22948 * metadata.c, metadata.h: added helper function to allocate signatures.
22950 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22952 * icall.c: added internal call to get the location of machine.config.
22954 2002-10-08 Martin Baulig <martin@gnome.org>
22956 * debug-mono-symfile.c: Ignore classes with a pending init for the
22959 2002-10-03 Dick Porter <dick@ximian.com>
22961 * threads.c: Freebsd pthread_t is a pointer
22963 2002-10-03 Dick Porter <dick@ximian.com>
22965 * socket-io.c: Implemented GetHostName_internal
22967 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22970 (mono_config_parse_file): don't leak the text.
22972 2002-10-02 Martin Baulig <martin@gnome.org>
22974 * debug-mono-symfile.c: Added support for methods.
22976 2002-10-01 Martin Baulig <martin@gnome.org>
22978 * debug-mono-symfile.c: Don't emit methods and line numbers for
22979 the dynamic symbol file, just write the type table. We can easily
22980 have an external helper program which creates a symbol file for an
22983 2002-10-01 Dick Porter <dick@ximian.com>
22985 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
22986 Only add the handle to the cleanup array when we're about to
22987 launch the thread. Bug 31425 deadlocked when the test was run on
22990 2002-10-01 Martin Baulig <martin@gnome.org>
22992 * debug-mono-symfile.c: Added support for properties.
22994 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
22996 * reflection.c: unaligned store fix from Mark Crichton
22997 <crichton@gimp.org>.
22999 2002-09-27 Martin Baulig <martin@gnome.org>
23001 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
23004 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
23006 * assembly.h, assembly.c: use a sane API to hook into the assembly
23007 loading process instead of a useless special-purpouse hack
23008 (ngen needs a hook, too, for example).
23010 2002-09-27 Dick Porter <dick@ximian.com>
23012 * threads.c (mono_thread_init): Call GetCurrentProcess() so
23013 io-layer can set up some process handle info. Not needed on w32,
23014 but doesn't hurt either.
23016 * process.c: Pass the program name in the second parameter to
23017 CreateProcess, so the path is searched. Include the working
23018 directory. Implemented process name, process enumeration, and some
23019 process detail internal calls.
23021 * icall.c: Added internal calls for process lookup, and some
23024 2002-09-26 Martin Baulig <martin@gnome.org>
23026 * assembly.c (mono_install_open_assembly_hook): New global
23027 function to install a function to be invoked each time a new
23028 assembly is loaded.
23029 (mono_assembly_open): Run this callback function if set.
23031 * debug-mono-symfile.c: Put back line numbers for the dynamic
23032 symbol file and also record the .il file as source file. This
23033 allows us to install the temporary symbol file as `file.dbg' just
23034 like a compiler-generated one.
23036 2002-09-26 Nick Zigarovich <nick@chemlab.org>
23038 * Corrected typo in gc.c (BOHEM vs BOEHM).
23040 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23042 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
23043 GetProperties. Also avoid calling g_slist_length in GetProperties and
23046 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
23048 * reflection.c: avoid unaligned stores (bug spotted by
23049 Mark Crichton <crichton@gimp.org>).
23051 2002-09-25 Martin Baulig <martin@gnome.org>
23053 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
23054 instead of guint64 for addresses and added prologue/epilogue info.
23056 2002-09-25 Martin Baulig <martin@gnome.org>
23058 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
23059 store line number info. For the dynamic symbol file, we only need
23060 to provide the JIT generated dynamic line number info for the dynamic
23063 2002-09-25 Martin Baulig <martin@gnome.org>
23065 * debug-mono-symfile.h: Incremented version number.
23067 2002-09-24 Martin Baulig <martin@gnome.org>
23069 * class.c (mono_debugger_class_init_func): New global function
23071 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
23074 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
23075 function. This is called via the mono_debugger_class_init_func
23076 hook to add all types to the dynamic type table.
23077 (ves_icall_MonoDebugger_GetType): New interncall to get a class
23078 from its metadata token.
23080 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
23081 New interncall for the debugger.
23083 2002-09-24 Nick Drochak <ndrochak@gol.com>
23085 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
23086 before using it in case it is null.
23088 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
23090 * metadata.c: allow custom modifiers in local var signatures
23091 (bug spotted by Zoltan Varga).
23093 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
23095 * class.c: deal with the <Module> class that may have a NULL vtable.
23096 Eliminate warnings.
23098 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
23100 * image.c, image.h: more strong name helpers.
23101 * monosn.c: more work: convert pem keys to cryptoapi format.
23103 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
23105 * string-icalls.c: speedup IndexOf.
23107 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
23109 * icall.c: updates from Zoltan.2.Varga@nokia.com.
23111 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
23113 * icall.c: cleanup: use mono_object_domain ().
23115 2002-09-23 Martin Baulig <martin@gnome.org>
23117 * debug-mono-symfile.c: Improved type support.
23119 2002-09-22 Martin Baulig <martin@gnome.org>
23121 * debug-mono-symfile.c: Added support for reference types and strings.
23123 2002-09-22 Martin Baulig <martin@gnome.org>
23125 * debug-mono-symfile.c: Started to work on the type table.
23127 2002-09-21 Martin Baulig <martin@gnome.org>
23129 * debug-mono-symfile.c: Largely reworked the symbol table format.
23130 The symbol table is now incrementally updated each time a new
23131 method is added. We're now also using our own magic and version
23132 so that you don't need to recompile all your classes if the
23133 dynamic table changes.
23134 (mono_debug_update_mono_symbol_file): Removed.
23135 (mono_debug_symfile_add_method): New function to add a method.
23137 2002-09-21 Martin Baulig <martin@gnome.org>
23140 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
23143 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
23144 New interncall to get a method from its metadata token.
23146 2002-09-21 Martin Baulig <martin@gnome.org>
23148 * debug-mono-symfile.c: Create type table.
23150 2002-09-20 Martin Baulig <martin@gnome.org>
23152 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
23154 2002-09-20 Martin Baulig <martin@gnome.org>
23156 * debug-mono-symfile.c: Provide information about params and locals.
23158 2002-09-20 Martin Baulig <martin@gnome.org>
23160 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
23163 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
23164 interncall to get a method from its metadata token.
23166 2002-09-20 Martin Baulig <martin@gnome.org>
23168 * debug-mono-symfile.c: Added a few checks for method->header
23169 being non-NULL. This should never happen, but for the moment
23170 let's use a g_warning() rather than a g_assert().
23172 2002-09-19 Mark Crichton <crichton@gimp.org>
23174 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
23175 even if support for it isn't present. Added an #ifdef to fix this.
23177 * socket-io.c: Added checks back for Solaris support.
23179 2002-09-19 Martin Baulig <martin@gnome.org>
23181 * debug-mono-symfile.c (read_string, write_string): Reflect latest
23182 changes in the symbol file format.
23184 2002-09-18 Martin Baulig <martin@gnome.org>
23186 * debug-mono-symfile.c: Set version number to 21.
23188 2002-09-18 Dick Porter <dick@ximian.com>
23190 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
23191 on netbsd. Fixes bug 30051.
23193 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23196 (set_version_from_string): little fix.
23198 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
23200 * monosn.c, Makefile.am: added strong name utility.
23201 * reflection.h, reflection.c: implemented delayed signing,
23202 locale, version and hash id assembly attributes.
23204 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
23206 * loader.c, metadata.c: load param attributes in signatures.
23208 2002-09-16 Martin Baulig <martin@gnome.org>
23210 * debug-mono-symfile.c: Added string table with all method names.
23212 2002-09-14 Martin Baulig <martin@gnome.org>
23214 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
23215 fast method lookup.
23217 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
23219 * reflection.c: record the public key token of referenced assemblies.
23221 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
23223 * image.c, image.h: added functions to get the strong name and the
23224 public key of an assembly.
23225 * pedump.c: use them.
23227 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
23229 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
23231 2002-09-12 Miguel de Icaza <miguel@ximian.com>
23233 * marshal.c (mono_marshal_get_managed_wrapper): Added
23236 2002-09-11 Martin Baulig <martin@gnome.org>
23238 * gc.c: Call GC_unregister_disappearing_link() on all links when
23239 finalizing them, this is necessary to aviod a crash in boehm's
23242 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
23244 * gc.c: handle GetTarget for finalized objects spotted and fixed by
23247 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
23249 * icall.c: implemented MonoType::Module.
23250 * reflection.c, reflection.h: mono_module_get_object () from
23251 Tomi Pakarinen <tomi.pakarinen@welho.com>.
23253 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
23255 * icall.c: ignore overridden methods in GetMethods ().
23256 Fix for FieldInfo::SetValue().
23257 * object.c: handle float/double in runtime invoke.
23259 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
23261 * object.c: allow a constructor to be called again on an object.
23263 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
23265 * class.h, class.c: move field layout code to it's own function and
23266 export it. Get an interface id earlier. Move fields in MonoClass
23267 so they are more cache friendly and align the bitfields.
23268 * loader.c: temporary handle get_param_names() for a runtime method.
23269 * reflection.c, reflection.h: more code to handle runtime creation of
23272 2002-09-09 Martin Baulig <martin@gnome.org>
23274 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
23275 signature with the pinvoke field being set for the actual call.
23277 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
23279 * icall.c: removed some unused icalls. Start of map of glib charsets
23280 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
23282 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
23284 * debug-helpers.c: break infinite loop (found and fixed by
23285 Holger Arnold <harnold@gmx.de>).
23287 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
23289 * icall.c: target may be null in create_delegate.
23291 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
23293 * marshal.c: handle a boolean return type.
23295 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
23297 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
23299 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
23301 * gc.c: fix weakreferences.
23303 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
23305 * icall.c: added icall to get default codepage.
23307 2002-09-03 Dick Porter <dick@ximian.com>
23310 * threads.c: Use MonoThread instead of MonoObject where
23313 Store running thread objects in a hash table, so that we have all
23314 the info to hand when waiting for them to finish
23315 (means we don't need OpenThread() any more, so mingw builds should
23316 be fully functional again.)
23319 * object.h: Added thread ID to MonoThread
23321 2002-09-03 Martin Baulig <martin@gnome.org>
23323 * icall.c (System.Reflection.Assembly::get_location): New interncall.
23325 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23327 * icall.c: fixed leak in get_temp_path. Thanks lupus.
23329 2002-09-03 Martin Baulig <martin@gnome.org>
23331 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
23332 argument to store the end address of the disassembled instruction.
23334 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
23335 here from debug-symfile.h.
23336 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
23337 JIT into this struct.
23338 (MonoSymbolFile): Added `char *image_file' field.
23339 (MonoDebugGetMethodFunc): Removed.
23340 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
23341 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
23342 (mono_debug_find_method): New method.
23344 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
23345 create a full symbol file.
23346 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
23347 and static symbol files.
23348 (mono_debug_find_method): The symbol file keeps an internal method hash,
23349 call this to get a MonoDebugMethodInfo from a MonoMethod.
23351 * debug-symfile.[ch]: Removed.
23353 2002-08-29 Miguel de Icaza <miguel@ximian.com>
23355 * image.c (do_mono_image_open): Remove linker version check.
23357 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
23359 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
23360 wrappers for instance methods.
23362 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23364 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
23366 2002-08-28 Dick Porter <dick@ximian.com>
23368 * Makefile.am: Export HOST_CC for w32 builds
23370 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
23372 * file-io.c process.c: MonoString are null terminated, no
23373 need for mono_string_to_utf16() anymore.
23375 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
23377 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
23379 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
23381 * icall.c, reflection.h: speedup System.MonoType.
23383 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
23385 * reflection.c: allow null as the value of a string argument in
23386 custom attributes constructors.
23388 2002-08-27 Martin Baulig <martin@gnome.org>
23390 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
23391 `trampoline_address' field.
23393 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
23395 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
23396 check (fixes bug #29486)
23398 2002-08-27 Martin Baulig <martin@gnome.org>
23400 * debug-mono-symfile.c: Changed the file format in a way that allows us
23401 open it read-only and to use a specially malloced area for all the
23402 dynamic data. We can now also generate a symbol file on-the-fly if we're
23403 debugging IL code and there is no MCS generated symbol file for it.
23405 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
23407 * object.c: added a define for a good string and array
23408 creation speedup (not enabled by default because we need to deal with
23411 2002-08-26 Martin Baulig <martin@gnome.org>
23413 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
23414 function to create a dynamic symbol file. This is used by the
23415 debugger to create a symbol file for IL code on-the-fly.
23417 2002-08-26 Martin Baulig <martin@gnome.org>
23419 * loader.c (mono_lookup_pinvoke_call): Include the error message
23420 from g_module_error() in the error message.
23422 2002-08-24 Martin Baulig <martin@gnome.org>
23424 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
23425 function to update the symbol file. The symbol file is mmap()ed
23426 writable, but private. This allows us to install the symbol file
23427 together with the assembly.
23429 2002-08-24 Martin Baulig <martin@gnome.org>
23431 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
23432 but they can read the new symbol file format which mcs is now creating.
23434 * debug-symfile.c (mono_debug_find_source_location): Moved to
23435 debug-mono-symfile.c; this is now operating on the new symbol file.
23437 2002-08-23 Martin Baulig <martin@gnome.org>
23439 * debug-helpers.c (mono_method_desc_from_method): New function to get
23440 a MonoMethodDesc from a MonoMethod.
23442 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
23444 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
23445 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
23447 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
23449 * string-icalls.[ch]: make helper methods static.
23451 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23453 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
23454 types to it and to SetValueInternal.
23456 * object.c: Moved handle_enum label to its proper place. This was the
23459 This time i compiled mcs and gtk-sharp and they both work.
23461 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23463 * icall.c: reverted partially my previous patch until
23464 object.c:set_value handles enums correcly.
23466 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23469 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
23470 (ves_icall_System_Environment_get_MachineName): removed warning when
23471 compiling under cygwin.
23473 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
23475 * object.c: fixed field_get_value() for reference types.
23477 2002-08-22 Dick Porter <dick@ximian.com>
23479 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
23480 Don't free a buffer while it's still needed. Patch from Jonathan
23481 Liger <Jonathan.liger@wanadoo.fr>
23483 2002-08-21 Miguel de Icaza <miguel@ximian.com>
23485 * icall.c (ves_icall_System_Environment_get_Platform): Add new
23488 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
23490 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
23491 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
23493 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
23494 we call unmanaged code which throws exceptions.
23496 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
23498 * appdomain.h: added per-domain entry_assembly.
23499 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
23501 * icall.c: Assembly::GetEntryAssembly icall.
23502 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
23503 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
23505 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
23507 * appdomain.h, gc.c: added mono_domain_finalize ().
23509 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23512 (mono_print_unhandled_exception): changed g_warning by g_printerr
23513 because g_log has a 1024 characters limit (yeah, i got a big stack
23514 trace). Don't print exception name, that should be in ToString
23517 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23519 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
23520 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
23522 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23525 (mono_print_unhandled_exception): after previous commit, i realized
23526 that MS calls ToString on the exception. I changed this function to
23527 do that. This way we get stack_trace for free.
23529 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23532 (mono_print_unhandled_exception): invoke Message property instead of
23533 getting 'message' field from Exception. Don't allocate memory for
23534 'trace' and 'message' if not needed.
23536 2002-08-18 Dick Porter <dick@ximian.com>
23538 * unicode.c: Fix asserts to match Encoder.cs checks
23540 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
23542 * marshal.c: fix unaligned store issue and a few wrong
23543 opcode argument types.
23545 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23547 * icall.c: added GetUninitializedObjectInternal internal call.
23549 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
23551 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
23552 to the right domain.
23554 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
23556 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
23558 * class.c (class_compute_field_layout): set blittable to false for Strings
23560 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
23562 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
23564 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
23565 first chunk of code to create types at runtime. Code to
23566 handle ReflectedType/DeclaringType. Make reflection handles
23569 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
23571 * class.c: set correct name in arrays.
23573 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
23575 * appdomain.c (mono_domain_transfer_object): make it work with
23576 valuetypes. bug fixes.
23578 2002-08-12 Dick Porter <dick@ximian.com>
23580 * object.h: Rename some parameters to avoid c++ keywords (Patch
23581 from Joseph Wenninger <kde@jowenn.at>)
23583 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
23585 * icall.c: added icall to implement Assembly.GetFile*.
23587 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
23589 * reflection.h, reflection.c: code to embed managed resources.
23591 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
23593 * class.c: move all the type size stuff into
23594 class_compute_field_layout().
23596 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
23598 * class.c: ensure enums have always the correct instance size.
23599 * unicode.c: remove wrong assert.
23601 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
23603 * assembly.c: fix mem corruption issue.
23604 * image.h, image.c: added mono_image_get_resource () to access
23606 * icall.c: implemented Assembly.EntryPoint property and some
23607 Managed Resources related internalcalls.
23610 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
23612 * image.c, image.h: impemented mono_image_get_entry_point ().
23613 * appdomain.c: use mono_image_get_entry_point.
23615 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
23617 * reflection.c: support the object type argument when loading
23620 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
23622 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
23623 String as return type.
23625 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
23627 * reflection.c: fix encoding of named args for custom attrs to match
23628 the ms implementation. Read them back when instantiating custom
23631 2002-08-02 Radek Doulik <rodo@ximian.com>
23633 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
23634 by Dietmar as quick fix
23635 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
23636 16 as stack size, used on more places as quick fix before Dietmar
23637 will fix it properly
23639 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
23641 * object.h, object.c: added accessors for fields and properties.
23643 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
23645 * class.c, class.h: made mono_class_get_field_from_name ()
23646 loop on parent types.
23647 Added mono_class_get_property_from_name ().
23649 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
23651 * class.c, class.h: move the code to setup the type vtable in its own
23652 function so that it can be reused also for types created at runtime.
23653 Eliminate the "class" identifier from the header file.
23654 * reflection.c: setup the vtable for enums so that we can create
23655 objects for use in SetConstant ().
23657 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
23659 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
23660 instead of the delegate itself as this pointer (bug #28383)
23662 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
23664 * marshal.c (mono_marshal_get_managed_wrapper): added return type
23667 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
23669 * loader.c: don't set the pinvoke bit on icalls.
23671 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
23673 * debug-helpers.c (mono_method_full_name): only print a number to
23674 indicate wrapper type (so that the output is more readable in traces).
23676 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
23678 * class.c (mono_class_init): include method override patch from Paolo
23680 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
23682 * icall.c: fixed GetTypeCode().
23684 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
23686 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
23687 use real delegate invoke function to make it work with multicast
23688 delegates (fix bug# 28291).
23690 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
23692 * object.c: load constant strings.
23694 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
23696 * reflection.c: no magic numbers.
23697 * tabledefs.h: security action enum.
23699 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
23701 * assembly.c: fix possible memory corruption.
23703 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
23705 * reflection.h, reflection.c: added support for linking resources.
23706 * verify.c: check we have an updated corlib.
23708 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
23710 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
23712 (mono_marshal_string_array): null terminate unmanaged string arrays.
23713 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
23715 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
23717 * icall.c: Type.GetType () can now return also types from the
23720 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
23722 * loader.h, loader.c: stack walking support.
23723 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
23724 GetCallingAssembly.
23726 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
23728 * marshal.c: added optimisations for blittable types
23730 * class.c (mono_array_class_get): do not set blittable attribute on arrays
23731 (mono_class_setup_mono_type): set blittable attribute for single
23734 * marshal.c (mono_string_utf8_to_builder): impl.
23735 (mono_string_builder_to_utf8): impl.
23736 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
23738 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
23740 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
23741 (mono_marshal_get_managed_wrapper): impl. byref types
23743 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23746 (search_method): don't display debug message.
23748 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
23750 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
23752 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
23754 * appdomain.c: set the missing filename when throwing exception.
23756 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
23758 * metadata.c (mono_type_size): code cleanup
23759 (mono_type_stack_size): removed some test code
23761 2002-07-21 Miguel de Icaza <miguel@ximian.com>
23763 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
23764 mono_get_exception_file_not_found now.
23766 * exception.c (mono_exception_from_name_two_strings): New version
23767 that will call a constructor with two string arguments.
23768 (mono_get_exception_file_not_found): New helper routine, used to
23769 report file-not-found errors.
23771 2002-07-20 Dick Porter <dick@ximian.com>
23774 * process.c: Pass file handles to CreateProcess
23778 * file-io.c: Implemented CreatePipe
23780 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
23782 * metadata.c (mono_get_param_info): set alignment for value types
23784 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
23786 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
23787 Constify mono_domain_assembly_open().
23788 * loader.c: handle null namespace in icalls.
23790 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
23792 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
23793 (emit_str_to_ptr_conv): marshal object as structs
23795 * metadata.c (mono_type_to_unmanaged): marshal object as structs
23797 * marshal.c (mono_marshal_get_runtime_invoke): support value types
23799 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
23801 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
23802 (mono_marshal_get_native_wrapper): we an now return value types
23804 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
23806 * verify.c: more checks implemented.
23808 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
23810 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
23812 (mono_marshal_get_native_wrapper): allow byref arguments
23813 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
23814 impl. PtrToStringXXX methods
23815 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
23816 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
23817 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
23818 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
23819 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
23821 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
23823 * reflection.c: fix buglet in parsing an assembly name.
23825 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
23827 * marshal.c (emit_ptr_to_str_conv): first impl.
23829 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
23831 * object.c, class.h: cache the vtable in the class as suggested by
23832 vargaz@freemail.hu (Zoltan Varga).
23834 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
23836 * class.h, loader.c: added mono_field_from_token().
23837 * verify.c: first cut of type checking code.
23839 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
23841 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
23843 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
23845 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
23847 (mono_marshal_get_remoting_invoke): impl.
23848 (mono_delegate_begin_invoke): impl.
23849 (mono_mb_emit_save_args): impl.
23850 (mono_delegate_end_invoke): impl.
23851 (mono_marshal_get_delegate_begin_invoke):
23852 (mono_marshal_get_delegate_end_invoke):
23853 (mono_marshal_get_delegate_invoke): generate a special name for
23854 those methods (including the signature) and associate them whith
23855 the delegate class.
23857 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
23860 (mono_reflection_type_from_name): now it has a MonoImage parameter
23861 which is used as the default image to search the type in. If the image
23862 is NULL or getting the type from it fails, it defaults to corlib.
23864 * icall.c: changed 1 call to mono_reflection_type_from_name to match
23867 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
23869 * reflection.c: update the parameter table index.
23871 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
23873 * domain.c: don't include the mark byte in the string hash.
23875 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
23877 * icall.cs: icall for Type.GetTypeCode ().
23878 * verify: a couple of fixes and disabled local initialization checks.
23880 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
23882 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
23884 * debug-helpers.c (mono_method_full_name): print the type of the
23887 * metadata.c (mono_signature_hash): a hash function for signatures
23888 (mono_signature_hash): better hash algorithm
23890 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
23892 * debug-helpers.c (mono_method_full_name): this can now generate
23893 method names with signatures
23895 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
23896 method dont have this pointers.
23898 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
23900 * reflection.c: fixup typebuilder tokens.
23901 * image.c: fix buglet.
23902 * marshal.h: remove whitespace.
23903 * metadata.h, metadata.c: reinstate code that was removed.
23904 * verify.c: handle catch directives and fix another couple of bugs.
23906 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
23908 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
23909 (mono_marshal_get_native_wrapper): make it comp. with the old code
23910 (mono_marshal_get_native_wrapper): support boolean
23911 (mono_marshal_get_managed_wrapper): support more types
23913 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
23915 * class.c (class_compute_field_layout): compute class->blittable attribute.
23917 2002-07-09 Dick Porter <dick@ximian.com>
23919 * threads.c: Make the thread cleaning up cope with threads that
23922 2002-07-08 Radek Doulik <rodo@ximian.com>
23924 * reflection.c (method_encode_code): use non-translated values to
23925 compute finally_start, this fixes exception handling on ppc, yay!
23927 * decimal.h (struct signscale): fix endianess
23929 2002-07-07 Radek Doulik <rodo@ximian.com>
23931 * reflection.c: swap box_val and not val
23933 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
23935 * reflection.c, reflection.h: handle full assembly info in type name.
23936 Handle Type arguments when loading custom attributes.
23937 * icall.c: updated to use new mono_reflection_type_from_name () method.
23939 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23942 (method_from_memberref): also print assembly name when method not found.
23944 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23947 (ves_icall_TypeGetProperties): fixed bug #27473.
23949 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23951 * reflection.c: display image name and token when cannot find the
23952 .ctor for an attribute.
23954 2002-07-05 Martin Baulig <martin@gnome.org>
23956 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
23958 2002-07-04 Dick Porter <dick@ximian.com>
23960 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
23961 compile on mingw. This will cause mingw builds to not wait for
23962 subthreads to terminate after the main thread does. I've lodged a
23963 bug with the mingw developers for them to wrap OpenThread().
23965 2002-07-03 Dick Porter <dick@ximian.com>
23967 * threads.c: Store thread IDs instead of handles, because
23968 GetCurrentThread() returns a pseudohandle and therefore stores
23969 useless values. mono_thread_cleanup() continues checking the
23970 array of threads until it is empty, to cope with subthreads
23971 spawning new threads after the main thread has finished.
23975 * profiler-private.h: Pass the thread ID to thread profiler
23976 functions, instead of a handle
23978 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
23980 * verify.c: fixes to make it more usable.
23981 * pedump.c: added --verify code to verify IL code in an assembly.
23983 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
23985 * reflection.c: turn errors into warnings to allow compiling corlib.
23987 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
23989 * reflection.c: add special cases to compile corlib.
23991 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
23993 * reflection.c: handle properties with only a set method.
23995 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
23997 * opcodes.h: add enum with opcodes in opval order.
23999 2002-07-01 Dick Porter <dick@ximian.com>
24002 * object.c (mono_runtime_run_main): Removed unneeded argument
24004 2002-06-28 Martin Baulig <martin@gnome.org>
24006 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
24008 2002-06-27 Dick Porter <dick@ximian.com>
24010 * threads.c: Store the handle in both the parent thread and in the
24011 subthread, to minimise the time between starting a new thread and
24014 2002-06-26 Dick Porter <dick@ximian.com>
24016 * appdomain.c (mono_runtime_cleanup): Close the socket library
24017 after all the threads have finished, not before
24019 2002-06-26 Martin Baulig <martin@gnome.org>
24021 * debug-symfile.c (mono_debug_find_source_location): Added
24022 `guint32 *line_number' argument. If it's not NULL, store the line number
24023 there and return the file name without the line number.
24025 2002-06-25 Dick Porter <dick@ximian.com>
24029 * process.c: Process forking and other support functions
24031 2002-06-25 Dick Porter <dick@ximian.com>
24033 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
24034 things dont happen when the image is closed.
24035 (mono_image_lookup_resource): Walk the resource section looking
24036 for a particular entry
24038 * cil-coff.h: PE resource section decoding
24040 2002-06-25 Dick Porter <dick@ximian.com>
24044 (mono_assembly_foreach): Accessor functions to walk the list of
24046 (mono_assembly_set_main):
24047 (mono_assembly_get_main): Process methods need to know which
24048 assembly is the "main" one
24050 * object.c (mono_runtime_run_main): Record the main assembly
24052 * debug-helpers.c: Fix typo
24054 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
24056 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
24057 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
24059 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
24061 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
24063 2002-06-21 Miguel de Icaza <miguel@ximian.com>
24065 * image.c (do_mono_image_open): Initialize reference count,
24066 otherwise we leak the MonoImage.
24068 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
24070 * reflection.c: small tweak to handle self-hosting.
24072 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
24074 * reflection.c: fix type name parse code.
24076 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
24078 * reflection.c: break out of the loop.
24079 * image.c: special case corlib.
24081 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
24083 * reflection.c: add all the custom attrs at the end to ensure the
24084 ctors have been properly initialized when the attributes are defined
24085 in the current assembly.
24087 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
24089 * reflection.c: handle correctly multiple-nested types.
24091 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
24093 * row-indexes.h: fix typos.
24094 * reflection.c: adjust for typos and fix method_def_or_ref
24095 encoding in MethodImpl table.
24097 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
24099 * reflection.c: fix entry point patching (thanks Serge!).
24101 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
24103 * verify.c: add check for System.Exception
24105 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
24107 * image.c, class.c: minifix for code just c&p'ed.
24108 * reflection.c: warning fix.
24109 * object.h, loader.h, domain.c: load also StringBuilder.
24111 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
24113 * marshal.h, marshal.c: some support code to handle complex marshaling.
24115 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24117 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
24118 Better signatures with vtable error dump.
24120 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
24122 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
24124 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
24126 * icall.c (ves_icall_Type_GetField): impl.
24128 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24130 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
24131 to retrieve a marshal description blob for a field or param.
24133 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
24135 * reflection.h, reflection.c: change order of nested type emission
24136 to avoid table corruption. The NestedTypes table is sorted.
24137 * icall.c: change order of GetConstructor results to workaround mcs bug.
24139 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
24141 * reflection.h, reflection.c: handle field and param marshal
24144 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
24146 * icall.c, marshal.c marshal.h: more Marshal class implementation.
24148 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
24150 * reflection.c: fix call convention.
24152 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
24154 * reflection.h, reflection.c: mono_image_get_memberref_token()
24155 takes a type instead of a class, now. Added
24156 mono_image_get_array_token() to create tokens for the special
24157 multi-dim array methods.
24159 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
24161 * assembly.c: handle modules (no assembly table). Split
24162 loading references in its own function.
24163 * class.c: handle moduleref resolution scope.
24164 * image.c, image.h: cache module name in image.
24166 2002-06-07 Martin Baulig <martin@gnome.org>
24168 * reflection.c (mono_image_get_type_info): Only add a class layout entry
24169 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
24171 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
24173 * icall.c: more signature fixes that used uint instead of int.
24175 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24177 * reflection.c: fixed signature of field refs.
24179 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
24181 * class.c, reflection.c: handle typerefs of nested types
24182 (both on read and when writing files).
24184 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
24186 * icall.c: fix method signatures that tried to workaround the previous
24189 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
24191 * debug-helpers.c: fix typo.
24193 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
24195 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
24196 rewrote the PE/COFF writing code (our programs are understood by the
24199 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
24201 * gc.c, gc.h, icall.c: weakreference support.
24203 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
24205 * Makefile.am, mono-config.c: use $(sysconfdir).
24207 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
24209 * icall.c: changed default precision of Double.ToString() to 15.
24210 Fixed memory leak. Unified with Single.ToString.
24212 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
24214 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
24216 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
24218 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
24219 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
24220 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
24223 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
24225 * debug-symfile.c, sysmath.c: yet more compilation fixes.
24227 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24229 * reflection.c, socket-io.c: more compilation fixes.
24231 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
24233 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
24234 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
24235 unicode.c: warning and compiler compatibility fixes.
24237 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
24239 * class.h, metadata.c: fixed warnings/compilation errors.
24241 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
24243 * Makefile.am, mono-config.c, mono-config.h: configuration file
24245 * loader.c, loader.h: make Dll mapping configurable at runtime in the
24246 config file. Export methods to insert and lookup mappings.
24248 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
24250 * reflection.c: handle types and boxed objects in custom attr
24253 2002-05-30 Martin Baulig <martin@gnome.org>
24256 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
24258 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
24260 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
24261 to lookup the implmap row for a P/Invoke method.
24262 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
24263 P/Invoke method from the runtime on an as needed basis.
24265 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
24267 * metadata.c (mono_metadata_parse_signature): impl.
24269 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
24271 * class.c: handle .pack directive.
24273 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
24275 * object.c: initialize static fields with RVA data.
24277 2002-05-25 Martin Baulig <martin@gnome.org>
24280 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
24282 2002-05-24 Martin Baulig <martin@gnome.org>
24285 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
24286 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
24287 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
24289 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
24291 * object.c: special case string ctros in invoke.
24292 * gc.c: silly whitespace changes.
24294 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
24296 * threadpool.[ch]: impl. a threadpool that can
24297 be used by mint and mono.
24299 2002-05-22 Martin Baulig <martin@gnome.org>
24301 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
24302 The first argument is now a `MonoReflectionModuleBuilder *', the return
24303 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
24304 `methods' field to get the method builder. The `token' argument is the
24307 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
24308 invalid characters instead of g_assert_not_reached()ing. This seems
24309 to be the behaviour of mscorlib.
24311 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
24313 * object.c (mono_runtime_invoke_array): applied patch from Rachel
24314 Hestilow to fix bug #25104
24316 2002-05-21 Martin Baulig <martin@gnome.org>
24318 * debug-symfile.c (mono_debug_find_source_location): New function.
24319 Looks up an IL offset in the line number table and returns the source
24320 location as a string.
24322 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24325 (mono_double_ToStringImpl): changed %f by %g until we have something
24328 2002-05-21 Nick Drochak <ndrochak@gol.com>
24330 * icall.c : Use different name for Math.Pow's icall. Needed to check
24331 parameters first in C#.
24333 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
24335 * icall.c, reflection.h: added icall to get info about an event.
24337 2002-05-20 Radek Doulik <rodo@ximian.com>
24339 * object.c (mono_value_box): don't use memcpy for boxing on BIG
24341 (mono_value_box): don't use memcpy for small sizes on
24342 architectures with unaligned access
24344 2002-05-20 Martin Baulig <martin@gnome.org>
24346 * reflection.c (mono_reflection_setup_internal_class): Don't crash
24347 if `tb->parent == NULL'.
24348 (mono_reflection_create_internal_class): New function. This is
24349 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
24352 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
24355 2002-05-19 Martin Baulig <martin@gnome.org>
24357 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
24358 argument to get the length, don't default to the array length.
24360 2002-05-18 Miguel de Icaza <miguel@ximian.com>
24362 * assembly.c (mono_assembly_setrootdir): New function used to
24363 override the MONO_ASSEMBLIES directory.
24365 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
24367 * icall.c: ValueType_GetHashCode() initialize local var.
24369 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
24371 * reflection.c: sort custom attributes table.
24373 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
24375 * reflection.c: support named args in custom attributes (write support).
24377 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
24379 * reflection.c: fix finally position calculation.
24381 2002-05-15 Radek Doulik <rodo@ximian.com>
24383 * reflection.c: fixed endianess at many places
24385 * icall.c (ves_icall_InitializeArray): comment out debug msg
24387 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
24389 * object.c (mono_unhandled_exception): new function to handle
24390 unhandled exceptions.
24391 (mono_unhandled_exception): call the UnhandledException event.
24392 (mono_runtime_delegate_invoke): impl.
24394 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
24396 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
24397 returns the RVA, not the direct pointer to the data. Handle the case
24398 when the class size is fixed.
24400 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
24402 * reflection.c: fix some endianess issues.
24404 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
24406 * object.c (mono_runtime_invoke): is now able to catch exceptions.
24408 * threads.c (mono_thread_init): added a callback which is invoked
24411 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
24413 * icall.c: make GetHashCode return non-negative values.
24415 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
24417 * object.c, icall.c, gc.c: revert to address-based hashcode.
24419 2002-05-13 Miguel de Icaza <miguel@ximian.com>
24421 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
24423 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
24425 * icall.c, class.c: special case <Module>.
24427 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
24429 * icall.c: fix bug in GetNow().
24431 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
24433 * object.c (mono_runtime_class_init): make sure that we call all
24434 static class constructors.
24436 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
24438 * reflection.c: sort methodsemantics table.
24440 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
24442 * reflection.h, reflection.c: honour init locals setting.
24444 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
24446 * icall.c: copied Double ToStringImpl for Single ToStringImpl
24448 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
24450 * reflection.c: support ContructorBuilders in attribute blob creation.
24452 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
24454 * reflection.c: some changes to build a binary that can be run
24455 directly in windows.
24457 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
24459 * loader.c: print a big message when an icall can't be found.
24461 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24463 * string-icalls.c: fix bug 24248.
24465 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
24467 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
24468 icall.c, reflection.h: separate assembly loading by pathname and by
24469 assembly name. Use the MONO_PATH env var to search for assemblies.
24471 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
24473 * assembly.c, image.h: add some support for assemblies
24474 with multiple modules.
24475 * class.c, class.h: export mono_class_from_typeref().
24476 * loader.c: remove duplicated code and use mono_class_from_typeref(),
24479 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
24481 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
24482 documentation says (the ECMA one is correct).
24484 2002-05-02 Dick Porter <dick@ximian.com>
24486 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
24487 Don't name the synchronisation mutex.
24489 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
24492 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
24493 Make the prototypes match.
24494 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
24498 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
24499 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
24500 all systems have tm.tm_zone, so use strftime() with %Z to print
24501 the timezone abreviation into a temp string.
24503 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
24504 rather than mono_array_addr() on a MonoString on Big Endian
24507 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
24509 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
24512 2002-04-30 Dick Porter <dick@ximian.com>
24514 * socket-io.c: Cope with SOCKET being an integer rather than a
24517 * threads.c: Added Thread_free_internal, to deal with thread
24518 handle cleanup. Moved calls to handle_store() and handle_remove()
24519 to start_wrapper(), so each can only be called once. Allocate
24520 synchronisation blocks with GC_malloc(), and use GC finalisation
24521 to close the handles.
24523 * icall.c: added System.Threading.Thread::Thread_free_internal
24525 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
24527 * icall.c: support Environment.Exit, CommandLineArgs().
24529 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
24531 * object.c, object.h: added mono_runtime_run_main () and
24532 mono_runtime_get_main_args () for use in System.Environment.
24534 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
24536 * gc.c: fix thinko, enable actual finalization since the jit is now
24539 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
24541 * gc.c, object.c: take into account that an object may be offset wrt the address
24542 returned by GC_malloc().
24544 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
24546 * image.c: handle files without entries in the assembly table (modules).
24548 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
24550 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
24551 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
24552 allowed to be null when it's System.Object class setup.
24554 2002-04-27 Martin Baulig <martin@gnome.org>
24556 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
24557 if `tb->parent == NULL' rather than crashing.
24559 2002-04-28 Nick Drochak <ndrochak@gol.com>
24561 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
24562 calling acos() where asin() should have been called.
24564 2002-04-26 Martin Baulig <martin@gnome.org>
24566 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
24567 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
24568 there's a subdirectory called `System', but we don't want to read that
24569 subdirectory as an assembly.
24571 2002-04-25 Martin Baulig <martin@gnome.org>
24573 * debug-symfile.c: Reflect latest MonoString changes.
24575 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
24577 * rand.c, rand.h: instance method icalls need to have an explicit
24578 this pointer as first argument in the C implementation.
24580 2002-04-25 Nick Drochak <ndrochak@gol.com>
24582 * icall.c: Fix typo in map for GetNonZeroBytes
24584 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
24586 * string-icalls.c : String does now passes unit tests without any
24587 errors, the following changes has been made:
24589 Implemented replace methods.
24590 Renaming of methods to (try) follow the standard.
24591 Fixed compare ordinal
24592 Made all memory allocated directly to function instead of via icall function.
24593 Small performance fix in is_in_array function
24595 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
24597 c (mono_string_Internal_ctor_charp_int_int):
24598 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
24599 sindex < 0, throw ArgumentOutOfRangeException instead of
24600 ArgumentNullException.
24602 Added new check for length == 0, however
24603 I need to make it return String.Empty from the C code.
24605 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
24606 that calculate the length for us here.
24608 (mono_string_Internal_ctor_sbytep_int_int): Replaced
24609 mono_string_new_utf16 with mono_string_new, since value is utf8.
24611 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
24613 * object.c: register the object for finalization if needed.
24614 Allocate one more char in the string for the terminating 0 char.
24616 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
24618 * class.c, class.h, image.c: check if a type implemenst a destructor.
24619 Use the proper key for array class lookups.
24620 * icall.c: register the icalls in the System.GC class.
24621 * gc.c, gc.h: GC-related functions and icalls.
24623 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24627 * unicode.c: free some strings gotten from mono_string_to_utf8 and
24628 changed a couple of free () by g_free ().
24630 * decimal.c: one-liner in the comments for decimal2string ().
24632 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
24634 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
24636 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
24638 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
24639 * object.c (mono_runtime_invoke_array) : handle null in params
24641 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
24643 * string-icalls.c: fixed bug in split (one off bug)
24645 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
24647 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
24648 * icalls.c: added String::Equals as internal method
24650 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
24652 * threads.c: fixed bug in the double interlocked functions
24654 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
24656 * threads.c: implemented all of the new interlocked icalls.
24657 * string-icalls.c: fix a bug in insert.
24658 * icalls.c: added the icalls for interlocked, removed old string functions.
24660 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
24662 * loader.c: fix off-by-one error when reading argument names.
24664 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
24666 * profiler.c: win32 counter implementation (untested).
24667 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
24668 (the latter needs testing and more complete impl. from win32 folks).
24670 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
24672 * object.c: mono_array_new_full workaround mono_array_class_get
24675 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
24677 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
24678 * object.h (mono_string_chars): Changed casting type.
24680 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
24682 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
24683 method signatures to use gunichar2 instead of gint16.
24685 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
24687 * object.h, object.c: domain-specific versions of mono_object_new and
24690 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
24692 * object.c: changed String layout
24694 * string-icalls.c (mono_string_Internal_ctor_chara): added
24695 internal string constructors.
24697 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
24699 * threads.c: pass 'this' to the thread start routine.
24701 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24703 * string-icalls.c: fix IndexOf and LastIndexOf. Now
24704 InternalCompareStr don't call twice mono_string_cmp_char for the last
24705 character. Improved performance in mono_string_cmp_char.
24707 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
24709 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
24710 code into its own library: libmonoruntime.
24712 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
24714 * object.h, object.c: changed array format so that szarrays do not
24715 require a bounds structure.
24716 * icall.c, appdomain.c: support for new szarray format.
24718 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
24720 * metadata.c: compare also the retuns type when comparing signatures:
24721 we didn't do this as an optimization since really overloaded methods
24722 must differ also in the arguments, but this doesn't work with
24723 low-level IL code (or when using explicit conversion operators: see
24724 bug#23498 for an example).
24726 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
24728 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
24730 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
24732 * icall.c: make MonoType::GetElementType its own icall.
24734 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
24736 * icall.c: remove MonoMethod_get_Name().
24737 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
24740 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
24742 * string-icalls.c: optimized a few methods.
24744 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
24746 * icall.c: added all new string internal calls
24747 * string-icalls.c: added, new string internal call implementation.
24748 * object.c: added mono_string_new_size for allocating a string a size
24750 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
24752 * object.c (mono_object_isinst): use the same code as in the
24753 optimized x86 version.
24755 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
24757 * profiler.c: TSC-based timer code (faster and more accurate).
24758 Not hooked up in configure, yet (set USE_X86TSC to 1).
24760 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
24762 * profiler.c, profiler.h: track time spent compiling methods.
24763 * threads.c: track thread creation/destruction.
24765 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
24767 * profiler.c, profiler.h, profiler-private.h: profiling interface
24768 and sample implementation. Moved here so that it can be used also by
24771 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
24773 * reflection.c, reflection.h: keep types and other handles separate in
24774 the hash tables for referred tokens. Add guid for modules.
24776 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
24778 * assembly.c: fix bugs found with valgrind.
24779 * metadata.h, metadata.c: added mono_metadata_guid_heap().
24781 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
24783 * threads: added icall support for getting current domain for
24786 2002-04-13 Martin Baulig <martin@gnome.org>
24788 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
24789 (MonoDebugVarInfo): Added `index' field for register based addresses.
24790 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
24791 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
24792 `MonoDebugVarInfo *params' and `guint32 this_offset' with
24793 `MonoDebugVarInfo *this_var'.
24795 * debug-symfile.c (relocate_variable): New static function to write
24796 a location description for a local variable or method parameter.
24798 2002-04-12 Martin Baulig <martin@gnome.org>
24800 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
24801 stack offset and begin/end scope address of a local variable.
24802 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
24803 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
24804 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
24806 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
24807 Added new relocation types for start/end scope of a local variable.
24809 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
24811 * object.h: add mono_object_domain() macro.
24812 * reflection.c: handle typespecs.
24813 * icall.c: MonoMethod::get_Name() implementation.
24815 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
24817 * icall.c: String::GetHashCode() icall implementation.
24819 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24821 * icall.c: String::IndexOfAny icall.
24822 * object.c, object.h: make array->max_length more useful.
24823 Intrduced mono_object_class() and mono_string_length() macros.
24825 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24827 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
24828 instead of g_unichar_isdigit.
24830 2002-04-11 Nick Drochak <ndrochak@gol.com>
24832 * icall.c: Implement a simple Double.ToString().
24834 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
24836 * appdomain.h: only io-layer.h is supposed to be included.
24837 * icall.c: explicitly import environ. Fix warning.
24839 2002-04-10 Nick Drochak <ndrochak@gol.com>
24841 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
24842 return true even if it's not Daylight Savings time.
24843 Only return false for the case where the function isn't
24844 implemented for a plaform (read Windows).
24846 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24848 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
24851 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
24853 * mempool.c (mono_mempool_alloc): only use g_malloc when
24854 absolutely necessary.
24856 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
24858 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
24860 * class.c (mono_class_vtable): use domain mempool to allocate vtable
24861 (mono_class_proxy_vtable): use domain mempool
24863 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
24865 * appdomain.h, appdomain.c: split initialization that requires the
24866 execution engine support into mono_runtime_init().
24868 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
24870 * class.c (mono_class_init): don't include vtable inside MonoClass
24871 to save some memory, gather some statistics.
24872 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
24874 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
24876 * icall.c: internalcall implementation for ValueType.Equals().
24878 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
24880 * object.c (mono_message_init): moved
24881 (mono_runtime_exec_main): new arch. independent impl.
24882 (mono_runtime_invoke_array): new method - like
24883 mono_runtime_invoke, but you can pass an array of objects.
24884 (mono_remoting_invoke): new arch. independent impl.
24885 (mono_message_invoke): new arch. independent impl.
24886 (mono_runtime_class_init): new arch. independent impl.
24887 (mono_runtime_object_init): new arch. independent impl.
24889 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
24891 * metadata.c, object.c, reflection.c: documented the exported
24894 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
24896 * icall.c: simpler code to pass the assembly builder data to corlib.
24897 Implement GetNestedTypes() internalcall.
24899 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
24901 * class.c: warn if a type can't be loaded.
24903 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
24905 * image.h: typedef MonoImageOpenStatus
24906 * types.h: removed unused file
24908 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
24910 * icall.c: Enum_ToObject accepts enum value arguments.
24912 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
24914 * class.c: move initialization of properties, events and nested
24915 classes, so that they happen for interfaces, too.
24917 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
24919 * icall.c: cleanup some ugly casts in Array_SetValue*.
24921 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
24923 * icall.c: the values array fro enums is of the correct type, now.
24924 Implement (correctly) getFullName instead of assQualifiedName for
24926 * reflection.h, reflection.c: added mono_type_get_name ().
24928 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
24930 * assembly.c, image.h: for each MonoImage, record from wich assembly
24932 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
24933 Make Type.Assembly work.
24935 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
24937 * debug-symfile.h: use char* instead of gpointer to avoid
24940 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
24942 * icall.c (ves_icall_InternalExecute): impl. FielSetter
24943 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
24945 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
24947 * icall.c (mono_message_init): impl. (code cleanup)
24948 (ves_icall_InternalExecute): impl. FieldGetter
24950 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
24951 defined we call all (non-static)methods through the vtable.
24953 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
24955 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
24956 finalizer even though the memory is still referenced (and the chunk of
24957 memory is not freed).
24959 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
24961 * assembly.c: fix brokeness.
24963 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
24965 * class.c: kill some warnings. Check explicit interface method
24966 implementation also without considering the namespace.
24967 Load also literal strings in static class data.
24969 2002-03-29 Miguel de Icaza <miguel@ximian.com>
24971 * assembly.c (default_assembly_name_resolver): Kill memory leak.
24972 (default_assembly_name_resolver): Make the resolver take the
24973 "base" directory where the assembly was originally defined, so we
24974 can load DLLs that are in the same directory as the assembly that
24975 is being referenced.
24977 2002-03-28 Dick Porter <dick@ximian.com>
24983 * unicode.c: Warning cleanups
24985 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
24987 * object.h, reflection.h: use the correct type instead of MonoObject.
24989 2002-03-28 Martin Baulig <martin@gnome.org>
24991 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
24992 (mono_debug_update_symbol_file): Initialize classes if necessary.
24994 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
24996 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
24997 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
24999 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
25001 * assembly.h: fix function prototype.
25002 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
25003 * mono-endian.h: use const cast.
25005 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
25007 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
25009 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
25011 * loader.c: don't assert when a typeref can't be loaded, give
25012 a chance to the runtime to trow an exception instead.
25013 * loader.h: fix warning.
25015 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
25017 * class.c (mono_class_proxy_vtable): added proxy support
25019 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
25021 * icall.c: removed last of PAL calls, added System.Environment
25022 * file-io.h, file-io.c: MonoIO implementation
25023 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
25025 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
25027 * appdomain.c: do not use the byte marker in ldstr table lookup.
25028 * debug-helpers.c: allow two ':' to separate class and method name.
25029 * object.c: allocate arrays bounds with the GC, too.
25030 * verify: add a few more checks.
25032 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
25034 * reflection.c: output also literal strings. Allocate parameter data
25035 with GC_malloc() (thanks, Martin, for catching this!).
25037 2002-03-26 Martin Baulig <martin@gnome.org>
25039 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
25040 include the `this' offset in the `param_offsets'.
25042 2002-03-25 Martin Baulig <martin@gnome.org>
25044 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
25045 mono_debug_get_class() function to get the classes. Added new
25046 relocation types for arrays and strings.
25047 (mono_debug_get_class): New static function to search in all
25048 referenced assemblies for a metadata token.
25050 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
25052 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
25054 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
25055 hold gc-allocated objects. Make the string heap a stream like the
25056 others. Removed duplicated code when writing stream info.
25057 Added asserts to catch possible buffer overflows. Set the sorted map
25058 for tables that need sorting. Added some documentation.
25060 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
25062 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
25063 for interned strings and vtables.
25065 2002-03-24 Martin Baulig <martin@gnome.org>
25067 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
25068 it in the array since it was created with g_slist_prepend().
25070 2002-03-24 Martin Baulig <martin@gnome.org>
25072 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
25073 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
25074 (mono_debug_method_from_token): Renamed to
25075 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
25076 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
25078 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
25081 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
25083 2002-03-24 Martin Baulig <martin@gnome.org>
25085 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
25086 (mono_debug_method_from_token): New func.
25088 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
25089 New interncall, calls mono_debug_local_type_from_signature().
25090 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
25091 calls mono_debug_method_from_token().
25093 2002-03-23 Martin Baulig <martin@gnome.org>
25095 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
25096 specifies the number of bytes to be converted, not the array size.
25097 Return the number of chars, not the number of bytes.
25098 (ves_icall_iconv_get_chars): The `byteCount' argument
25099 specifies the number of bytes to be converted, not the array size.
25101 2002-03-23 Martin Baulig <martin@gnome.org>
25103 * reflection.h (MonoReflectionSigHelper): New type.
25105 * reflection.c (mono_reflection_sighelper_get_signature_local),
25106 (mono_reflection_sighelper_get_signature_local): New functions.
25108 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
25109 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
25112 2002-03-23 Martin Baulig <martin@gnome.org>
25114 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
25115 is_writeable is set.
25116 (mono_raw_buffer_update): New function to write the modified map
25119 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
25121 * debug-symfile.c (mono_debug_update_symbol_file): Call
25122 mono_raw_buffer_update() when done writing.
25124 2002-03-23 Martin Baulig <martin@gnome.org>
25126 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
25128 * debug-symfile.c: Added support for arguments and local variables.
25130 2002-03-23 Dick Porter <dick@ximian.com>
25132 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
25133 protected by ifdefs, hence breaking the w32 build.
25135 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
25137 * object.c: implement is_interned() the right way.
25139 2002-03-21 Martin Baulig <martin@gnome.org>
25141 * debug-symfile.[ch]: New files to handle debugging information
25142 files. There's also support to dynamically update these symbol
25143 files to include machine dependent information.
25145 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
25147 * threads.c (mono_thread_create): new function to create thread
25150 2002-03-20 Martin Baulig <martin@gnome.org>
25152 * icall.c (ves_icall_InternalInvoke): Create a new object if the
25153 method is a constructor.
25154 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
25155 points to ves_icall_InternalInvoke().
25157 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
25159 * file-io.c: Flush shouldn't throw exceptions.
25161 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
25163 * file-io.c: FileStream flush support; FileSetLength now
25164 restores file pointer.
25166 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
25168 * class.c: set image for pointer classes.
25170 2002/03/19 Nick Drochak <ndrochak@gol.com>
25172 * sysmath.c: Forgot one.
25174 2002-03-18 Miguel de Icaza <miguel@ximian.com>
25176 * sysmath.c: Avoid redefining existing names.
25178 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
25180 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
25181 handled by runtime as icall rather than dllimport from libm.so
25182 * file-io.c, file-io.h: fixed handle argument type.
25184 2002-03-18 Dick Porter <dick@ximian.com>
25186 * reflection.c (mono_image_get_type_info): rename interface to
25187 iface, because of "#define interface struct" on windows.
25189 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
25191 * class.c, class.h: rename and export mono_ptr_class_get().
25192 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
25193 * reflection.c, reflection.h, icall.c: better/saner type name
25194 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
25197 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
25199 * class.c (mono_class_init): removed hardcoded GHC_SLOT
25201 * icall.c (ves_icall_InternalInvoke): impl.
25203 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
25205 * reflection.c: output the interface map table, too.
25207 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
25209 * class.c (class_compute_field_layout): separate computation of
25210 static field layout
25212 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
25214 * icall.c: added System.Buffer support.
25215 * file-io.c: moved file icalls from PAL to FileStream.
25217 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
25219 * icall.c (ves_icall_System_Object_GetHashCode): impl.
25221 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
25223 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
25225 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
25227 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
25229 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
25231 * debug-helpers.{c,h}: moved here from monograph some useful functions
25232 to locate a method by name/signature in a class or image. Included
25233 also a small and flexible IL disassembler.
25235 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
25237 * reflection.c: fixup tokens in methods with small header size, too.
25239 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
25241 * object.c (mono_string_to_utf8): remove assert(!error), instead
25244 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
25246 * icall.c: update to the new mono_Array_class_get interface.
25248 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
25250 * appdomain.c, object.c: Boehm-GC enable.
25251 * icall.c: make get_data_chunk() support split data requests.
25252 Ensure a class is initialized in more cases. Return only the first
25253 property found in GetProperties() or the compiler gets confused.
25254 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
25255 * reflection.h, reflection.c: add fixup mechanism for field and method
25256 tokens. Initialize assembly->typeref in a single place. Output
25257 properties after events. Support custom attributes for events, too.
25258 Typo fix for paramter custom attrs.
25260 2002-03-07 Martin Baulig <martin@gnome.org>
25262 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
25264 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
25266 * class.c (mono_array_class_get): fix. for multi. dim. arrays
25268 2002-03-06 Martin Baulig <martin@gnome.org>
25270 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
25271 non-zero lower bounds. See testcases #F10-#F13.
25273 2002-03-05 Martin Baulig <martin@gnome.org>
25275 * exception.c (mono_get_exception_argument_out_of_range): New exception.
25277 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
25278 ves_icall_System_Array_GetValue(), only calculate the absolute array position
25280 (ves_icall_System_Array_SetValue): Likewise.
25281 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
25282 as argument and does the actual work. This function is used when copying a
25283 multi-dimensional array.
25284 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
25285 now do all the widening conversions of value types.
25286 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
25288 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
25290 * class.c: remove some magic numbers and use the smbolic names,
25291 instead. Added init_events() to load event info at class init time.
25292 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
25293 and mono_metadata_methods_from_event().
25294 * reflection.h, reflection.c: added support for writing out the evnets
25295 related information.
25297 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
25299 * reflection.h, icall.c: use a different method (GetInterfaces)
25300 to gather interface info and add isbyref, isprimitive and
25301 ispointer to the ves_icall_get_type_info() return value.
25303 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
25305 * class.h: stared adding support for events.
25306 * icall.c: split find_members implementation. Added debug icall to get
25307 the address of an object.
25308 * reflection.c: handle TypeBuilders in mono_type_get_object().
25310 2002-03-01 Martin Baulig <martin@gnome.org>
25312 * icall.c (ves_icall_System_Array_GetLength): This must throw an
25313 ArgumentOutOfRangeException(), not an ArgumentException().
25314 (ves_icall_System_Array_GetLowerBound): Likewise.
25315 (ves_icall_System_Array_GetValue): Improved argument checking.
25316 (ves_icall_System_Array_SetValue): Improved argument checking.
25318 2002-03-01 Martin Baulig <martin@gnome.org>
25320 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
25321 called with invalid arguments rather than just dying with g_assert().
25322 (ves_icall_System_Array_SetValue): Likewise.
25323 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
25324 raise a NotImplementedException instead.
25325 (ves_icall_System_Array_GetLength): Added argument checking.
25326 (ves_icall_System_Array_GetLowerBound): Added argument checking.
25328 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
25330 * object.h (mono_assert): new macros mono_assert and
25331 mono_assert_not_reached
25333 2002-02-28 Martin Baulig <martin@gnome.org>
25335 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
25336 and "System::String::IsInterned" to "System::String::_IsInterned".
25338 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
25340 * icall.c: remove hacks for typebuilder. Added icall to create a
25341 modified type from a tybebuilder.
25342 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
25343 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
25344 to create a backing MonoClass for a TypeBuilder.
25346 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
25348 * class.c, class.h: more refactoring of class init.
25349 Export mono_class_setup_mono_type() and mono_class_setup_parent().
25351 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
25353 * marshal.c, marshal.h: start of marshaling interface.
25355 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
25357 * icall.c: fix order in assembly qualified name icall.
25359 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
25361 * class.c: do not free str, since we store it in the hash table.
25362 * reflection.h: add label field to MonoILExceptionInfo.
25363 * reflection.c: handle references to more than one assembly. Handle
25364 case when there isn't a module created in the assembly.
25366 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
25368 * class.c: Fix typo. Start refactoring of class init code.
25370 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
25372 * appdomain.c: exit with 1 on error.
25373 * class.c: we already have the name in MonoClassField.
25374 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
25375 MonoStreamHeader instead of an offset of image->raw_metadata.
25377 2002-02-26 Miguel de Icaza <miguel@ximian.com>
25379 * appdomain.c (mono_init): Be even more descriptive about the error.
25381 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
25383 * appdomain.c: give the user an informative message when corlib can't
25386 2002-02-26 Martin Baulig <martin@gnome.org>
25388 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
25389 New icall to get the time zone data.
25391 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
25393 * reflection.c: set virtual and raw size of section correctly.
25394 * threads.c: transfer domain information to newly created threads.
25396 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
25398 * class.c: when instancing a class in a domain, load the default
25399 vaules for static fields from the constant table. Fix System.Enum to
25401 * icall.c: implement Object::GetType() internalcall. Implemented
25402 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
25403 Fixed checking of binding flags in find_members().
25404 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
25405 * reflection.c: handle enumerations when writing to the constant
25406 table. Use a different object cache for types.
25409 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
25411 * object.c (mono_object_isinst): fix for arrays
25413 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
25415 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
25417 * object.c: don't use mprotect () and fix intern pool hash table
25418 lookup for big endian systems.
25420 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
25422 * icall.c: change type_is_subtype_of () signature.
25424 2002-02-21 Mark Crichton <crichton@gimp.org>
25426 * rand.c, rand.h: Added random number generator for
25427 System.Security.Cryptography classes.
25429 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
25431 * icall.c: Added System.Security.Cryptography calls.
25433 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
25435 * class.c, icall.c, metadata.c: better support for pointer types.
25436 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
25437 * reflection.c: Add support for getting custom attrs for properties
25438 and simplify some code.
25440 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
25442 * icall.c: change getToken () and add custom attribute GetBlob()helper
25444 * reflection.h: add custom attrs array to the reflection builder structures.
25445 * reflection.c: encode and emit custom attributes for all the relevant
25446 reflection objects. Cache fieldref and methodref tokens. Change
25447 mono_image_create_token() interface to take a MonoDynamicAssembly.
25448 More complete custom attributes decoder. Load custom attributes for
25449 Assembly, Field, Method and Constructor objects, too. Make the
25450 returned array an Attribute[] one, not object[]. Added
25451 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
25452 custom attribute constructor.
25454 2002-02-20 Dick Porter <dick@ximian.com>
25458 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
25459 problem code out for now).
25461 2002-02-19 Radek Doulik <rodo@ximian.com>
25463 * object.c (mono_ldstr): use hash table to avoid multiple swapping
25465 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
25467 * icall.c: register the GetCustomAttributes method.
25468 * object.c, object.h: add mono_string_new_len ().
25469 * reflection.h, reflection.c: added mono_runtime_invoke(),
25470 mono_install_runtime_invoke(). Added
25471 mono_reflection_get_custom_attrs () to load custom attributes and
25472 create the attribute objects.
25474 2002-02-19 Dick Porter <dick@ximian.com>
25475 * threads-dummy-types.c:
25476 * threads-dummy-types.h:
25479 * threads-pthread-types.c:
25480 * threads-pthread-types.h:
25481 * threads-pthread.c:
25482 * threads-pthread.h: Deleted obsolete files
25484 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
25486 * class.c (mono_class_vtable): runtime init the class when we
25487 allocate static class data.
25489 * icall.c (ves_icall_System_Array_SetValue): check for null values.
25491 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
25492 and String - but we will need generic marshalling support in the
25494 (mono_init): set the domain name in a ms compatible way
25496 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
25499 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
25501 * object.c (mono_array_clone): use alloca() instead of g_malloc
25504 * appdomain.c (mono_domain_unload): impl.
25506 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
25508 * appdomain.c, object.c: fix intern pool implementation.
25509 * class.c: fix alignment code.
25511 2002-02-16 Radek Doulik <rodo@ximian.com>
25513 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
25514 and s2 > s1, just copy lower bytes to be compatible with little
25515 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
25516 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
25518 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
25519 force big_endian to be 1 for big endian machines
25520 (ves_icall_iconv_new_decoder): ditto
25522 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
25524 * socket-io.c (convert_sockopt_level_and_name): If the system
25525 doesn't define SOL_IP or SOL_TCP, get them by hand using
25526 getprotobyname() and caching the values (because this could be a
25528 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
25529 Use the appropriate struct when the system does support it. Ie,
25530 not all systems have struct ip_mreqn so use struct ip_mreq when
25533 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
25535 * reflection.c: handle finally clauses.
25537 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
25539 * socket-io.c: use g_snprintf() instead of snprintf.
25541 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
25543 * reflection.c (mono_param_get_objects): Cast second argument to
25544 mono_method_get_param_names to a const char** to silence the
25547 * appdomain.c (mono_domain_assembly_open): Put parens around the
25548 truth statement in the for-loop.
25550 * unicode.c (iconv_convert): Got rid of a compiler warning about
25551 int i being unused when the system has a new iconv.
25552 (iconv_get_length): Same.
25554 * image.c (load_class_names): Cast the second argument to
25555 g_hash_table_insert() to char* to hush compiler warnings about the
25557 (mono_image_open): Same here.
25559 * socket-io.c: Don't conditionally include sys/filio.h or
25560 sys/sockio.h here anymore since we now get them from
25561 io-layer/io-layer.h
25562 (inet_pton): If the system doesn't support inet_aton, implement
25563 using inet_addr and also #define INADDR_NONE if it isn't defined
25566 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
25568 * metadata.c, metadata.h: added function to get packing and size info
25570 * reflection.h, reflection.c: handle field RVA data. Save info about
25571 the table layout if needed. Assign typedef indexes to all the types
25572 before dumping the info about them to avoid forward reference problems.
25574 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
25576 * socket-io.c (convert_sockopt_level_and_name): ifdef
25577 SO_ACCEPTCONN because it is not defined on my system (old debian)
25579 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
25581 * opcode.c: use stddef.h to get NULL.
25583 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
25585 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
25586 for FIONBIO, FIONREAD and SIOCATMARK.
25587 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
25588 define INADDR_NONE and besides, inet_addr() is deprecated and
25589 should not be used. Use inet_pton() instead - it also has the
25590 added bonus that it can easily handle IPv6 addresses as well.
25591 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
25593 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
25595 * decimal.c: remove _MSC_VER conditional.
25597 2002-02-13 Dick Porter <dick@ximian.com>
25600 * icall.c: Internal calls for Blocking, Select, Shutdown,
25601 GetSocketOption and SetSocketOption
25603 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
25605 * assembly.cs: better resolver: use it instead of some kludgy
25608 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
25610 * reflection.c: the best way to speed-up the compiler is to avoid
25613 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
25615 * class.c (mono_class_vtable): changed the object layout
25616 (obj->vtable->class).
25617 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
25619 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
25621 * assembly.c: look for assemblies in the assembly dir, too.
25623 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
25625 * class.c: fix thinko in mono_class_from_type().
25627 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
25629 * exception.h, exception.c: added TypeLoadException.
25630 * object.h, object.c: added mono_array_clone ().
25631 * icall.c: handle throwOnError in AssemblyGetType().
25632 Added Array.Clone().
25633 * opcode.h, opcode.c: use a single value for the opcode val.
25634 Compile fix for non-gcc compilers.
25636 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
25638 * opcodes.c, opcodes.h: export interesting info about opcodes.
25640 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
25642 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
25645 * class.c (class_compute_field_layout): set element_class for enums
25646 (mono_class_create_from_typedef): set element_class for normal classes
25648 * icall.c (ves_icall_System_Enum_get_value): impl.
25650 * class.c (mono_class_create_from_typedef): do not set valuetype
25651 flag for System.ValueType and System.Enum
25653 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
25655 * unicode.c (iconv_convert): fix big endian problem.
25657 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
25659 * class.c: add asserts if we are ever going to scribble over memory.
25660 * socket-io.c: not all systems have AF_IRDA defined.
25662 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
25664 * class.c (class_compute_field_layout): do not consider static
25665 fields to compute alignment
25667 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
25669 * appdomain.c (mono_appdomain_get): impl.
25670 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
25672 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
25674 * icall.c: ignore "file://" prefix when loading an assembly.
25676 2002-01-23 Dick Porter <dick@ximian.com>
25680 * Makefile.am: Added socket support
25682 2002-01-23 Miguel de Icaza <miguel@ximian.com>
25684 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
25685 code back. This should return the assemblies that are loaded by
25686 the runtime on behalf of an application domain.
25688 The current implementation is still broken, it just returns every
25689 assembly loaded, but until we get real applications domain this
25692 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
25694 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
25697 2002-01-23 Miguel de Icaza <miguel@ximian.com>
25699 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
25700 the mono_class_from_name lookup.
25701 (ves_icall_get_parameter_info): ditto.
25702 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
25704 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
25706 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
25708 * class.c: load also nested classes on class init.
25709 System.ValueType instance methods gets passed boxed
25710 values, unless methods in derived classed that get a pointer to the
25712 * icall.c: use better name parsing code in GetType().
25713 * image.c, image.h: add mono_image_loaded ().
25714 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
25715 * reflection.c, reflection.h: added mono_reflection_parse_type().
25717 2002-01-22 Veronica De Santis <veron78@interfree.it>
25719 * icall.c : Added mapping of internal calls for Manual and Auto reset events
25720 * threads.c : Added the implementation of internal calls for events
25721 * threads.h : Added prototypes of internal calls for events
25723 2002-01-21 Radek Doulik <rodo@ximian.com>
25725 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
25727 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
25729 * class.c (mono_class_init): set min_align to 1 (instead of 0)
25730 (mono_class_value_size): use min_align
25732 2002-01-20 Dick Porter <dick@ximian.com>
25735 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
25736 so it compiles on w32.
25738 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
25740 * metadata.c (mono_type_stack_size): impl.
25742 * class.c (mono_class_get_field): impl. memberref token
25744 2002-01-16 Veronica De Santis <veron78@@interfree.it>
25746 * icall.h : Added the internal calls mapping for CreateMutex_internal
25747 and ReleaseMutex_internal.
25748 * threads.h : Added the prototype of mutexes internal calls.
25749 * threads.c : Added the implementations of mutexes internal calls.
25751 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
25753 * metaparse.h: removed unused file.
25754 * reflection.c, reflection.h: added stream_data_align () function
25755 to align data in streams and keep stream aligned. Add support for
25756 exception support in method headers.
25758 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
25760 * unicode.c: make iconv_convert () return the number of bytess written
25761 in the output buffer.
25763 2002-01-15 Dick Porter <dick@ximian.com>
25764 * threads.c: Make the runtime's idea of infinite timeouts coincide
25765 with the class library's
25767 Fix a particularly egregious bug in mono_thread_cleanup(). That
25768 code was so utterly bogus it must have been written on a Monday.
25770 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
25772 * reflection.h: add subtypes field to TypeBuilder.
25773 * reflection.c: encode constants for literal fields.
25774 Handle subtypes. Fix user string token (and add a zero byte)
25777 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
25779 * class.c (mono_class_init): bug fix: assign slot numbers for
25782 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
25784 * reflection.c: don't try to output a code RVA for abstract methods.
25785 Small fixes for method header format. Output parameter info to the
25786 ParamDef table. Save method overriding info to MethodImpl table.
25787 Fix property support. Allow typedef.extends to be a type in the
25789 * verify.c: fix off-by-one error.
25791 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
25793 * class.c: fix mono_class_from_mono_type () for szarray types.
25794 Remove unused cache check in mono_class_from_type_spec().
25795 * icall.c: *type_from_name () functions handle simple arrays and byref.
25796 * reflection.c: handle byref and szarray types. Handle methods without
25797 body (gets P/Invoke compilation working). Handle types and fields in
25799 * reflection.h: add rank to MonoTypeInfo.
25801 2002-01-10 Dick Porter <dick@ximian.com>
25803 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
25806 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
25808 * icall.c: initialize class in type_from_handle ().
25809 Loop also in parent classes for get_method ().
25810 * reflection.c: properly encode class and valuetype types.
25811 Start on encoding TypeBuilder types. Handle fieldrefs.
25812 Use correct length when registering a user string.
25813 Handle ConstructorBuilder and MonoMethod in get_token ().
25814 Make mono_type_get_object () aware of cached types.
25815 * object.c: back out change to mono_string_new ().
25817 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
25818 * object.c: mono_string_new should return a NULL when the string
25819 passed in is NULL -- not try to deference it.
25821 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
25823 * icall.c: hack to make IsSubType work for TypeBuilders.
25824 * reflection.c: emit constructors before methods.
25825 Retrieve param names in mono_param_get_objects().
25827 2002/01/05 Nick Drochak <ndrochak@gol.com>
25829 * Makefile.am: fix list of headers and sources so automake 1.5
25830 doesn't complain. Removed \# at end of list.
25832 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
25834 * reflection.c: get token for a method ref. Set return type of
25835 constructor to void.
25836 * loader.c: debug message.
25837 * class.c: typo fix.
25839 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
25841 * icall.c: fix array init with rank > 1. FindMembers
25842 loops in parent class as well.
25843 * image.c: do not insert nested types in name cache.
25844 * reflection.c: warning fix.
25845 * reflection.h: add override method (for interface impl).
25847 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
25849 * metadata.c: fix customattr decoding.
25851 2001-12-21 Miguel de Icaza <miguel@ximian.com>
25853 * rawbuffer.cs: Added native Win32 implementation, avoids using
25854 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
25856 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
25858 * class.c: make the low-level routines handle the cache.
25860 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
25862 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
25864 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
25866 * class.c: fix mono_array_element_size() for objects.
25867 * class.h, class.c: add properties to MonoClass and load them
25869 * icall.c: check with isinst() when assigning a value to an array
25870 instead of requiring the classes to match exactly.
25871 Implemented icall for System.Type::GetType().
25872 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
25873 enums. Handle bindingflags when looking for methods and fields.
25874 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
25875 and mono_metadata_methods_from_property().
25876 * reflection.h, reflection.c: added structures for propreties,
25877 parameters and enums. Implemented mono_property_get_object() and
25878 mono_param_get_objects().
25880 2001-12-18 Dick Porter <dick@ximian.com>
25882 * file-io.c: Use mono_string_to_utf16() instead of
25883 mono_string_chars()
25885 * object.c: Added mono_string_to_utf16(), which copies the non
25886 NULL-terminated MonoString into a new double-null-terminated
25889 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
25891 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
25893 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
25895 * file-io.c: raise exceptions if handle is invalid.
25897 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
25899 * assembly.c: yet another check for mscorlib.
25900 * class.c, class.h: load nesting info for classes.
25901 * icall.c: many new functions to support the Reflection classes.
25902 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
25903 * reflection.h, reflection.c: mono_image_create_token(),
25904 mono_assembly_get_object(), mono_type_get_object(),
25905 mono_method_get_object(), mono_field_get_object(): methods to return
25906 objects that parallel the C representation of assemblies, types,
25909 2001-12-11 Dick Porter <dick@ximian.com>
25912 * file-io.c: Internal calls for file IO.
25914 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
25916 * tabledefs.h: missing FileAttributes.
25917 * verify.h, verify.c: use is_valid_string () to simplify and check for
25918 valid strings more correctly. Fix warnings and speeling.
25919 Check more tables: Filed, File, ModuleRef, StandAloneSig.
25920 Check code: branches, maxstack, method calls.
25922 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
25924 * object.c (mono_object_allocate): removed static, so that the jit
25925 can allocate value types.
25927 * icall.c (ves_icall_System_DateTime_GetNow): impl.
25929 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
25931 * class.c: init enum types right away and register the
25932 token->MonoClass map in mono_class_create_from_typedef ().
25933 * verify.h, verify.c: first cut of the verifier.
25934 * pedump.c: add --verify switch to verify metadata tables.
25935 * tabledefs.h: add some missing enums.
25937 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
25939 * class.c (mono_install_runtime_class_init): impl.
25940 (mono_class_init): renamed mono_class_metadata_init to
25941 mono_class_init, also removed the metadata_inited flag
25943 * object.c (mono_object_isinst): use faster algorithm
25945 2001-11-30 Radek Doulik <rodo@ximian.com>
25947 * mono-endian.h: reverted last change
25948 added function prototypes
25950 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
25951 add mono-endian.c back
25953 * mono-endian.c: returned back, as Paolo pointed out, it's needed
25954 for unaligned access, I've mistaked it with endianess. I am
25956 (mono_read16): fix reverted endianess
25957 (mono_read64): ditto
25958 (mono_read32): ditto
25960 2001-11-30 Dick Porter <dick@ximian.com>
25962 * exception.c: Implement mono_exception_from_name()
25964 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
25966 * metadata.h, metadata.c: remove params_size and locals_size and their
25967 calculation from the metadata code: they are only usefult to the
25970 2001-11-29 Radek Doulik <rodo@ximian.com>
25972 * object.c (mono_ldstr): swap bytes here, it's probably not the
25973 best place, but works for me now, I'll redo it once I know mono
25974 better, also note that I add PROT_WRITE and don't reset back, also
25975 note that it's only affects big endians, so x86 should be OK
25977 * mono-endian.h (read16): use just glib macros for both endians
25979 * mono-endian.c: removed as glib macros are used in in
25980 mono-endian.h so we don't need to care about endianess for read
25981 macros as glib does that for us already
25983 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
25985 * class.h, class.h: take minimum alignment into consideration so
25986 that the fields of a class remain aligned also when in an array.
25988 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
25990 * loader.h, loader.c: add mono_method_get_param_names().
25991 * class.c: 0-init class fields.
25993 2001-11-26 Dick Porter <dick@ximian.com>
25997 * threads.c: New file that handles System.Threading on all platforms
26000 * object.h: Remove the synchronisation struct from MonoObject,
26001 replace it with a pointer that gets initialised on demand
26003 * Makefile.am: Replace all the system-specific threading code with
26004 a single file that uses the new wrapper library
26006 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
26008 * class.c, class.h: add mono_install_trampoline() so that the runtime
26009 can register a function to create a trampoline: removes the ugly
26010 requirement that a runtime needed to export arch_create_jit_trampoline.
26011 * object.h, object.c: added mono_install_handler() so that the runtime
26012 can install an handler for exceptions generated in C code (with
26013 mono_raise_exception()). Added C struct for System.Delegate.
26014 * pedump.c: removed arch_create_jit_trampoline.
26015 * reflection.c: some cleanups to allow registering user strings and
26016 later getting a token for methodrefs and fieldrefs before the assembly
26018 * row-indexes.h: updates and fixes from the new ECMA specs.
26020 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
26022 * class.h, class.c: add enum_basetype field to MonoClass.
26023 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
26024 to get index in the constant table reated to a field, param or
26026 * reflection.h, reflection.c: handle constructors. Set public-key and
26027 version number of the built assembly to 0.
26028 * row-indexes.h: update from new ECMA spec.
26030 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
26032 * class.h, class.c: add a max_interface_id to MonoClass.
26033 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
26034 since it's used to do that. Added mono_type_type_from_obj().
26035 Make GetType() return NULL instead of segfaulting if the type was not
26036 found. Handle simple arrays in assQualifiedName.
26037 * object.h: add a struct to represent an Exception.
26038 * reflection.c: output call convention in method signature.
26039 Add code to support P/Invoke methods and fixed offsets for fields.
26041 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
26043 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
26045 * icall.c: use mono_array_addr instead of array->vector: fixes the
26046 reflection image writing.
26047 * reflection.c: init call convention byte to 0 in method signature.
26048 Encode the property signature. Don't output property-related methods
26049 twice. Really process the properties for a type (don't cast a field to
26050 a property, my mom always told me that).
26051 Fix 64 bit issues in pointer alignment in a different and more
26054 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
26056 * loader.h: Removed type class from MonoDefaults, added monotype
26058 * loader.c: Loaded MonoType, removed loading of Type
26060 * icall.c (my_mono_new_object): Now returns a System.MonoType,
26061 and fills in System.Type._impl with a RuntimeTypeHandle rather
26062 than the actual MonoClass *
26064 (ves_icall_type_from_handle): change from type_class to
26067 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
26070 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
26073 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
26075 (ves_icall_System_Reflection_Assembly_GetType): implemented
26077 (ves_icall_System_MonoType_assQualifiedName): implemented
26079 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
26081 2001-11-09 Miguel de Icaza <miguel@ximian.com>
26083 * assembly.c (mono_assembly_open): Implement a cache for the
26086 (mono_assembly_close): only destroy the assembly when the last
26089 2001-11-09 Dick Porter <dick@ximian.com>
26091 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
26093 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
26095 * class.c (mono_class_metadata_init): bug fix: compute the right slot
26097 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
26099 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
26100 from Martin Weindel.
26101 * object.h: add mono_string_chars ().
26103 2001-11-07 Miguel de Icaza <miguel@ximian.com>
26105 * reflection.c (build_compressed_metadata): Eliminates warnings
26106 and uses 64-bit clean code.
26108 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
26109 (mono_type_equal): Change signature to eliminate warnings.
26111 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
26113 * icall.c, loader.c: remove the internalcall array constructors.
26114 Changes to match the new MonoArray structure.
26115 * object.h, object.c: an array object doesn't allocate an extra
26116 vector. Add mono_array_new_full () to create jagged arrays easily.
26118 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
26120 * metadata.h, metadata.c: add mono_metadata_field_info () to
26121 retreive all the info about a field from vairous tables.
26122 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
26123 * class.h, class.c: augment MonoClassField with more info.
26124 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
26125 policy and load a field's RVA if needed.
26127 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
26129 * class.c (mono_class_metadata_init): create a trampoline for all
26130 virtual functions instead of actually compiling them.
26132 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
26134 * class.h, class.c: include name in MonoClassField.
26135 * class.c: fix fundamental type of System.Object and System.String.
26136 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
26138 * icall.c: remove internalcalls for the Reflection stuff that is now
26140 * loader.c: mono_field_from_memberref () implementation.
26141 * mono-endian.c: thinko (s/struct/union/g).
26142 * object.c, object.h: make the mono_string_* prototypes actually use
26143 MonoString instead of MonoObject.
26144 * reflection.c, reflection.h: updates for changes in the reflection
26145 code in corlib: we use C structures that map to the actual C# classes.
26146 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
26147 fat method header if needed and use the info from the ILGenerator for
26148 methods. Handle fields in types. Misc fixes.
26150 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
26152 * class.c (mono_class_metadata_init): bug fix: always allocate
26153 space for static class data
26155 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
26157 * class.c (mono_compute_relative_numbering): use relative
26158 numbering to support fast runtime type checks.
26160 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
26162 * class.c (mono_class_create_from_typeref): added debugging output
26163 to print class name when MonoDummy is returned instead of real class
26165 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
26167 * class.c (mono_class_metadata_init): interface offset table now
26168 contains pointers into the vtable - this is more efficient for the jit
26170 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
26172 * class.c (mono_class_metadata_init): use a temporary vtable (the
26173 old algorithm only worked for the interpreter, but not for the jit)
26175 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
26177 * loader.c (method_from_memberref): use mono_class_get to get the
26178 class of an array instead of using System.Array directly.
26179 (mono_get_method): also add MEMBERREF methods to the method cache
26180 which usefull for arrays.
26182 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
26184 * pedump.c (arch_compile_method): added to compute vtable entry
26186 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
26187 number of interfaces.
26189 * class.h: merged MonoArrayClass into MonoClass
26191 * class.c (mono_class_create_from_typedef): compute the vtable size and
26192 allocate space to include the vtable inside MonoClass
26193 (mono_class_metadata_init): initialize the vtable
26195 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
26197 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
26198 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
26199 * image.c: endian fixes by Laurent Rioux.
26200 * object.h, object.c: rename MonoStringObject to MonoString and
26201 MonoArrayObject to MonoArray. Change some function names to conform to
26202 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
26203 guint16* as first argument, so don't use char*.
26204 Provide macros to do the interesting things on arrays in a portable way.
26205 * threads-pthread.c: updates for the API changes and #include <sched.h>
26206 (required for sched_yield()).
26207 * icall.c: updates for the API changes above.
26208 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
26209 platforms that need them.
26211 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
26213 * class.c: set the correct type for all the fundamental
26214 type when loading the class.
26216 2001-10-05 Dick Porter <dick@ximian.com>
26218 * threads-pthread.c (pthread_mutex_timedlock): Simple
26219 compatibility version for C libraries that lack this call.
26221 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
26223 * class.c: MonoTypes stored in MonoClass are stored as
26224 fundamental MonoTypes when the class represents a
26225 fundamental type (System.Int32, ...).
26226 The TypeHandle return by ldtoken is a MonoType*.
26227 * icall.c: ves_icall_get_data_chunk () write out all the
26228 PE/COFF stuff. Implement ves_icall_define_method (),
26229 ves_icall_set_method_body (), ves_icall_type_from_handle ().
26230 * image.c: properly skip unknown streams.
26231 * loader.h, loader.c: add type_class to mono_defaults.
26232 * metadata.c, metadata.h: export compute_size () as
26233 mono_metadata_compute_size () with a better interface.
26234 Typo and C&P fixes.
26235 * pedump.c: don't try to print the entry point RVA if there is no entry point.
26236 * reflection.c, reflection.h: many cleanups, fixes, output method
26237 signatures and headers, typedef and typeref info, compress the metadata
26238 tables, output all the heap streams, cli header etc.
26239 * row-indexes.h: typo fixes.
26241 2001-10-04 Dick Porter <dick@ximian.com>
26243 * object.h: Add a synchronisation mutex struct to MonoObject
26245 * object.c (mono_new_object): Initialise the object
26246 synchronisation mutexes
26248 * icall.c: System.Threading.Monitor internal calls
26250 * threads-pthread.h:
26251 * threads-pthread.c: System.Threading.Monitor internal calls
26253 * threads-types.h: New file, includes the system-specific thread
26256 * threads-pthread-types.h:
26257 * threads-pthread-types.c: New files, handle pthread-specific
26258 synchronisation types
26260 * threads-dummy-types.h:
26261 * threads-dummy-types.c: New files of dummy support for
26262 thread-specific types
26266 * pedump.c: include mono-endian.h not endian.h
26268 * Makefile.am: More threads files.
26269 Name mono-endian.h not endian.h
26271 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
26273 * Makefile.am, reflection.h, reflection.c: move here the reflection related
26274 stuff and implement a few more bits.
26275 * icall.c: a field needs to be dereferenced twice. Do not use the same
26276 name for two variables in the same scope.
26277 * image.c, image.h: cleanups.
26279 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
26281 * class.c (mono_class_metadata_init): bug fix: compute the right size
26283 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
26285 * icall.c: implemented some of the Reflection internalcalls.
26286 * image.c, image.h: start writing out the PE/COFF image.
26287 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
26288 that does the reverse than decode_blob_size ().
26289 * object.c: use mono_metadata_encode_value (). Move here
26290 temporary implementation of mono_string_to_utf8 ().
26291 * rawbuffer.c: make malloc_map static.
26293 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
26295 * metadata.c: fix type comparison for arrays.
26296 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
26297 Added a couple of new classes to monodefaults.
26298 * icall.c: added a couple of Reflection-related internalcalls.
26299 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
26300 Added a byval_arg MonoType to MonoClass.
26302 2001-09-28 Dick Porter <dick@ximian.com>
26305 * threads-pthread.h:
26306 * threads-pthread.c: Implemented internal calls for
26307 LocalDataStoreSlot operations. Applied mutexes around all shared
26308 data. Reworked the thread creation and Start() operations to
26309 avoid a race condition.
26312 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
26314 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
26316 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
26318 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
26320 * class.c, loader.c: warn and return NULL instead of erroring out.
26321 * icall.c: added System.AppDomain::getCurDomain().
26322 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
26324 2001-09-25 Dick Porter <dick@ximian.com>
26326 * threads-pthread.h:
26327 * threads-pthread.c: Implemented timed thread joining and added
26328 System.Threading.Thread::Join_internal internal call
26330 * icall.c: Added System.Threading.Thread::Join_internal internal call
26333 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
26335 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
26337 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
26338 mono_string_intern () to implement the semantics of the ldstr opcode
26339 and the interning of System.Strings.
26340 * icall.c: provide hooks to make String::IsIntern and String::Intern
26343 2001-09-23 Dick Porter <dick@ximian.com>
26346 * threads-dummy.h: New files of dummy threading routines
26348 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
26349 support code based on system specifics
26351 Rename PTHREAD_LIBS to THREAD_LIBS
26353 2001-09-23 Dick Porter <dick@ximian.com>
26355 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
26356 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
26358 (mono_thread_init): Set up a Thread object instance to return when
26359 the main thread calls Thread.CurrentThread
26360 (mono_thread_cleanup): Wait for all subthreads to exit
26362 * icall.c: New internal calls for System.Threading.Thread::Sleep
26363 (including Schedule) and CurrentThread
26365 * threads.h: New file, to insulate thread-specific stuff from the
26368 2001-09-21 Dick Porter <dick@ximian.com>
26370 * threads-pthread.h:
26371 * threads-pthread.c: New file, for handling pthreads-style
26372 threading support. Start() now starts a new thread and executes
26373 the ThreadStart delegate instance.
26375 * icall.c: Added the internalcall for
26376 System.Threading.Thread::Start_internal
26378 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
26380 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
26382 * loader.c: work around the different signatures for delegates
26383 constructors csc generates in compiled code vs the ones compiled in mscorlib.
26385 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
26387 * class.h, class.c: add mono_class_get_field_from_name ().
26388 * *: Fix C comments and other ANSI C issues.
26390 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
26392 * endian.h, assembly.c: fix some endianness issues.
26394 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
26396 * loader.h, load.c: add delegate_class to mono_defaults.
26397 Handle runtime provided methods in mono_get_method ().
26399 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
26401 * loader.c (mono_get_method): use pinvoke for internal call
26403 * icall.c: use pinvoke for internal call
26405 * loader.c (method_from_memberref): set the method name
26407 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
26409 * metadata.c: help the compiler generate better code for
26410 mono_class_from_mono_type ().
26412 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
26414 * class.c (mono_class_metadata_init): delayed computing of the
26415 class size to mono_class_metadata_init ()
26417 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
26419 * class.c, class.h: add an interfaces member to MonoClass.
26420 * image.c, image.h: add assembly_name field to MonoImage
26421 from the assembly table.
26422 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
26424 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
26426 * class.c: Handle Array in mono_class_from_mono_type ().
26427 * metadata.c, pedump.c: some endian fixes.
26429 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
26431 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
26432 * metadata.c: fix small problem introduced with the latest commit.
26434 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
26436 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
26437 We don't need a MonoMetadata pointer anymore to compare signatures in
26438 mono_metadata_signature_equal (), update callers.
26439 Reduced memory usage an number of allocations for MonoMethodHeader and
26440 MonoMethodSignature.
26442 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
26444 * metadata.c: added compare for szarray.
26446 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
26448 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
26449 and add a couple more types to it and mono_defaults. Give an hint on
26450 classes that need implementing in our corlib and are referenced
26453 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
26455 * class.h, class.c: keep track if a class is also an Enum.
26456 * loader.c: Implement a couple more types for use in libffi
26457 marshalling. Gives better diagnostics when failing to dlopen
26458 a library. Set method->klass for P/Invoke methods, too.
26460 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
26462 * class.c, class.h: add a MonoType this_arg to MonoClass that
26463 represents a pointer to an object of the class' type that
26464 can be used by the interpreter and later the type cache.
26465 Add best guess alignment info for valuetype objects.
26467 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
26469 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
26470 into MonoType: one less level of indirection and allocation and
26471 simplifies quite a bit of code. Added cache for MonoTypes that are
26472 used frequently, so that we don't need to allocate them all the time.
26474 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
26476 * class.c (mono_class_create_from_typedef): System.Enum is also a
26477 value type, although it does not derive from System.ValueType
26478 (maybe a bug in the ms compiler?)
26480 * metadata.c (mono_type_size): return the right size for value types
26482 * loader.c (mono_get_method): only initialize method header if not abstract
26484 * class.c (mono_class_from_mono_type): use mono_default values.
26486 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
26488 * *: use MonoClass pointers instead of <type_tokens>
26490 * class.h: new flag: metadata_inited.
26492 * class.c (mono_class_metadata_init): impl.
26493 (mono_class_instance_size): impl.
26494 (mono_class_data_size): impl.
26496 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
26498 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
26499 MonoClass now has the name and name_space fields.
26500 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
26501 mono_get_method () takes and optional MonoClass as argument.
26502 Removed mono_typedef_from_name() and added mono_class_token_from_name()
26503 instead that takes advantage of a map from class names to typedef
26504 tokens in MonoImage.
26506 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
26508 * metadata.c: zero is not a valid alignment boundary.
26509 Merge MONO_TYPE_VOID in default decoding code.
26511 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
26513 * image.h: merged MonoMetadata into MonoImage
26515 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
26516 identify the type of elements.
26518 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
26520 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
26521 * cil-coff.h: split MonoMSDOSHeader and add size info.
26522 * image.c: add some consistency checks.
26523 * metadata.c: fix row size computation: one programmer
26524 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
26525 add explanation for the locator routine.
26526 Fix decoding of size in method header.
26528 2001-08-20 Miguel de Icaza <miguel@ximian.com>
26530 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
26531 (g_concat_dir_and_file): Bring g_concat_dir_and_file
26532 function from gnome-libs. This uses the right path separator
26533 based on the OS, and also works around a bug in some systems where
26534 a double slash is not allowed.
26535 (default_assembly_name_resolver): Use g_concat_dir_and_file
26536 (mono_assembly_open): ditto.
26538 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
26540 * metadata.c (mono_metadata_signature_equal): impl.
26542 * *: void is now a realy MonoType (instead of using NULL)
26544 * metadata.c (do_mono_metadata_parse_type): use
26545 mono_metadata_parse_type to parse void value.
26547 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
26549 * metadata.c, metadata.h: in the signature and method header store
26550 only the space required for holding the loca vars and incoming arguments.
26552 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
26554 * metadata.c (do_mono_metadata_parse_type): treat void like any
26555 other type (instead of assigning NULL);
26557 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
26559 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
26561 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
26563 * image.c (do_mono_image_open): added a cache for arrays.
26565 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
26567 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
26568 decode a single column from a row in a metadata table and changes
26569 to take advantage of it in the typedef locator (gives a nice speed up).
26570 Store offset info for function params.
26572 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
26574 * image.h (MONO_IMAGE_IS_CORLIB): removed
26576 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
26578 * assembly.c: how could mono_assembly_close () had ever worked?
26579 * metadata.c, metadata.h: provide offset info for local vars.
26580 Implement mono_type_size () to take care of alignment as well
26581 as size (it was mono_field_type_size in cli/class.c before).
26583 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
26585 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
26587 * assembly.h (CORLIB_NAME): set to corlib.dll
26589 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
26591 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
26593 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
26594 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
26595 tokentype.h: massive namespace cleanup.
26597 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
26599 * metadata.h, metadata.c: decode exception clauses when parsing method header.
26601 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
26603 * metadata.c (mono_metadata_free_type): added check for type !=
26604 NULL (void) before calling mono_metadata_free_type()
26606 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
26608 * metadata.h, row_indexes.h: added header with enumerations to use
26609 to index in the columns from tables in metadata and to decode coded
26610 tokens: we should start using this instead of embedding magic numbers
26613 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
26615 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
26616 Move metadata_t info from cli_image_info_t to MonoImage, where
26617 it's easily accessible. Changed all the uses accordingly.
26618 Added the method and class caches to MonoImage.
26619 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
26620 and mono_metadata_decode_value () signature to be more consistent
26621 with the other parse functions (and simplify code). Taken advantage
26622 of zero-length array allocation with GCC. Removed reduntant (and
26623 wrong) MonoFieldType struct and use MonoParam instead. Changed
26624 mono_metadata_parse_field_type () to use common code for parsing.
26625 Added mono_metadata_typedef_from_field () and
26626 mono_metadata_typedef_from_method () to lookup a typedef index from a
26627 field or method token.
26628 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
26630 2001-07-23 Miguel de Icaza <miguel@ximian.com>
26632 * metadata.c (mono_metadata_parse_field_type): Implement.
26633 (do_mono_metadata_parse_type): Split engine from
26634 mono_metadata_parse_type, so that we can create smaller structures
26635 for things that just have one pointer to the MonoType (look at
26638 2001-07-20 Miguel de Icaza <miguel@ximian.com>
26640 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
26641 as Jan Gray found out, it is incorrect.
26643 2001-07-18 Miguel de Icaza <miguel@ximian.com>
26645 * assembly.c: Implement asssembly loading. This loads an image
26646 and loads all the referenced assemblies. Come to think of it, we
26647 could always do lazy loading of the assemblies.
26649 * image.c (mono_image_open): Keep loaded images in a hashtable.
26651 * image.h (MonoImage): Add reference count.
26653 2001-07-17 Miguel de Icaza <miguel@ximian.com>
26655 * assembly.c (mono_assembly_open): Keep track of the file name in
26656 case the assembly has no ASSEMBLY table.
26658 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
26661 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
26663 * metadata.c, metadata.h: decode local vars in method header
26664 parse function. Change callers accordingly.
26666 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
26668 * metadata.h, cil-coff.h: protect against multiple inclusion.
26669 Added some new structures to hold information decoded from metadata:
26670 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
26671 and relevant decoding/free functions.
26672 * metadata.c: implement decoding functions. Add warning for out of bounds
26673 index in mono_metadata_locate(). Implement mono_get_method () to retreive
26674 all the info about a method signature and invocation. Remove check on
26675 uninitialized local var in parse_mh() and fix memory leak.
26677 2001-07-12 Miguel de Icaza <miguel@ximian.com>
26679 * metadata.h: More macros.
26681 * tokentype.h: New file.
26683 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
26685 * assembly.c: added a consistency check and initialize
26686 some structures with g_new0().
26687 * metadata.c: fixed a couple more bugs in table size computation
26688 and add other checks for out-of bound access to metadata.
26690 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
26692 * metatada.c: fix bugs computing table sizes. Spew a
26693 warning when index in string heap is out of bounds.
26695 2001-07-04 Miguel de Icaza <miguel@ximian.com>
26697 * metadata.h: Add a couple of macros to manipulate tokens.
26699 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
26701 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
26702 cli_section_tables).
26704 2001-07-01 Miguel de Icaza <miguel@ximian.com>
26706 * metadata.c (mono_metadata_user_string): New function, provides
26707 access to the UserString heap.
26709 2001-06-27 Miguel de Icaza <miguel@ximian.com>
26711 * metadata.c: Add inline documentation.
26713 2001-06-26 Miguel de Icaza <miguel@ximian.com>
26715 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
26718 2001-06-22 Miguel de Icaza <miguel@ximian.com>
26720 * typeattr.h: New file, TypeAttribute flags.
26722 2001-06-21 Miguel de Icaza <miguel@ximian.com>
26724 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
26725 mono_assembly_ensure_section): Section loading code.
26726 (load_section_tables): Load the sections.
26728 * mono/metadata/metadata.c (mono_metadata_locate_token,
26729 mono_metadata_locate): Functions to locate the information
26730 definition given a token or a table and an index.
26731 (mono_metadata_compute_table_bases): New.
26732 (compute_size): New function to compute the sizes of the various
26735 * mono/metadata/metadata.h: Finish listing the different index
26738 * mono/metadata/pedump.c: Improve to dump new information.
26740 2001-06-19 Miguel de Icaza <miguel@ximian.com>
26742 * mono/metadata/metadata.c: Entered all the tables matching
26745 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2