1 2008-06-11 Zoltan Varga <vargaz@gmail.com>
3 * assembly.c (mono_assembly_load_from_full): Call
4 mono_assembly_load_friends () outside the assemblies lock, since it can
5 acquire the loader lock. Fixes #323696.
7 * reflection.c (resolve_object): Inflate the inst with the context for
8 FieldOnTypeBuilderInst. Fixes #399010.
10 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
12 * reflection.c (mono_image_get_field_on_inst_token): Don't
13 inflate the field to encode it's signature. If it's a
14 VAR or MVAR it should stay that way in the signature.
17 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
19 * reflection.c (resolve_object): Release memory of inflated types.
21 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
23 * loader.c (mono_method_get_signature_full): Remove assert about
24 loading a methodspec to a generic method. We have such methods, such as
25 System.Threading.Interlocked::CompareExchange<T>.
26 This assert was removed since it crashes the verifier when it checks
27 methods calling CompareExchange<T>.
29 2008-06-10 Marek Safar <marek.safar@gmail.com>
31 * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
32 of Type array and not MonoType.
34 2008-06-10 Marek Habersack <mhabersack@novell.com>
36 * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
39 2008-06-10 Martin Baulig <martin@ximian.com>
41 * debug-mono-symfile.h
42 (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6. There were no
43 changes to the file format, but we were generating incorrect
44 source file indices in the line number table due to a bug, which
45 made backtraces report an incorrect source file.
47 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
49 * mono-debug.c: Moved mono_debug_free_method_jit_info from
50 mini/debug-mini.c to here.
52 * mono-debug.c (il_offset_from_address): Free memory from find_method.
54 * mono-debug.h: Export mono_debug_free_method_jit_info, users should
55 use it to release structs returned by mono_debug_find_method.
57 2008-06-10 Zoltan Varga <vargaz@gmail.com>
59 * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
60 since it needs to set method->slot for all interface methods.
62 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
64 * class-internals.h: Forgot to add.
66 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
68 * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
70 * reflection.c (lookup_custom_attr): Added a MonoImage argument.
71 Lookup the custom attributes from property_hash.
73 * reflection.c (mono_save_custom_attrs): Save the custom attributes
74 in property_hash. Allocate all data using the image mempool.
76 * reflection.c: Removed dynamic_custom_attrs. Changed all checks
77 for dynamic_custom_attrs to checks if the image is dynamic.
79 2008-06-09 Zoltan Varga <vargaz@gmail.com>
81 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
84 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
85 runtime functions while holding the domain assemblies lock.
87 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
89 * verify.c: Reapplied the last bit of the reverted changes.
91 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
93 * verify.c: Reapplied more of the reverted changes.
95 2008-06-09 Martin Baulig <martin@ximian.com>
97 * debug-mono-symfile.c (load_symfile): Check the major version
98 first; if it's wrong, don't print the minor version in the error message.
100 2008-06-09 Zoltan Varga <vargaz@gmail.com>
102 * appdomain.c (set_domain_search_path): Make this use the domain assemblies
103 lock instead of the domain lock to avoid deadlocks, since the thread might
104 already hold the loader lock.
106 * threads.c (start_wrapper): Call mono_monitor_init_tls ().
107 (mono_thread_attach): Ditto.
109 * monitor.c: Use a TLS variable for holding the current thread id instead
110 of calling pthread_self ().
111 (mono_monitor_init_tls): New internal function to initialize the TLS
113 (mono_monitor_try_enter_internal): Put the owner == id check after the
116 * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
117 missed optimizations when using gcc-4.3.
119 2008-06-08 Rodrigo Kumpera <rkumpera@novell.com>
121 * reflection.c (mono_dynamic_image_free): Free the memory
122 used by MonoGenericParam in MonoDynamicImage::gen_param.
124 * reflection.c (mono_reflection_setup_generic_class): Allocate
125 container from mempool.
127 * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
128 container from mempool.
130 2008-06-07 Zoltan Varga <vargaz@gmail.com>
132 * threads.c (mono_set_pending_exception): New internal function to set the
133 pending exception of the current thread.
134 (mono_thread_get_and_clear_pending_exception): Check for
135 thread->pending_exception as well.
137 * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
139 * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
140 it can trigger a collection.
142 2008-06-06 Martin Baulig <martin@ximian.com>
144 Merged the `debugger-kahalo' branch.
147 (MONO_DEBUGGER_VERSION): Bumped to 72.
149 * debug-mono-symfile.h
150 (MonoSymbolFileMethodIndexEntry): Removed.
151 (MonoSymbolFileMethodEntry): New public typedef.
152 (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
153 (MonoSymbolFileSourceEntry): Remove everything except `index' and
155 (MonoSymbolFileMethodEntry): Removed.
156 (MonoSymbolFileLexicalBlockEntry): Removed.
157 (MonoSymbolFileLineNumberEntry): Removed.
158 (MonoDebugLexicalBlockEntry): Removed.
159 (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
160 removed `num_il_offsets' and `il_offsets'.
161 (MonoSymbolFile): Replace `version' with `major_version' and
163 (MONO_SYMBOL_FILE_VERSION): Replace with
164 `MONO_SYMBOL_FILE_MAJOR_VERSION' and
165 `MONO_SYMBOL_FILE_MINOR_VERSION'.
167 * debug-mono-symfile.c
168 (mono_debug_symfile_lookup_location): Add support for the new line
171 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
173 * metadata.c (free_generic_class): Release the inflated
174 MonoClass of dynamic generic classes if it's not a generic
177 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
179 * verify.c: Reapplied more of the reverted changes.
181 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
183 * reflection.c (lookup_custom_attr): Clean the cached flag or
184 nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
187 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
189 * verify.c: Reapplied a small part of the reverted changes.
191 2008-06-07 Zoltan Varga <vargaz@gmail.com>
193 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
195 * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was
196 previously in managed code.
197 (mono_monitor_exit): Ditto.
198 (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
200 * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
201 the managed definition.
203 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
205 * verify.c: Revert changes to see if it helps with weird buildbot crashes.
207 2008-06-06 Zoltan Varga <vargaz@gmail.com>
209 * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
211 * monitor.c: Add some micro optimizations.
213 * icall.c (type_from_typename): Handle 'bool'.
215 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
217 * verify.c: Implement constructor verification per P III 1.8.1.4.
220 2008-06-06 Zoltan Varga <vargaz@gmail.com>
222 * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
223 holding the assemblies lock here too.
225 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
227 * verify.c: Kill stack_top function.
229 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
231 * verify.c: Kill stack_get function.
233 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
235 * verify.c (mono_method_verify): Last change broke the build. Fixed.
237 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
239 * verify.c (verify_type_compatibility_full): Make SZARRAY checks
242 * verify.c (mono_method_verify): Inflate params and locals to avoid
243 mismatch when checking for compatibility.
245 2008-06-05 Jonathan Chambers <joncham@gmail.com>
247 * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
248 Length prefix should be size in bytes. Fix bug #339530.
250 * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
251 Length prefix should be size in bytes. Fix bug #339530.
253 Code is contributed under MIT/X11 license.
255 2008-06-05 Bill Holmes <billholmes54@gmail.com>
257 * decimal.c: Adding MSVC implementation to my_g_bit_nth_msf.
259 Contributed under MIT/X11 license.
261 2008-06-05 Martin Baulig <martin@ximian.com>
263 * mono-debug-debugger.c
264 (mono_debugger_check_breakpoints): Reflect latest runtime changes.
266 2008-06-05 Zoltan Varga <vargaz@gmail.com>
268 * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
269 while holding the assemblies lock to prevent deadlocks. Handle the case
270 where the search hook returns NULL but the assembly was still loaded.
273 * appdomain.c (set_domain_search_path): Acquire the domain lock since we
276 2008-06-05 Andreas Färber <andreas.faerber@web.de>
278 * boehm-gc.c: Add DTrace probes gc-{begin,end}.
279 * Makefile.am (pedump_LDADD): Post-process object files and
280 add dtrace-generated object file, if necessary.
282 Code is contributed under MIT/X11 license.
284 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
286 * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
288 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
290 * class.c (mono_type_get_full): Add a work-around for generic type definitions.
292 2008-06-04 Mark Probst <mark.probst@gmail.com>
294 * threads.c: Try to free everything from the delayed free table
295 when shutting down threads, and set the variable to NULL after the
296 table is freed so that calling
297 mono_thread_hazardous_try_free_all() when shutting down the root
298 domain doesn't crash.
300 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
302 * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
303 the caller if resulting type was inflated.
305 * class.c (mono_class_create_from_typespec): Free the MonoType if it
308 * class.c (mono_type_get_full): Free the MonoType if it was inflated.
311 2008-06-04 Zoltan Varga <vargaz@gmail.com>
313 * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
316 * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume
317 (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
320 2008-06-04 Mark Probst <mark.probst@gmail.com>
322 * domain.c, domain-internals.h: The JIT infos are now freed by the
323 JIT info table code. They are freed immediately if there only a
324 single JIT info table in circulation. If there is more, the free
325 is delayed via a queue.
327 * threads.c, threads-types.h: New hazard pointer function for
328 freeing all freeable delayed items in one sitting.
330 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
332 * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
334 * reflection.c (typebuilder_setup_properties): Same.
336 * reflection.c (typebuilder_setup_events): Same.
338 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
340 * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
341 and use it for allocating memory.
343 * reflection.c (mono_marshal_spec_from_builder): Same.
345 * reflection.c: Change code to use new signatures.
347 * metadata.c (mono_metadata_type_dup): Add a FIXME note.
349 2008-06-03 Zoltan Varga <vargaz@gmail.com>
351 * decimal.c (rescale128): Put back one line which was accidently commented
354 * decimal.c (rescale128): Disable the code added by the last patch, as it seems
357 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
359 * reflection.c (mono_reflection_generic_class_initialize): Name must
360 be always malloc'ed so we can free it later on. Do this for field, property
363 * metadata.c (free_generic_class): Free field, property and event names.
365 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
367 * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
370 * reflection.c (typebuilder_setup_fields): Same.
372 2008-06-03 Zoltan Varga <vargaz@gmail.com>
374 * decimal.c (rescale128): Optimize this function a bit more.
376 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
378 * metadata.c (free_generic_class): Release some memory from
381 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
383 * reflection.c (mono_image_get_generic_field_token): No reference
384 to name is kept, free it.
386 * reflection.c (mono_reflection_generic_class_initialize): Free
387 more memory of the inflated field.
389 2008-06-03 Zoltan Varga <vargaz@gmail.com>
391 * decimal.c (mono_decimalDiv): Moved equality checks here from managed
394 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
396 * reflection.c (mono_dynamic_image_free): Release memory used by
397 MonoDynamicImage::array_methods elements.
399 * reflection.c (assembly_add_win32_resources): Release memory after
402 2008-06-02 Zoltan Varga <vargaz@gmail.com>
404 * decimal.c (log2_32): Use an optimized version for this function too.
406 * decimal.c (log2_64): Fix this on 32 bit machines.
408 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
410 * class.c (mono_dup_array_type): Implement allocation using a mempool.
412 * class.c (mono_metadata_signature_deep_dup): Same.
414 * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
417 * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
419 * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
421 * metadata-internals.h: Added mono_metadata_signature_dup_full.
423 * class-internals.h: Update signatures to take a MonoMemPool.
425 2008-06-02 Dick Porter <dick@ximian.com>
427 * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage):
429 System.ComponentModel.Win32Exception.W32ErrorMessage, using the
430 FormatMessage API to get the error text. Fixes bug 321827.
432 2008-06-02 Zoltan Varga <vargaz@gmail.com>
434 * decimal.c: Add some micro optimizations to make decimal operations faster.
436 2008-06-01 Rodrigo Kumpera <rkumpera@novell.com>
438 * reflection.c (method_encode_clauses): Take a mempool
439 as parameter and use it to allocate the clause array.
441 * reflection.c (mono_image_get_field_on_inst_token): Free
442 the inflated type after encoding it.
444 * reflection.c (mono_dynamic_image_free): Free each element
445 of MonoDynamicImage::gen_params.
447 * reflection.c (reflection_methodbuilder_to_mono_method):
448 Allocate the generic param array from the mempool.
449 Allocate signature params from the mempool.
451 * reflection.c (mono_reflection_generic_class_initialize):
452 Free inflated fields after been used.
454 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
456 * icall.c: Reapply the memory leak fixes as they no
457 longer make mono crash.
459 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
461 * reflection.c (mono_type_get_object): Don't store the suplied
462 MonoType with type_hash. A caller which pass a type that
463 was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
464 might end with a pointer to freed memory.
465 The solution is to use byval_arg or this_arg from the associated
466 MonoClass of the supplied type.
468 2008-05-29 Zoltan Varga <vargaz@gmail.com>
470 * icall.c: Revert the rest of the last change as it breaks the build too.
472 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
474 * icall.c: Revert a leak fix as it's breaking the build.
476 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
478 * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
480 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
482 * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
484 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
486 * icall.c: Fix some memory leaks.
488 2008-05-29 Dick Porter <dick@ximian.com>
490 * threadpool.c (mono_thread_pool_remove_socket): Always remove the
491 async socket operations from the pending list when a socket
492 closes. Leaving it until the threadpool services the event
493 exposes a race condition when a socket descriptor is reused.
496 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
498 * object.c: Fix negative index check for array alocation.
500 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
502 * icall.c, marshal.c: Delegate wrappers should skip visibility.
503 This check is performed by the verifier for IL created delegates
504 and by Delegate::CreateDelegate for programatically created ones.
507 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
509 * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
510 Fix code to use mono_array_size_t instead of int.
512 Based on patch by Luis F. Ortiz.
513 Contributed under X11 license.
514 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
516 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
518 * icall.c: Added ves_icall_System_Array_GetLongLength and
519 ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
522 * icall.h: Export both new functions.
524 Based on patch by Luis F. Ortiz.
525 Contributed under X11 license.
526 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
528 2008-05-28 Martin Baulig <martin@ximian.com>
530 The debugger now requires exactly r103463.
532 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
533 This version is not supported by the debugger, wait for 72.
535 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
537 * object.h: Changed array related functions to use
538 mono_array_size_t instead of guint32. Forgot to commit this file.
540 Patch by Luis F. Ortiz.
541 Contributed under X11 license.
542 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
545 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
547 * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
548 don't define it. Use the number literal instead.
550 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
552 * icall.c: Changed array related functions to use
553 mono_array_size_t instead of guint32.
555 * icall.c (ves_icall_System_Array_GetLength): Check for length
556 overflow under MONO_BIG_ARRAYS.
558 Based on patch by Luis F. Ortiz.
559 Contributed under X11 license.
560 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
562 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
564 * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
566 Based on patch by Luis F. Ortiz.
567 Contributed under X11 license.
568 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
570 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
572 * object.c, object.h: Changed array related functions to use
573 mono_array_size_t instead of guint32.
575 Patch by Luis F. Ortiz.
576 Contributed under X11 license.
577 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
579 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
581 * object.h: Introduced mono_array_size_t typedef. This must be used
582 in all places an array length is expected. This is 64bits wide if
583 MONO_BIG_ARRAYS is enabled.
585 Patch by Luis F. Ortiz.
586 Contributed under X11 license.
587 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
589 2008-05-27 Zoltan Varga <vargaz@gmail.com>
591 * security-manager.c class.c: Set the class exception info by calling
592 mono_class_set_failure ().
594 * class.c (mono_class_get_exception_data): New accessor function.
595 (mono_class_set_failure): Store exception_data in the property hash.
597 * class-internals.h (struct _MonoClass): Store 'exception_data' outside
598 the struct as a property.
600 * loader.c (mono_get_method_full): Store the lookup result for method
601 tokens in method_cache, the others in methodref_cache to decrease the memory
602 usage of hash tables.
604 * image.c (mono_image_close): Destroy method_cache and methodref_cache.
605 (mono_image_init): method_cache is lazy inited now.
607 * metadata-internals.h (struct _MonoImage): Change method_cache to
608 a MonoValueHashTable, add a separate methodref_cache.
610 2008-05-27 Eyal Alaluf <eyala@mainsoft.com>
612 * number-formatter.h: Fix tables to avoid arithemtic overflow in
613 Double.ToString as exposed by Bug #383531.
615 2008-05-26 Zoltan Varga <vargaz@gmail.com>
617 * number-formatter.h: Make some tables static.
619 * class.c (mono_method_set_generic_container): New accessor function.
620 (mono_method_get_generic_container): Ditto.
622 * class-internals.h (struct _MonoMethod): Remove rarely used
623 'generic_container' field, store it in the property hash instead. Add
624 'is_generic' boolean field instead.
626 * image.c (mono_image_init): Initialize property_hash.
627 (mono_image_close): Destroy property_hash.
629 * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
630 hold rarely used fields of runtime structures belonging to this image.
632 * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
633 to get/set method->generic_container.
635 * loader.c (mono_get_method_from_token): Avoid loading the method header for
638 2008-05-25 Zoltan Varga <vargaz@gmail.com>
640 * class.c (mono_class_inflate_generic_method_full): Don't increase
641 mono_stats.inflated_method_count for methods found in the cache.
643 * threads.c (mono_thread_request_interruption): Add a comment about
646 2008-05-24 Zoltan Varga <vargaz@gmail.com>
648 * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
649 interface_offsets_packed table.
651 * class.c (mono_class_init): Remove some dead code.
653 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
654 mono_class_setup_vtable () when CAS is active to detect security problems.
656 2008-05-23 Rodrigo Kumpera <rkumpera@novell.com>
658 * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
660 * verify.c (mono_delegate_signature_equal): Don't compar number of generic
661 parameters as it's irrelevant for delegate checking.
663 2008-05-23 Zoltan Varga <vargaz@gmail.com>
665 * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
667 * class.c (mono_class_init): Control the creation of a generic vtable using
668 a global which is true by default, but set to false by the runtime startup code.
670 * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
671 Disabled for now since it breaks the embedding API.
672 Move the setup of class->methods for arrays to mono_class_setup_methods ().
673 (mono_class_setup_methods): Add a memory barrier.
675 * object.c (mono_class_create_runtime_vtable): Add code to handle the case
676 when mono_class_init () doesn't compute the generic vtable.
678 2008-05-23 Massimiliano Mantione <massi@ximian.com>
679 * profiler.c: Added mono_profiler_install_statistical_call_chain,
680 mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
681 to support call chains (backtrace) in the stat profiler.
682 * profiler.c, profiler-private.h: Likewise.
684 2008-05-22 Mark Probst <mark.probst@gmail.com>
686 * generic-sharing.c: Init generic class when a method of it is
687 requested via a runtime generic context.
689 2008-05-22 Zoltan Varga <vargaz@gmail.com>
691 * class.c (mono_class_init): Add a comment about trying to avoid calling this.
693 * reflection.c (mono_type_get_object): Add a FIXME.
695 * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
697 * class.c (mono_class_get_method_by_index): New helper function, returning an
698 entry in the class->methods array.
700 2008-05-21 Zoltan Varga <vargaz@gmail.com>
702 * class.c (mono_class_init): Only do the array optimization for szarrays.
703 Avoid creating a generic vtable for generic instances as well.
704 (mono_class_get_method_from_name_flags): Don't search in the metadata for
707 2008-05-21 Rodrigo Kumpera <rkumpera@novell.com>
709 * loader.c (mono_get_method_constrained): Inflate the signature
710 with class context. Fix #325283.
712 2008-05-21 Zoltan Varga <vargaz@gmail.com>
714 * object.c (mono_class_create_runtime_vtable): Add a comment.
716 * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
718 (setup_interface_offsets): Handle the case when this is called twice for arrays.
719 (mono_class_setup_vtable_general): Add an assert.
720 (mono_class_init): Avoid creating a generic vtable for arrays.
722 * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
723 here, let mono_class_init () do that.
725 * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
726 interfaces in mscorlib.
728 * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
729 interfaces. Add some comments.
730 (mono_class_init): Call mono_class_setup_methods () here since it is no
731 longer called by mono_class_setup_vtable ().
733 * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
734 not set in class->vtable.
735 (mono_class_create_runtime_vtable): Reenable the disabled code.
737 * object.c (mono_class_create_runtime_vtable): Disable the last change for
738 now as it causes some test failures.
740 * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
741 if using the vtable trampoline. Also remove some strange code which put the
742 generic methods themselves into the vtable slots. Remove the AOT init_vtable
743 stuff as it is no longer needed.
745 2008-05-19 Rodrigo Kumpera <rkumpera@novell.com>
747 * pedump.c: Give make --verify all option check code as well.
748 Using --verify code won't check for metadata now.
750 2008-05-19 Martin Baulig <martin@ximian.com>
752 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
755 (_mono_debug_using_mono_debugger): New global variable; it's set
756 directly by the debugger, so mono_debug_using_mono_debugger() also
757 works after attaching.
759 2008-05-18 Rodrigo Kumpera <rkumpera@novell.com>
761 * object.c (mono_class_create_runtime_vtable): Use memory barriers
762 as we do double checked locking on MonoClass::runtime_info and
763 MonoClassRuntimeInfo::domain_vtables.
765 2008-05-18 Zoltan Varga <vargaz@gmail.com>
767 * debug-helpers.c (print_field_value): Fix a warning.
769 2008-05-16 Zoltan Varga <vargaz@gmail.com>
771 * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
774 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
776 * class.c (mono_class_setup_vtable_general): Use memory barriers
777 as we do double checked locking on MonoClass::vtable.
779 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
781 * reflection.c (resolve_object): Inflate only if the generic context
782 is not null. Fixes #389886.
784 2008-05-15 Jonathan Chambers <joncham@gmail.com>
786 * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
789 Code is contributed under MIT/X11 license.
791 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
793 * class.c: Revert unrelated change.
795 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
797 * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
798 a generic instantiation, use mono_class_from_mono_type instead of playing
799 with MonoType directly.
801 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
803 * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
804 checks must ignore generic instantiations, so mono_class_has_parent is not
805 suitable. Fixes #390128.
807 2008-05-14 Zoltan Varga <vargaz@gmail.com>
809 * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
810 it to avoid registering tokens during metadata generation. Fixes #390023.
812 2008-05-14 Kornél Pál <kornelpal@gmail.com>
814 * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
817 Contributed under MIT/X11 license.
819 2008-05-14 Kornél Pál <kornelpal@gmail.com>
821 * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
822 even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
823 to fixup the EXE image.
824 (mono_cleanup): Use mono_close_exe_image.
825 (mono_close_exe_image): New function.
826 * image.c: Include "marshal.h".
827 (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
828 (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
829 counting when the image is loaded outside of mono_image_open_full. Set status
830 based on GetLastError.
831 * coree.c: Include required headers. Add init_from_coree.
832 (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
833 mono_assembly_open only when the image has vtfixups. Set init_from_coree.
834 (_CorExeMain): Set init_from_coree.
835 (CorExitProcess): Only call ExitProcess for now.
836 (CorBindToRuntimeEx): New stub implementation.
837 (CorBindToRuntime): New function.
838 (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
839 (MonoFixupExe): ILONLY executables require no fixups.
840 (mono_set_act_ctx): New function to set activation context.
841 (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.
842 * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
843 Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
844 mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
846 * domain-internals.h: Add mono_close_exe_image.
848 Contributed under MIT/X11 license.
850 2008-05-13 Rodrigo Kumpera <rkumpera@novell.com>
852 * metadata.c (mono_metadata_compute_size): Correctly calculate field
853 size for generic param and event tables. Fixes #388977.
855 2008-05-13 Zoltan Varga <vargaz@gmail.com>
857 * loader.c (mono_method_signature): Use memory barriers because of the double
858 checked locking pattern.
860 * threads.c (remove_and_abort_threads): Stop and wait for threads which are
861 aborting or aborted as well. Fixes #376391.
863 * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
864 existing runtime state in the Suspend handler during shutdown.
866 2008-05-12 Zoltan Varga <vargaz@gmail.com>
868 * threads.c (mono_thread_request_interruption): Add some FIXMEs.
870 * threads.c (mono_thread_suspend_all_other_threads): Add support for threads
871 which are starting up or shutting down.
873 * threads.c (mono_threads_set_shutting_down): Don't return a value since
874 this function never returns if the runtime is already shutting down.
876 * icall.c (ves_icall_System_Environment_Exit): Update after
877 mono_threads_set_shutting_down () signature change.
879 2008-05-09 Rodrigo Kumpera <rkumpera@novell.com>
881 * class.c: Added can_access_instantiation to verify if the instantiation
882 is visible. Fix access check for nested types as they returned TRUE
883 before doing type and generic instantiation visibility checks.
885 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
887 * reflection.c (mono_reflection_create_generic_class): The created type
888 must have a different container from its TypeBuilder. Otherwise they
889 will end sharing generic arguments, which is wrong.
891 Due to the sharing, making a generic instance of the created type using
892 the TypeBuider generic arguments resulted in the generic type definition
893 been returned, which is wrong as well.
895 As a bonus the code was leaking the type_params array. This memory should
896 be allocated from the image mempool.
898 This fixes bug #354047.
900 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
902 * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
903 to here as they are now used in assembly.c new code.
904 Added a skipverification flag to MonoAssembly.
905 New internal function mono_assembly_has_skip_verification.
907 * assembly.c: New function mono_assembly_has_skip_verification. It checks
908 if an assembly has a version 2.0 SkipVerification security attribute. Fixes
911 2008-05-07 Zoltan Varga <vargaz@gmail.com>
913 * object.c (mono_object_get_virtual_method): Inflate the resulting method if
914 needed. Fixes #387034.
916 * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
918 2008-05-06 Miguel de Icaza <miguel@novell.com>
920 * assembly.c (mono_assembly_load_reference): Prevent crash while
921 disassembling Silverlight 2.0 executables while we still do not
922 have GACed libraries.
924 2008-05-07 Zoltan Varga <vargaz@gmail.com>
926 * reflection.c: Special case generic type definitions as well. Fixes #383444.
928 2008-05-06 Zoltan Varga <vargaz@gmail.com>
930 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
931 of the dynamic case. Fixes #387404.
933 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
935 *verify.c (mono_verifier_is_class_full_trust): If under
936 verify_all and the verifier mode was not set, only
937 gac and corlib types are fulltrust. This makes --verify-all
938 usable to detect unverifiable code, which is the expected
941 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
943 * verify.h: Ops, commited the header with debug
946 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
948 * verify.c (merge_stack): Use the new value on unverifiable
951 * verify.c (verify_type_compatibility_full): Comparison
952 of nullable types can't use mono_class_is_assignable_from.
954 * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
955 that makes all verification errors be reported.
957 * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
960 2008-05-05 Robert Jordan <robertj@gmx.net>
962 * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
963 support for value types. See #386415.
965 * object.c: comments.
967 Code is contributed under MIT/X11 license.
969 2008-05-05 Martin Baulig <martin@ximian.com>
971 * debug-mono-symfile.h
972 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
973 for old pre-terrania symbol files.
975 2008-05-05 Andreas Färber <andreas.faerber@web.de>
977 * mono-config.c: Add ppc64 architecture.
979 Code is contributed under MIT/X11 license.
981 2008-05-05 Andreas Färber <andreas.faerber@web.de>
983 * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
984 PPC64 uses function descriptors as well.
986 Code is contributed under MIT/X11 license.
988 2008-05-04 Zoltan Varga <vargaz@gmail.com>
990 * object.c (compute_class_bitmap): Ignore literal static fields.
992 * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
993 var has an invalid format.
994 (describe_ptr): Add some sanity checks for the vtable.
995 (add_nursery_frag): Clear unused nursery fragments.
996 (major_collection): Clear all remaining nursery fragments.
998 2008-05-03 Robert Jordan <robertj@gmx.net>
1000 * image.c, metadata-internals.h: add thunk_invoke_cache.
1002 * marshal.c, marshal.h: implement
1003 mono_marshal_get_thunk_invoke_wrapper ().
1005 * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
1007 Code is contributed under MIT/X11 license.
1009 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
1011 * verify.c (do_leave): Empty the stack.
1013 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
1015 * class.c (mono_class_is_assignable_from): Variance
1016 doesn't work between reference and value types. For example,
1017 given type C<T+>, C<int32> is not assignable to C<object>.
1018 Break the argument checking loop on first error.
1020 2008-05-02 Atsushi Enomoto <atsushi@ximian.com>
1022 * icall.c : base64_to_byte_array() needs some more strict
1023 check for sequence of '=' characters. Patch by Santa
1024 Marta (http://deee.g.hatena.ne.jp/santamarta).
1026 Contributed under MIT/X11 license.
1027 (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
1029 2008-05-02 Jonathan Chambers <joncham@gmail.com>
1031 * domain.c: Disable LoadLibrary support to fix Win32 build.
1033 Code is contributed under MIT/X11 license.
1035 2008-05-02 Zoltan Varga <vargaz@gmail.com>
1037 * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
1038 to help with cache behaviour.
1040 2008-05-01 Miguel de Icaza <miguel@novell.com>
1042 * appdomain.c (mono_domain_from_appdomain): Add new accessor
1045 2008-05-01 Zoltan Varga <vargaz@gmail.com>
1047 * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
1049 2008-05-01 Dick Porter <dick@ximian.com>
1051 * process.c (process_get_fileversion): Only pass 16 bits of
1052 language ID to VerLanguageName. Fixes bug 381204.
1054 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
1056 * verify.c (mono_method_verify): Fix the comparison
1057 operator for code bounds check.
1059 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
1061 * verify.c (mono_method_verify): Check the bounds of
1062 all access of the code array.
1064 2008-04-29 Kornél Pál <kornelpal@gmail.com>
1066 * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
1068 2008-04-28 Zoltan Varga <vargaz@gmail.com>
1070 * image.c (mono_image_strong_name_position): Fix return value when the rva is
1073 2008-04-28 Kornél Pál <kornelpal@gmail.com>
1075 * loader.c (mono_get_method_from_token, mono_method_signature): Add
1076 support for METHOD_IMPL_ATTRIBUTE_NATIVE.
1077 * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
1078 fixup main EXE images when using mono.exe for mixed-mode assembly support.
1079 * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
1081 * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
1082 runtime initialization from metadata.
1083 * assembly.c: Remove obsolete ceGetModuleFileNameA.
1084 (mono_set_rootdir): Use mono_get_module_file_name.
1085 (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
1087 * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
1088 * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
1089 * image.c (mono_cli_rva_image_map): Use MonoImage instead of
1090 MonoCLIImageInfo. Add support for module handles.
1091 (load_cli_header): Update mono_cli_rva_image_map signature.
1092 (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
1093 (mono_image_strong_name_position): Use mono_cli_rva_image_map.
1094 (mono_image_rva_map): Add support for module handles.
1095 (mono_image_ensure_section_idx): Add support for module handles.
1096 (mono_image_close): Add support for module handles.
1097 (do_load_header): Add support for module handles.
1098 (mono_image_open_from_module_handle): New function for internal use.
1099 (mono_image_open_full): Load normal images using LoadLibrary on Windows.
1100 (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
1101 (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
1103 (mono_image_fixup_vtable): New function for mixed-mode assembly support.
1104 * image.h: Add mono_image_fixup_vtable.
1105 * coree.c: New file for mscoree.dll functions and mixed-mode assembly
1107 * coree.h: New file.
1108 * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
1109 unsupported native code.
1110 (mono_marshal_set_callconv_from_modopt): New function splitted from
1111 mono_marshal_get_managed_wrapper.
1112 (mono_marshal_get_managed_wrapper): Use
1113 mono_marshal_set_callconv_from_modopt.
1114 (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
1115 * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
1116 * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
1117 that results in a deadlock when the runtime is loaded in _CorDllMain.
1118 * Makefile.am: Add coree.c and coree.h.
1120 Contributed under MIT/X11 license.
1122 2008-04-28 Mark Probst <mark.probst@gmail.com>
1124 * generic-sharing.c: Search for type arguments in array element
1127 2008-04-28 Mark Probst <mark.probst@gmail.com>
1129 * class-internals.h, generic-sharing.c: New, small runtime generic context.
1131 * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
1133 * object.c: Don't setup the RGCTX when the vtable is created,
1134 because we're setting it up lazily now.
1136 2008-04-26 Zoltan Varga <vargaz@gmail.com>
1138 * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix
1141 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
1143 * verify.c (verify_class_for_overlapping_reference_fields):
1144 If class is under fulltrust allow reference types to overllap
1145 if they have the same RVA.
1147 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
1149 * pedump.c: Added new flag valid-only, that makes the verifier
1150 behaves just like --security=validil. It won't fail type load
1151 due to unverifiable restrictions.
1153 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
1155 * class-internals.h (struct MonoMethod): Added a verification_success
1156 field to cache verifier executions. Reduced MonoMethod:slot size by
1159 2008-04-23 Zoltan Varga <vargaz@gmail.com>
1161 * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
1162 instead of a 'vt' argument to save an indirection and to allow these to be used
1164 (scan_vtype): New helper function to scan an area using a gc descriptor.
1165 (mono_gc_wbarrier_value_copy): Implement this.
1166 (handle_remset): Add support for REMSET_VTYPE.
1167 (find_in_remset_loc): Ditto.
1168 (mono_gc_base_init): Allow some debugging options to be controlled through the
1169 use of the MONO_GC_DEBUG env variable.
1170 (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
1171 (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
1173 2008-04-23 Martin Baulig <martin@ximian.com>
1175 * domain.c (mono_domain_create): Move the call to
1176 mono_debug_domain_create() down, after allocating the domain id.
1178 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
1180 verify.c (verify_class_for_overlapping_reference_fields): Skip
1181 static fields while verifying for overlapping fields as they
1182 don't matter at all.
1184 2008-04-23 Marek Habersack <mhabersack@novell.com>
1186 * domain-internals.h: added a declaration of
1187 mono_make_shadow_copy.
1189 * assembly.c (mono_assembly_open_full): shadow copying of
1190 assemblies moved to here, so that all the assemblies within the
1191 application domain's private binary directories can be
1192 processed. Fixes bug #380546
1194 * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
1195 mono_make_shadow_copy and made non-static. The decision whether
1196 to shadow-copy an assembly is made based on its location - it's
1197 copied if it's in one of the private application domain binary
1198 directories and its different to the target file in the shadow
1199 directory. Fixes bug #380546
1201 2008-04-22 Zoltan Varga <vargaz@gmail.com>
1203 * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
1205 * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
1208 * reflection.c (mono_image_create_token): Handle
1209 Method/ConstructorOnTypeBuilderInst.
1210 (resolve_object): Ditto.
1211 (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
1212 so it can be called from resolve_object. Also handle the case when the inflated
1213 class already has its methods setup.
1215 2008-04-21 Martin Baulig <martin@ximian.com>
1217 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
1219 2008-04-20 Geoff Norton <gnorton@novell.com>
1221 * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
1222 pointer dereference.
1224 2008-04-15 Marek Habersack <mhabersack@novell.com>
1226 * appdomain.c (try_load_from): if IOMAP is in effect, call the
1227 portability API to look up the assembly file. Fixes behavior in
1228 situations when the application has a bin/ directory, but the
1229 assembly search patch refers to Bin/ (and thus the requested file
1230 name is Bin/SomeLibrary.dll). Fixes bug #379888
1232 2008-04-15 Rodrigo Kumpera <rkumpera@novell.com>
1234 verify.c (mono_type_is_generic_argument): Extracted this check
1235 from a dozen places to here.
1237 verify.c: Fixed all issues related to boxing generic arguments
1238 and their constraints.
1240 2008-04-14 Rodrigo Kumpera <rkumpera@novell.com>
1242 verify.c (mono_class_interface_implements_interface): Fix win32 build.
1244 2008-04-14 Zoltan Varga <vargaz@gmail.com>
1246 * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
1247 isn't finished yet. Fixes #363447.
1249 2008-04-13 Zoltan Varga <vargaz@gmail.com>
1251 * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
1254 2008-04-13 Jb Evain <jbevain@novell.com>
1256 * domain.c: update the 2.1 profile versions.
1257 Merged from the Moonlight 2 branch.
1259 2008-04-12 Zoltan Varga <vargaz@gmail.com>
1261 * assembly.c (mono_assembly_load_from_full): Do the check for loading other
1262 mscorlibs for the non-refonly case as well.
1264 * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
1265 in mono_assembly_load_from_full (). Fixes #378924.
1267 2008-04-11 Geoff Norton <gnorton@novell.com>
1269 * icall.c: The global extern environ doesn't exist on Mac. We
1270 need to call NSGetEnviron instead.
1272 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
1274 verify.c: Add generic method constraint verification.
1276 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
1278 class.c (mono_class_inflate_generic_method_full): Add a long
1279 explanation to the is_mb_open hack. Remove the FIXME.
1281 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
1283 * verify.c (mono_method_verify): Mark all unknown opcodes
1284 as invalid. Mark jmp as unverifiable.
1286 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
1288 * verify.c: Add code to do type constraint verification on class instances.
1290 * verify.c (mono_verifier_verify_class): Use the type constraint
1293 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
1295 * class.c (mono_class_get_field_default_value): Don't pass cindex
1296 as hint to mono_metadata_get_constant_index. The local is not initialized
1297 and should contain garbage most of the time. This could only work
1300 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
1302 * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
1304 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
1306 * class-internals.h: Add generic_param_token to MonoClass::sizes union.
1308 * class.c (mono_class_from_generic_parameter): Save the token of the
1309 generic param in MonoClass::sizes.generic_param_token.
1311 * reflection.c (mono_custom_attrs_from_class): If the class type is
1312 VAR or MVAR retrieve the attributes of the generic param.
1314 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
1316 * class.c (mono_class_init): Do class verification if the verifier
1319 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
1321 * verify-internal.h: Added mono_verifier_verify_class.
1323 * verify.c: Added mono_verifier_verify_class. It checks for
1324 classes with explicit layout that have overlapping reference fields.
1326 * pedump.c: Init the verifier state prior to verification. Fixed
1327 command line arguments.
1329 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
1331 * Makefile.am: Added verify-internals.h, hopefully fix the build.
1333 2008-04-08 Zoltan Varga <vargaz@gmail.com>
1335 * verify-internals.h: Fix a warning.
1337 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
1339 * verify-internals.h: New header with the verifier configuration
1340 extracted from mini.c.
1342 * verify.c: Implemented the new functions exported by verify-internals.h.
1344 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
1346 * verify.c: Add proper verification of ckfinite.
1348 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
1350 * verify.c (do_conversion): Improved error message to something
1353 * verify.c (check_is_valid_type_for_field_ops): Fix to work
1354 with primitive types.
1356 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
1358 * verify.c: Added tail prefix checking. Marked icall
1361 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
1363 * verify.c: Fix the detection of branches to the middle
1366 2008-04-03 Rodrigo Kumpera <rkumpera@novell.com>
1368 * verify.c: Implemented verification of volatile. and
1369 unaligned. prefix. Check if a type is valid after retrieving it.
1371 2008-04-01 Dick Porter <dick@ximian.com>
1373 * process.c (process_get_fileversion): If there's no string block,
1374 set the file language to en_US. Fixes the other new part of bug
1377 2008-03-29 Rodrigo Kumpera <rkumpera@novell.com>
1379 * class.c: New functions mono_method_can_access_field_full and
1380 mono_method_can_access_method_full. They perform type visibility
1381 and type site check.
1383 * class-internal.h: Added exported functions.
1385 * verify.c: Use new functions to implement proper visibility checks.
1387 2008-03-29 Zoltan Varga <vargaz@gmail.com>
1389 * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
1391 2008-03-28 Dick Porter <dick@ximian.com>
1393 * process.c (process_get_fileversion): Use the first language ID
1394 we see, rather than insisting on an invariant language. Fixes bug
1397 2008-03-28 Zoltan Varga <vargaz@gmail.com>
1399 * reflection.c (calc_section_size): Use add_stream_zero to align the size of
1400 the streams to fix reading of invalid memory later.
1402 * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
1405 2008-03-26 Zoltan Varga <vargaz@gmail.com>
1407 * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
1408 (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
1410 2008-03-26 Massimiliano Mantione <massi@ximian.com>
1411 * threads.h: Added MonoThreadManageCallback type and
1412 mono_thread_set_manage_callback prototype
1413 * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
1414 (used to store the mono_thread_manage callback).
1415 * threads.c: Added mono_thread_set_manage_callback, and handle
1416 "MonoThread->manage_callback" in build_wait_tids.
1418 2008-03-26 Dick Porter <dick@ximian.com>
1420 * process.c (process_get_fileversion): Set FileVersionInfo strings
1421 to Empty when the resource doesn't have the particular info.
1424 2008-03-25 Rodrigo Kumpera <rkumpera@novell.com>
1426 * verify.c (mono_method_verify): Proper prefix validation.
1428 2008-03-25 Zoltan Varga <vargaz@gmail.com>
1430 * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
1431 itself in a separate argument instead of throwing them. Fixes #373448.
1433 * appdomain.c: Bump corlib version.
1435 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
1437 * verify.c: Implemented readonly prefix and verify controled mutability pointers.
1439 2008-03-20 Kornél Pál <kornelpal@gmail.com>
1441 * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
1444 2008-03-20 Mark Probst <mark.probst@gmail.com>
1446 * generic-sharing.c, class-internals.h: Code for putting
1447 reflection types into the runtime generic context.
1449 2008-03-19 Rodrigo Kumpera <rkumpera@novell.com>
1451 * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
1455 2008-03-17 Rodrigo Kumpera <rkumpera@novell.com>
1457 * verify.c (VerifyContext): Added instruction prefix data to the struct.
1459 * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
1461 * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
1463 * verify.c (do_cast): Let the result value keep the boxed status.
1465 * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
1467 2008-03-17 Jb Evain <jbevain@novell.com>
1469 * reflection.c: when running on a 2.0 runtime, emit
1470 unconditionally the #~ header version as 2.0, and the
1471 CLI header version as 2.5, for symmetry's sake with csc.
1473 2008-03-16 Zoltan Varga <vargaz@gmail.com>
1475 * class.c: Remove the unused cache_interface_offsets stuff.
1477 * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
1478 profiler.c: Fix warnings.
1480 2008-03-16 Mark Probst <mark.probst@gmail.com>
1482 * generic-sharing.c, class-internals.h: Support for putting
1483 methods into the runtime generic context.
1485 2008-03-16 Zoltan Varga <vargaz@gmail.com>
1487 * class.c (mono_class_setup_fields): Ignore calls made to this function for
1488 classes which are generic instances of not-yet finished typebuilders. Fixes
1491 * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
1493 2008-03-15 Zoltan Varga <vargaz@gmail.com>
1495 * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
1497 * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
1498 field, replace it with a hash table in MonoDynamicImage.
1500 * reflection.c (inflate_mono_method): Access the generic definition object from
1501 image->generic_def_objects instead of imethod->reflection_info.
1503 * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.
1505 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
1507 * image.c (mono_image_close): Move the dynamic image freeing code to a separate
1508 function in reflection.c so it is easier to keep in sync with the dynamic image
1511 * reflection.c (mono_dynamic_image_free): New internal function, extracted from
1512 mono_image_close ().
1514 2008-03-15 Mark Probst <mark.probst@gmail.com>
1516 * class.c (mono_class_generic_sharing_enabled): Disable generic
1517 sharing for all architectures except AMD64 and x86 to fix build.
1519 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
1521 * verify.c: Use the generic definition MonoGenericContext when available.
1522 Remove code for checking generics instance compatibility in favor of
1523 mono_class_is_assignable_from.
1525 2008-03-14 Mark Probst <mark.probst@gmail.com>
1527 * marshal.c, marshal.h, metadata-internals.h, image.c,
1528 wrapper-types.h: New wrapper for invoking a shared static method
1529 without having to pass the runtime generic context argument.
1531 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
1533 * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
1535 2008-03-14 Zoltan Varga <vargaz@gmail.com>
1537 * reflection.c (mono_image_get_field_on_inst_token): Add caching.
1539 * reflection.c (mono_image_get_field_on_inst_token): New helper function to
1540 create a token from a FieldOnTypeBuilderInst.
1541 (mono_image_create_token): Handle FieldOnTypeBuilderInst.
1542 (resolve_object): Ditto.
1544 * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
1545 mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
1547 2008-03-14 Martin Baulig <martin@ximian.com>
1549 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
1551 * debug-mono-symfile.h
1552 (MONO_SYMBOL_FILE_VERSION): Bump to 41.
1553 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
1555 2008-03-10 Martin Baulig <martin@ximian.com>
1557 * debug-mono-symfile.h
1558 (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
1559 `lexical_block_table_offset'.
1560 (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
1562 (MonoSymbolFile): Added `version'.
1565 (MonoDebugLexicalBlockEntry): Removed.
1566 (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
1569 * mono-debug.c (mono_debug_add_method): Don't compute lexical
1570 blocks here; the debugger now does this internally.
1572 2008-02-27 Martin Baulig <martin@ximian.com>
1574 * object.c (mono_runtime_exec_main): Call
1575 `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
1576 `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
1578 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
1580 * verify.c (verify_type_compatibility_full): Allow native int to be converted
1581 to native pointer in non-strict mode. Required to "(IntPtr)null" work.
1583 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
1585 * verify.c (verify_ldftn_delegate): Accept a sealed type when using
1586 ldftn with a virtual method.
1588 2008-03-13 Geoff Norton <gnorton@novell.com>
1590 * decimal.c: Only include memory.h if the platform has it.
1592 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
1594 * assembly.c, class.c, metadata-internals.h: make sure public key
1595 tokesns are compared in a case-insensitive way. Also, all
1596 the lookups in the GAC use a lowercase public key token
1597 (gaacutil already does the lowercasing on install). Fixes
1600 2008-03-11 Rodrigo Kumpera <rkumpera@novell.com>
1602 * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
1605 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
1607 * image.c: when someone loads a mscorlib from a file, return the
1608 currently loaded mscorlib (fixes bug #369253).
1610 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
1612 * class.c: handle types with no parents by forcing them to have
1613 System.Object as a parent and marking them as broken (this currently
1614 allows the first part of bug #369173 to work as well, likely because
1615 we don't check for typeload exceptions everywhere yet).
1617 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
1619 * class.c: more complete check that types belong to corlib
1620 (fixes second part of bug #369173).
1622 2007-03-10 Bill Holmes <billholmes54@gmail.com>
1624 * generic-sharing.c: Including glib.h for the MSVC builds to define
1625 "inline" to "__inline" before including mono-membar.h.
1627 * mono-perfcounters.c: Adding HAVE_SYS_TIME_H check for MSVC builds.
1628 Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for
1631 Contributed under MIT/X11 license.
1633 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
1635 * verify.c (do_invoke_method): Remove return type validation.
1637 * verify.c (do_ret): Do return type validation at return site instead of
1640 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
1642 * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
1644 * verify.c: Some todos cleaned and improved a few error messages.
1646 2008-03-08 Zoltan Varga <vargaz@gmail.com>
1648 * class.c (mono_class_setup_mono_type): Improve the test for corlib.
1650 2008-03-07 Zoltan Varga <vargaz@gmail.com>
1652 * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
1653 system types correctly.
1655 * exception.h exception.c (mono_exception_from_token_two_strings): New helper
1658 2008-03-06 Zoltan Varga <vargaz@gmail.com>
1660 * assembly.c (build_assembly_name): Fix a warning.
1662 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
1664 * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
1665 the called function takes an object type argument. Fixes storing or
1666 valuetypes across remoting as well as reducing memory usage.
1667 * image.c, metadata-internals.h: remove now unused ldfld_remote and
1668 stfld_remote wrapper caches.
1670 2008-03-06 Zoltan Varga <vargaz@gmail.com>
1672 * icall.c (mono_lookup_internal_call): Update the exception message when an icall
1675 * reflection.c (mono_image_register_token): New helper function to save
1676 a token->object mapping.
1678 * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
1681 * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
1682 one dimension arrays. Fixes #367670.
1683 (mono_reflection_get_type_internal): Ditto.
1685 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
1687 * marshal.c: mono_load_remote_field_new() always returns object.
1688 so use the proper signature (fixes bug #366445).
1690 2008-03-04 Zoltan Varga <vargaz@gmail.com>
1692 * class-internals.h (MonoMethod): Remove unused uses_this flag,
1693 add an 'inline_failure' flag instead.
1695 2008-03-04 Mark Probst <mark.probst@gmail.com>
1697 * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
1698 with a new structure, MonoGenericJitInfo, in the MonoJitInfo. It
1699 contains the location of "this", used for exception handling.
1701 2008-03-04 Zoltan Varga <vargaz@gmail.com>
1703 * class.c (mono_class_layout_fields): Set the min alignment of small structs to
1704 their size on all platforms for perf reasons.
1706 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
1708 * reflection.h: Move mono_reflection_is_valid_dynamic_token to
1711 * object-internal.h: Same.
1713 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
1715 * reflection.h: Fix the build I just broke.
1717 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
1719 * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
1720 Test if a token is valid, this remove explicit usage of
1721 MonoDynamicImage::tokens from the verifier code.
1723 * reflection.h: Added mono_reflection_is_valid_dynamic_token.
1725 * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
1726 instead of direct access to MonoDynamicImage::tokens.
1728 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
1730 * verify.c (token_bounds_check): Fix the build I just broke.
1732 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
1734 * verify.c (token_bounds_check): Fix bounds check for dynamic images.
1736 * verify.c (verifier_load_method): Fixed the errors message.
1738 * verify.c (mono_method_verify): Fixed a debug message.
1740 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
1742 * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
1743 mono-perfcounters.h, class-internals.h: support for predefined
1744 writable counters, query of categories and counters, bugfixes.
1746 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
1748 * verify.c (do_refanytype): Verify the refanytype opcode.
1750 * verify.c (mono_method_verify): Use do_refanytype.
1752 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
1754 * verify.c (do_mkrefany): Verify the mkrefany opcode.
1756 * verify.c (mono_method_verify): Use do_mkrefany.
1758 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
1760 * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
1761 mono-perfcounters.c, mono-perfcounters.h: basic performance counter
1764 2008-02-27 Zoltan Varga <vargaz@gmail.com>
1766 * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
1767 the type load exception.
1769 2008-02-27 Rodrigo Kumpera <rkumpera@novell.com>
1771 * verify.c: Added a few FIXME for method signatures
1773 * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
1774 of mono_method_get_signature and get vararg call working. Removed unused
1775 checks for return value.
1777 * verify.c (do_refanyval): Verify the refanyval opcode.
1779 * verify.c (mono_method_verify): Implemented verification of arglist and
1782 2008-02-27 Zoltan Varga <vargaz@gmail.com>
1784 * class.c (mono_class_setup_methods): Move the check for synchronized methods on
1785 vtypes to marshal.c.
1787 * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
1788 it works for AOT as well.
1790 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
1792 * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
1793 with mono_msec_ticks () which is monotonic and doesn't cause bugs when
1794 the system time is adjusted.
1796 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
1798 * icall.c, icall-def.h: use the new time functions (fixes the
1799 non-monotonic behaviour of TickCount).
1801 2008-02-26 Zoltan Varga <vargaz@gmail.com>
1803 * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
1804 it breaks the build.
1806 * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
1807 cattr is not finished yet.
1809 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
1811 * verify.c: Proper token validation for field, method and type.
1813 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
1815 * loader.c (field_from_memberref): Generate a loader error if the type is not found.
1817 * loader.c (method_from_memberref): Generate type load error instead of method missing
1818 if the type is not found.
1820 2008-02-23 Zoltan Varga <vargaz@gmail.com>
1822 * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
1823 some of the conversions caused the generation of a marshal directive exception.
1825 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
1827 verify.c: Report which exception should be thrown by the JIT.
1828 Added a lot of FIXME notes.
1830 2008-02-22 Mark Probst <mark.probst@gmail.com>
1832 * generic-sharing.c: Runtime generic context slots are not
1833 instantiated on init anymore. Instead, provide function to do the
1834 instantiating on demand.
1836 * class-internals.h: Added vtable to runtime generic context.
1837 Macros for encoding direct and indirect slot offsets in one
1840 2008-02-21 Mark Probst <mark.probst@gmail.com>
1842 * object.c, generic-sharing.c: Moved some generic sharing code
1843 from object.c to generic-sharing.c.
1845 * generic-sharing.c: Added support for extensible runtime generic
1848 * metadata-internals.h: Two new hash tables in MonoImage for
1849 extensible runtime generic context support.
1851 * domain.c: Unregister generic vtables upon domain unloading.
1853 * image.c: Destroy new hash tables upon image unloading.
1855 * metadata.c: Unregister generic subclasses upon image unloading.
1857 * class-internals.h: New data structure for runtime generic
1858 context template. New fields in the runtime generic context for
1861 * Makefile.am: Added generic-sharing.c.
1863 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
1865 icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
1866 there is a pending loader exception, raise it.
1868 icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
1871 icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken):
1876 2008-02-20 Zoltan Varga <vargaz@gmail.com>
1878 * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
1880 * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
1882 * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
1883 ref-only requests for compatibility with MS.
1885 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
1887 * reflection.c (mono_custom_attrs_from_method): Don't silently
1888 return an empty list for generic method instances.
1889 (mono_custom_attrs_from_param): Likewise.
1891 2008-02-20 Rodrigo Kumpera <rkumpera@novell.com>
1892 Raja R Harinath <harinath@hurrynot.org>
1895 * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
1896 * class.c (mono_class_inflate_generic_method_full): Initialize it
1897 when a fully-open method is instantiated.
1898 * metadata.c (inflated_method_equal, inflated_method_hash): Update
1900 * reflection.c (inflate_mono_method): Don't create a temporary context.
1902 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
1904 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
1905 Compute correct value, to prepare for imethod->reflection_info going away.
1907 2008-02-19 Zoltan Varga <vargaz@gmail.com>
1909 * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
1911 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
1913 * verify.c: Implement skip visibility flag.
1915 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
1917 * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
1918 which contains an extra field to tell the kind of exception that should be thrown.
1920 * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
1922 2008-02-17 Raja R Harinath <harinath@hurrynot.org>
1924 * loader.c (mono_method_get_param_names): Initialize 'klass' after
1925 'method' is updated.
1927 2008-02-11 Zoltan Varga <vargaz@gmail.com>
1929 * class.c (mono_class_layout_fields): Set class->min_align for classes using
1930 explicit layout as well. Fixes #360375.
1932 2008-02-11 Geoff Norton <gnorton@novell.com>
1934 * loader.c: Guard and dereference against inflated generic methods
1936 2008-02-10 Gert Driesen <drieseng@users.sourceforge.net>
1938 * class.c: Include Retargetable spec in assembly name.
1939 * assembly.c: Always include PublicKeyToken spec in assembly name
1940 (with value "null" if assembly is not signed), and include
1942 * icall-def.h: Added icall for Assembly.get_fullname.
1943 * icall.c: Added icall returning the fullname of an assembly.
1945 2008-02-09 Zoltan Varga <vargaz@gmail.com>
1947 * class.c (mono_class_setup_vtable_general): Add a missing call to
1948 mono_class_setup_methods () which is needed in the AOT case.
1950 2008-02-08 Rodrigo Kumpera <rkumpera@novell.com>
1952 * verify.c (mono_type_get_stack_name): Added. Return the name for the
1953 stack type of the given MonoType.
1955 * verify.c (verify_type_compatibility_full): Handle the void type.
1957 * verify.c (is_compatible_boxed_valuetype): Changed to fit the
1958 way stack merging works.
1960 * verify.c (store_local): Improved verification message.
1962 * verify.c (do_branch_op): If the merging is invalid, the method
1963 is unverifiable and not invalid. Improved error message.
1965 * verify.c (merge_stacks): Properly merge a boxed valuetype and
1966 a reference type diferent than System.Object. Improved error
1969 2008-02-07 Rodrigo Kumpera <rkumpera@novell.com>
1971 * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
1973 * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
1974 type of an enum even if the argument is byref.
1976 * verify.c: Replace all explicit uses of enumtype and enum_basetype
1977 to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
1979 * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
1981 *verify.c (verify_type_compatibility_full): Make enum types
1982 compatible with their base types.
1984 * verify.c (is_compatible_boxed_valuetype): Added. Check if both
1985 types are compatible for the special case of a boxed valuetype and
1988 * verify.c (verify_stack_type_compatibility): The function
1989 is_compatible_boxed_valuetype was extracted from here.
1991 * verify.c (push_arg): Only set ctx->has_this_store if the method
1994 * verify.c (do_ldelem): Fixed a typo in an error message and added
1995 strict check for mixing int32 and native int as the array type
1998 * verify.c (merge_stacks): Consider boxed valuetypes in the
1999 compatibility checks.
2001 2008-02-07 Massimiliano Mantione <massi@ximian.com>
2002 * profiler.h: (MonoGCEvent): Added start-stop the world events.
2004 2008-02-06 Massimiliano Mantione <massi@ximian.com>
2005 *class.c: use_new_interface_vtable_code: renamed the env var to have
2006 a "MONO_" prefix, and fix the logic to enable it by default.
2008 2008-02-06 Massimiliano Mantione <massi@ximian.com>
2010 mono_class_setup_vtable_general: rewrote the way in which interface
2011 methods are added to vtables. Makes bug-77127.exe pass, and hopefully
2012 makes the code more maintainable.
2013 For now the old code is still there, and can be activated setting
2014 the env var "USE_NEW_INTERFACE_VTABLE_CODE".
2016 2008-02-06 Rodrigo Kumpera <rkumpera@novell.com>
2018 * verify.c: guarded some debug functions around and #ifdef.
2020 * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
2022 2008-02-06 Zoltan Varga <vargaz@gmail.com>
2024 * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
2025 changes for now since they seem to break too many things.
2027 2008-02-05 Mark Probst <mark.probst@gmail.com>
2029 * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
2030 mono_marshal_find_nonzero_bit_offset): Added macro and function
2031 for finding the byte- and bit-offset of a bitfield within a
2034 2008-02-05 Zoltan Varga <vargaz@gmail.com>
2036 * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
2037 (mono_marshal_get_struct_to_ptr): Ditto.
2039 * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of
2042 2008-02-03 Zoltan Varga <vargaz@gmail.com>
2044 * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
2045 between methods for non-corlib types.
2047 2008-02-02 Geoff Norton <gnorton@novell.com>
2049 * loader.c (mono_method_get_param_names): Populate the parameter name for
2050 generic parameters as well. (Fixes #342536)
2052 2008-01-31 Rodrigo Kumpera <rkumpera@novell.com>
2054 * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
2056 * verify.c (do_invoke_method): Fix for calling with byref structs.
2058 * verify.c (do_cast): push a boxed value type based on the type token and not
2061 2008-01-31 William Holmes <billholmes54@gmail.com>
2063 * process.c (process_module_string_read): Check the size returned form
2064 VerQueryValue to avoid out of memory exception.
2066 2008-01-30 Zoltan Varga <vargaz@gmail.com>
2068 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
2069 Handle properly modules which are not in the moduleref table. Fixes
2072 2008-01-29 Zoltan Varga <vargaz@gmail.com>
2074 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
2075 the dynamic case which is now in managed code.
2076 (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
2078 * marshal.c (mono_string_to_bstr): Fix a warning.
2079 (init_com_provider_ms): Ditto.
2081 * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
2083 * exception.c (mono_get_exception_out_of_memory): New helper function.
2085 2008-01-28 Jonathan Chambers <joncham@gmail.com>
2087 * marshal.c: Add support for BSTR marshalling
2088 using other COM systems.
2090 Code is contributed under MIT/X11 license.
2092 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
2094 * object.c (mono_runtime_invoke_array): reverted previous
2095 commit as it breaks the build.
2097 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
2099 * object.c (mono_runtime_invoke_array): Verify arguments for
2100 invalid types. Fixes #348522.
2102 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
2104 * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
2105 non-final virtual calls using call.
2107 * verify.c (do_invoke): fixed some TODOs.
2109 * verify.c (push_arg): set has_this_store for "ldarga 0".
2111 2008-01-27 Zoltan Varga <vargaz@gmail.com>
2113 * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
2114 which belong to an inflated class. Fixes #356531.
2116 2008-01-26 Robert Jordan <robertj@gmx.net>
2118 * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
2119 which resort to FindFirstFile when a certain error condition
2120 (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
2121 Code is contributed under MIT/X11 license.
2123 2008-01-24 Jonathan Chambers <joncham@gmail.com>
2125 * marshal.c (emit_marshal_string): Fix out string marshalling
2126 to use specified encoding. Fixes #323900.
2128 Code is contributed under MIT/X11 license.
2130 2008-01-24 Raja R Harinath <harinath@hurrynot.org>
2132 * class.c (mono_class_inflate_generic_method_full): Don't modify
2133 iresult->context after cache check.
2135 2008-01-23 Zoltan Varga <vargaz@gmail.com>
2137 * class.c (mono_class_inflate_generic_method_full): Change the
2138 struct assignments to memcpy for better visibility and add some comments.
2140 2008-01-23 Dick Porter <dick@ximian.com>
2142 * threads.c (mono_threads_set_shutting_down): Simplify shutdown
2143 procedure, and make it work on windows.
2145 2008-01-22 Zoltan Varga <vargaz@gmail.com>
2147 * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
2148 a MonoReflectionTypeBuilder since it is always of that type.
2150 * reflection.c (mono_type_get_object): Remove an unneccesary check.
2152 * reflection.c (mono_generic_class_get_object): Simplify this a bit.
2154 * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
2156 * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
2158 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
2160 * reflection.c (mono_reflection_create_runtime_class): Remove already created
2161 instantiations from the type cache.
2163 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
2165 * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
2167 * verify.c (do_unbox_value): push a controled mutability managed pointer.
2169 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
2171 * verify.c (do_ldstr): added, verifies if the #US token is valid.
2173 * verify.c (mono_method_verify): removed old TODO
2175 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
2177 * verify.c (do_newobj): add visibility check.
2179 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
2181 * verify.c (do_load_function_ptr): add visibility check.
2183 2008-01-21 Massimiliano Mantione <massi@ximian.com>
2185 mono_generic_class_get_class: hook profiler events.
2186 mono_field_get_offset: added to support heap-shot in the new profiler.
2187 *class.h: exported mono_field_get_offset.
2189 mono_reflection_setup_internal_class: hook profiler events.
2191 2008-01-20 Zoltan Varga <vargaz@gmail.com>
2193 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
2194 argument here too and use it to avoid checking for pending exceptions if
2197 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
2199 * assembly.c (build_assembly_name): add arg for passing the assembly
2200 flags. Do not consider a PublicKey with value "null" valid.
2201 (mono_assembly_name_parse_full): added boolean argument that will be
2202 set if the assembly name contains a PublicKeyToken spec. Added support
2203 for the Retargetable spec for which only Yes or No are allowed as valid
2204 value. Consider assembly name invalid if Retargetable spec is set, but
2205 either version, culture or public key (token) are not specified.
2206 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
2207 with implementation in assembly.c.
2208 * icall.c (fill_reflection_assembly_name): also copy assembly flags
2209 from MonoAssemblyName.
2210 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
2211 introduced argument for mono_assembly_name_parse_full to know if the
2212 assembly name has a PublicKeyToken spec, and if it has instruct
2213 fill_reflection_assembly_name to use default value for keyToken (if
2214 PublicKeyToken is null).
2216 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
2218 * verify.c (mono_method_verify): fixed ovf ops with
2219 float values. They are unverifiable now.
2221 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
2223 * class.c (set_failure_from_loader_error): add BadImageException to the
2224 list of exceptions that can cause a type to fail to load.
2226 * class.c (mono_class_get_exception_for_failure): same.
2228 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
2230 * verify.c (in_any_exception_block): added, check if offset
2231 is part of any exception handling clause.
2233 * verify.c (get_stack_type): added VAR and MVAR types.
2235 * verify.c (do_stobj): better error messages.
2237 * verify.c (do_cpobj): added, check cpobj.
2239 * verify.c (do_initobj): added, check initobj.
2241 * verify.c (do_sizeof): added, check sizeof.
2243 * verify.c (do_localloc): added, check localloc.
2245 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
2247 2008-01-17 Zoltan Varga <vargaz@gmail.com>
2249 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
2250 save_lmf/restore_lmf opcodes.
2252 * threads.c (mono_threads_install_notify_pending_exc): New function to
2253 install a callback notifying the JIT there is a pending exception on a thread.
2254 (mono_thread_request_interruption): Call the new callback.
2255 (mono_thread_get_and_clear_pending_exception): New function to return the
2256 exception pending on a thread.
2258 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
2259 to turn off checking for pending exceptions.
2260 (mono_marshal_get_native_wrapper): Ditto.
2262 2008-01-16 Zoltan Varga <vargaz@gmail.com>
2264 * threads-types.h: Get rid of the unnecessary extern declarations.
2266 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
2268 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
2269 return field from parent class if not private.
2270 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
2271 returns fields from parent class if they are not private.
2272 (method_nonpublic): added function to determine if a given method
2273 should be considered non-public. Returns false for private methods
2274 on parent class, and internal methods from parent on the 1.0 profile.
2275 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
2276 use method_nonpublic function to determine whether method should be
2278 (property_accessor_public): use newly introduced method_nonpublic
2279 function to determine whether accessor is non-public.
2280 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
2281 event from parent class if not private. Only return static event if
2282 Static flag is set, and only return static event from parent class if
2283 FlattenHierarchy flag is set.
2284 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
2285 include non-private events from parent class.
2287 2008-01-16 Zoltan Varga <vargaz@gmail.com>
2289 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
2292 2008-01-16 Wade Berrier <wberrier@novell.com>
2294 * security.c: Add assembly.h header to appease some warnings
2296 2008-01-16 Dick Porter <dick@ximian.com>
2298 * process.c (process_module_string_read): Remove trailing null
2301 2008-01-16 Mark Probst <mark.probst@gmail.com>
2303 * class-internals.h: A new data structure describing the layout of
2304 a runtime generic context (MonoRuntimeGenericContextTemplate).
2306 * metadata-internals.h: Added a hash table to MonoDomain that maps
2307 from open generic classes to their runtime generic context
2310 * object.c: Building of the runtime generic context, including
2311 proper handling of generic type arguments of superclasses.
2312 Building of the runtime generic context according to the template.
2314 2008-01-15 Zoltan Varga <vargaz@gmail.com>
2316 * class.c (mono_class_setup_fields): Set field.count for generic instances.
2319 * image.c (do_mono_image_open): Pass TRUE as last_exists to
2320 mono_portability_find_file (). Fixes #325466.
2321 (mono_image_get_public_key): Fix a warning.
2323 2008-01-14 Zoltan Varga <vargaz@gmail.com>
2325 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
2327 (mono_class_from_name_case): Ditto.
2329 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
2331 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
2332 common storage for the tables used in the System/NumberFormatter class.
2334 2008-01-13 Zoltan Varga <vargaz@gmail.com>
2336 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
2338 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
2340 * verify.c (get_boxable_mono_type): check if the token is valid.
2342 * verify.c (set_stack_value): changed to add an error if an
2343 invalid type is set on stack. Changed all callers due to signature change.
2345 * verify.c (do_stobj): implement stobj validation.
2347 2008-01-11 Zoltan Varga <vargaz@gmail.com>
2349 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
2350 set container->is_method, it was set earlier.
2352 * metadata.c (type_in_image): Handle MVARs which belong to not finished
2355 * reflection.c (mono_reflection_initialize_generic_parameter): Set
2356 is_method of the generic container to TRUE for methods.
2358 2008-01-10 Zoltan Varga <vargaz@gmail.com>
2360 * metadata.c (type_in_image): Handle type parameters properly.
2362 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
2363 memory ownership of this structure.
2365 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
2367 * verify.c (get_boxable_mono_type): make typedref types been just
2368 unverifiable. check for void type.
2370 * verify.c (do_unbox_any): added, verify opcode unbox.any.
2372 * verify.c (do_load_function_ptr): accept method spec tokens.
2374 2008-01-10 Zoltan Varga <vargaz@gmail.com>
2376 * marshal.c (mono_class_native_size): Always set *align even if this is called
2379 2008-01-09 Zoltan Varga <vargaz@gmail.com>
2381 * verify.c (mono_verify_corlib): Remove this as it was not used and was
2384 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
2386 * verify.c: removed some old unused tables. A huge bunch of small fixes
2387 to things found while testing the verifier with mono basic.
2389 * verify.c (dump_stack_value): dump null literal flag to.
2391 * verify.c (verify_type_compatibility_full): fix comparison
2392 for types that have a generic super type.
2394 * verify.c (verify_stack_type_compatibility): fix compatibility
2395 between null literals and reference types. fix compatibility between
2396 boxed valuetypes and object. fix corner case test for enums.
2398 * verify.c (do_cmp_op): proper verification of cgt.un in case
2401 * verify.c (do_invoke_method): fix error message.
2403 * verify.c (do_store_indirect
2405 * verify.c (check_is_valid_type_for_field_ops): proper verification
2406 of managed pointers to valuetypes and boxed valuetypes. proper verification
2409 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
2410 allow token to be a reference type.
2412 * verify.c (do_cast): proper handling of boxes valuetypes.
2414 * verify.c (do_stelem): proper handling of storing a boxed valuetype
2417 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
2418 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
2419 fixed the decoding of unbox_any
2421 2008-01-08 Zoltan Varga <vargaz@gmail.com>
2423 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
2425 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
2427 * verify.c (do_newobj): do delegate verification.
2429 * verify.c (verify_delegate_compatibility): perform delegate
2432 * verify.c (verify_ldftn_delegate): perform tests related to
2435 * verify.c (mono_delegate_signature_equal): perform the
2436 slightly diferent signature comparison required by delegates.
2438 * metadata.c (mono_metadata_type_equal_full): added and exported
2439 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
2440 allows signature only comparison.
2442 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
2445 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
2447 * verify.c: added a bunch of stack_slot_* functions to
2448 make access to stack slot type easier. This is required to
2449 allow optional flags, like null literal, boxed value and
2451 All access paths to IlStackDesc::stype have been changed
2452 to use these new funcions.
2453 Removed a bunch of unused functions and cleared all warnings.
2454 This patch introduces the usage of the this pointer and
2457 2008-01-07 Zoltan Varga <vargaz@gmail.com>
2459 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
2461 2008-01-06 Zoltan Varga <vargaz@gmail.com>
2463 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
2464 match managed version.
2466 * appdomain.c: Bump corlib version.
2468 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
2471 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
2473 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
2474 Set public key token to zero-length byte array if assembly is not
2477 2008-01-05 Zoltan Varga <vargaz@gmail.com>
2479 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
2480 writing a vtype array elem.
2482 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
2484 * assembly.c (build_assembly_name): return FALSE if length of token is
2485 not 16 (if not "null").
2486 (mono_assembly_name_parse_full): return FALSE if value of version,
2487 culture, token or key is 0.
2488 * icall.c (fill_reflection_assembly_name): add boolean arguments to
2489 specify whether public key and public key token must be set to default
2490 value (zero-length byte array) if not available. Set versioncompat to
2491 SameMachine. If public key is available or the default is set, then
2493 (ves_icall_System_Reflection_Assembly_FillName): if no public key
2494 is available, use empty byte array as default value. On the 2.0
2495 profile, use default value for public key token if not set.
2496 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
2497 profile, use default value for public key if not set. On the 2.0
2498 profile, use default value for public key token if not set.
2499 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
2500 default values for public key and public key token.
2502 2008-01-05 Zoltan Varga <vargaz@gmail.com>
2504 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
2505 field to keep it in synch with the managed object.
2507 * marshal.c (emit_marshal_object): Add support for byref marshalling of
2508 delegates. Fixes #351520.
2510 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
2511 contains defined memory.
2513 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
2515 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
2517 * sgen-gc.c (check_consistency): New helper function to do a consistency check
2518 of the GC data structures.
2520 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
2522 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
2524 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
2526 (mono_array_clone_in_domain): Ditto.
2527 (mono_array_clone_in_domain): Ditto.
2529 * threads.c (start_wrapper): Register the thread start argument as a GC root.
2530 (cache_culture): Use a write barrier.
2532 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
2533 (ves_icall_get_property_info): Ditto.
2535 * object.h (MONO_STRUCT_SETREF): New macro.
2537 * class-internals.h (MonoStats): Add some GC statistics.
2539 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
2541 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
2543 * exception.c (mono_exception_from_name_two_strings):
2544 Break from loop after method is found.
2546 2008-01-04 Dick Porter <dick@ximian.com>
2548 * process.c (process_module_string_read): Rename variable to
2549 reflect correct usage, after fixing bug 345972.
2551 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
2553 * verify.c (mono_type_create_fnptr_from_mono_method):
2554 created a MonoType function pointer instance to be used during
2555 verification. The verifier releases this memory at end.
2557 * verify.c (mono_method_is_constructor): extracted repeated
2558 checks for constructor into a single class.
2560 * verify.c (do_push_field): use new extracted method
2561 for constructor check.
2563 * verify.c (do_newobj): same.
2565 * verify.c (do_ldftn): renamed to do_load_function_ptr
2566 and make it verify ldvirtftn too.
2568 * verify.c (mono_method_verify: proper verification
2569 of ldvirtftn. release created MonoMethod instances.
2571 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
2573 * verify.c (token_bounds_check): added.
2575 * verify.c (do_ldftn): added.
2577 * verify.c (mono_method_verify): proper verificartion of ldftn.
2579 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
2581 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
2582 than the table row count. It's the resposibility of the caller to
2583 make the bounds check and raise the correct error.
2585 * metadata.c (mono_metadata_decode_row_col): Same.
2587 * loader.c (mono_get_method_from_token): perform bounds check
2588 on token for methoddef table.
2590 2007-12-29 Miguel de Icaza <miguel@novell.com>
2593 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
2594 assert into a negative result, the managed code already coped with
2597 Some folks on Windows reported this error.
2599 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
2601 * appdomain.c: Bump corlib version.
2603 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
2604 CultureInfo.CreateCulture to create CultureInfo for name.
2605 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
2606 create CultureInfo for name. Fixes bug #347174.
2608 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
2610 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
2613 * verify.c (is_valid_branch_instruction): allow branching to the
2614 first instruction of the protected block.
2616 * verify.c (is_valid_cmp_branch_instruction): same.
2618 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
2619 avoid double initialization.
2621 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
2622 detect which cases the eval stack should just be copied.
2624 * verify.c (mono_method_verify): check if the eval stack
2625 is empty when entering a protected block.
2627 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
2629 * verify.c: added is_clause_in_range, is_clause_inside_range,
2630 is_clause_nested and verify_clause_relationship. They perform
2631 the verifications stated in P1 12.4.2.7.
2633 * verify.c (mono_method_verify): remove some unused variables,
2634 add the new exception clause checks, add instruction border
2635 checks for protected block start/end, improved some error
2636 messages and fixed a bug in the way invalid instruction access
2639 2007-12-26 Zoltan Varga <vargaz@gmail.com>
2641 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
2642 from GC 7.0 if available.
2644 * object.c: Remove an unused define.
2646 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
2648 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
2650 * null-gc.c (mono_gc_make_descr_for_array): Implement.
2652 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
2654 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
2655 to take the same arguments as the other make_descr functions.
2657 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
2659 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
2662 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
2665 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
2668 * boehm-gc.c (mono_gc_register_root): Fix a warning.
2670 * null-gc.c (mono_gc_register_root): Fix a warning.
2672 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
2674 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
2675 (mono_gc_base_init): Call GC_init ().
2677 * null-gc.c: Define mono_gc_register_root () as a no-op.
2679 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
2681 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
2683 * verify.c: add prototype for merge_stacks at top
2685 * verify.c (do_switch): added.
2687 * verify.c (merge_stacks): on some cases the stack merging
2688 was not happening properly. Unequal stack sizes at merge
2689 points should be invalid.
2691 * verify.c (mono_method_verify): added more debug info on stack state.
2692 verify switch properly.
2694 2007-12-24 Zoltan Varga <vargaz@gmail.com>
2696 * method-builder.h: New file, moved the mono_mb_ declarations here from
2699 * boehm-gc.c marshal.c: Include method-builder.h.
2701 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
2703 * marshal.c: Remove some code which is now in method-builder.c.
2705 2007-12-23 Zoltan Varga <vargaz@gmail.com>
2707 * method-builder.c: New file, extraction of the method builder functionality
2710 * marshal.c: Move the mb functions into method-builder.c.
2712 * marshal.h marshal.c: Export some mono_mb_... functions.
2714 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
2716 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
2719 * class.c (mono_class_get_full): Check the token type in the dynamic case.
2721 * loader.c (mono_field_from_token): Ditto.
2723 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
2726 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
2729 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
2730 a helper function for setting it.
2732 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
2735 * assembly.c: Significally simplify code now that referenced assemblies are
2736 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
2738 * threads.h: Don't include the internal threads-types.h header file. Fixes
2741 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
2743 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
2744 instructions that were target of branches or are at protected block boundaries.
2746 * verify.c (in_same_block): handle filter clauses.
2748 * verify.c (is_valid_branch_instruction): added. checks the target of
2749 instructions br or brtrue/false.
2751 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
2752 binary branch instructions such as beq and bge.
2754 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
2755 and made it pin the instruction as been part of the exception block.
2757 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
2760 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
2763 * verify.c (do_ret): ret from a protected block is unverifiable and
2766 * verify.c (do_static_branch): verify br and br.s instructions.
2768 * verify.c (merge_stacks): add extra param to support detection
2769 of branches in the middle of instructions.
2771 * verify.c (mono_method_verify): verify branches and exception blocks
2772 that target the middle of instructions. Proper verification of br and br.s.
2774 2007-12-21 Zoltan Varga <vargaz@gmail.com>
2776 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
2777 skip_visibility field.
2778 (reflection_methodbuilder_from_dynamic_method): Ditto.
2780 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
2781 registrations. Fixes #348193.
2783 * threads.h: Move the internal mono_thread_get_pending_exception () to
2784 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
2786 2007-12-20 Zoltan Varga <vargaz@gmail.com>
2788 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
2789 icall registration. Fixes #348193.
2791 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
2792 for corlib classes into object. Fixes #349621.
2794 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
2796 * icall.c (property_accessor_nonpublic): new function to determine
2797 whether an accessor allows a property to be considered non-public.
2798 Returns false for private accessor(s) from parent class, and internal
2799 accessor(s) from parent on 2.0 profile (and higher).
2800 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
2801 to determine whether property should be included if NonPublic flag
2802 is set. Fixes bug #349078.
2804 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
2806 * verify.c (init_stack_with_value): added.
2808 * verify.c (mono_method_verify): extracted common
2809 code for exception initialization into init_stack_with_value.
2811 * verify.c (mono_method_verify): initialize the exception
2812 for handler clauses as well.
2814 * verify.c (mono_method_verify): fix the exception clause
2815 ordering rules, it should use handler end offset and not
2818 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
2820 * rawbuffer.c: remove useless warning.
2822 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
2824 * threads.h, threads-types.h: move functions to the correct header
2827 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
2829 * verify.c (mono_method_verify): proper verification
2830 of exception handling clauses ranges and fallthru in
2831 and out of protected blocks.
2833 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
2835 * verify.c (mono_method_verify): fixed compilation issue.
2837 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
2839 * verify.c (mono_method_verify): a printf slipped in, changed
2840 to use verifier debug macro.
2842 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
2844 * verify.c (is_correct_leave): check for filter clauses.
2846 * verify.c (do_filter): added.
2848 * verify.c (mono_method_verify): property verification of leave.
2851 2007-12-18 Mark Probst <mark.probst@gmail.com>
2853 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
2854 Win32 build, until we figure out how to do the proper thing on
2857 2007-12-17 Zoltan Varga <vargaz@gmail.com>
2859 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
2860 by the previous patch.
2862 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
2863 the assembly resolve handler for refonly assemblies.
2865 2007-12-17 Mark Probst <mark.probst@gmail.com>
2867 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
2868 Make sure only one thread is allowed to commence shutdown, and
2869 don't allow new threads to be started once shutdown is in
2872 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
2874 * verify.c (is_correct_endfilter): added.
2876 * verify.c (is_unverifiable_endfilter): added.
2878 * verify.c (do_endfilter): added.
2880 * verify.c (mono_method_verify): property verification of endfilter
2881 and fixed a corner case or endfinally.
2883 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
2885 * verify.h: new flags to support fail fast of unverifiable code and
2886 do non-strict verification. Non-strict verification is required to
2887 have MS runtime compatibility. There are a huge amount of unverifiable
2888 code that it accepts as verifiable. The strict mode verifies the code
2890 Non-strict mode will be required in cases where code needs to be
2891 accepted as verifiable but fails under strict mode.
2893 * pedump.c: added support to fail fast and non-strict verification.
2895 * verify.c: added support for both fail fast and non-strict verification.
2897 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
2899 * verify.c (is_correct_endfinally): added.
2901 * verify.c (mono_method_verify): property verification of endfinally.
2903 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
2905 * verify.c (in_any_block): check for filter clauses.
2907 * verify.c (is_correct_rethrow): added.
2909 * verify.c (mono_method_verify): property verification of rethrow.
2911 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
2913 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
2915 * verify.c (do_throw): added.
2917 * verify.c (mono_method_verify): property verification of throw
2919 2007-12-11 Zoltan Varga <vargaz@gmail.com>
2921 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
2922 assemblies. Fixes #346425.
2924 2007-12-10 Zoltan Varga <vargaz@gmail.com>
2926 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
2929 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
2931 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
2932 prevent asserts when this is called with a token which might not be valid.
2934 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
2935 lookup_dynamic_token_class with valid_token == FALSE.
2937 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
2939 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
2941 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
2943 2007-12-10 Mark Probst <mark.probst@gmail.com>
2945 * gc.c: Don't delay threadpool thread finalization unless Mono is
2948 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
2950 * threads.c: turn an assert into a non-fatal warning.
2952 2007-12-09 Robert Jordan <robertj@gmx.net>
2954 * icall.c (GetVirtualMethod): Add missing argument validation.
2956 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
2958 * verify.c (do_cast): added.
2960 * verify.c (mono_method_verify): property verification of castclass and isinst.
2963 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
2965 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
2967 * verify.c (do_stelem): added.
2969 * verify.c (mono_method_verify): property verification of stelem.X.
2971 2007-12-07 Mark Probst <mark.probst@gmail.com>
2973 * class.c, class-internals.h: Introduce an environment variable
2974 (MONO_GENERIC_SHARING) through which the extent of generic code
2975 sharing can be controlled (share all classes, share only corlib
2976 classes, or share nothing).
2978 * object.c: Only create runtime generic context for classes for
2979 which sharing is enabled.
2981 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
2983 * verify.c (do_ldelem): refactor it to work with ldelem.any.
2985 * verify.c (mono_method_verify): property verification of ldelem.any.
2987 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
2989 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
2990 added ldelem.X opcodes.
2992 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
2994 * verify.c: proper verification of ldelem.X
2996 2007-12-06 Zoltan Varga <vargaz@gmail.com>
2998 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
3000 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
3002 * verify.c (mono_method_verify): null literal requires special handling,
3003 the value pushed on stack need to be flagged as so.
3005 * verify.c (do_ldelema): Verify ldelema properly.
3007 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
3009 * verify.c: Verify ldlen properly.
3011 2007-12-05 Zoltan Varga <vargaz@gmail.com>
3013 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
3014 to the target object's type. Fixes #346160.
3016 2007-12-05 Dick Porter <dick@ximian.com>
3018 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
3019 Solaris needs the same workaround as BSD-derived systems. Fixes
3020 bug 323524, patch by Burkhard Linke
3021 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
3023 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
3025 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
3026 handle to use when error dialog is shown; otherwise, update mask
3027 to show no error dialog when an error occurs.
3029 2007-12-03 Zoltan Varga <vargaz@gmail.com>
3031 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
3033 * class.c (mono_class_get_field_default_value): New helper function to initialize
3034 field->def_type and field->data.
3036 2007-11-30 Zoltan Varga <vargaz@gmail.com>
3038 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
3041 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
3043 * marshal.c: Avoid depending on delegate->method_info being set.
3045 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
3047 * object.c (mono_delegate_ctor): Set delegate->method.
3049 * object-internals.h (struct _MonoDelegate): Add 'method' field.
3051 * appdomain.c: Bump corlib version.
3053 2007-11-27 Raja R Harinath <harinath@gmail.com>
3055 * metadata.c (mono_generic_inst_equal_full): Short-circuit
3056 equality check if we're comparing canonicalized MonoGenericInsts.
3058 2007-11-23 Zoltan Varga <vargaz@gmail.com>
3060 * class.c (generic_array_methods): Call mono_class_setup_methods () before
3061 accessing class->methods.
3063 2007-11-22 Dick Porter <dick@ximian.com>
3065 * threads.c: Ensure that the synch_cs is set before trying to use
3068 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
3070 * profiler.c: r89126 broke the statistial profiler, unbreak.
3072 2007-11-22 Martin Baulig <martin@ximian.com>
3074 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
3077 (mono_debug_debugger_version): Bump to 3.
3078 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
3079 -> mono_debugger_class_initialized().
3081 * mono-debug-debugger.c
3082 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
3085 (mono_debugger_start_class_init_func): Removed.
3086 (mono_debugger_class_loaded_methods_func): Added.
3087 (mono_class_setup_methods): Call it here.
3089 2007-11-22 Martin Baulig <martin@ximian.com>
3092 (mono_debug_add_delegate_trampoline): New public method.
3093 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
3096 (MonoSymbolTable): Added `global_data_table'.
3097 (MonoDebuggerTypeKind): Removed.
3099 2007-11-21 Zoltan Varga <vargaz@gmail.com>
3101 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
3104 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3106 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
3108 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
3110 2007-11-20 Martin Baulig <martin@ximian.com>
3112 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
3114 * mono-debug-debugger.c
3115 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
3116 (mono_debugger_remove_breakpoint): Likewise.
3117 (mono_debugger_check_breakpoints): Likewise.
3118 (mono_debugger_register_class_init_callback): New public method.
3119 (mono_debugger_remove_class_init_callback): Likewise.
3120 (mono_debugger_add_type): Likewise.
3122 * mono-debug-debugger.h
3123 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
3125 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
3127 * class.c: more interface implementations needed for the
3128 array enumerator (fixes bug #341112).
3130 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
3132 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
3133 fix ParamName of ArgumentNullExceptions.
3135 2007-11-17 Miguel de Icaza <miguel@novell.com>
3137 * reflection.c (mono_reflection_encode_sighelper): Generate the
3138 modopts and modreqs. I have a useless test that crashes monodis,
3139 but that shows the code working.
3141 2007-11-17 Zoltan Varga <vargaz@gmail.com>
3143 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
3144 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
3146 2007-11-15 Dick Porter <dick@ximian.com>
3148 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
3149 When joining a thread, it's the thread that's calling Join that
3150 gets WaitSleepJoin state not the target. Fixes the standalone
3151 test case in bug 334740, and hopefully the whole bug too.
3153 2007-11-15 Dick Porter <dick@ximian.com>
3155 * process.c: Read file version info from the files pointed at by
3156 process modules, not the current process. Fixes bug 315969.
3158 Use windows typedef names in some places to fix warnings on the
3161 2007-11-15 Mark Probst <mark.probst@gmail.com>
3163 * image.c, metadata-internals.h: Added a generic_class_cache hash
3164 to MonoImage for looking up generic classes when sharing generics.
3166 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3168 * sgen-gc.c: warning cleanups.
3170 2007-11-15 Zoltan Varga <vargaz@gmail.com>
3172 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
3173 inherited properties.
3175 2007-11-14 Mark Probst <mark.probst@gmail.com>
3177 * object.c, class-internals.h: Added more information to the
3178 runtime generic context.
3180 2007-11-13 Zoltan Varga <vargaz@gmail.com>
3182 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
3183 instead of just the target method. Generalize the abstract method handling to
3184 handle any non-static method.
3186 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
3187 mono_marshal_get_delegate_invoke () signature change.
3189 2007-11-13 Mark Probst <mark.probst@gmail.com>
3191 * class.c, class-internals.h: Made
3192 mono_type_get_basic_type_from_generic () public. Fixed member
3193 access check for shared generics.
3195 * loader.c: Don't insert field into field cache if it's part of a
3196 non-inflated generic class.
3198 * domain.c, domain-internals.h: The generic sharing context is now
3199 part of the jit info data structure. Added two accessor
3202 2007-11-12 Zoltan Varga <vargaz@gmail.com>
3204 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
3205 the array Get/Set/Address methods, since the JIT inlines them.
3207 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
3209 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
3210 (mono_image_init): Initialize runtime_invoke_direct_cache.
3212 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
3213 mono_marshal_get_delegate_invoke signature change.
3215 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
3216 an additional argument. Add support for invoking abstract methods.
3218 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
3220 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
3222 2007-11-09 Mark Probst <mark.probst@gmail.com>
3224 * class.c: Do field layout for open generic classes as well.
3226 2007-11-09 Mark Probst <mark.probst@gmail.com>
3228 * gc.c, gc-internal.h: Don't finalize threadpool threads with
3229 other objects, because the threadpool is still around. Put them
3230 in a list instead and after finalizing all other objects in the
3231 root domain shut down the thread pool and then finalize the
3232 threads. Fixes bug #337383.
3234 * threads.c, thread-types.h: New mono_thread_create_internal()
3235 function for marking a thread with the threadpool flag before it
3236 started. Set synch_cs to NULL after freeing it.
3238 * threadpool.c: Mark threadpool threads before they start.
3240 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
3242 * reflection.h, reflection.c: don't export random functions
3243 and lazy load dbnull and missing objects.
3245 2007-11-07 Jonathan Chambers <joncham@gmail.com>
3247 * class.c: Initialize COM types if COM interfaces
3248 are present (not just COM classes).
3250 Code is contributed under MIT/X11 license.
3252 2007-11-07 Massimiliano Mantione <massi@ximian.com>
3254 create_dynamic_mono_image: hook module profiler events (dynamic case).
3255 mono_image_basic_init: hook assembly profiler events (dynamic case).
3257 2007-11-07 Massimiliano Mantione <massi@ximian.com>
3259 simple_appdomain_unload: completely terminate the profiler
3260 instead of only processing the statistical samples.
3261 simple_shutdown: make sure this is really called exactly once,
3262 even in multithreaded applications, and always listen to
3264 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
3265 here, the "[un]load" functions will do it.
3266 Fixes bugs #333791 and #325261.
3268 2007-11-07 Geoff Norton <gnorton@novell.com>
3270 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
3271 rather than depend on __APPLE__.
3273 2007-11-07 Mark Probst <mark.probst@gmail.com>
3275 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
3277 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
3279 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
3280 UTF16 MonoString. Fix the crash from bug #335488
3282 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
3284 * marshal.c: Correct (for non-Win32 OS) length != size in
3285 mono_string_from_bstr. Fix #339530.
3287 2007-11-06 Geoff Norton <gnorton@novell.com>
3289 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
3292 2007-11-05 Kornél Pál <kornelpal@gmail.com>
3294 * process.c: Added run-time GetProcessId API detection for Windows.
3296 2007-11-04 Miguel de Icaza <miguel@novell.com>
3298 * reflection.c (mono_param_get_objects): If a parameter has the
3299 attribute [System.Runtime.InteropServices.Optional] we should
3300 set the DefaultValue of the ParameterInfo to be
3301 System.Reflection.Missing instead of DBNull.
3305 (mono_get_reflection_missing_object): New method,
3306 returns the System.Reflection.Missing.Value singleton instance.
3308 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
3310 * culture-info-table.h : regenerated.
3312 2007-11-02 Jonathan Chambers <joncham@gmail.com>
3314 * icall.c: Use GetEnvironmentStrings on windows
3315 so we are using the same environment block as
3316 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
3319 Code is contributed under MIT/X11 license.
3321 2007-10-31 Martin Baulig <martin@ximian.com>
3323 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
3325 * mono-debug-debugger.h
3326 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
3328 2007-10-30 Zoltan Varga <vargaz@gmail.com>
3330 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
3333 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
3335 * culture-info-table.h : regenerated.
3337 2007-10-30 Robert Jordan <robertj@gmx.net>
3339 * icall-def.h, icall.c:
3340 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
3342 Code is contributed under MIT/X11 license.
3344 2007-10-29 Zoltan Varga <vargaz@gmail.com>
3346 * class.c (mono_class_setup_vtable): Find the inflated methods in the
3347 inflated class instead of inflating them again.
3349 * class.c (mono_class_setup_vtable): Inflate the override methods in the
3352 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
3353 Call setup_supertypes () after klass->parent is set.
3354 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
3356 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
3357 for inflated instances of not yet created dynamic generic classes.
3358 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
3359 times from inflated_method.
3360 (methodbuilder_to_mono_method): Ditto.
3362 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
3364 * gc.c: code cleanup and removed old untested option of not creating the
3367 2007-10-29 Zoltan Varga <vargaz@gmail.com>
3369 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
3370 creating a jump trampoline for dynamic methods.
3372 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
3374 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
3375 generic TypeBuilders when called from another method of the same type (bug #335131).
3378 2007-10-27 Zoltan Varga <vargaz@gmail.com>
3380 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
3381 doesn't seem to work perfectly.
3383 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
3384 called multiple times.
3385 (methodbuilder_to_mono_method): Ditto.
3386 (resolve_object): Inflate FieldBuilder's.
3388 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
3390 * string-icalls.c, string-icalls.h, appdomain.c: patch from
3391 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
3392 RemoveEmptyEntries in the string.Split implementation (bug #322375).
3394 2007-10-26 Dick Porter <dick@ximian.com>
3396 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
3397 Thread initialisation changes
3399 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
3401 * verify.c: fix compatibility check between arrays and System.Array
3403 2007-10-26 Zoltan Varga <vargaz@gmail.com>
3405 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
3408 2007-10-25 Zoltan Varga <vargaz@gmail.com>
3410 * object.c (mono_value_box): Use typed allocation here.
3412 2007-10-23 Zoltan Varga <vargaz@gmail.com>
3414 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
3415 trampoline instead of compiling the method right away.
3417 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
3419 2007-10-21 Zoltan Varga <vargaz@gmail.com>
3421 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
3422 related fields for dynamic classes. Fixes #334493.
3424 2007-10-20 Zoltan Varga <vargaz@gmail.com>
3426 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
3428 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
3430 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
3431 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
3433 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
3435 * reflection.c (create_generic_typespec): Initialize klass->generic_container
3437 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
3439 2007-10-18 Jonathan Chambers <joncham@gmail.com>
3441 * marshal.c: Use correct key when removing item
3444 Code is contributed under MIT/X11 license.
3446 2007-10-17 William Holmes <billholmes54@gmail.com>
3448 *marshal.c: Adding a case to marshal booleans to U1
3450 Code is contributed under MIT/X11 license.
3452 2007-10-18 Zoltan Varga <vargaz@gmail.com>
3454 * class.c (mono_class_from_name): Search the modules compromising dynamic
3455 assemblies. Fixes #331601.
3457 2007-10-16 Zoltan Varga <vargaz@gmail.com>
3459 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
3460 exception if the type name contains an assembly component. Fixes #334203.
3462 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
3463 modules inside dynamic assemblies. Fixes #334200.
3465 * reflection.c: Set image->public_key and image->public_key_length;
3467 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
3470 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
3472 2007-10-16 Mark Probst <mark.probst@gmail.com>
3474 * metadata.c: Implemented correct comparing of generic classes.
3475 An inflated generic class can be equal to a non-inflated one if it
3476 is inflated with generic type variables as type arguments. Fixes
3479 2007-10-15 Dick Porter <dick@ximian.com>
3481 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
3482 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
3485 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
3486 instead of a monitor lock. This means that monitor_try_enter and
3487 co can set the thread state safely.
3488 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
3489 thread_interrupt_requested, so interrupt actually works.
3491 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
3492 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
3493 state accessor function
3495 2007-10-15 Martin Baulig <martin@ximian.com>
3498 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
3499 the debugger with the current runtime.
3501 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
3503 * object.c, object-internals.h: added the ability to set a single
3504 trampoline for all the slots in a vtable.
3506 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
3508 * marshal.c: deal with a possible race condition during multicast
3509 delegate invocation.
3511 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
3513 * class.c: ensure value type methods don't have the synchronized
3516 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
3518 * string-icalls.c, string-icalls.h: reverted unapproved patch that
3521 2007-10-11 Joel Reed <joelwreed@comcast.com>
3523 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
3524 to take an options parameter so that empty entries can be removed during
3525 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
3527 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3529 * marshal.c: make sure we don't store the signature from a dynamic
3530 method into the runtime invoke cache (bug #327189).
3532 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
3534 * marshal.c: make sure the wrapper methods are properly initialized.
3536 2007-10-11 Mark Probst <mark.probst@gmail.com>
3538 * metadata.c, metadata-internals.h: Generalized
3539 mono_type_stack_size() to mono_type_stack_size_internal() which
3540 takes an additional argument specifying whether it allows open
3543 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
3545 * verify.c (do_invoke_method): handle typedbyref params
3546 correctly and check for unverifiable return values.
3548 * verify.c (do_newobj): fix a warning.
3550 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
3552 * verify.c: don't tread typedbyref as allways unverifable,
3553 so uses, like (ld/st)loc.0 are valid. verify for the cases
3554 that it matters, like boxing related operations.
3556 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
3558 * verify.c: add verification of the newobj opcode. verification
3559 of delegate instantation still missing due ldftn and virldftn not
3560 pushing the function type on stack
3562 2007-10-08 Mark Probst <mark.probst@gmail.com>
3564 * class-internals.h: Runtime generic context data structure
3567 * object.c: Initialization of runtime generic context at runtime
3568 vtable creation time.
3570 2007-10-08 Massimiliano Mantione <massi@ximian.com>
3571 * class.c (mono_class_create_from_typedef,
3572 mono_class_from_generic_parameter, mono_ptr_class_get,
3573 mono_fnptr_class_get, mono_bounded_array_class_get)
3574 * domain.c (mono_domain_create, mono_domain_free)
3575 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
3576 * image.c (do_mono_image_load, mono_image_close):
3577 Hooked up load-unload profiler events.
3579 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3581 * domain.c: track statistics about the actual amount of native code
3584 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
3586 * class.c: the valuetype enumerators don't have the additional
3587 supertypes interfaces.
3589 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
3591 * class.c: need more interfaces setup for the IEnumerator<T>
3592 object created for arrays (tests/ienumerator-interfaces.2.cs).
3594 2007-10-05 Zoltan Varga <vargaz@gmail.com>
3596 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
3598 2007-10-05 Alp Toker <alp@atoker.com>
3600 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
3601 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
3604 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
3606 * verify.c (verify_type_compatibility_full): verification of
3607 compatibility improved, validates correctly non-strict checks between
3608 native int and I4 types different than (unsigned)int32.
3610 * verify.c (do_store_indirect): added, do all verification of
3613 * verify.c (get_load_indirect_mono_type): renamed to
3614 get_indirect_op_mono_type, as it now returns the MonoType for
3615 ldind.X and stind.X opcodes.
3617 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
3619 * reflection.c: Fix the encoding of generic type definition for
3622 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
3623 mono_image_typedef_or_ref but allows to specify if typespec lookups should
3624 be made. Typespec check is done prior to typeref cache lookup.
3626 * reflection.c (mono_image_typedef_or_ref): now just delegate to
3627 mono_image_typedef_or_ref_full.
3629 * reflection.c (encode_generic_class): encode the generic class
3630 directly instead of calling encode_type.
3632 * reflection.c (encode_type): encode the generic type definition
3633 MonoClass as a generic instantiation.
3635 * reflection.c (create_typespec): cache typespec tokens in
3636 the assembly->typespec cache. Don't create typespec for a generic
3637 instance MonoClass. Create typespec for the generic type defintion.
3639 * reflection.c (create_generic_typespec): encode the generic
3640 class directly instead of calling encode_type.
3642 * reflection.c (mono_image_create_token): encode the generic
3643 type definition not using a typespec for MonoType instances.
3646 2007-10-04 Raja R Harinath <rharinath@novell.com>
3649 * class.c (mono_image_init_name_cache): Don't return nested
3650 'protected internal' classes.
3651 (mono_class_from_name_case): Likewise.
3653 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
3655 * icall-def.h, icall.c : get_bundled_machine_config() is now the
3656 common function used by both DefaultConfig in System.dll and
3657 InternalConfigurationHost in System.Configuration.dll.
3659 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3661 * class.c: automatically add to vectors only a few essential explicit
3662 generic interfaces. The rest of the interfaces that arrays should
3663 provide are currently implicitly added (but still not lazily, see the
3664 design in the discussion of bug#325495 for the details of what is
3665 needed for that). Additionally, implicit interfaces are assigned the
3666 same vtable slot as the explicit interfaces (as they are compatible):
3667 this enables huge memory savings since we don't need to instantiate
3668 as many memthods and as large vtables anymore. Also, Since
3669 GetEnumerator<T> returns an instance of a type that is required to
3670 support a similarly large set of interfaces as arrays, we add
3671 implicit interfaces and interface offset sharing support to those
3672 types, too. This change adds all the required interfaces so that
3673 the anonarray.cs test case in the bug report works (we don't add
3674 all the interfaces to arrays of arrays 3-level deep and more because
3675 of the memory requirements explained in the bug and since they are much
3676 less common: the lazy-loading support will enabled them to work, too).
3678 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
3680 * verify.c (merge_stacks): major clean up, all type compatibility
3681 checks are done by verify_type_compatibility. This fix my earlier lack
3682 of understanding of the CLR type system and merge_stacks no longer looks
3685 * verify.c: fixed some bad spelling.
3687 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
3689 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
3690 a given stack slock.
3692 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
3693 verify_type_compatibility_full. This removed a near indentical function and fixed
3694 handling of Int32 and IntPtr across all opcodes.
3696 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
3698 * class.c: only vectors have the additional generic interfaces.
3700 2007-10-01 Jonathan Chambers <joncham@gmail.com>
3702 * mono-config.c: Use g_strcasecmp instead of
3703 strcasecmp like everywhere else to fix
3704 compilation with MSVC.
3706 Code is contributed under MIT/X11 license.
3708 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
3710 * object.c, object-internals.h: refactored the IMT code to enable
3711 building a single slot at a time and lazily creating the IMT trampolines
3714 2007-09-29 Zoltan Varga <vargaz@gmail.com>
3716 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
3718 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
3721 2007-09-29 Raja R Harinath <harinath@gmail.com>
3723 * loader.c (method_from_methodspec): Rearrange to avoid
3724 un-necessary exposition. Don't assert out if the method's
3725 declaring type is a generic type definition.
3727 2007-09-28 Martin Baulig <martin@ximian.com>
3729 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
3731 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
3733 * class-internals.h: optimize field layout of MonoClass to
3734 requires less cachelines at runtime and save a few bytes on 64 bit
3737 2007-09-28 Jb Evain <jbevain@novell.com>
3739 * reflection.c: when encoding type names in custom attributes,
3740 if the type is a closed generic type, its generic arguments
3741 have to be serialized as AssemblyQualifiedName, so that when
3742 they are deserialized, it's possible to re-create them properly.
3746 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
3748 * object.c, class-internals.h: added delegate-creation counter.
3750 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
3752 * class.c: cleanup of the code that synthetizes interfaces for
3753 arrays in 2.0: saves quit a bit of corlib mempool memory.
3754 Code to fix bug #325495 ifdeffed out for now until the issues
3755 with memory usage and O(n^2) behaviour are fixed.
3757 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
3759 * marshal.c: when possible, do not duplicate the name of the methods
3760 in the method builder and in the generated MonoMethod.
3762 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
3763 * verify.c: added support for type checking ldind_* opcodes.
3765 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
3767 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
3768 which is used to distinguish the fully open instantiation of a TypeBuilder
3769 with the rest. This temporary hack is required to restore the property that
3770 the fully open instantiation is the same type of the generic type definition.
3772 * class-internals.h (mono_generic_class_is_generic_type_definition):
3773 new function as part of the internal API.
3775 * class.c (inflate_generic_type): return NULL when the generic inst is
3776 fully open. The fully open generic type is now the same as the generic type
3777 definition for non TypeBuilder types.
3779 * class.c (mono_generic_class_get_class): removed assert since it is
3780 no longer valid, gklass->cached_class can point to the generic type definition.
3782 * class.c (mono_generic_class_is_generic_type_definition): new.
3784 * metadata.c (mono_generic_class_hash): added is_tb_open field
3785 to the hash calculation.
3787 * metadata.c (free_generic_class): if the generic class is associated
3788 with the generic type definition, its field will come from the mempool and
3791 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
3792 new, this function identifies the corner case of a TypeBuilder fully open
3795 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
3796 for lookup. Set gclass->cached_class to be the container class in case of
3797 the fully open instantiation of non TypeBuilder types.
3799 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
3800 to compare generic classes.
3802 * reflection.c (method_encode_methodspec): remove assert that
3805 * reflection.c (mono_reflection_generic_class_initialize): add
3806 an aditional assert to ensure the proper type is used.
3808 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
3810 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
3813 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
3815 * verify.c (push_arg): Fixed support for ldarga
3816 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
3817 MonoType used as first arg in case of instance calls.
3819 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
3821 * verify.c: Support for verifying VAR and MVAR types,
3823 2007-09-25 Zoltan Varga <vargaz@gmail.com>
3825 * icall.c (ves_icall_get_property_info): Set the reflected type of the
3826 accessors correctly.
3828 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3830 * threads.c: support OSX and other systems in
3831 mono_thread_get_stack_bounds (bug #328026).
3833 2007-09-25 Martin Baulig <martin@ximian.com>
3836 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
3838 2007-09-24 Martin Baulig <martin@ximian.com>
3841 (MonoDebugClassEntry): Moved the definition of this struct into
3842 mono-debug.c to make it private.
3845 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
3846 type table per symbol file, we don't need to store the symfile id
3849 2007-09-24 Martin Baulig <martin@ximian.com>
3851 Create one type table per symbol file, since a `MonoClass *' gets
3852 invalid when its image is unloaded.
3854 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
3855 (MonoDebugHandle): Added `type_table'.
3857 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
3859 * mempool.c, mempool.h: added mono_mempool_new_size () API
3860 to be able to specify a smaller initial size for the pool.
3861 Adjusted the code to slowly increase pool size before using
3862 the previous default size.
3863 * image.c: use a small initial size for image mempools.
3865 2007-09-23 Zoltan Varga <vargaz@gmail.com>
3867 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
3870 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
3871 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
3873 2007-09-22 Zoltan Varga <vargaz@gmail.com>
3875 * metadata.c (mono_type_create_from_typespec): Remove an invalid
3876 free. Fixes #327438.
3878 2007-09-21 Raja R Harinath <harinath@gmail.com>
3880 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
3881 generic instantiations, etc.
3882 <MONO_TYPE_ARRAY>: Likewise.
3884 2007-09-21 Martin Baulig <martin@ximian.com>
3886 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
3887 these structs were never defined.
3888 (MonoDebugHandle): Removed the `_priv' field, it was never used.
3890 2007-09-21 Martin Baulig <martin@ximian.com>
3892 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
3894 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
3896 * image.c: removed the guid hash tables: we can get the same info
3897 without the additional memory usage hit (partially fixes also bug #327052).
3899 2007-09-10 Massimiliano Mantione <massi@ximian.com>
3901 * profiler.h, profiler-private.h, profiler.c: add a new profiler
3902 event to handle unloading methods. After the event is called, the
3903 corresponding MonoMethod* must be considered invalid.
3904 * loader.c (mono_free_method): call the new mono_profiler_method_free
3907 2007-09-20 Mark Probst <mark.probst@gmail.com>
3909 * domain-internals.h: New flag in MonoJitInfo which marks shared
3910 generic methods. New hash table (shared_generics_hash) in
3911 MonoDomain to keep track of shared generic methods. Prototypes
3912 for functions to register and lookup shared generic methods.
3914 * domain.c: Support for registering and looking up shared generic
3915 methods via a hash table (shared_generics_hash) in MonoDomain.
3917 * class-internals.h: New exception to signal failure of shared
3918 compilation of a generic method. New counters for generics
3919 sharing in MonoStats.
3921 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
3923 * image.c, metadata-internals.h: don't keep a file descriptor open
3924 for loaded assemblies (bug#325988).
3926 2007-09-19 Raja R Harinath <rharinath@novell.com>
3928 * metadata.c (signature_in_image): New. Carve out of type_in_image.
3929 (ginst_in_image, gclass_in_image): Simplify. Change signature to
3930 use the corresponding datatypes.
3931 (type_in_image): Update to changes.
3932 (CleanForImageUserData): Simplify.
3933 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
3934 Avoid quadratic behaviour in handling the "stolen" list by
3935 separating the filter predicate out, and by prepending the stolen
3936 items rather than appending them.
3937 (steal_ginst_in_image): Likewise.
3938 (mono_metadata_clean_for_image): Update to changes.
3940 2007-09-19 Martin Baulig <martin@ximian.com>
3942 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
3944 2007-09-19 Martin Baulig <martin@ximian.com>
3946 * mono-debug.c (mono_debug_cleanup): Don't call
3947 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
3949 2007-09-19 Raja R Harinath <harinath@gmail.com>
3951 Fix crash on 'make run-test' in mcs/errors
3952 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
3953 Avoid more potential allocations in mono_class_from_mono_type.
3954 (ginst_in_image): Update to changes.
3955 (gclass_in_image): Rearrange slightly.
3957 2007-09-18 Zoltan Varga <vargaz@gmail.com>
3959 * class.c (mono_class_init): Move the code that sets up class->methods to
3960 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
3962 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
3963 canonical instance of an inflated generic signature.
3964 (mono_type_create_from_typespec): Remove an invalid free.
3966 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
3968 2007-09-18 Marek Habersack <mhabersack@novell.com>
3970 * domain-internals.h: added a declaration of the
3971 mono_assembly_load_full_nosearch internal function.
3973 * assembly.c (mono_assembly_load_with_partial_name): use
3974 mono_try_assembly_resolve return value properly.
3975 (mono_assembly_load_full_nosearch): copied the function body from
3976 mono_assembly_load_full, without the code to invoke assembly
3978 (mono_assembly_load_full): calls the above new function and if the
3979 assembly is not resolved, invokes the search hooks.
3981 * appdomain.c (mono_runtime_init): restore the global postload
3982 assembly search handlers.
3984 2007-09-18 Zoltan Varga <vargaz@gmail.com>
3986 * class.c (mono_class_init): Make sure class->methods and class->properties
3987 are never NULL in the generics case.
3989 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
3991 2007-09-17 Zoltan Varga <vargaz@gmail.com>
3993 * metadata.c (free_generic_class): Disable some code to fix the build.
3995 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
3997 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
3998 from the image mempool.
4000 * metadata.c (free_generic_class): Free more data from the inflated class.
4002 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
4004 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
4006 (mono_type_create_from_typespec): Ditto.
4008 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
4009 MonoImage to the caller.
4010 (mono_init_internal): Save the opened image in a global variable.
4011 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
4013 * reflection.c (resolve_object): Fix a leak.
4015 * metadata.c: Fix the freeing of data in the generics caches.
4017 * metadata.c (free_generic_inst): Comment this out to fix the build.
4018 (free_generic_class): Ditto.
4020 * metadata.c: Free cached generic methods, instantinations and classes when
4021 they are removed from the caches.
4022 (mono_metadata_free_type): Free the type itself.
4024 * class.c: Free the result of mono_class_inflate_generic_type () in a few
4027 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
4029 * boehm-gc.c: restrict managed allocs to __thread supporting
4032 2007-09-16 Zoltan Varga <vargaz@gmail.com>
4034 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
4035 (mono_generic_class_get_class): Fix a leak.
4037 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
4038 mono_metadata_free_type ().
4039 (mono_metadata_inflate_generic_inst): Fix a leak.
4041 2007-09-14 Zoltan Varga <vargaz@gmail.com>
4043 * mono-debug.c (free_header_data): Fix a leak missed earlier.
4045 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
4048 * mono-debug.c (mono_debug_close_image): Fix call to
4049 g_hash_table_remove ().
4051 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
4053 * icall-def.h: redirect all the string ctor to the managed
4054 CreateString () methods.
4055 * string-icalls.c, string-icalls.h: removed dead code for string
4058 2007-09-14 Zoltan Varga <vargaz@gmail.com>
4060 * mono-debug.c: Fix memory leaks.
4062 2007-09-14 Jonathan Chambers <joncham@gmail.com>
4064 * threads-types.h: Implement mono_hazard_pointer_set and
4065 mono_hazard_pointer_clear macros using do/while(0) to fix
4066 compilation with MSVC.
4068 Code is contributed under MIT/X11 license.
4070 2007-09-14 Zoltan Varga <vargaz@gmail.com>
4072 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
4073 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
4075 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
4077 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
4080 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
4082 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
4083 managed-code allocated as well.
4085 2007-09-13 Zoltan Varga <vargaz@gmail.com>
4087 * class.c (mono_class_is_assignable_from): Add support for generic variance.
4089 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
4091 * boehm-gc.c: fixed the build after the AOT changes.
4093 2007-09-13 Zoltan Varga <vargaz@gmail.com>
4095 * wrapper-types.h: Add an ALLOC wrapper type.
4097 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
4098 reference managed allocator methods.
4100 2007-09-12 Marek Safar <marek.safar@gmail.com>
4102 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
4103 of Type array and not MonoType, a fix suggested by Hari.
4105 2007-09-12 Jonathan Chambers <joncham@gmail.com>
4107 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
4108 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
4110 Code is contributed under MIT/X11 license.
4112 2007-09-10 Massimiliano Mantione <massi@ximian.com>
4114 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
4116 2007-09-12 Marek Habersack <mhabersack@novell.com>
4118 * image.c (do_mono_image_open): if assembly file fails to open and
4119 MONO_IOMAP is in effect, try to find the path in a
4120 case-insensitive way.
4122 * appdomain.c (mono_runtime_init): do not install postload hooks -
4123 tests show that MS.NET doesn't use anything of that sort to
4124 trigger the AppDomain.AssemblyResolve event.
4125 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
4127 (mono_runtime_init): init portability helpers here.
4129 * assembly.c (mono_assembly_load_with_partial_name): if other
4130 attempts fail, trigger the AppDomain.AssemblyResolve event handler
4131 to resolve the assembly.
4133 * domain-internals.h: added mono_try_assembly_resolve and marked
4136 2007-09-11 Jb Evain <jbevain@novell.com>
4138 * object-internals.h (MonoReflectionDynamicMethod): add
4139 a `MonoReflectionType *owner` field. The owner is used
4141 (mono_reflection_create_dynamic_method): use the owner of the dynamic
4142 method as the class declaring the dynamic method.
4143 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
4144 dynamic method to the declaring type of the methodbuilder.
4146 2007-09-11 Mark Probst <mark.probst@gmail.com>
4148 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
4149 rules for calling methods via reflection.
4151 2007-09-11 Zoltan Varga <vargaz@gmail.com>
4153 * reflection.c (resolve_object): Add support for MonoGenericClass.
4156 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
4158 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
4159 provide a managed method that does fast allocations without needing
4160 a managed->unmanaged transition. Boehm GC implementation currently
4161 enabled for ptrfree objects on sane architectures.
4163 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
4165 * marshal.c, marshal.h: exported a couple of useful functions and
4166 added mono_mb_get_label () to easily handle backward branches.
4168 2007-09-10 Zoltan Varga <vargaz@gmail.com>
4170 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
4172 2007-09-10 Massimiliano Mantione <massi@ximian.com>
4174 * loader.c (find_method): Fixed the regression introduced while
4177 2007-09-09 Zoltan Varga <vargaz@gmail.com>
4179 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
4182 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
4183 icall.c reflection.c: Pass a MonoGenericContext argument to
4184 mono_lookup_dynamic_token ().
4186 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
4189 2007-09-09 Robert Jordan <robertj@gmx.net>
4191 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
4192 for generic methods.
4194 * object.c (mono_object_get_virtual_method): Handle generic methods.
4197 Code is contributed under MIT/X11 license.
4199 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
4201 * image.c: fix locking in mono_image_load_file_for_image ().
4203 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
4205 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
4206 used only as a cache: added an icall to fill it.
4208 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
4210 * reflection.h: exposed mono_reflection_free_type_info
4211 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
4212 since mono_reflection_bind_generic_parameters makes a copy of it.
4213 * reflection.c (free_type_info): subinfos should be freed.
4214 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
4216 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
4217 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
4218 this fixes #82695 and #81726.
4221 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
4223 * process.h, process.c: added support for user profile/info in
4224 ProcessStartInfo. For now only Windows works.
4226 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4228 * metadata.c: consider the generic arguments when comparing
4229 signatures (bug #82614).
4231 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4233 * cil-coff.h, image.c: updated assembly loader to cope with the
4234 PE32+ 64 bit file format.
4236 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4238 * assembly.c, class.c, domain.c, loader.c: remove useless
4239 inclusion of cil-coff.h.
4241 2007-08-29 Jonathan Chambers <joncham@gmail.com>
4243 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
4244 if interface is marked with CoClassAttribute.
4246 Code is contributed under MIT/X11 license.
4248 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
4250 * sgen-gc.c: ensure no object from the to space is copied again or finalized
4251 if it's seen twice in major collections.
4253 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4255 * sgen-gc.c: big objects are not copied to the gray area, but they
4256 need to be considered for scanning, too, if they are brought alive
4257 by an object ready for finalizations or a survived one.
4259 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
4261 * sgen-gc.c: properly account the number of disappearing links when
4264 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
4266 * sgen-gc.c: share the code to scan the registered roots between the
4267 different types of collections.
4269 2007-08-28 Zoltan Varga <vargaz@gmail.com>
4271 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
4273 2007-08-28 Zoltan Varga <vargaz@gmail.com>
4275 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
4276 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
4278 2007-08-28 Mark Probst <mark.probst@gmail.com>
4280 * security-manager.c (mono_security_manager_get_methods):
4281 LinkDemandSecurityException now has 2 arguments instead of 3.
4283 2007-08-27 Zoltan Varga <vargaz@gmail.com>
4285 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
4286 platforms which need it.
4288 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4290 * sgen-gc.c: unregister thread data structures with a pthread_key_t
4293 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
4295 * threads.c: free the thread static data on thread exit.
4297 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
4299 * class.c: walk the hierarchy to find the generic definition for
4300 a class (fixes runtime part of bug #82498).
4302 2007-08-24 Zoltan Varga <vargaz@gmail.com>
4304 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
4307 * image.c (mono_image_close): Here. Hopefully fixes #82510.
4309 2007-08-24 Mark Probst <mark.probst@gmail.com>
4311 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
4313 2007-08-24 Robert Jordan <robertj@gmx.net>
4315 * appdomain.c: don't perform the ':'->';' substitution on Win32.
4317 2007-08-24 Jb Evain <jbevain@novell.com>
4319 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
4322 2007-08-24 Mark Probst <mark.probst@gmail.com>
4324 * threads.c: Make sure a thread gets cleaned up only once. Fixes
4327 2007-08-24 Zoltan Varga <vargaz@gmail.com>
4329 * assembly.c: Fix a warning.
4331 2007-08-23 Marek Habersack <mhabersack@novell.com>
4333 * appdomain.c: parse the <runtime> section looking for the probing
4334 element with the 'privatePath' attribute, which sets additional
4335 directories in which the runtime should look for assemblies.
4337 2007-08-23 Robert Jordan <robertj@gmx.net>
4339 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
4342 2007-08-23 Martin Baulig <martin@ximian.com>
4344 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
4345 _mono_debug_init_corlib() and remove it from the header file.
4347 2007-08-23 Martin Baulig <martin@ximian.com>
4349 * mono-debug-debugger.c
4350 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
4351 don't notify the debugger about it.
4353 * mono-debug-debugger.h
4354 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
4356 2007-08-23 Robert Jordan <robertj@gmx.net>
4358 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
4359 Code is contributed under MIT/X11 license.
4361 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4363 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
4365 2007-08-22 Martin Baulig <martin@ximian.com>
4367 * mono-debug.c: Store debugging info on a per-domain basis and
4368 free it on domain unload. Add support for unloading symbol files.
4371 (MonoDebugList): New typedef.
4373 - add `data_tables and `type_table'.
4374 - replace 'symbol_files' and `num_symbol_files' with a
4376 (mono_debug_data_table): Removed.
4377 (mono_debug_list_add): New public function.
4378 (mono_debug_list_remove): New public function.
4379 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
4380 (mono_debug_init_2_memory): Renamed into
4381 mono_debug_open_image_from_memory().
4382 (mono_debug_close_image): New public function.
4383 (mono_debug_domain_create): Likewise.
4384 (mono_debug_domain_unload): Likewise.
4385 (MONO_DEBUGGER_VERSION): Bump to 60.
4387 * mono-debug-debugger.h
4388 (MonoDebuggerEvent):
4389 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
4390 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
4391 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
4392 - rename `THREAD_CREATED' and `THREAD_EXITED' into
4393 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
4394 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
4396 (mono_debugger_add_symbol_file): Removed.
4397 (mono_debugger_add_type): Removed.
4398 (mono_debugger_lookup_type): Removed.
4399 (mono_debugger_lookup_assembly): Removed.
4402 (mono_domain_create): Call mono_debug_domain_create().
4403 (mono_init_internal): Call mono_debug_init_corlib().
4406 (mono_assembly_close): Call mono_debug_close_image().
4408 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
4410 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
4413 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
4415 * sgen-gc.c: ensure section->pin_queue_end is initialized
4416 correctly when non pinning objects in the section have been found.
4418 2007-08-22 Marek Habersack <mhabersack@novell.com>
4420 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
4421 containing a list of directories separated by ':'. MSDN docs say
4422 the directories should be separated with ';'. Part of a bugfix for
4425 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
4427 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
4428 it should MonoType and not MonoClass.
4430 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
4432 * culture-info-table.h : regenerated.
4434 2007-08-20 William Holmes <billholmes54@gmail.com>
4436 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
4437 to call ReplaceFile Kernel32 on windows or in io-layer.
4438 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
4439 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
4440 as an internal call.
4442 Code is contributed under MIT/X11 license.
4444 2007-08-20 Jb Evain <jbevain@novell.com>
4446 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
4447 and MONO_EXCEPTION_FIELD_ACCESS.
4449 * debug-helpers.[c|h]: new mono_field_full_name function.
4451 2007-08-20 Mark Probst <mark.probst@gmail.com>
4453 * class.c: Removed class_security_level() and moved it to
4454 security-core-clr.c.
4456 * security-core-clr.c, security-core-clr.h: class_security_level()
4457 is now public and renamed to mono_security_core_clr_class_level().
4458 It also looks for security attributes in the classes a class is
4461 2007-08-20 Mark Probst <mark.probst@gmail.com>
4463 * security-core-clr.c, security-core-clr.h: CoreCLR security
4466 * Makefile.am: Added security-core-clr.[ch].
4468 * security-manager.c, security-manager.h: Functions and enum for
4469 setting and getting the security mode.
4471 * class.c: CoreCLR security checks.
4473 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4475 * icall-def.h, process.c, process.h: implemented icall to get
4476 user/system processor times.
4478 2007-08-17 Mark Probst <mark.probst@gmail.com>
4480 * domain.c, threads.c, class-internals.h, domain-internals.h: New
4481 reader-lock-free jit_info_table.
4483 2007-08-17 Zoltan Varga <vargaz@gmail.com>
4485 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
4487 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
4489 * object-internals.h (MonoException): Add missing _data member.
4491 2007-08-08 Massimiliano Mantione <massi@ximian.com>
4493 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
4494 checking that only methods with matching qname or fqname are picked
4495 from implemented interfaces.
4497 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
4499 * verify.c (do_newarr):added, do type verification of
4500 newarr ops, push the right value on the eval stack.
4501 * verify.c (mono_method_verify): use do_newarr
4504 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
4506 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
4507 factored the common code into get_boxable_mono_type, which
4508 is now using mono_type_get_full, this fixed byref related tests.
4510 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
4512 * class.c: added mono_type_get_full, this function has the same
4513 behavior of mono_class_get_full but the returned MonoType has
4514 all metadata of the associated token in case of a typespec token.
4515 * class.c: added mono_type_retrieve_from_typespec, used by
4516 mono_type_get_full to retrieve the token type.
4517 * class.c (mono_class_create_from_typespec): changed to use
4518 mono_type_retrieve_from_typespec.
4519 * class.c (mono_ldtoken): changed to use mono_type_get_full
4520 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
4521 * class-internals.h: exported mono_type_get_full for internal use.
4523 2007-08-16 Jb Evain <jbevain@novell.com>
4525 * domain.c (supported_runtimes): add entry for
4526 the 'moonlight' runtime version.
4528 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
4530 * verify.c (mono_method_verify): small typo sliped in.
4532 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
4534 * verify.c (do_unbox_value): added, do type verification of
4536 * verify.c (mono_method_verify): use do_unbox_value
4539 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
4541 * verify.c (dump_stack_value): fixed typo, was printing string
4542 instead of object on stack.
4543 * verify.c (do_box_value): moved the byref check up as it leads
4544 to invalid code and should be done earlier.
4545 * verify.c: improved error messages for and ldobj
4547 2007-08-15 William Holmes <billholmes54@gmail.com>
4549 * marshal.c (emit_marshal_custom): Omit the call to
4550 marshal_native_to_managed when calling native to managed
4551 and the argument is specified as an out argument.
4553 Code is contributed under MIT/X11 license.
4555 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
4557 * verify.c: fixed the type checks for generics, function pointers and vectors.
4558 Added type verification for ldobj and ldtoken. The verifier
4559 would segfault if header or signature of a method contained references
4560 to non-existant types.
4562 2007-08-15 Jonathan Chambers <joncham@gmail.com>
4564 * marshal.c (cominterop_get_ccw): Patch from
4565 Bill Holmes to no walk up interface hierarchy.
4566 All parent methods should be present in the interface for COM.
4568 Code is contributed under MIT/X11 license.
4570 2007-08-15 Jonathan Chambers <joncham@gmail.com>
4572 * marshal.c (emit_marshal_com_interface): Patch from
4573 Bill Holmes to handle COM Interfaces as return values
4574 for native->managed calls.
4576 Code is contributed under MIT/X11 license.
4578 2007-08-14 Jonathan Chambers <joncham@gmail.com>
4580 * marshal.c (cominterop_get_idispatch_for_object): Implement
4581 for runtime callable wrappers.
4583 Code is contributed under MIT/X11 license.
4585 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
4587 * pedump.c (main): changed from mono_init to mono_init_from_assembly
4588 so 2.0 types are accessible
4591 2007-08-13 Miguel de Icaza <miguel@novell.com>
4593 * domain.c (mono_init_internal): Call mono_assembly_load_friends
4594 once we load mscorlib. Due to the order in which we initialize,
4595 the mono_assembly_load_full routine that loads mscorlib did not
4596 load friends. We now load it once we load the
4597 mono_defaults.internals_visible_class class.
4599 * assembly.c: Expose the mono_load_friend_assemblies method.
4601 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
4603 * verify.c: improved the handling of boxing, better
4604 type checking for unary ops and conversion. Fix bug
4605 regarding managed pointer compatibility checking
4607 2007-08-11 Zoltan Varga <vargaz@gmail.com>
4609 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
4611 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
4613 2007-08-09 Raja R Harinath <rharinath@novell.com>
4615 * reflection.c (dup_type): Remove.
4616 * class.c (dup_type): Remove.
4617 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
4618 instead of the dodgy 'dup_type'.
4619 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
4620 handle the case where 'dup_type' needed the second argument.
4622 2007-08-08 Zoltan Varga <vargaz@gmail.com>
4624 * domain.c: Fix a warning.
4626 2007-08-08 Massimiliano Mantione <massi@ximian.com>
4628 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
4629 checking that methods with the same fqname are not overridden
4630 with a method from an ancestor.
4632 2007-08-07 Zoltan Varga <vargaz@gmail.com>
4634 * threads.c (free_thread_static_data_helper): Avoid a crash if
4635 thread->static_data is not yet set.
4637 2007-08-07 Jonathan Chambers <joncham@gmail.com>
4639 * marshal.c: Use correct image when emitting
4640 native wrapper for COM calls.
4642 Code is contributed under MIT/X11 license.
4644 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
4646 * icall-def.h, security.c, security.h :
4647 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
4649 2007-08-07 Martin Baulig <martin@ximian.com>
4651 * mono-debug-debugger.h
4652 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
4654 * domain.c (mono_domain_free): Call
4655 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
4657 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
4659 * verify.c (check_underflow, check_overflow): error message now returns IL offset
4660 * verify.c (in_same_block): code should test if either offset is inside the clauses
4661 * verify.c (mono_method_verify): push the exception into the eval stack of exception
4664 2007-08-03 Zoltan Varga <vargaz@gmail.com>
4666 * image.c (mono_image_close): Fix a leak.
4668 * object.c (mono_runtime_invoke_array): Avoid using alloca.
4670 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
4672 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
4674 * domain.c, threads.c, threads-types.h: fix memory retention issue
4675 with thread static variables not being cleared on domain unload.
4676 Reuse thread static slots after domain unload.
4678 2007-08-03 Zoltan Varga <vargaz@gmail.com>
4680 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
4683 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
4684 now done in mono_runtime_invoke_array.
4686 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
4687 receiver is a nullable type.
4689 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
4692 2007-08-03 Jonathan Chambers <joncham@gmail.com>
4694 * marshal.c: Implement COM Objects as return type for
4695 managed->unmanaged calls. Added Release calls for COM Object
4696 out/return values in managed->unmanaged calls.
4698 Code is contributed under MIT/X11 license.
4700 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
4702 * threads.h, threads-type.h: move the hazard pointer declarations
4703 to the private header.
4705 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4707 * file-io.c, appdomain.c: memory leak fixes.
4709 2007-08-02 Dick Porter <dick@ximian.com>
4712 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
4713 SO_REUSEADDR setting into io-layer/sockets.c.
4715 2007-08-01 Zoltan Varga <vargaz@gmail.com>
4717 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
4718 from Object when called on a generic parameter. Fixes #82211.
4720 2007-08-01 Dick Porter <dick@ximian.com>
4722 * file-io.c (convert_share): Test FileShare values bit-by-bit.
4723 Fixes bug 79250 yet again.
4725 2007-07-30 Martin Baulig <martin@ximian.com>
4727 Merged the `debugger-dublin' branch.
4730 (MonoDebugDataTable): New typedef.
4731 (MonoDebugMethodAddressList): New typedef.
4732 (MonoDebugWrapperData): Removed.
4733 (MonoDebugSymbolTable): Removed `current_data_table',
4734 `current_data_table_size', `current_data_table_offset'.
4735 (MonoDebugDataItemType): Moved into mono-debug.c.
4736 (MonoDebugMethodJitInfo): Remove `address'.
4737 (mono_debug_data_table): New global variable.
4738 (mono_debug_lookup_method_addresses): New public function.
4739 (mono_debug_find_method): Take a `MonoMethod *', not a
4740 `MonoDebugMethodInfo *'.
4742 * mono-debug.c: Drop support for the old symbol tables.
4744 2007-06-28 Martin Baulig <martin@ximian.com>
4746 * mono-debug.c (mono_debug_debugger_version): New public variable.
4748 2007-07-31 William Holmes <billholmes54@gmail.com>
4750 * metadata.c Changed mono_type_create_from_typespec to not insert
4751 the type into the hash map until after
4752 do_mono_metadata_parse_type has completed.
4754 Code is contributed under MIT/X11 license.
4756 2007-07-31 Zoltan Varga <vargaz@gmail.com>
4758 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
4759 generic parameter. Fixes #82211.
4761 2007-07-27 Jb Evain <jbevain@novell.com>
4763 * pedump.c (dump_metadata, dump_metadata_header): dump
4764 versions contained in the metadata header.
4766 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
4768 * threads.c: register small_id_table with the GC.
4770 2007-07-27 Mark Probst <mark.probst@gmail.com>
4772 * threads.c, threads.h, class-internals.h, object-internals.h:
4773 Hazard pointers, to be used by lock-free parallel algorithms.
4775 2007-07-26 Dick Porter <dick@ximian.com>
4777 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
4778 routine on non-windows platforms, as I've not managed to think of
4779 a non-kludgy way of doing this. Finishes off bug 78739.
4781 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
4783 * object.c: properly setup interface_bitmap in proxy vtables.
4785 2007-07-25 Marek Habersack <mhabersack@novell.com>
4787 * appdomain.c (get_shadow_assembly_location): do not use TickCount
4788 to create unique shadow copy target directories, use the domain's
4789 serial number instead. Each domain gets a unique target directory
4792 * domain.c (mono_domain_create): added code to increment domain
4793 shadow copy serial number and cache the value in the current
4796 * domain-internals.h (struct _MonoDomain): added a new field -
4797 shadow_serial to hold the serial number used in generation of
4798 shadow-copy directories. This is to make sure that the directory
4799 name is unique for each and every domain created. We avoid a race
4800 condition with overriding assemblies already in use by other app
4803 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
4805 * class.c (mono_bounded_array_class_get): fixed memory leak when
4806 binding generic parameters.
4808 2007-07-24 Raja R Harinath <rharinath@novell.com>
4810 * metadata.c (do_mono_metadata_parse_generic_class): Use
4811 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
4814 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4816 * loader.c, class-internals.h, reflection.c: removed the per-method
4817 generics hashtable: we use the global one through the call of
4818 mono_class_inflate_generic_method ().
4820 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
4822 * class.c, metadata.c, class-internals.h: introduce yet another
4823 generics global cache for inflated methods (fixes 98% of the perf
4824 issue in bug #81806).
4826 2007-07-23 Raja R Harinath <rharinath@novell.com>
4828 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
4829 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
4830 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
4831 return a MonoGenericInst containing (a copy) of those types.
4832 (mono_metadata_inflate_generic_inst): Update to changes.
4833 (mono_metadata_parse_generic_inst): Likewise.
4834 (mono_get_shared_generic_inst): Likewise.
4835 * reflection.c (mono_class_bind_generic_parameters): Likewise.
4836 (mono_reflection_bind_generic_method_parameters): Likewise.
4837 * metadata-internals.h: Likewise.
4838 * icall.c (free_generic_context): Kill.
4839 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
4841 * reflection.c (reflection_methodbuilder_to_mono_method): Use
4842 mono_metadata_type_dup.
4843 * marshal.c (mono_mb_create_method): Likewise.
4845 * metadata.c (mono_metadata_type_dup): Rename from
4846 mono_metadata_type_dup_mp. Take an optional mempool instead of a
4847 MonoImage. Handle a few more cases, esp. when no mempool is given.
4848 * marshal.c, metadata-internals.h: Update to changes.
4850 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
4852 * class.c: fixed a small leak for array classes and removed warning.
4854 2007-07-22 Zoltan Varga <vargaz@gmail.com>
4856 * loader.c (mono_method_get_param_token): Make this work on generic methods.
4857 Return 0x8000000 for return parameters. Fixes #82161.
4859 2007-07-21 Marek Habersack <grendello@gmail.com>
4861 * appdomain.c (get_shadow_assembly_location): append the current
4862 ticks value to the path. Avoids overwriting the same assemblies by
4863 several threads at the same time.
4865 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
4866 and Raja R Harinath <rharinath@novell.com>
4868 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
4870 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
4871 property for testing if a method is a generic method definition.
4873 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
4875 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
4877 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
4879 * verify.c: used function from private branch, reverted to the one in class.h
4881 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
4883 * verify.c: a typo slipped in and the code wont compile
4885 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
4887 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
4888 disabled box instruction as it is doing the wrong thing
4889 improved stack dump messages, now it is easier to debug type related issues
4892 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
4894 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
4896 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
4898 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
4899 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
4900 grouped with class and valuetype. This change will simply
4901 the code as it should be handled just like unmanaged pointers.
4903 2007-07-19 Mark Probst <mark.probst@gmail.com>
4905 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
4907 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
4909 * verify.c: several stack merge issues fixed, reference comparisons now
4910 check the type size. strict type check now works correctly.
4911 added more uses of IS_MANAGED_POINTER macro.
4912 fixed issues pointed by running the test suite against .net.
4915 2007-07-19 Mark Probst <mark.probst@gmail.com>
4917 * class.c, loader.c, class-internals.h: Removed the
4918 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
4921 * icall.c: Better error checking in some internal reflection
4924 2007-07-18 William Holmes <billholmes54@gmail.com>
4926 * filewatcher.c : removed unused variable 'filename' in
4927 ves_icall_System_IO_FSW_SupportsFSW
4929 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4931 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
4934 2007-07-15 Zoltan Varga <vargaz@gmail.com>
4936 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
4938 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
4940 2007-07-14 Zoltan Varga <vargaz@gmail.com>
4942 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
4943 Implement generics support.
4944 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
4946 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
4947 type_args and method_args arguments.
4948 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
4949 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
4950 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
4952 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
4954 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
4955 It adds a rootimage parameter to mono_reflection_get_type_internal,
4956 adds new function mono_reflection_get_type_with_rootimage and use
4957 the rootimage to resolve the types instead of the current image
4959 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
4961 * culture-info-table.h: Forgot to update after r78304.
4963 2007-07-13 Raja R Harinath <rharinath@novell.com>
4965 * class.c (mono_class_is_open_constructed_type)
4966 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
4968 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
4970 * class.c (mono_bounded_array_class_get): method fails if used with
4971 an incomplete TypeBuilder enum (no basetype field), fixed it by
4972 avoiding calculating the size for such array as it cannot be instantiated.
4975 2007-07-12 Raja R Harinath <rharinath@novell.com>
4977 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
4979 * metadata.c, reflection.c: Update to changes.
4981 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
4983 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
4984 mono_class_is_valid_enum, they are used to valide a enum when loading.
4985 * reflection.c: used new functions to throw TypeLoadException when and
4986 invalid enum is build with TypeBuilder. Fixes #82018
4988 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
4990 * object.c: forgot commit of mono_class_setup_methods () to access
4992 * object-internals.h: added a few more handy fields to
4995 2007-07-11 Zoltan Varga <vargaz@gmail.com>
4997 * object.c (build_imt): Call mono_class_setup_methods () before accessing
5000 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
5002 * class-internals.h, object-internals.h, object.c: IMT-based
5003 interface invocation core from Massimiliano Mantione
5004 (massi@ximian.com) with a reworked arch-specific interface,
5005 bsearch implementation and a few bugfixes and memory savings by me.
5007 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
5009 * class.c (mono_class_create_from_typedef): mono would segfault if
5010 an enum did not have a __value field. It now throws a TypeLoadException
5011 for such cases. Fix bug #82022
5013 2007-07-10 Zoltan Varga <vargaz@gmail.com>
5015 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
5017 2007-07-09 Mark Probst <mark.probst@gmail.com>
5019 * class.c (mono_class_init): If a class is already inited but has
5020 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
5022 2007-07-09 Mark Probst <mark.probst@gmail.com>
5024 * class.c: Properly handle the case of an unimplemented interface
5025 method. Fixes: 81673.
5027 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
5029 * class-internals.h, object.c: cleanup patch from massi: use
5030 MonoVTable->interface_bitmap since the vtable interfaces offset array
5033 2007-07-10 Zoltan Varga <vargaz@gmail.com>
5035 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
5036 GetMDStreamVersion icall instead.
5038 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
5040 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
5041 not use mono_dl_build_path() with a full library name: makes
5042 fallbacks to libgaim and libfam work.
5044 2007-07-06 William Holmes <billholmes54@gmail.com>
5046 * assembly.c: Added a continue statement in probe_for_partial_name when
5047 parse_assembly_directory_name fails. Fixes : 82002
5049 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
5051 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
5052 and added a verification for TYPEDBYREF.
5053 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
5054 make native int interchangeable with int32 and some small cleanup and formating.
5055 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
5056 handle byref of byref.
5057 * verify.c (push_local): handle byref of byref.
5058 * verify.c (do_binop): invalid mix of values is unverifiable
5059 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
5060 added visibility checks
5061 * verify.c (field related method): added visibility checks
5062 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
5064 2007-07-06 Zoltan Varga <vargaz@gmail.com>
5066 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
5069 2007-07-05 Zoltan Varga <vargaz@gmail.com>
5071 * profiler.c (mono_profiler_load): Fix an off-by-one error.
5073 * marshal.c (emit_marshal_string): When returning a string from managed code,
5074 allways make a copy even for unicode strings. Fixes #81990.
5076 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
5078 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
5079 of byref generic inst types (bug #81997).
5081 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
5083 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
5084 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
5086 2007-07-02 Zoltan Varga <vargaz@gmail.com>
5088 * marshal.c (emit_marshal_string): Add support for unicode strings in
5089 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
5091 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
5093 * verify.c: field load/store are now verified, missing only access checks now
5095 2007-06-28 Martin Baulig <martin@ximian.com>
5097 * mono-debug.c (mono_debug_debugger_version): New public variable.
5099 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
5101 * locales.c: When constructing DateTimeFormat or NumberFormat for
5102 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
5103 MonoCultureInfo contructed from the current locale is always
5104 read-only and has UseUserOverride set to true. All MonoCultureInfo
5105 instances returned for GetCultures have both IsReadOnly and
5106 UseUserOverride set to true. Fixes part of bug #81930.
5108 2007-06-22 Jonathan Chambers <joncham@gmail.com>
5110 * icall-def.h: Update System.__ComObject icalls
5111 * marshal.c: Avoid managed transition (and object creation)
5112 when looking up COM interface in RCW.
5115 Code is contributed under MIT/X11 license.
5117 2007-06-22 Zoltan Varga <vargaz@gmail.com>
5119 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
5120 to avoid crashes during assembly unloading.
5122 2007-06-22 Raja R Harinath <rharinath@novell.com>
5124 Fix MethodInfo.IsGenericMethodDefinition
5125 * reflection.c (mono_reflection_bind_generic_method_parameters):
5126 Rearrange code to ensure we always uses a generic method definition.
5127 * class.c (mono_class_inflate_generic_method_full): Set
5128 'generic_container' field only for generic method definitions.
5129 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
5130 Use presense of 'generic_container' field as indication of being a
5131 generic method definition.
5133 2007-06-21 Zoltan Varga <vargaz@gmail.com>
5135 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5137 * object-internals.h: Reflect changes in the layout of the managed Delegate
5140 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
5141 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
5142 runtime memory used by the dynamic method. Fixes #77146.
5144 2007-06-21 Dick Porter <dick@ximian.com>
5147 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
5148 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
5151 2007-06-21 Raja R Harinath <rharinath@novell.com>
5153 * reflection.c (method_encode_methodspec): Add a tripwire.
5154 * class.c (inflate_generic_type): The fully open generic type is
5155 not the same as the generic type definition.
5157 2007-06-21 Martin Baulig <martin@ximian.com>
5159 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
5161 * mono-debug-debugger.h
5162 (MonoDebuggerBreakpointInfo): Removed.
5163 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
5164 (mono_debugger_remove_breakpoint): Likewise.
5165 (mono_debugger_breakpoint_callback): Likewise.
5166 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
5168 2007-06-21 Raja R Harinath <rharinath@novell.com>
5170 * metadata.c (mono_metadata_lookup_generic_class): The fully open
5171 generic type is not the same as the generic type definition.
5172 * class.c (mono_generic_class_get_class): Likewise.
5174 2007-06-20 Geoff Norton <gnorton@customerdna.com>
5176 * icall.c: The second argument to
5177 System.Reflection.MethodBase.GetMethodFromHandleInternalType
5178 is a MonoType not a MonoClass.
5180 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
5182 * verify.c: support for function pointers in the verifier
5184 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
5186 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
5188 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
5190 * assembly.c: removed Mono.Data.SqliteClient from the list of
5191 forward-compatible assemblies as it breaks the ABI (bug #81899).
5193 2007-06-19 Raja R Harinath <rharinath@novell.com>
5195 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
5196 lookup/update with the loader lock.
5197 * reflection.c (mono_class_bind_generic_parameters): No need to
5198 protect mono_metadata_lookup_* with the loader lock.
5199 * class.c (inflate_generic_type): Likewise.
5201 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
5202 on a generic instantiated type.
5204 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
5206 *verify.c: produce meanfull error messages on verification error
5207 *verify.c: fixed some cases of verification errors reported as validation errors
5208 *pedump.c: fixed the error name array, now it shows validation errors properly
5209 *verify.h: fixed the contant that should be used for verification errors
5211 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5213 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
5214 for bug #77596, 81858 and 80743 (generics data structures on domain
5217 2007-06-15 Raja R Harinath <rharinath@novell.com>
5219 Avoid allocating 'MonoGenericContext' on the heap.
5220 * class-internals (_MonoMethodInflated::context): Make field
5221 inline, not a pointer.
5222 * loader.c (method_from_methodspec): Allocate 'new_context' on the
5223 stack. Use the context embedded within the inflated method as the
5224 hash key, rather than 'new_context'.
5225 * class.c (inflate_generic_context): Simplify. Return a struct
5226 rather than allocating on the heap.
5227 (mono_class_inflate_generic_method_full): Update to changes. Now,
5228 doesn't salt away a copy of the context -- simplifying the
5229 lifetime rules of a 'MonoGenericContext *'.
5230 (mono_method_get_context): Return pointer to embedded context.
5231 (setup_generic_array_ifaces): Allocate temporary context on stack.
5232 * reflection.c (inflate_mono_method): Likewise.
5233 (mono_reflection_bind_generic_method_parameters): Likewise.
5234 Use the context embedded within the inflated method as the hash key.
5236 Avoid a source of allocation of 'MonoGenericContext'.
5237 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
5238 and 'cached_context' fields into embedded 'MonoGenericContext' field.
5239 * class.c: Update to changes.
5240 (mono_generic_class_get_context): Simplify drastically. Now just
5241 returns a pointer to the field.
5242 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
5243 argument as a const pointer.
5244 (mono_metadata_generic_context_equal): Likewise.
5245 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
5248 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
5250 * verify.c improved the handling of brtrue/brfalse, factored out common code
5252 2007-06-14 Raja R Harinath <rharinath@novell.com>
5254 Kill MonoGenericMethod.
5255 * class-internals.h (MonoGenericContext::method_inst): Rename from
5256 'gmethod' and convert to a MonoGenericInst.
5257 (MonoGenericMethod): Remove.
5258 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
5259 * loader.c (method_from_methodspec): Update to changes. Use a
5260 MonoGenericContext as the key to the hashtable.
5261 * metadata.c (mono_metadata_generic_context_equal): Rename from
5262 'mono_metadata_generic_method_equal' and take MonoGenericContext.
5263 (mono_metadata_generic_context_hash): Likewise from
5264 'mono_metadata_generic_method_hash'. Change hash function.
5265 (mono_metadata_load_generic_params): Update to changes.
5266 (mono_get_shared_generic_method): Remove.
5267 * metadata-internals.h (mono_get_shared_generic_method): Remove.
5268 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
5269 (inflate_generic_context): Likewise.
5270 (mono_class_inflate_generic_method_full): Likewise.
5271 (setup_generic_array_ifaces): Likewise.
5272 (mono_class_create_from_typespec): Likewise.
5273 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
5274 (method_encode_methodspec): Update callsite.
5275 (reflection_methodbuilder_to_mono_method): Update to changes.
5276 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
5277 MonoGenericContext as the key to the hashtable.
5278 (inflate_mono_method): Update to changes.
5280 * class-internals.h (MonoGenericMethod::container): Remove.
5281 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
5283 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
5285 * profiler-private.h, profiler.c, profiler.h: added API to profile
5288 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
5290 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
5292 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
5294 * verify.c: method invocation is now validated, now we verify parameter types on stack.
5295 Fixed overflow and underflow not aborting the verification process.
5297 2007-06-13 Mark Probst <mark.probst@gmail.com>
5299 * class-internals.h (MonoStats): Added stats entries for dynamic
5302 2007-06-12 Zoltan Varga <vargaz@gmail.com>
5304 * loader.c (mono_free_method): Free header->locals and header->clauses.
5306 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
5309 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
5311 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
5313 2007-06-12 Raja R Harinath <rharinath@novell.com>
5315 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
5318 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
5320 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
5322 2007-06-11 Raja R Harinath <harinath@gmail.com>
5324 MonoGenericMethod on a diet
5325 * class-internals.h (_MonoMethodInflated::reflection_info): Move
5327 (_MonoGenericMethod::reflection_info): ... from here.
5328 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
5330 * reflection.c (inflate_mono_method): Likewise.
5331 (mono_reflection_bind_generic_method_parameters): Likewise.
5333 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
5335 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
5336 *verify.c: factored long ldarg forms to share code with short forms
5338 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
5340 *verify.c: fixed code formating factored some duplicate code
5343 *verify.h: fixed binary incompatibility introduced earlier
5345 *pedump.c: fixed formating
5347 2007-06-11 Raja R Harinath <harinath@gmail.com>
5349 Fix assertion when disassembling Mono.C5.dll
5350 * loader.c (method_from_methodspec): Avoid inflating a method
5351 twice with the same context. If the methodref is inflated, use
5352 the declaring method instead.
5354 * class.c (mono_class_from_generic_parameter): Fix case similar to
5355 bug #81830 handled below, but for method containers.
5357 2007-06-10 Raja R Harinath <harinath@gmail.com>
5359 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
5360 get_shared_generic_class. Directly inflate the instance.
5361 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
5362 (inflate_generic_class): Delete.
5363 (get_shared_generic_class): Delete. Move setting of
5364 'cached_class' and 'cached_context' ...
5365 * metadata.c (mono_metadata_lookup_generic_class): ... here.
5367 * metadata.c (mono_metadata_lookup_generic_class): Change
5368 signature to take the components of a MonoGenericClass rather than
5369 an allocated MonoGenericClass. Change semantics to be intern-like.
5370 * reflection.c (mono_class_bind_generic_parameters): Update to
5371 changes. Make locking region tighter.
5372 * class.c (inflate_generic_class): Update to changes.
5373 (get_shared_generic_class): Likewise.
5374 * metadata-internals.h: Likewise.
5376 * reflection.c (mono_class_bind_generic_parameters): Take and
5377 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
5378 (mono_reflection_bind_generic_parameters): Use
5379 'mono_class_bind_generic_parameters' rather than duplicate the code.
5380 * class.c (mono_bounded_array_class_get): Update to changes.
5381 * object-internals.h: Likewise.
5383 * reflection.c (mono_class_bind_generic_parameters): Only support
5384 parameterizing generic type definitions. Remove support for other
5387 2007-06-08 Zoltan Varga <vargaz@gmail.com>
5389 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
5391 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
5392 in the dynamic case.
5394 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
5396 * threads.c: When cleaning up thread, reset the Background bit.
5399 2007-06-08 Jonathan Chambers <joncham@gmail.com>
5401 * metadata.c: Move variable declarations to top of scope.
5402 * verify.c: Move variable declarations to top of scope.
5404 Code is contributed under MIT/X11 license.
5406 2007-06-08 Raja R Harinath <rharinath@novell.com>
5408 * reflection.c (mono_class_bind_generic_parameters): Replace
5409 open-coded loop with mono_metadata_inflate_generic_inst.
5411 * class.c (get_shared_generic_class): Don't call
5412 mono_get_shared_generic_inst. Use the container's own
5415 * metadata.c (mono_metadata_load_generic_params): Move
5416 initialization of 'context' field here from ...
5417 * class.c (mono_class_create_from_typedef): ... here, and ...
5418 * loader.c (mono_get_method_from_token): ... here.
5420 * class.c (get_shared_generic_class): Rename from
5421 mono_get_shared_generic_class and make static.
5422 (mono_get_shared_generic_inst): Move to metadata.c.
5423 * loader.c (mono_get_shared_generic_method): Likewise.
5424 * class-internals.h, metadata-internals.h: Update to changes.
5427 * class.c (mono_class_from_generic_parameter): Don't assume a
5428 generic container owner exists. Generic containers from monodis
5431 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
5433 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
5434 * verify.h: new typedefs to returns the non-verifiable status
5435 * verify.c: initial implementation of generics, stack merging and object compatibility check
5437 2007-06-06 Mark Probst <mark.probst@gmail.com>
5439 * class.c, image.c, class-internals.h (MonoImage): class_cache is
5440 a MonoInternalHashTable again (fixed bug in internal hash table
5443 2007-06-06 Mark Probst <mark.probst@gmail.com>
5445 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
5446 MonoInternalHashTable again (fixed bug in internal hash table
5449 2007-06-06 Mark Probst <mark.probst@gmail.com>
5451 * class.c, image.c, class-internals.h, domain.c,
5452 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
5453 changes. Have to figure out what makes them break the SWF
5456 2007-06-04 Mark Probst <mark.probst@gmail.com>
5458 * class.c, image.c, class-internals.h (MonoImage): class_cache is
5459 a MonoInternalHashTable now.
5461 2007-06-04 Mark Probst <mark.probst@gmail.com>
5463 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
5464 MonoInternalHashTable now.
5466 2007-05-31 Zoltan Varga <vargaz@gmail.com>
5468 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
5471 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
5473 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
5474 dependent trampoline.
5476 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5478 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
5480 2007-05-29 Robert Jordan <robertj@gmx.net>
5482 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
5484 2007-05-28 Zoltan Varga <vargaz@gmail.com>
5486 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
5488 2007-05-25 Jonathan Chambers <joncham@gmail.com>
5490 * marshal.c: Fix interface lookup loops for
5491 cominterop_get_com_slot_for_method and
5492 cominterop_get_method_interface. Only need to lookup
5493 if type is a class, else use interface type method is on.
5495 Code is contributed under MIT/X11 license.
5497 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
5499 * reflection.c: HasSecurity can be present even if no specially
5500 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
5501 SecurityAttribute). Fix CAS regression tests on buildbot.
5503 2007-05-24 Jonathan Chambers <joncham@gmail.com>
5505 * appdomain.c: Add configure checks for header files.
5506 * image.c: Add configure checks for header files.
5507 * file-io.c: Add configure checks for header files.
5508 * debug-mono-symfile.c: Add configure checks for header files.
5509 * threadpool.c: Add configure checks for header files.
5510 * console-io.c: Add configure checks for header files.
5511 * profiler.c: Add configure checks for header files.
5512 * rawbuffer.c: Add configure checks for header files.
5513 * icall.c: Add configure checks for header files.
5514 * rand.c: Add configure checks for header files.
5515 * socket-io.c: Add configure checks for header files.
5517 Code is contributed under MIT/X11 license.
5519 2007-05-24 Zoltan Varga <vargaz@gmail.com>
5521 * reflection.c (mono_custom_attrs_from_builders): Remove the
5522 assertion as it breaks the build.
5524 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
5526 * reflection.c (lookup_custom_attr): Make a copy here too.
5528 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
5531 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
5534 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
5537 2007-05-22 Zoltan Varga <vargaz@gmail.com>
5539 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
5540 (load_cattr_value): Ditto.
5542 2007-05-20 Zoltan Varga <vargaz@gmail.com>
5544 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
5546 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
5548 * threads.c: In "start_wrapper", set apartment_state to MTA if
5549 apartment_state is Unknown and we're running on 2.0 profile or
5551 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
5552 to main method, then set apartment_state to Unknown on 1.0 profile,
5553 and MTA on 2.0 profile.
5555 2007-05-16 Jb Evain <jb@nurv.fr>
5557 * class-internals.h (MonoDefaults): Add an attribute_class and
5558 customattribute_data_class.
5559 * domain.c (mono_init_internal): Populate them.
5560 * reflection.c: Use them to remove duplicates. Make a vew
5561 MonoClass variables `static'.
5563 2007-05-15 Massimiliano Mantione <massi@ximian.com>
5565 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
5566 step in implementing IMT, so that all isinst checks now can go
5568 This was needed because vtables for TransparentProxy need to look
5569 like the vtable of the "target" class, so they need to point to
5570 its interface bitmap directly.
5572 * object.c: inside "mono_class_create_runtime_vtable" and
5573 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
5575 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
5577 * object-internals.h
5578 culture-info.h : added territory field in MonoCulture and
5579 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
5580 * locales.c : fill territory field above too.
5581 * culture-info-table.h : regenerated.
5583 2007-05-12 Zoltan Varga <vargaz@gmail.com>
5585 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
5588 2007-05-11 Jonathan Chambers <joncham@gmail.com>
5590 * object.c: Always initialize apartment, even if
5591 there is no custom attributes on entry point.
5593 Code is contributed under MIT/X11 license.
5595 2007-05-10 Jonathan Chambers <joncham@gmail.com>
5597 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
5598 * metadata.c: If no encoding is set, check for unicode
5601 Code is contributed under MIT/X11 license.
5603 2007-05-09 Jonathan Chambers <joncham@gmail.com>
5605 * threads.c: Handle if mono_thread_current returns NULL
5607 Code is contributed under MIT/X11 license.
5609 2007-05-09 Jonathan Chambers <joncham@gmail.com>
5611 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
5612 in start_wrapper. Added mono_thread_init_apartment_state and
5613 mono_thread_cleanup_apartment_state.
5614 * object.c: Initialize thread apartment state on main thread
5615 by checking for STAThreadAttribute on entry point.
5616 * object-internals.h: Add apartment_state field to MonoThread.
5617 * threads-types.h: Add unmanaged definition of
5618 System.Threading.ApartmentState, MonoThreadApartmentState.
5620 Code is contributed under MIT/X11 license.
5622 2007-05-08 Jonathan Chambers <joncham@gmail.com>
5624 * class.c: Fix windows build.
5625 * class-internals.h: Fix windows build.
5627 Code is contributed under MIT/X11 license.
5629 2007-05-08 Robert Jordan <robertj@gmx.net>
5631 * process.c (CreateProcess_internal):
5632 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
5633 .CreateNoWindow was specified. Fixes #81496.
5635 2007-05-08 Massimiliano Mantione <massi@ximian.com>
5637 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
5638 step in implementing IMT, replaced it with two compact arrays
5639 (interfaces_packed and interface_offsets_packed) and a bitmap that
5640 is used for isinst checks (interface_bitmap).
5642 * class.c: (compare_interface_ids): compare function to pass to
5643 bsearch when looking for an interface with a given id.
5644 (mono_class_interface_offset): reimplemented using bsearch on
5645 interfaces_packed, getting the offset from interface_offsets_packed.
5646 (print_implemented_interfaces): utility debugging function.
5647 (setup_interface_offsets): reworked to initialize interfaces_packed,
5648 interface_offsets_packed and interface_bitmap.
5650 * object.c: replaced all accesses to "MonoClass.interface_offsets"
5651 with uses of interfaces_packed and interface_offsets_packed.
5653 2007-05-08 Massimiliano Mantione <massi@ximian.com>
5655 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
5656 mono_class_interface_offset prototype to wrap all accesses to
5657 "MonoClass.interface_offsets".
5659 * class.c: Implemented mono_class_interface_offset, and wrapped all
5660 accesses to "MonoClass.interface_offsets".
5662 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
5663 "MonoClass.interface_offsets".
5665 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
5667 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
5668 GetMethodFromHandle overloads (bug #78637).
5670 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
5672 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
5673 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
5675 2007-05-01 Zoltan Varga <vargaz@gmail.com>
5677 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
5680 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
5682 (mono_custom_attrs_from_index): Ditto.
5684 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
5687 2007-04-30 Zoltan Varga <vargaz@gmail.com>
5689 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
5690 is now allocated from a mempool.
5692 2007-04-28 Zoltan Varga <vargaz@gmail.com>
5694 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
5695 caller holds threads_lock, leading to deadlocks. Fixes #81476.
5697 2007-04-26 Zoltan Varga <vargaz@gmail.com>
5699 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
5700 mono_loader_clear_error () too late. Fixes #81463.
5702 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
5704 * culture-info-table.h : regenerated.
5706 2007-04-25 Zoltan Varga <vargaz@gmail.com>
5708 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
5711 2007-04-25 Dick Porter <dick@ximian.com>
5713 * Makefile.am: Put the mingw enforced-optimisation back into the
5714 PLATFORM_WIN32 section.
5716 2007-04-24 Zoltan Varga <vargaz@gmail.com>
5718 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
5721 * image.c (mono_image_load_module): New API function to load a module reference.
5723 * image.c (load_modules): Load modules lazily. Fixes #80812.
5725 * class.c (mono_class_from_typeref): Use mono_image_load_module.
5727 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
5729 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
5730 to mono_image_load_module_dynamic.
5732 2007-04-23 Jonathan Chambers <joncham@gmail.com>
5734 * marshal.c: Fix calling convention for CCW on non-windows
5735 platforms. STDCALL on windows, CDECL everywhere else to work
5736 with XPCOM and MainWin COM.
5738 Code is contributed under MIT/X11 license.
5740 2007-04-23 Martin Baulig <martin@ximian.com>
5745 (method_from_memberref): Added `gboolean *used_context' argument.
5746 (mono_get_method_from_token): Likewise.
5747 (mono_get_method_full): Don't insert the method in the cache when
5748 `used_context' is true.
5750 2007-04-23 Raja R Harinath <rharinath@novell.com>
5752 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
5754 * reflection.c (mono_reflection_bind_generic_parameters): Don't
5755 create new MonoTypes for returned types.
5756 * class.c (mono_generic_class_get_class): Export mono-internal.
5757 * class-internals.h: Update to changes.
5759 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
5761 * threadpool.c, threadpool.h, icall-def.h: patch from
5762 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
5764 2007-04-18 Zoltan Varga <vargaz@gmail.com>
5766 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
5768 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
5770 * threads.c (mono_thread_get_stack_bounds): New helper function.
5772 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
5773 Correctly compute stack bounds when attaching. Fixes #81394.
5775 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
5777 * reflection.c: fix handling of doubles in custom attributes
5778 for the arm-fpa format (bug #81368).
5780 2007-04-18 Raja R Harinath <rharinath@novell.com>
5782 * reflection.c (assembly_add_win32_resources): Mildly relax an
5783 bounds check to let the end pointer point just past the end of the
5784 allocated buffer. (may fix #81384)
5786 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
5788 * culture-info-table.h : regenerated.
5790 2007-04-07 Zoltan Varga <vargaz@gmail.com>
5792 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
5793 the thread is aborted early.
5795 2007-04-05 Dick Porter <dick@ximian.com>
5797 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
5798 FindFirstFile()/FindNextFile() to find entries. This lets the
5799 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
5802 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
5804 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
5806 2007-04-04 Martin Baulig <martin@ximian.com>
5809 (mono_method_desc_full_match): Add support for nested classes.
5811 2007-04-02 Zoltan Varga <vargaz@gmail.com>
5813 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
5815 2007-04-01 Zoltan Varga <vargaz@gmail.com>
5817 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
5818 waiting for too many threads.
5820 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
5822 * environment.c: Fix return value check on uname so we can get the
5823 executing version on Solaris operating systems.
5825 2007-03-28 Jb Evain <jbevain@gmail.com>
5827 * class.c (mono_type_get_name_recurse): Complete the
5828 fix for the creation of assembly qualified names for
5829 pointer types. Fixes #81208.
5831 2007-03-27 Dick Porter <dick@ximian.com>
5833 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
5834 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
5838 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
5839 the value of ReleaseMutex().
5841 2007-03-27 Dick Porter <dick@ximian.com>
5843 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
5844 in little-endian order, not network endian, so must be converted
5845 to host endian here. Fixes bug 80593.
5847 2007-03-22 Jb Evain <jbevain@gmail.com>
5849 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
5850 qualified names for pointer types. Fixes #81208.
5852 2007-03-21 Jonathan Chambers <joncham@gmail.com>
5854 * marshal.c: Add support for PreserveSigAttribute.
5856 Code is contributed under MIT/X11 license.
5858 2007-03-14 Zoltan Varga <vargaz@gmail.com>
5860 * process.c: Fix endianness issues. Fixes #81126.
5862 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
5863 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
5865 * image.c (mono_image_lookup_resource): Make this work on big-endian
5866 machines.Change API contract so the caller needs to free the return value.
5868 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
5871 2007-03-14 Martin Baulig <martin@ximian.com>
5873 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
5874 mono_type_get_desc() as well.
5876 2007-03-13 Jonathan Chambers <joncham@gmail.com>
5878 * icall.c: Fix environ access in VS.
5880 2007-03-13 Alp Toker <alp@atoker.com>
5882 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
5883 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
5886 2007-03-12 Zoltan Varga <vargaz@gmail.com>
5888 * reflection.c (mono_reflection_create_dynamic_method): Add support for
5889 circular references among dynamic methods. Fixes #81091.
5891 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
5893 2007-03-09 Martin Baulig <martin@ximian.com>
5895 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
5897 2007-03-09 Jonathan Chambers <joncham@gmail.com>
5899 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
5900 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
5902 Code is contributed under MIT/X11 license.
5904 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
5906 * loader.c: Reapply patch for bug #79424.
5908 2007-03-06 Zoltan Varga <vargaz@gmail.com>
5910 * metadata.c (mono_type_to_unmanaged): Only convert object to
5911 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
5913 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
5915 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
5916 (and incorrectly set) is_reference field from MonoGenericInst.
5918 2007-03-06 Zoltan Varga <vargaz@gmail.com>
5920 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
5923 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
5925 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
5927 2007-03-05 Miguel de Icaza <miguel@novell.com>
5929 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
5930 FileOptions.1 value to mean "temporary", map that to
5931 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
5935 2007-03-03 Marek Habersack <mhabersack@novell.com>
5937 * appdomain.c: implement MS .Net style shadow copying. Copies of
5938 the assemblies are made in a subdirectory of the dynamic base
5939 directory, the assembly names are preserved.
5940 Copy .mdb and .config files along with the assemblies being shadowed.
5942 2007-02-28 Zoltan Varga <vargaz@gmail.com>
5944 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
5945 (emit_marshal_handleref): Ditto.
5947 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
5948 on Visual C++. Fixes #80671.
5950 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
5952 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
5953 for clone operations.
5955 2007-02-28 Zoltan Varga <vargaz@gmail.com>
5957 * marshal.c: Fix warnings.
5959 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
5961 * loader.c: allow case-insensitive matching of the dll name
5962 in dllmap handling when prefixed with "i:".
5964 2007-02-20 Jonathan Chambers <joncham@gmail.com>
5966 * threads.c: Fix #ifdef for dummy_apc function for VS.
5968 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
5970 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
5972 2007-02-19 Massimiliano Mantione <massi@ximian.com>
5973 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
5974 giving precedence to the methods with a fully qualified name
5975 (InterfaceName.MethodName) when building the interface sections
5978 2007-02-16 Dick Porter <dick@ximian.com>
5980 * threadpool.c (append_job): Fix fast-path array handling, so it's
5981 less likely the array will grow exponentially when the load is
5984 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
5986 * metadata-internals.h, loader.c: fix dllmap lookup order
5987 for non-function maps, too, and prepare for fallback code.
5989 2007-02-12 Robert Jordan <robertj@gmx.net>
5991 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
5992 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
5993 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
5994 GlobalFree. Fixes a part of bug #77075.
5996 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
5998 * loader.c: implemented typedef parent in field memberref.
6000 2007-02-11 Jonathan Chambers <joncham@gmail.com>
6002 * marshal.c: Fix warnings and remember to call Release on
6005 Code is contributed under MIT/X11 license.
6007 2007-02-10 Miguel de Icaza <miguel@novell.com>
6009 * class-internals.h: Add MonoHandleRef definition, and
6010 handleref_class to mono_defaults.
6012 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
6013 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
6015 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
6016 (do nothing on this stage)
6017 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
6018 (emit_marshal_handleref): New method, used for argument handling
6021 2007-02-08 Jonathan Chambers <joncham@gmail.com>
6023 * class.c (mono_class_setup_parent): Lazily init com types.
6024 * domain.c (mono_init_internal, mono_init_com_types): Lazily
6026 * object.c (mono_remote_class_vtable): Lazily init com types.
6027 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
6028 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
6029 * domain-internals.h: Expose mono_init_com_types.
6030 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
6031 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
6032 Add support for COM Callable Wrapper marshalling.
6033 * marshal.h: Add icall definitions.
6034 * gc.c: Handle freeing of CCWs in finalizer code.
6036 Code is contributed under MIT/X11 license.
6038 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
6040 * reflection.c: changed all the signature encoding code to use
6041 a variable-sized buffer.
6043 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6045 * marshal.c: locking fixes: never take the loader lock
6046 or other runtime locks when holding the marshal lock
6049 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
6051 * marshal.c: make the delegate function pointer mapping
6052 work for the moving GC.
6054 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
6056 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
6059 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6061 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
6064 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6066 * threadpool.c: made the code moving-GC safe.
6068 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
6070 * assembly.c, boehm-gc.c, class-internals.h, class.c,
6071 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
6072 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
6074 * reflection.c: warning cleanup, some threading and moving GC fixes.
6076 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
6078 * class.c, loader.c: create the needed Set/Get/Address array methods
6079 as well as the .ctors in mono_class_init (), fixes bug #80567.
6081 2007-01-24 Zoltan Varga <vargaz@gmail.com>
6083 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
6084 we doesn't decrease its alignment. Should fix the sparc build.
6086 2007-01-24 Dick Porter <dick@ximian.com>
6089 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
6090 Create the returned object if we need to ignore an unsupported
6091 socket option. Fixes a segfault reported by Atsushi.
6093 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
6095 * class.c, object.c: restrict GC-tracked fields to
6096 UIntPtr fields used inside corlib, so we provide better
6097 type info to the GC and also allow broken packing as in
6100 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
6102 * sgen-gc.c: removed duplicated function.
6104 2007-01-19 Miguel de Icaza <miguel@novell.com>
6106 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
6107 value that means that the value is not supported, but that we
6108 should not return a failure, but instead report this as a
6109 successful operation.
6111 2007-01-19 Raja R Harinath <rharinath@novell.com>
6113 Fix tests/bug79956.2.il
6114 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
6115 (mono_generic_class_get_class): If the generic definition in an
6116 enum, copy over other fields related to it.
6118 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6120 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
6121 genericinst enums (bug #79215).
6123 2007-01-17 Massimiliano Mantione <massi@ximian.com>
6124 * class.c: Fix bug 80307.
6126 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
6128 * image.c: if the file table is not present, try to load
6129 all the modules, since we don't have info about them
6130 having or not metadata (bug #80517).
6131 * assembly.c: allow mono_assembly_load_references () to
6132 work for netmodules.
6134 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
6136 * image.c, metadata-internals.h, object.c: execute module
6137 cctors when running on the 2 runtime if present (bug #80487).
6139 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
6141 * icall.c: optimized InitializeArray() on bigendian.
6143 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
6145 * icall.c: fix for the broken ARM FPA double format.
6147 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6149 * icall.c: handle endian issues for r4 and r8 types, too, in
6150 the InitializeArray() icall.
6152 2007-01-15 Miguel de Icaza <miguel@novell.com>
6154 * loader.c (mono_loader_error_prepare_exception): Clear the error
6155 once we have extracted the information from it, do this before we
6156 call into the JIT's class loading mechanisms.
6158 * object.c (mono_class_create_runtime_vtable): Do not clear the
6159 loader error before calling mono_class_get_exception_for_failure
6160 as the loader error is needed inside
6161 mono_class_get_exception_for_failure to throw the error (thinko).
6165 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6167 * reflection.c: align fields rva data so it's faster to load at
6170 2007-01-12 Raja R Harinath <rharinath@novell.com>
6172 Prepare to simplify GenericMethod handling.
6173 * class-internals.h (mono_method_get_context): New accessor function.
6174 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
6175 rather than directly accessing '->context' field.
6177 * class-internals.h (_MonoGenericParam.method): Move ...
6178 (_MonoGenericContainer): ... here. Add into union with klass field.
6179 * class.c, icall.c, loader.c, metadata.c, reflection.c:
6182 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
6184 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
6185 the wrapper type enum and reduce relocations.
6187 2007-01-12 Raja R Harinath <rharinath@novell.com>
6189 * reflection.c (inflate_mono_method): Reuse method instantiation
6190 from the generic method, if available.
6192 2007-01-11 Jonathan Chambers <joncham@gmail.com>
6194 * marshal.c (emit_marshal_variant): Fix conv_arg
6195 type in last commit, based on whether parameter is byref.
6197 2007-01-11 Jonathan Chambers <joncham@gmail.com>
6199 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
6201 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
6202 MONO_TYPE_OBJECT back for VARIANT support.
6204 2007-01-11 Jonathan Chambers <joncham@gmail.com>
6206 * marshal.c, marshal.h, icall-def.h: Implement
6207 Marshal.ReAllocCoTaskMem.
6209 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
6211 * marshal.c: memory retention fixes: use the proper
6212 image cache for runtime_invoke method lookups.
6214 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6216 * mempool.c: added code to help debug mempool allocations.
6218 2007-01-11 Dick Porter <dick@ximian.com>
6220 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
6221 support (experimenting with faking it with IP_MTU_DISCOVER for
6222 systems that don't have IP_DONTFRAGMENT.)
6223 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
6226 * icall-def.h: new System.Net.Sockets.Disconnect icall.
6228 * socket-io.h: Add new fields to MonoSocketAsyncResult
6229 corresponding to the new ones in Socket.cs.
6231 2007-01-11 Raja R Harinath <rharinath@novell.com>
6233 Fix IronPython regression mentioned in #80249
6234 * metadata.c (do_mono_metadata_parse_generic_class): Clear
6235 'cached_context' field, since it may have been initialized as a
6236 side-effect of metadata parsing.
6238 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
6239 (_MonoGenericClass.cached_class): Move here and rename from lone
6240 remaining field of ...
6241 (_MonoInflatedGenericClass): ... this. Remove.
6242 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
6245 Fix mcs/tests/test-128.cs regression.
6246 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
6247 2007-01-10 change below.
6248 [MONO_TYPE_OBJECT]: Recurse into array case.
6250 2007-01-11 Raja R Harinath <harinath@gmail.com>
6252 * class-internals.h (mono_get_inflated_generic_class): Remove.
6253 * class.c (mono_get_inflated_generic_class): Remove.
6254 (mono_generic_class_get_class): Rename from
6255 mono_class_create_generic.
6256 (mono_class_from_mono_type) [GENERICINST]: Use it.
6257 * reflection.c, metadata.c: Update to changes. Use
6258 'mono_class_from_mono_type'.
6260 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
6262 * reflection.c: use passed type when encoding an array element
6263 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
6265 2007-01-09 Robert Jordan <robertj@gmx.net>
6267 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
6268 result arguments (someDelegate.EndInvoke (unrelatedAres)).
6271 2007-01-09 Raja R Harinath <rharinath@novell.com>
6273 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
6275 * object.c (set_value): Avoid aliasing between type->data.klass
6276 and type->data.generic_class.
6278 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
6280 2007-01-08 Raja R Harinath <rharinath@novell.com>
6282 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
6283 between type->data.klass and type->data.generic_class.
6285 2007-01-08 Lluis Sanchez <lluis@ximian.com>
6287 * marshal.c: In MS.NET, StringBuilder objects are not copied by
6288 value in out parameters.
6290 2007-01-08 Raja R Harinath <rharinath@novell.com>
6292 Simplify invariant for MonoGenericClass::klass field.
6293 * class.c (mono_class_create_generic): Verify 'klass' is null.
6294 * metadata.c (do_mono_metadata_parse_generic_class): Don't
6295 initialize 'klass' field.
6297 2007-01-05 Raja R Harinath <rharinath@novell.com>
6299 Ongoing work to avoid redundant data and simplify invariants.
6300 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
6301 'generic_class', and change type to a GenericInst.
6302 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
6303 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
6305 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
6307 * class.c : skip io-layer under PLATFORM_WIN32.
6309 2007-01-03 Tor Lillqvist <tml@novell.com>
6311 Fix #80305: In a bundled executable, look in the bundled exe
6312 assembly to determine the runtime version. Add the possibility to
6313 bundle also the machine.config file.
6315 * assembly.c (mono_assembly_open_from_bundle): Make
6316 non-static. Allow being called even if we have no bundled
6317 assemblies, and return NULL right away in that case.
6319 * domain-internals.h: Declare mono_assembly_open_from_bundle()
6322 * domain.c (app_config_parse): Take an assembly exe file name as
6323 parameter instead of a config file name. Check for a bundled
6324 config file for that assembly by calling
6325 mono_config_string_for_assembly_file() (see below) before looking
6326 for one in the file system.
6327 (get_runtimes_from_exe): Corrsponding change to call of
6329 (get_runtimes_from_exe): Check for bundled assembly exe file first
6330 by calling mono_assembly_open_from_bundle(). If no bundled
6331 assembly exe file is found, call mono_image_open() as before to
6332 look it up in the file system.
6334 * mono-config.c: Add variable bundled_machinec_onfig.
6335 (mono_config_string_for_assembly_file): New function.
6336 (mono_config_for_assembly): Move code snippet that looks for a
6337 bundled assembly .config file into the above new function. Call
6339 (mono_register_machine_config, mono_get_machine_config): New
6340 functions to set and retrieve
6342 * assembly.h: Declare mono_register_machine_config().
6344 * mono-config.h: Declare mono_get_machine_config() and
6345 mono_config_string_for_assembly_file().
6347 * icall.c: No declaration of environ necessary on Win32. It is
6348 declared (as a macro expanding to a function call) in stdlib.h.
6349 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
6350 New internal mono function. Returns the value of
6351 mono_get_machine_config() as a Mono string.
6353 * icall-def.h: Add get_bundled_machine_config().
6355 2007-01-04 Raja R Harinath <rharinath@novell.com>
6357 Remove redundant field
6358 * class-internals.h (_MonoGenericContext.container): Remove field.
6359 * loader.c (mono_method_get_signature_full): Don't parse a
6360 "container" for a signature parse when the signature is inflated
6362 (method_from_methodspec): Likewise, for a generic_inst.
6363 * class.c, metadata.c, reflection.c: Update to changes.
6365 2006-01-04 Raja R Harinath <rharinath@novell.com>
6367 * class-internals.h (_MonoGenericClass): Rename 'context' field to
6368 'cached_context', and change semantics -- it starts off NULL, and
6369 is initialized on demand.
6370 * class.c (mono_generic_class_get_context): New accessor to
6371 replace 'context' field accesses.
6372 (mono_class_get_context): New helper.
6373 (*): Update to changes.
6374 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
6376 2007-01-03 Miguel de Icaza <miguel@novell.com>
6378 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
6379 before the memcpy. Fixes Marshal2 regression.
6381 2007-01-02 Jb Evain <jbevain@gmail.com>
6383 * blob.h: add a MONO_TYPE_ENUM definition
6384 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
6385 fix the encoding of arrays of enums in custom attributes.
6389 2007-01-01 Miguel de Icaza <miguel@novell.com>
6391 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
6392 string is null terminated, but only cut the string short if it
6393 overflows the buffer.
6395 (mono_string_to_byvalstr): Also fix this routine. The code here
6396 was not properly terminating a string (it was only terminated
6397 because of the previous catch-all memset).
6399 I left the memset, because I do not know if applications expect
6400 the runtime to clear this region.
6404 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
6405 Clear the error before returning to unmanaged code to prevent the
6406 runtime from being confused later on (fixes 80420).
6407 (ves_icall_type_from_name): Always call mono_loader_clear_error
6408 after parsing a type that could have failed.
6409 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
6411 * loader.c (mono_loader_clear_error): Fix indentation.
6413 2006-12-28 Martin Baulig <martin@ximian.com>
6415 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
6417 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
6419 * reflection.c: patch from Rolf Bjarne Kvinge to fix
6420 getting a token for an EnumBuilder.
6422 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
6424 * reflection.c: be more careful in case resource generation
6425 fails to create the data array.
6427 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
6429 * sgen-gc.c: write barrier for clone and fix unregister handles.
6431 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6433 * reflection.c: some fixes needed in the generics code for the moving GC.
6435 2006-12-22 Robert Jordan <robertj@gmx.net>
6437 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
6438 account. Fixes bug #80299.
6440 2006-12-21 Raja R Harinath <rharinath@novell.com>
6442 Fix WaitHandle usage in delegates.
6443 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
6444 * object.c (mono_wait_handle_new): Use the property set method to
6445 initialize the handle.
6446 (mono_wait_handle_get_handle): New.
6447 * threadpool.c (mono_async_invoke): Use it.
6448 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
6450 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
6452 2006-12-21 Jonathan Chambers <joncham@gmail.com>
6454 * marshal.c (emit_marshal): Call emit_marshal_variant and
6455 emit_marshal_com_interface when applicable.
6456 (emit_marshal_variant, emit_marshal_com_interface): Add
6457 methods for this case and remove if's from emit_marshal_object.
6459 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
6461 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
6463 2006-12-19 Jonathan Chambers <joncham@gmail.com>
6465 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
6466 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
6467 and GlobalFree on Windows. Remove FIXME.
6469 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
6471 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
6472 implementation for managed objects.
6474 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6476 * object.c: implemented code to be used for checking
6477 that no reference field overlaps with non-references.
6479 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6481 * threadpool.c: fix queue code to be compatible with the
6484 2006-12-18 Miguel de Icaza <miguel@novell.com>
6486 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
6487 in structures by throwing ArgumentNullException.
6489 (emit_marshal_safehandle): Also when they are null parameters.
6491 (emit_marshal_safehandle): Add support for ref
6492 SafeHandles parameters
6494 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6496 * profiler.c: updated to use the mono-dl API instead of
6499 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6501 * profiler.c: updated to use the mono-dl dynamic loading
6502 API instead of gmodule.
6504 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
6506 * profiler.c: use readlink, older versions of glib don't have
6507 g_file_read_link ().
6509 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
6511 * profiler.c: try to detect the path to mono if libc fails to provide
6512 a useful name (bug #80286).
6514 2006-12-16 Raja R Harinath <rharinath@novell.com>
6517 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
6518 instance, use the generic type definition instead.
6519 (ves_icall_Type_GetNestedTypes): Likewise.
6520 * class.c (mono_class_create_generic): Always set the
6521 nested_classes of a generic instance to NULL, even if the generic
6522 type definition has nested types.
6524 2006-12-15 Jonathan Chambers <joncham@gmail.com>
6526 * marshal.c (mono_string_from_bstr): Revert previous Windows change
6529 2006-12-15 Miguel de Icaza <miguel@novell.com>
6531 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
6532 my arguments were in the wrong order. I also fixed the Windows
6533 version which seems to have had the same issue.
6535 (mono_free_bstr): On Unix, this is g_free.
6536 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
6537 conversions (for the tests in corlib to pass).
6539 2006-12-14 Miguel de Icaza <miguel@novell.com>
6541 * marshal.c (emit_ptr_to_object_conv): For now, ignore
6542 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
6543 exception if a ref SafeHandle in a struct has changed).
6545 (emit_struct_conv): Do not perform layout checks for classes
6546 derived from SafeHandle, as those are specially handled.
6548 (emit_object_to_ptr_conv): Add support for
6549 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
6551 (emit_marshal_safehandle): Implement conversion of return values
6552 of safehandles (MARSHAL_ACTION_CONV_RESULT).
6554 * threads.c: WaitHandle now is compiled with two different handles
6555 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
6558 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
6559 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
6560 these routines to cope with both kinds of fields.
6562 2006-12-12 Miguel de Icaza <miguel@novell.com>
6564 * metadata.c (mono_type_to_unmanaged): Handle the case where
6565 type->data.klass is a SafeHandle, and in that case, return the
6566 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
6567 MONO_MARSHAL_CONV_SAFEHANDLE.
6569 2006-12-11 Miguel de Icaza <miguel@novell.com>
6571 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
6572 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
6573 calling emit_marshal_object.
6575 (emit_marshal_safehandle): Implement marshalling of
6576 SafeHandle parameters (no ref support yet).
6578 (MarshalAction): Document the defines as I implement
6579 them for SafeHandle.
6581 (emit_marshal_object): indentation police.
6583 * class-internals.h: Define MonoSafeHandle.
6584 Add safehandle_class to MonoDefaults type.
6586 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
6587 list of classes to check for fields.
6589 * domain.c (mono_init_internal): Add SafeHandle to the list of
6590 mono_defaults loaded.
6592 2006-12-15 Raja R Harinath <rharinath@novell.com>
6595 * reflection.c (mono_reflection_bind_generic_parameters): If the
6596 generic type definition is a type builder, ensure that it is fully
6597 initialized before instantiating it. Kill some dead code.
6599 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
6601 * object.c: clear the loader_error () before loading
6602 more metadata stuff (bug #80258).
6604 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
6606 * icall.c, icall-defs.h: type modifiers icalls for
6607 parameters and properties.
6609 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
6611 * object.c, icall.c: fixed warnings.
6613 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
6615 * marshal.c: fixed a couple of leaks and coding style in a few places.
6617 2006-12-08 Dick Porter <dick@ximian.com>
6619 * process.c: Cope with NULL ProcessStartInfo arguments on windows
6620 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
6623 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
6625 * process.c: ProcessStartInfo may have only filename set and
6626 arguments can be NULL.
6628 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
6630 * icall.c: fix leak found by Robert Jordan.
6632 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
6634 * marshal.c, marshal.h: generate managed method to access an element
6635 of a multi-dimensional array.
6637 2006-11-30 Paolo Molaro (lupus@ximian.com)
6639 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
6641 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6643 * icall.c: back out GetFields () fix until the serialization code is
6644 fixed to not depend on the incorrect behaviour.
6646 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
6648 * profiler.c: provide defaults if none are set.
6650 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6652 * Makefile.am, attrdefs.h: new public header file with
6653 constants for attributes for use by embedders.
6655 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
6657 * icall.c: GetFields () fix for bug #80064.
6659 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
6661 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
6662 removed long unused icalls.
6664 2006-11-27 Jonathan Chambers <joncham@gmail.com>
6667 (mono_marshal_emit_managed_wrapper): Level of indirection for
6668 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
6669 can be generated without a delegate class.
6670 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
6672 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
6674 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6676 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
6679 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6681 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
6682 icall-def.h: added icalls needed by System.GC.
6684 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
6686 * loader.c: ensure the class in catch clauses is handled
6687 correctly for generics methods (fixes bug#79980).
6689 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
6691 * monitor.h, monitor.c: added mono_locks_dump () function
6692 to help debug deadlocks involving managed locks.
6694 2006-11-13 Dick Porter <dick@ximian.com>
6696 * file-io.c (get_file_attributes): If the file is a symlink try
6697 and get the stat data for the target, but also add the
6698 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
6699 the specs for the windows symlink support, but will probably have
6700 to be reworked when I have test data from a vista machine. Fixes
6703 2006-11-13 Dick Porter <dick@ximian.com>
6705 * gc.c (mono_domain_finalize):
6706 * marshal.c (mono_delegate_begin_invoke):
6707 * threadpool.c (socket_io_init, mono_thread_pool_init)
6708 (mono_thread_pool_finish):
6709 * monitor.c (mono_monitor_try_enter_internal):
6710 * threads.c (mono_thread_resume, mono_thread_init)
6711 (mono_thread_suspend_all_other_threads)
6712 (mono_thread_execute_interruption):
6713 * appdomain.c (mono_domain_unload): Check for NULL error returns
6714 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
6717 2006-11-11 Miguel de Icaza <miguel@novell.com>
6720 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
6721 Only close the handle if the value of the handle is not
6722 INVALID_HANDLE_VALUE. This just makes the process a bit more
6725 Improvement for #75733, so that we do not run into this problem.
6728 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
6729 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
6730 internal variables. Fixes #79462
6733 2006-11-09 Dick Porter <dick@ximian.com>
6735 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
6736 Use poll() not select(). Fixes bug 79397.
6738 2006-11-09 Raja R Harinath <rharinath@novell.com>
6741 * assembly.c (mono_assembly_load_from_full): Check that the given
6742 image has an assembly manifest.
6744 2006-11-09 Ankit Jain <jankit@novell.com>
6746 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
6747 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
6748 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
6750 2006-11-07 Dick Porter <dick@ximian.com>
6752 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
6753 Put the old resolver behaviour back for pre-2.0 profiles.
6755 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
6757 * threadpool.c: precise GC and locking fixes.
6759 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
6761 * class.c: don't load types that have an explicit unaligned
6762 managed reference. Provide better info in the TypeLoad exception.
6763 Part of the fix for bug #79744.
6764 * object.c: use the correct check for class type load issues.
6766 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
6768 * class.c: enforce alignment of fields with managed references
6769 even when Pack=1 is forced by the user (bug #77788).
6771 2006-11-03 Dick Porter <dick@ximian.com>
6773 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
6774 If the address reverse lookup fails, return it as the hostname
6775 anyway. Fixes bug 79721.
6777 2006-11-03 Dick Porter <dick@ximian.com>
6779 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
6780 Fix build on Windows.
6782 2006-11-02 Dick Porter <dick@ximian.com>
6785 * object-internals.h:
6786 * exception.c (mono_get_exception_thread_interrupted):
6787 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
6790 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
6791 Check for pending Thread.Interrupt.
6793 2006-10-27 Massimiliano Mantione <massi@ximian.com>
6794 * loader.c: Fixed bug 79684.
6796 2006-10-27 Dick Porter <dick@ximian.com>
6798 * file-io.c (get_file_attributes): Force symlinks to directories
6799 to be returned as a regular file. Fixes bug 79733.
6800 2006-10-26 Dick Porter <dick@ximian.com>
6802 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
6803 CreateFile to open a directory then we need to set the
6804 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
6806 2006-10-23 Zoltan Varga <vargaz@gmail.com>
6808 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
6811 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
6813 * sgengc.c: small cleanup of timer code.
6815 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6817 * sgen-gc.c: fix some warnings and start adding support for
6818 complete object removal on domain unload.
6820 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
6822 * assembly.c: build_assembly_name should not consider a version
6823 number without build or revision number invalid. Fixes bug #79715.
6825 2006-10-18 Jonathan Chambers <joncham@gmail.com>
6827 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
6828 call kernel32 function OutputDebugString directly.
6830 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
6832 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
6834 * reflection.c: small cleanup, using a function to insert a MonoString
6837 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
6839 * reflection.c: moving GC fixes.
6841 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
6843 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
6844 all the objects with finalizers belonging to an unloading appdomain.
6846 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
6848 * sgen-gc.c: added ability to allocate even when the nursery is fully
6849 pinned and fixed a couple of bugs.
6851 2006-10-15 Zoltan Varga <vargaz@gmail.com>
6853 * threads.h: Revert the last change for now.
6855 * threads.h (mono_thread_get_pending_exception): Rename this to
6856 mono_thread_get_undeniable_exception ().
6858 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
6860 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
6861 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
6862 when fname does not refer to valid assembly. This result in a more
6863 meaningful error message.
6864 * exception.c: added mono_get_exception_bad_image_format2 which
6865 constructs a BadImageFormatException using the ctor taking a custom
6866 message and the file name. Passing in a NULL msg results in a default
6868 * exception.h: define mono_get_exception_bad_image_format2 function.
6869 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
6870 when file name pointed to an invalid IL image. Use
6871 mono_get_exception_file_not_found2 to construct FileNotFoundException,
6872 as this results in a more meaningful error message.
6874 2006-10-15 Zoltan Varga <vargaz@gmail.com>
6876 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
6879 2006-10-12 Zoltan Varga <vargaz@gmail.com>
6881 * metadata.c (mono_type_size): Change the align parameter to guint32 for
6882 consistency with the other _size functions.
6883 (mono_type_stack_size): Ditto.
6885 * class.c object.c icall.c: Fix warnings caused by the above change.
6887 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
6889 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
6891 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
6893 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
6895 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
6896 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
6897 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
6898 threadpool.h, threads-types.h: mark more internal functions.
6900 2006-10-11 Dick Porter <dick@ximian.com>
6902 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
6903 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
6904 reproduce the bug even before applying the fix.)
6906 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
6908 * reflection.c: allow retrieving attributes for arguments in generic
6909 methods (bug #79241).
6911 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
6913 * debug-mono-symfile.c: properly check fopen () result (found by
6916 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
6918 * reflection.c: make error message clearer and fixed two
6919 issuelets found by Coverity.
6921 2006-10-10 Zoltan Varga <vargaz@gmail.com>
6923 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
6925 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
6927 * object-internals.h, gc-internal.h, profiler-private.h:
6928 mark internal functions.
6930 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
6932 * reflection.c: put data in the text section.
6933 * icall.c: recognize more types in type_from_typename ().
6934 * process.c, marshal.c: added some GC FIXMEs.
6936 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
6938 * loader.c: check for NULL before initializing.
6940 2006-10-09 Zoltan Varga <vargaz@gmail.com>
6942 * gc.c (finalizer_thread): Use a non-alertable wait here.
6944 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
6945 until the correct solution is found.
6947 2006-10-06 Zoltan Varga <vargaz@gmail.com>
6949 * reflection.c (mono_module_get_object): Avoid an assert when operating on
6950 modules with no metadata. Fixes #79596.
6952 * image.c (load_metadata_ptrs): Put back the error message when
6953 the #- heap is encountered since the support is not complete yet.
6955 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
6957 * gc.c: do not allow the user to SuppressFinalize () a
6958 delegate because it would leak the trampoline if present.
6960 2006-10-06 Zoltan Varga <vargaz@gmail.com>
6962 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
6965 2006-10-05 Zoltan Varga <vargaz@gmail.com>
6967 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
6969 * metadata.c (mono_metadata_get_param_attrs): Ditto.
6971 * row-indexes.h: Add definitions for *Ptr tables.
6973 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
6975 * metadata.c (mono_metadata_translate_token_index): New helper function to
6976 translate table indexes used in uncompressed metadata.
6977 (mono_metadata_decode_table_row): Ditto.
6978 (mono_metadata_decode_table_row_col): Ditto.
6980 * metadata.c: Add table schema for *Ptr tables.
6982 * class.c loader.c: Use the new helper function to access the affected metadata
6985 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
6988 2006-10-04 Zoltan Varga <vargaz@gmail.com>
6990 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
6991 sequences which can be unbounded in size. Fixes #79583.
6993 2006-10-02 Zoltan Varga <vargaz@gmail.com>
6995 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
6996 static initialization.
6998 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
7000 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
7002 * domain.c (mono_domain_free): Free up type_init_exception_hash.
7004 * object.c (mono_runtime_class_init): Implement correct semantics when a static
7005 ctor fails, i.e. throw the same exception on subsequent accesses.
7007 2006-09-0 Jonathan Chambers <joncham@gmail.com>
7009 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
7010 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
7011 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
7012 Handle marshalling of interfaces and VARIANTs contained in structs.
7014 Code is contributed under MIT/X11 license.
7016 2006-09-30 Zoltan Varga <vargaz@gmail.com>
7018 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
7020 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
7023 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7025 * console-io.c: ignore previous SIGINT handler.
7027 2006-09-27 Zoltan Varga <vargaz@gmail.com>
7029 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
7030 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
7031 #79460, #79461, #79485.
7033 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
7035 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
7038 2006-09-26 Zoltan Varga <vargaz@gmail.com>
7040 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
7041 could be generated from it.
7043 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
7045 * rand.c: fix read loop to correctly handle EINTR.
7047 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
7049 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
7050 internal calls are defined to keep methods closer to the declaring
7051 type and allow a significant reduction in runtime relocations and
7054 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
7056 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
7057 exception message to have FileNotFoundException use the default
7058 assembly load error message. Fixes bug #79426.
7059 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
7061 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7063 * threadpool.c: (start_thread_or_queue) use the root domain when
7064 creating the thread instead of the async object one.
7066 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
7068 * class.c, object.c, class-internals.h, reflection.c:
7069 for arrays, store element_size inside MonoClass (speedup
7070 for array object creation).
7072 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
7074 * icall.c: fixed CodeBase to use the file name and not the module
7077 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
7079 * mono-debug.c, mono-debug.h: export find_method as
7080 mono_debug_find_method ().
7082 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
7084 * debug-helpers.c, class-internals.h: added a few functions useful
7085 when debugging under gdb.
7087 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7089 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
7090 characters that need special handling.
7092 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
7094 * mono-config.c: make the os/cpu specification more flexible,
7095 allowing lists and negation.
7097 2006-09-18 Jonathan Chambers <joncham@gmail.com>
7099 * marshal.c: COM Interop fixes. Handle case where method->klass.
7100 is interface. Handle BSTR/MonoString when null. Use CDECL as
7101 calling convention on non-windows platforms. This is for
7102 compatibility with XPCOM and MainWin COM.
7104 Code is contributed under MIT/X11 license.
7107 2006-09-18 Zoltan Varga <vargaz@gmail.com>
7109 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
7110 correctly. Fixes #79217.
7112 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
7114 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
7116 * mono-config.c: allow both an os and cpu attribute for dllmap
7117 and dllentry elemnets to enable a single config file to be used
7118 for multiple architectures.
7120 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
7122 * loader.c: MonoLoaderError was cleared too soon on load failure.
7125 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
7127 * icall.c: use the defining class vtable when accessing a
7128 static field, not a pobblibly derived class.
7130 2006-09-17 Zoltan Varga <vargaz@gmail.com>
7132 * icall.c string-icalls.c: Remove references to unicode.h.
7134 * unicode.h unicode.c Makefile.am: Remove these unused source files.
7136 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
7138 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
7139 indicating the image where custom marshaller types should be looked up.
7140 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
7141 custom marshallers, instead of corlib. Fixes #79425.
7143 2006-09-14 Zoltan Varga <vargaz@gmail.com>
7145 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
7147 2006-09-14 Jonathan Chambers <joncham@gmail.com>
7149 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
7150 Implement Environment.ProcessorCount.
7152 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
7153 Implement Environment.ProcessorCount.
7156 Add Environment.ProcessorCount icall.
7158 Patch by Jason McFall.
7160 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7162 * assembly.c: don't append .exe/.dll when the filename already contains
7163 one of those extensions.
7165 2006-09-12 Martin Baulig <martin@ximian.com>
7167 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
7168 to array interfaces.
7170 2006-09-11 Martin Baulig <martin@ximian.com>
7172 * reflection.c (mono_image_build_metadata): Create the
7173 MethodImpl's after emitting all types and methods, so we don't
7174 need another fixup pass for them.
7176 2006-09-11 Zoltan Varga <vargaz@gmail.com>
7178 * class.c (mono_class_from_name_case): Fix regression introduced by the last
7181 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
7183 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
7186 2006-09-10 Zoltan Varga <vargaz@gmail.com>
7188 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
7189 args is not set. Fixes #78926.
7191 2006-09-08 Zoltan Varga <vargaz@gmail.com>
7193 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
7195 * image.c (load_class_names): Move this to class.c, and rename it to
7196 'mono_image_init_name_cache'.
7197 (load_modules): Fix a warning.
7199 * class.c icall.c image.c: Initialize image->name_cache lazily.
7201 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
7202 on its name using information in the AOT file.
7204 * class.c (mono_class_from_name): Use the new hook function.
7206 2006-09-06 Zoltan Varga <vargaz@gmail.com>
7208 * reflection.c (mono_param_get_objects): Handle enum default parameter values
7211 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
7214 2006-09-06 Martin Baulig <martin@ximian.com>
7216 * icall.c (mono_lookup_internal_call): Small fix.
7218 2006-09-05 Raja R Harinath <rharinath@novell.com>
7220 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
7223 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
7225 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
7226 when --debug is specified.
7228 2006-09-04 Zoltan Varga <vargaz@gmail.com>
7230 * class.c (setup_generic_array_ifaces): Fix a warning.
7232 2006-09-04 Miguel de Icaza <miguel@novell.com>
7234 * Temporarily remove the patch to assemly.c that checks the
7235 assembly versions as it breaks our gacutil.
7237 2006-09-03 Zoltan Varga <vargaz@gmail.com>
7239 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
7241 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
7244 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
7245 created using the default ctor. Fixes #79152.
7246 (mono_string_builder_to_utf16): Ditto.
7248 2006-09-01 Martin Baulig <martin@ximian.com>
7250 Fix handling of the generic array interfaces.
7253 (MonoDefaults): Removed `generic_array_class' and added
7254 `generic_ilist' class.
7257 (mono_bounded_array_class_get): Add the new generic array interfaces.
7258 (setup_generic_array_ifaces): New static method; create vtable
7259 entries for each method in the generic array interfaces.
7262 (select_container): Allow "parent-less" generic methods.
7265 (mono_marshal_get_generic_array_helper): New public method.
7268 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
7269 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
7270 moved the interncall into System.Array.
7272 2006-09-01 Raja R Harinath <rharinath@novell.com>
7274 A few more cases of avoiding work on types with ->byref set.
7275 Has the real fix for #79238
7276 * icall.c (is_generic_parameter): New helper.
7277 (ves_icall_Type_GetGenericParameterPosition): Use it.
7278 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
7279 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
7280 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
7281 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
7283 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
7285 (ves_icall_Type_get_IsGenericInstance): Likewise.
7286 (ves_icall_Type_get_IsGenericType): Likewise.
7288 2006-09-01 Zoltan Varga <vargaz@gmail.com>
7290 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
7293 * mempool.h (mono_mempool_get_allocated): New helper function.
7295 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
7298 * mempool.c: Fix warnings and the calculation of stats.
7300 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
7302 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
7304 * loader.c (mono_get_method_from_token): Update method_count stat.
7306 * class-internals.h (MonoStats): Add some stats.
7308 2006-08-31 Robert Jordan <robertj@gmx.net>
7310 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
7311 with managed variants.
7312 All code is contributed under the MIT/X11 license.
7314 2006-08-31 Zoltan Varga <vargaz@gmail.com>
7316 * reflection.c (reflection_methodbuilder_to_mono_method): Set
7317 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
7319 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
7321 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
7322 with cycles in classes.
7324 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
7326 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
7327 missing a [MarshalAs] directive. Fixes #79203.
7329 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
7330 klass->marshal_info. Fixes #79217.
7332 2006-08-30 Martin Baulig <martin@ximian.com>
7334 Committing a patch from Joachim Ante <joe@otee.dk>:
7335 Add support for binary data symbol stores.
7337 * debug-mono-symfile.c
7338 (mono_debug_open_mono_symbol_file): Renamed into
7339 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
7343 (mono_debug_open_image): Added `raw_contents' and `size' args.
7344 (mono_debug_init_2_memory): New public function.
7346 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
7348 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
7350 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7352 * appdomain.c: implement support for ShadowCopyFiles.
7354 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
7356 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
7357 when value is NULL (and should remove CID #51).
7359 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7361 * image.c: moved 2 functions to ../utils.
7363 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
7365 * gc.c: cope with the target object of a GC handle being NULL
7368 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7370 * class.c: recursively check parent's explicit implementations
7371 of interface methods (fixes bug #79125).
7373 2006-08-19 Miguel de Icaza <miguel@novell.com>
7375 * filewatcher.c: Avoid warnings when building, do not redefine
7376 constants that are defined.
7380 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7382 * image.c: don't fail when the link points to an absolute path.
7384 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
7386 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
7389 2006-08-17 Miguel de Icaza <miguel@novell.com>
7391 * image.c (full_path): A new method used to obtain the actual path
7392 of an assembly even in the presence of symbolic links.
7394 This is necessary for the case where we are running a binary that
7395 has been GACed, but we are using the "published" path name
7396 ($prefix/mono/1.0/blah.exe) which happens to point to the real
7399 This was the source of the failure for the `xsp' command with the
7400 recent AppDomain changes, as far as the runtime was concerned,
7401 there were two different assemblies: $prefix/mono/1.0/blah.exe and
7402 $prefix/mono/gac/blah/version/blah.exe.
7404 (do_mono_image_open): use full path
7406 2006-08-17 Zoltan Varga <vargaz@gmail.com>
7408 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
7410 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
7412 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
7413 domain_id is supplied. Fix CID #241 and corlib's unit tests.
7415 2006-08-17 Zoltan Varga <vargaz@gmail.com>
7417 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
7418 small structures. Fixes #78990.
7420 2006-08-17 Zoltan Varga <vargaz@gmail.com>
7422 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
7424 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
7426 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7429 * marshal.c: don't load all the assemblies from a domain into newly
7430 created ones. The new domains might have different rules and load
7431 assemblies from different locations. Fixes bug #76757.
7433 Patch by Lluis. Conflicts resolved by Brian Crowell.
7435 2006-08-16 Alp Toker <alp@atoker.com>
7437 * socket-io.c: First half of the fix for #79084.
7438 Set sa_size to the length of the content, not that of the struct.
7439 Don't add NULL suffix to the content, this should be done in
7440 managed code if needed.
7442 2006-08-14 Raja R Harinath <rharinath@novell.com>
7445 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
7446 mono_metadata_parse_type returns NULL.
7448 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
7450 * normalization-tables.h : new file for string normalization data.
7451 * locales.c, locales.h, icall.c :
7452 added load_normalization_resource() for string normalization,
7454 * Makefile.am : added normalization-tables.h to the sources.
7456 2006-08-13 Zoltan Varga <vargaz@gmail.com>
7458 * marshal.c: Add more helper functions to reduce code duplication and use them
7461 2006-08-12 Zoltan Varga <vargaz@gmail.com>
7463 * marshal.c: Fix non-x86 stdcall warnings.
7465 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
7468 2006-08-11 Jonathan Chambers <joncham@gmail.com>
7470 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
7471 type check on multi-dimensional arrays. Fixes #79000.
7473 2006-08-10 Jonathan Chambers <joncham@gmail.com>
7475 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
7476 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
7477 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
7478 * class-internals.h: add is_com_object to class structure.
7479 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
7480 null checks to COM object marshalling. Fix .ctor call on RCW.
7481 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
7483 All code is contributed under the MIT/X11 license.
7485 2006-08-09 Dick Porter <dick@ximian.com>
7487 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
7488 racing mono_monitor_allocator_lock() somewhere, so don't delete
7489 the critical section for now. Found by running and exiting
7492 2006-08-10 Zoltan Varga <vargaz@gmail.com>
7494 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
7495 (ves_icall_System_ComObject_FindInterface): Ditto.
7496 (ves_icall_System_ComObject_CacheInterface): Ditto.
7498 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
7499 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
7501 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7503 * threadpool.c: treat pipes from process asynchronous reads as sockets
7504 when reading from them, so we get select/poll or epoll to wait for
7507 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
7509 * loader.c: Fix a typo (CID #233) in the null check.
7511 2006-08-07 Zoltan Varga <vargaz@gmail.com>
7513 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
7514 Hopefully fixes #78949.
7516 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
7517 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
7518 bytes. Fixes #78972.
7520 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7522 * filewatcher.c: we need to set errno here.
7524 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7526 * filewatcher.c: let Win32Exception get the error value.
7528 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7530 * filewatcher.c: translate errno into win32 errors for Win32Exception
7531 to know what happened.
7533 2006-08-01 Zoltan Varga <vargaz@gmail.com>
7535 * threadpool.c: Fix more warnings.
7537 * assembly.c (search_loaded): Fix warnings.
7539 * threadpool.c (mono_thread_pool_finish): Fix warnings.
7540 (mono_async_invoke): Ditto.
7542 2006-07-28 Jonathan Chambers <joncham@gmail.com>
7544 * object.c (mono_remote_class_vtable): Need to create proxy vtable
7545 entries for __ComObject type in addition to ComImport types.
7546 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
7549 All code is contributed under the MIT/X11 license.
7551 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
7553 * image.c: avoid tentative loading of modulerefs that contain
7554 no metadata (P/Invoke library names).
7556 2006-07-28 Dick Porter <dick@ximian.com>
7558 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
7559 mono_loader_lock() somewhere, so don't delete the critical section
7560 for now. Found by running and exiting monodevelop.
7562 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7564 * filewatcher.c: define the inotify syscalls when we're building on
7565 linux and have sys/syscall.h. The build system might not have support
7566 for inotify but the target system might have it.
7568 2006-07-26 Miguel de Icaza <miguel@novell.com>
7570 * domain.c: Documentation updates.
7572 * loader.c (mono_free_method): Do not release the method
7573 information if we are being profiled, as profilers will use this
7574 information at shut down to present some data to the user.
7576 This is needed so that the profiler does not crash, as the
7577 profiler tends to keep MonoMethods around, and they might become
7578 invalid if we free these.
7580 (mono_get_method_constrained): Return the original CIL stream
7581 method as well, so verification can be performed against it.
7583 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7585 * filewatcher.[ch]: support for inotify file system watcher.
7586 * icall.c: add new internal calls for the inotify file system watcher.
7588 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7590 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
7593 2006-07-20 Dick Porter <dick@ximian.com>
7595 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
7598 2006-07-20 Dick Porter <dick@ximian.com>
7600 * threads.c (start_wrapper): Do the thread cleanup while we still
7601 hold a reference to its object. Fixes bug 78123.
7603 2006-07-18 Kornél Pál <kornelpal@gmail.com>
7605 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
7606 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
7607 "managed-to-managed".
7608 * icall.c: Redirect string constructors that take sbyte* to
7609 ves_icall_System_String_ctor_RedirectToCreateString.
7610 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
7611 to CreateString () methods with matching signature.
7612 * reflection.c: Use original security informations for
7613 MONO_WRAPPER_MANAGED_TO_MANAGED.
7614 * security-manager.c: Use original security informations for
7615 MONO_WRAPPER_MANAGED_TO_MANAGED.
7616 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
7617 that is a placeholder and only its address should be used.
7618 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
7619 that is a placeholder and only its address should be used.
7621 2006-07-15 Jonathan Chambers <joncham@gmail.com>
7623 Begin implementing COM Interop.
7624 * appdomain.c: Increment corlib version.
7625 * class.c: Set ComImport classes' parent to __ComObject.
7626 * loader.c: Mark cominterop methods as such.
7627 * domain.c: Add __ComObject class to MonoDefaults structure.
7628 * image.c: Add 2 hashtables to the image for COM Interop related methods
7629 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
7630 using the mempool allocator
7632 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
7633 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
7634 declaration for mono_metadata_type_dup_mp.
7636 * debug-helpers.c: Added strings for two additional wrapper types
7637 * object.c: Create proxy objects for ComImport classes
7638 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
7639 and added __ComObject class to MonoDefaults structure.
7641 * object-internals.h: Finish MonoRealProxy definition, and add definition of
7642 MonoComInteropProxy and MonoComObject.
7644 * marshal.c: Added support for COM Interop
7645 (signature_cominterop): Converts managed signature to corresponding
7646 unmanaged COM signature.
7647 (cominterop_get_function_pointer): gets unmanaged function pointer via
7649 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
7650 (cominterop_get_method_interface): returns interface type that method is defined on
7651 (mono_mb_emit_cominterop_call): emits native call to function pointer
7653 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
7654 that matches signature of unmanaged function.
7655 (cominterop_get_native_wrapper): wrapper around adjusted method call.
7656 (cominterop_get_invoke): forwards call from proxy to __ComObject
7657 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
7658 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
7659 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
7661 * marshal.h: Added Marshal icall declarations.
7662 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
7663 so we can access them in finalizer
7665 2006-07-14 Dick Porter <dick@ximian.com>
7667 * object.c (mono_type_initialization_cleanup): Fix a race
7668 condition by temporarily commenting out the critical section
7671 2006-07-14 Zoltan Varga <vargaz@gmail.com>
7673 * reflection.c (create_custom_attr): Fix some warnings.
7674 (create_custom_attr_data): Ditto.
7675 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
7676 types. Fixes #78855.
7678 2006-07-11 Zoltan Varga <vargaz@gmail.com>
7680 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
7682 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
7684 2006-07-08 Zoltan Varga <vargaz@gmail.com>
7686 * reflection.c (resolve_object): Add support for DynamicMethod.
7688 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
7689 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
7691 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
7693 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
7694 don't leak GPtrArray's pdata has we have no use (nor free) for it.
7696 2006-07-01 Zoltan Varga <vargaz@gmail.com>
7698 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
7701 2006-06-30 Raja R Harinath <rharinath@novell.com>
7703 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
7704 slightly: remove a shadow local variable.
7706 2006-06-29 Raja R Harinath <rharinath@novell.com>
7708 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
7709 definition that introduces the virtual function slot.
7710 Also fix Coverity #105.
7712 2006-06-29 Zoltan Varga <vargaz@gmail.com>
7714 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
7715 for dynamic assemblies. Fixes #78724.
7717 2006-06-28 Zoltan Varga <vargaz@gmail.com>
7719 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
7722 2006-06-21 Martin Baulig <martin@ximian.com>
7725 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
7728 2006-06-21 Zoltan Varga <vargaz@gmail.com>
7730 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
7732 2006-06-20 Raja R Harinath <rharinath@novell.com>
7734 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
7736 * class.c (mono_class_create_from_typespec): Add 'context' argument.
7737 Inflate result if necessary.
7738 (mono_class_get_full): Remove old version. Rename from
7739 'mono_class_get' and add 'context' argument. Pass it to
7740 ..._create_from_typespec.
7741 (mono_class_get): New. Simple wrapper to mono_class_get_full.
7742 (mono_ldtoken): Revert change below.
7744 2006-06-20 Martin Baulig <martin@ximian.com>
7746 * class.c (mono_ldtoken): Don't pass the generic context to
7747 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
7749 2006-06-15 Zoltan Varga <vargaz@gmail.com>
7751 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
7752 and later freeing it. Fixes #78638.
7754 2006-06-15 Miguel de Icaza <miguel@novell.com>
7756 * icall.c (mono_class_get_throw): Revert over-zealous error
7757 throwing, the caller for mono_class_get_throw will cope with
7758 errors when classes are not properly initialized already.
7760 The code still copes with loader exceptions though.
7762 Fixes the regression in reftype1 and reftype3 from the CAS tests.
7764 2006-06-14 Miguel de Icaza <miguel@novell.com>
7766 Fixes the `make run1' version of RuntimeAbort (to be commited,
7767 source is in Bugzilla).
7769 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
7770 FALSE on class loading failure instead of returning true.
7772 * class.c (mono_class_create_from_typedef): It is possible for
7773 mono_metadata_interfaces_from_typedef_full to fail if a class is
7774 not found, cope with this.
7777 2006-06-14 Dick Porter <dick@ximian.com>
7780 * process.c: Fix a bunch of signed/unsigned warnings from gcc
7783 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
7785 * culture-info-table.h : oops, forgot to make it nsync with r61548.
7787 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
7789 * icall.c: Another fix for building mono in Visual Studio.
7791 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
7793 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
7795 2006-06-09 Martin Baulig <martin@ximian.com>
7797 * debug-mono-symfile.c: Put this back and really fix it this
7798 time. Sorry for all the trouble.
7800 2006-06-08 Zoltan Varga <vargaz@gmail.com>
7802 * icall.c (mono_class_get_throw): Fix a warning.
7803 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
7804 ReflectionTypeLoadException if needed. Fixes #78606.
7806 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
7807 (mono_class_init): Ditto.
7809 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
7810 ref_only exceptions.
7811 (mono_loader_clear_error): Make this work even if there is no error.
7813 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
7815 * object-internals.h marshal.c marshal.h icall.c: Implement method
7816 Marshal.GetComSlotForMethodInfo using internal call.
7818 2006-06-07 Zoltan Varga <vargaz@gmail.com>
7820 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
7821 a function for signalling it.
7823 * class.c (mono_class_from_typeref): Use the new kind of loader error when
7824 a referenced assembly is not found.
7826 * loader.c (mono_loader_error_prepare_exception): Add support for
7827 LOADER_ERROR_ASSEMBLY. Fix formatting.
7829 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
7831 * domain.c appdomain.c class-internals.h marshal.c: Add support
7832 for VARIANT marshalling on windows and increment corlib version
7833 since Variant struct was added.
7835 2006-06-03 Miguel de Icaza <miguel@novell.com>
7837 * debug-mono-symfile.c: Revert Martin's previous patch which broke
7838 stack trace line information:
7840 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
7841 (Martin) when looking up B which is between A and C, return A not C.
7845 Thanks to Alexander Olk for tracking this down.
7847 2006-06-02 Zoltan Varga <vargaz@gmail.com>
7849 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
7851 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
7852 avoid clobbering its value.
7853 (mono_string_to_lpstr): Fix a warning on windows.
7855 2006-05-31 Zoltan Varga <vargaz@gmail.com>
7857 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
7859 * reflection.c loader.c: Removed references to 'dummy' flag.
7861 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
7863 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
7864 it gets GC tracking.
7866 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
7869 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
7871 * marshal.c threadpool.c: Update callers of mono_async_result_new.
7873 * appdomain.c: Bump corlib version.
7875 2006-05-30 Zoltan Varga <vargaz@gmail.com>
7877 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
7878 CEE_STIND_REF when working with object references.
7880 2006-05-31 Zoltan Varga <vargaz@gmail.com>
7882 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
7885 2006-05-30 Miguel de Icaza <miguel@novell.com>
7887 * loader.c (method_from_memberref): Fix argument value for
7888 mono_loader_set_error_method_load (I was passing the MonoClass
7889 instead of the class name char *).
7891 2006-05-30 Zoltan Varga <vargaz@gmail.com>
7893 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
7894 CEE_STIND_REF when working with object references.
7896 2006-05-30 Martin Baulig <martin@ximian.com>
7898 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
7899 mono_method_full_name() change and replace the ':' with a '.'
7902 2006-05-30 Martin Baulig <martin@ximian.com>
7904 * debug-mono-symfile.c
7905 (mono_debug_symfile_lookup_location): Fix the algorithm:
7906 when looking up B which is between A and C, return A not C.
7908 2006-05-29 Martin Baulig <martin@ximian.com>
7911 (MonoDebugMethodInfo): Make the typedef public.
7912 (MonoDebugSourceLocation): New public struct.
7915 (mono_debug_source_location_from_address): Removed.
7916 (mono_debug_source_location_from_il_offset): Removed.
7917 (mono_debug_il_offset_from_address): Removed.
7918 (mono_debug_address_from_il_offset): Removed.
7919 (mono_debug_lookup_method): New public function.
7920 (mono_debug_lookup_source_location): New public function; replaces
7921 the old mono_debug_source_location_from_*() functions; see the
7922 inline documentation.
7923 (mono_debug_free_source_location): New public function.
7924 (mono_debug_print_stack_frame): New public function; see the
7925 inline documentation.
7927 * debug-mono-symfile.c
7928 (mono_debug_find_source_location): Renamed into
7929 mono_debug_symfile_lookup_location(); only take a
7930 `MonoDebugMethodInfo *' and an `offset' argument; added inline
7932 (mono_debug_find_method): Renamed into
7933 mono_debug_symfile_lookup_method().
7935 2006-05-27 Zoltan Varga <vargaz@gmail.com>
7937 * assembly.c (mono_assembly_open_full): Dont overwrite the status
7938 returned by mono_image_open_full ().
7940 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
7941 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
7944 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
7947 2006-05-27 Miguel de Icaza <miguel@novell.com>
7949 * class.c (mono_class_from_typeref): handle missing images
7950 earlier, deals with bug #78418. Refactor code;
7952 Fix a warning introduced in my previous commit (some stale code
7953 from before I revisited my patch).
7955 * class.c (mono_class_create_from_typedef): On failure, remove the
7956 class from the MonoImage->class_cache as the class is not
7957 initialized; Fixes the leak pointed out by Paolo.
7959 2006-05-25 Dick Porter <dick@ximian.com>
7961 * threads.c (mono_thread_cleanup): Build fix. Comment out the
7962 DeleteCriticalSections until I figure out which one may still be
7963 sometimes locked when mono_thread_cleanup is called.
7965 2006-05-24 Dick Porter <dick@ximian.com>
7967 * threads.c (mono_thread_cleanup): Move the threading cleanup out
7968 of mono_thread_manage and back into its own function, so it can be
7969 called after the finalizer thread has finished.
7971 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
7973 2006-05-24 Zoltan Varga <vargaz@gmail.com>
7975 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
7978 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
7979 with non-blittable elements.
7980 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
7982 2006-05-24 Martin Baulig <martin@ximian.com>
7984 * mono-debug-debugger.h (MonoDebuggerEvent): Added
7985 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
7987 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
7988 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
7989 `mono_debugger_event_handler' to NULL.
7991 2006-05-24 Martin Baulig <martin@ximian.com>
7993 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
7995 2006-05-24 Martin Baulig <martin@ximian.com>
7997 * mono-debug-debugger.h
7998 (mono_debugger_create_notification_function): Added
7999 `MonoCodeManager *' argument.
8001 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
8003 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
8005 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
8007 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
8008 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
8011 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
8013 * icall.c: precise GC support: objects can't be stored in unmanaged
8014 memory anymore, even if they are kept alive by other references: since
8015 they can move the GC needs to be able to always find them.
8017 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8019 * object.c: precise GC support for static fields. Support
8020 for moving GCs: write barriers and pinned allocation for interned
8023 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
8025 * domain.c, domain-internals.h: precise GC support for the MonoDomain
8028 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
8030 * class.c, gc.c: sgen and precise GC updates.
8032 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
8034 * marshal.h, marshal.c: added write barrier wrapper and precise type
8037 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
8039 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
8042 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
8044 * reflection.c: precise and sgen GC updates.
8046 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
8048 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
8050 2006-05-22 Zoltan Varga <vargaz@gmail.com>
8052 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
8054 2006-05-20 Zoltan Varga <vargaz@gmail.com>
8056 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
8057 MONO_TYPE_OBJECT. Fixes #78462.
8059 2006-05-18 Zoltan Varga <vargaz@gmail.com>
8061 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
8062 and blittable types.
8064 2006-05-17 Miguel de Icaza <miguel@novell.com>
8066 * class.c (mono_class_get_exception_for_failure): Implement parts
8067 of a TODO: if the loader error is set (instead of the class
8068 error), we return a Loader exception that can be properly thrown
8071 This was exposed by some Winforms 2.0 code that I tried to run
8072 (Atsushi pointed me to it).
8074 2006-05-17 Zoltan Varga <vargaz@gmail.com>
8076 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
8077 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
8079 * marshal.c (emit_marshal_vtype): Add limited support for
8080 UnmanagedType.LPStruct. Fixes #78427.
8082 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
8083 Applied a patch from kangaroo to fix #77523.
8085 2006-05-17 Martin Baulig <martin@ximian.com>
8088 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
8089 (debugger_thread_created): Removed.
8090 (debugger_thread_exited): Removed.
8092 2006-05-15 Zoltan Varga <vargaz@gmail.com>
8094 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8096 * object-internals.h (MonoReflectionResource): Sync with managed version.
8098 2006-05-12 Wade Berrier <wberrier@novell.com>
8100 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
8102 2006-05-12 Zoltan Varga <vargaz@gmail.com>
8104 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
8105 functions try to allocate from the image mempool.
8107 2006-05-12 Dick Porter <dick@ximian.com>
8109 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
8111 2006-05-12 Lluis Sanchez <lluis@ximian.com>
8113 * object.c: The FieldGetter and FieldSetter methods require the full
8114 name of the class, not only the name. Fixes bug #78277.
8116 2006-05-11 Miguel de Icaza <miguel@novell.com>
8118 * loader.c (method_from_memberref): Do not pass the NULL klass to
8119 mono_loader_set_error_() methods. Pass the non-NULL value
8122 2006-05-11 Zoltan Varga <vargaz@gmail.com>
8124 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
8125 (mono_assembly_close): Null out assembly->image->references after freeing it.
8127 * image.c (mono_image_close): Free image->references.
8129 * reflection.c (mono_image_basic_init): Fix a small memory leak.
8131 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
8133 * marshal.c: In function mono_mb_add_local don't use the mb pointer
8134 before checking if it's NULL (g_assert).
8136 2006-05-10 Martin Baulig <martin@ximian.com>
8138 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
8139 I thought I already killed that two months ago, but now it somehow reappeared.
8141 2006-05-10 Martin Baulig <martin@ximian.com>
8143 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
8145 2006-05-10 Zoltan Varga <vargaz@gmail.com>
8147 * reflection.c: Allocate memory for dynamically created methods in the image
8150 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
8152 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
8153 don't use the ad pointer before checking if it's NULL (g_assert).
8155 2006-05-09 Zoltan Varga <vargaz@gmail.com>
8157 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
8158 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
8160 * marshal.c: Allocate all signatures from mempools.
8162 * marshal.c: Allocate some more signatures from mempools.
8164 2006-05-09 Miguel de Icaza <miguel@novell.com>
8166 * object.c (mono_load_remote_field): The code used to provide a
8167 temporary variable for returning results if the user did not
8168 provide a result pointer. But our temporary variable was allocted
8171 Fix calling code to always pass a result area. Coverity ID 103.
8173 2006-05-06 Zoltan Varga <vargaz@gmail.com>
8175 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
8176 value, not the old. Fixes #78312.
8177 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
8179 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
8180 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
8183 * assembly.c (mono_assembly_close): Free image->references.
8185 * assembly.c (mono_assembly_names_equal): Fix a warning.
8186 (mono_assemblies_cleanup): Cleanup more global data.
8188 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
8190 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
8191 ptr_cache and image->modules.
8193 * image.c (mono_image_init): Allocate array_cache lazily.
8195 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8197 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
8198 behavior was changed recently and has bad side effects.
8200 2006-05-05 Zoltan Varga <vargaz@gmail.com>
8202 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
8204 * assembly.c (mono_assembly_close): Remove a debug printf.
8206 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
8208 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
8209 to also allow for temporary references between mono_image_open ()/close ().
8211 * domain.c (get_runtimes_from_exe): Add a FIXME.
8213 2006-05-04 Zoltan Varga <vargaz@gmail.com>
8215 * marshal.c: Fix support for dynamic methods.
8217 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
8219 * marshal.c (mono_marshal_cleanup): New cleanup function.
8221 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
8224 * class.c (mono_class_init): Fix leaking class->nested_classes.
8226 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
8228 * image.c (mono_image_init): Initialize the new cashes.
8230 * image.c (mono_image_close): Destroy the new cashes.
8232 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
8234 * mempool.c (mono_mempool_strdup): New helper function.
8236 * class-internals.h: Add prototype for mono_loader_unlock ().
8238 * domain.c (mono_jit_info_table_find): Fix a warning.
8239 (mono_debugger_check_runtime_version): Ditto.
8241 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
8242 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
8243 functions to these modules.
8245 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
8248 * marshal.c (mono_free_bstr): Fix a warning.
8250 * assembly.c (mono_assembly_open_full): Fix another small leak.
8252 * object.c: Fix some unload leaks in the remoting code.
8254 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
8257 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
8259 * reflection.c: Fix some unload leaks in dynamic assemblies.
8261 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
8263 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
8264 * marshal.h: Add BSTR support on Win32
8265 * icall.c: Add BSTR icalls
8266 * metadata.h: Add BSTR enums
8268 2006-04-28 Miguel de Icaza <miguel@novell.com>
8270 Work to catch the crash from #76795 and turn it into an
8271 exception. As I stubbed out pieces of the VisualBasic support,
8272 I found a number of places where the code was failing and I added
8273 checks to those places.
8275 * metadata.c (do_mono_metadata_parse_generic_class): Make this
8276 function return a status code. If we fail to parse the signature
8277 from mono_metadata_parse_generic_inst, return FALSE.
8279 * loader.c (mono_get_method_from_token): If we fail to load the
8280 method (mono_class_get) return NULL.
8282 * (method_from_memberref): Return NULL if we are unable to parse
8283 the method signature
8285 (mono_loader_error_prepare_exception): Since we now use the
8286 loader_error flag internally to stop processing, and obtaining
8287 exceptions that might be thrown will walk this code path the
8288 proper way of going from a MonoLoaderError into a
8289 MonoException was convoluted. This new routine encapsulates the
8290 process of turning the error into an exception and *clearing* the
8293 2006-04-27 Miguel de Icaza <miguel@novell.com>
8295 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
8296 with missing assemblies), and to cope with:
8298 * Missing fieldref from a non-existing assembly.
8299 * Missing methodref from a non-existing assembly.
8301 The first batch of work to address *some* of the issues from 76661.
8303 * object.c (mono_class_create_runtime_vtable): If we fail to
8304 initialize the class raise the exception here.
8306 * metadata.c (mono_class_get_overrides_full): If any methods fail
8307 to load return the failure to the caller.
8309 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
8310 flagging assemblies that failed to load.
8312 Do not crash if we are unable to load the assembly.
8314 (mono_assembly_close): Do nothing with REFERENCE_MISSING
8317 * loader.c (mono_loader_set_error_type_load): Change the
8318 convention to always pass unallocated strings, so we make our own
8319 copies (I know our own code had duplicated strings before, but
8320 this keeps the normal conventions).
8321 (method_from_memberref): Call mono_loader_set_error_method_load
8322 for all possible failures of loading the class.
8323 Remove assert, turn into a loader error.
8325 (mono_loader_error_to_exception): Move this routine from mini
8326 (mini_loader_error_to_exception) there was no need to have that in
8329 * class.c (mono_class_from_typeref): If we were not able to load
8330 the assembly with mono_assembly_load_reference, call the
8331 mono_loader_set_error_type_load to register the problem.
8333 (mono_class_setup_fields): If we fail to load the type from
8334 mono_metadata_parse_type_full, call mono_class_set_failure and
8335 break from the loop.
8337 If class->exception_type is set, we do not layout the fields as
8338 that might crash the runtime, and instead return (from breaking
8339 from the previous loop).
8341 (mono_class_setup_vtable): This now returns a boolean indicating
8342 whether the table was properly setup. The decision is driven by
8343 mono_class_get_overrides_full which might run into non-existing
8346 (mono_class_init): Returns TRUE on success or FALSE if there was a
8347 problem in loading the type (incorrect assemblies, missing
8348 assemblies, methods, etc).
8350 When we call mono_class_setup_fields we also check for a potential
8351 error inside this call (either a class exception or a general
8354 (mono_class_create_from_typedef): If the parent fails to load
8355 (calling mono_class_get_full) return NULL.
8359 calls to mono_metadata_parse_type_full should be checked
8360 everywhere and set the mono_class_set_failure
8361 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
8363 The current patch checks the places where my manually constructed
8364 tests show the errors are showing up, but we should do it
8369 mono_class_init return values should be tested everywhere, like
8370 the previous case this is something that we should audit
8371 everywhere and not only on the cases exposed by the tests I
8374 2006-04-26 Miguel de Icaza <miguel@novell.com>
8376 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
8377 boolean parameter and instead pass the information on `options'
8378 parameter (FileOptions).
8380 * icall.c: Register the new signature for MonoIO.Open.
8382 * debug-helpers.c (dis_one): Trying to understand how coverity
8383 works. Fix Run 5, item 78.
8385 2006-04-26 Dick Porter <dick@ximian.com>
8387 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
8390 2006-04-25 Martin Baulig <martin@ximian.com>
8392 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
8394 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
8395 debugger_thread_created().
8396 (debugger_gc_push_all_stacks): Don't handle the main thread in any
8398 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
8399 (mono_debugger_finalize_threads): New function; undo the effects
8400 of mono_debugger_init_threads().
8401 (mono_debugger_create_all_threads): Removed.
8403 2006-04-24 Zoltan Varga <vargaz@gmail.com>
8405 * image.c (mono_image_close): Tidy up trace messages.
8407 * assembly.c (mono_assembly_close): Ditto.
8409 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
8410 no longer references an already freed assembly. Fixes #78168.
8412 2006-04-21 Dick Porter <dick@ximian.com>
8414 * threads.c (mono_thread_detach): Fix reference counting when
8417 2006-04-21 Zoltan Varga <vargaz@gmail.com>
8419 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
8422 2006-04-19 Zoltan Varga <vargaz@gmail.com>
8424 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
8425 (mono_type_to_stind): Ditto.
8427 * marshal.c: Use the new helper functions to simplify code.
8429 * image.c (mono_image_close): Add some code for help debug assembly unloading
8432 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
8435 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
8436 assembly was already loaded in another appdomain. Fixes #78083.
8438 2006-04-13 Zoltan Varga <vargaz@gmail.com>
8440 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
8441 referenced assemblies.
8442 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
8444 * domain.c (mono_domain_free): Add a trace message.
8446 * appdomain.c (add_assemblies_to_domain): Ditto.
8448 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
8451 2006-04-12 Zoltan Varga <vargaz@gmail.com>
8453 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
8455 2006-04-12 Martin Baulig <martin@ximian.com>
8457 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
8458 `USE_INCLUDED_LIBGC'.
8460 2006-04-12 Zoltan Varga <vargaz@gmail.com>
8462 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
8463 the patch contains ../ and a small directory name later. Hopefully fixes
8466 2006-04-10 Martin Baulig <martin@ximian.com>
8468 Clean up the debugger's thread-handling code.
8470 The debugger's thread-handling code has been moved from
8471 ../mini/debug-debugger.c to threads.c. We now iterate directly
8472 over the `threads' hash, keep track of exiting threads and also
8475 We can now debug XSP and XSP based applications with the debugger.
8477 * object-internals.h (MonoThread): Added `gpointer end_stack'.
8480 (MonoThreadCallbacks): Removed; this was only used by the debugger.
8481 (mono_install_thread_callbacks): Likewise.
8483 * threads.c (mono_thread_callbacks): Removed.
8484 (debugger_thread_created, debugger_thread_exited): New static functions.
8485 (start_wrapper): Call debugger_thread_created().
8486 (thread_cleanup): Call debugger_thread_exited().
8487 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
8488 (mono_debugger_init_threads): New public function.
8489 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
8490 iterate directly over the `threads' hash and also use proper locking.
8492 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
8494 * mono-debug-debugger.h
8495 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
8497 2006-04-10 Zoltan Varga <vargaz@gmail.com>
8499 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
8500 argument type=array. Fixes #78057.
8502 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
8504 * culture-info-table.h : regenerated. Fixed bug #69652.
8506 2006-04-07 Zoltan Varga <vargaz@gmail.com>
8508 * loader.c metadata.c: Reapply a variant r59116.
8510 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
8512 * class.c (mono_class_setup_interface_offsets): New internal function.
8514 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
8515 interfaces too. Fixes #77398.
8517 * reflection.c (encode_cattr_value): Add support for
8518 parameter type=object, argument type=array.
8519 (load_cattr_value): Ditto. Fixes #77916.
8521 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
8522 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
8524 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
8525 a byval char array and CharSet is Ansi.
8527 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
8529 2006-04-06 Zoltan Varga <vargaz@gmail.com>
8531 * metadata.c: Add some locking comments.
8533 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
8535 (mono_metadata_free_method_signature): Don't free the signature itself.
8537 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
8539 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
8540 reference the same MonoImage.
8541 (mono_assembly_load_from_full): Add an assert.
8543 2006-04-05 Zoltan Varga <vargaz@gmail.com>
8545 * image.c (mono_image_close): Don't put the image we are about to free into the
8546 loaded_images_guid_hash.
8548 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
8549 to reduce code duplication.
8551 * marshal.c: Register the native functions called by this module as icalls, to
8552 somewhat centralize the creation of MonoMethodSignature's.
8554 * loader.c (mono_method_signature): Add a cache for method signatures.
8556 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
8557 the parameter attributes of a method.
8558 (mono_metadata_parse_method_signature_full): Refactored the computation of
8559 parameter attributes into a separate function. Also avoid one allocation in
8562 * assembly.c (mono_assembly_close): Ditto.
8564 * image.c (mono_image_close): Log trace messages with INFO level.
8566 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
8568 * image.c reflection.c: Correct reference counting of image modules.
8570 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
8571 of this function from the image mempool.
8573 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
8574 to allow more cached types to be used.
8576 * mono-debug.c (mono_debug_add_method): Appled patch from
8577 David S. Miller <davem@sunset.davemloft.net>: Access
8578 minfo->lexical_blocks[] entry elements using read32().
8580 2006-04-04 Zoltan Varga <vargaz@gmail.com>
8582 * loader.c (mono_free_method): No longer free the method header for non-dynamic
8583 methods as it is allocated from the mempool.
8585 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
8588 * metadata-internals.h: Add comments describing the reference counting scheme
8589 used for MonoImage and MonoAssembly.
8591 * image.c assembly.c reflection.c: Rework reference counting of images and
8592 assemblies so they are freed when the runtime is shut down. Free some
8593 additional memory structures when an image is unloaded.
8595 2006-04-03 Zoltan Varga <vargaz@gmail.com>
8597 * class.c loader.c reflection.c: Allocate more data structures in
8600 2006-03-31 Miguel de Icaza <miguel@novell.com>
8603 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
8604 build on pre glib 2.4 systems.
8606 2006-03-31 Zoltan Varga <vargaz@gmail.com>
8608 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
8610 * icall.c: Fix some warnings.
8612 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
8614 * culture-info-table.h : regenerated.
8616 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
8618 * threads.c, object-internals.h, verify.c: changed the culture caching
8619 code to use a normal MonoArray for storage so the GC can keep track of
8620 them easily. Fixed bits of the cache logic, too and simplified the
8623 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
8625 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
8626 thread for non-Boehm GCs.
8628 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
8630 * domain.c, object.c, domain-internals.h: reduce the amount of memory
8631 needed to keep track of the data for static fields.
8633 2006-03-29 Raja R Harinath <rharinath@novell.com>
8636 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
8637 for interface classes. Use 'num_methods' instead.
8638 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
8639 before using '->vtable_size' field.
8641 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8643 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
8644 doesn't contain managed pointers, so use a normal hashtable.
8646 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
8648 * reflection.c, class-internals.h, domain.c: fixed handling of types
8649 used as values for objects in custom attributes (bug #77915):
8651 2006-03-24 Martin Baulig <martin@ximian.com>
8653 * class.c (mono_class_setup_fields): Added support for generic
8654 instances; fixes #77580.
8656 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8658 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
8660 2006-03-24 Dick Porter <dick@ximian.com>
8662 * file-io.c (get_file_attributes): More stat macro breakage.
8665 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
8667 * profiler.c: added the file=filename option in the default profiler
8668 to output the profile data to filename.
8670 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8672 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
8675 2006-03-22 Martin Baulig <martin@ximian.com>
8677 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
8678 allocated `MonoClassField *' in `fb->handle'.
8680 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8682 * class.c, image.c, metadata-internals.h: implemented new mechanism to
8683 allocate interface ID to save memory and allow better ID reuse on
8684 appdomain unload. setup_generic_vtable () removal from Martin.
8686 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
8688 * object.h, appdomain.c, domain.c, exception.c, icall.c,
8689 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
8690 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
8691 write barriers for reference stores with managed objects accessed with
8692 C structures in the runtime and in embedding programs.
8694 2006-03-20 Raja R Harinath <rharinath@novell.com>
8696 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
8697 'interface_id' and 'max_interface_id' fields of MonoClasses
8698 representing open generic types.
8700 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
8702 * object.h, object.c, icall.c: added functions to deal with
8703 storing valuetypes that contain references in managed objects.
8704 * reflection.c, string-icalls.c, threads.c, marshal.c: small
8705 fixes and comments around uses of mono_array_addr ().
8707 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
8709 * object.h, icall.c, monitor.c: object.GetHashCode ()
8710 implementation that supports the moving garbage collector.
8712 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
8714 * icall.c, threads-types.h, threads.c: implemented finalizer for
8717 2006-03-15 Zoltan Varga <vargaz@gmail.com>
8719 * metadata.c (mono_type_size): Add a fixme.
8720 (mono_type_stack_size): Ditto.
8722 * object-internals.h (MonoReflectionAssemblyBuilder): Added
8723 'type_forwarders' field.
8725 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
8726 attribute from net 2.0.
8728 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
8731 * class.c (mono_class_setup_fields): Fix a warning.
8733 * class.c (mono_class_from_name): Add support for assemblyref entries
8734 in the EXPORTEDTYPE table.
8736 * reflection.c: Add support for handling type forwarders under net 2.0.
8738 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8740 2006-03-14 Zoltan Varga <vargaz@gmail.com>
8742 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
8743 overwriting entries in ModuleBuild->types, also clean up the code
8744 a little. Fixes #77774.
8746 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8748 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
8749 load friend assembly info when present.
8751 2006-03-14 Raja R Harinath <rharinath@novell.com>
8753 Fix crasher on gtest-158.cs.
8754 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
8755 the return value if the MonoClass we want is yet in an
8757 * class.c (mono_class_create_from_typedef): Add an comment
8758 explaining an order dependency between mono_class_setup_parent and
8759 mono_class_setup_mono_type.
8761 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
8763 * class.c: documentation updates and events bug fix.
8765 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
8767 * class.c: some cleanup, locking fixes.
8769 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8771 * class.c: fix the generics code to setup nested
8772 type info to the instantiated type (bug #77770).
8774 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
8776 * marshal.c: fixed a few type correctness issues.
8778 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8780 * loader.c: the Set/Get/Addrtess array methods should be public.
8782 2006-03-11 Zoltan Varga <vargaz@gmail.com>
8784 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
8786 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
8789 2006-03-10 Zoltan Varga <vargaz@gmail.com>
8791 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
8793 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
8795 * mempool.c (mono_mempool_alloc): Speed this up a bit.
8796 (mono_mempool_alloc0): Ditto.
8798 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8801 (create_object_from_sockaddr): it was allocating 4 extra bytes
8802 for the AF_UNIX data. Fixes bug #77747.
8804 2006-03-09 Zoltan Varga <vargaz@gmail.com>
8806 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
8808 2006-03-09 Dick Porter <dick@ximian.com>
8810 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
8811 Fixes bug 76966 again.
8813 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
8815 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
8817 * appdomain.c: Bumped corlib version to 48 (due to r57532)
8819 2006-03-07 Martin Baulig <martin@ximian.com>
8822 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
8824 2006-03-07 Martin Baulig <martin@ximian.com>
8827 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
8828 regression introduced in r56970; see gtest-252.cs.
8830 * loader.c (mono_get_method_constrained): Correctly handle generic
8831 methods; see gtest-253.cs.
8833 2006-03-04 Zoltan Varga <vargaz@gmail.com>
8835 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
8837 2006-03-04 Martin Baulig <martin@ximian.com>
8839 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
8840 compute the parent type at runtime, just like we're already doing
8844 (mono_reflection_bind_generic_parameters): Don't compute the
8845 parent type anymore.
8847 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
8849 2006-03-04 Martin Baulig <martin@ximian.com>
8851 * mono-debug-debugger.h
8852 (mono_debugger_create_notification_function): Allocate memory at
8853 runtime and return a pointer to it.
8855 2006-03-03 Zoltan Varga <vargaz@gmail.com>
8857 * assembly.c: Fix windows build.
8859 * assembly.c: Fix build.
8861 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
8863 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
8865 2006-03-03 Dick Porter <dick@ximian.com>
8868 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
8869 Check parameters before dereferencing them. Fixes Aaron's part of
8872 2006-03-03 Raja R Harinath <rharinath@novell.com>
8874 Fix performance regression.
8875 * loader.c (find_method_in_class): Add 'from_class' argument.
8876 Rename 'klass' argument to 'in_class'. The signature is compared
8877 against the method in 'in_class', and the corresponding method is
8878 returned from 'from_class'.
8879 (find_method): Walk both 'in_class' and 'from_class' in parallel.
8880 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
8881 type definition and generic instantiation in parallel.
8882 (mono_get_method_constrained): Update to changes.
8884 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8886 * threads.c: make sure the domain is correct, too when doing
8887 mono_thread_attach ().
8889 2006-03-01 Zoltan Varga <vargaz@gmail.com>
8891 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
8892 windows. Fixes #77683.
8894 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8896 * object.h, *: introduced specific way to set elements of an array
8897 of references to be used as write barrier. Still need to audit the
8898 uses of mono_array_addr.
8900 2006-03-01 Miguel de Icaza <miguel@novell.com>
8902 * object-internals.h: New field to cache the assmebly name, patch
8903 from Tambet Ingo (tambet@ximian.com)
8905 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
8907 * decimal.h, class-internals.h, metadata-internals.h,
8908 file-io.h: mark a few function declarations as internal, to
8909 reduce the number of PLT entries.
8911 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8913 * file-io.c: fix typo in warning message.
8915 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
8917 * loader.c: on unix, lookup the "*A" version of a function
8918 if charset is auto as a second option before failing.
8920 2006-02-28 Raja R Harinath <rharinath@novell.com>
8922 * class.h (mono_class_inflate_generic_method): Revert to two
8924 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
8925 (mono_class_inflate_generic_method_full): Add.
8926 * class.c (mono_class_inflate_generic_method_full): Rename from
8927 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
8928 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
8929 * loader.c, reflection.c: Update to changes.
8931 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
8933 * icall.c: const fixes and small improvements.
8935 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8937 * threadpool.c: for asynchronous connect(), enable the same workaround
8938 for BSD 6 as for the Mac. Fixes bug #77637.
8940 2006-02-24 Zoltan Varga <vargaz@gmail.com>
8942 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
8943 formatted classes. Fixes #77524.
8945 2006-02-24 Raja R Harinath <rharinath@novell.com>
8947 * class.c (inflate_generic_type): Add a couple more
8948 micro-optimizations.
8949 (inflate_generic_context): Don't use the 'gmethod' from
8951 (mono_class_inflate_generic_method): If the method has generic
8952 parameters, but the passed-in context doesn't have a 'gmethod',
8953 create one. Use the possibly simplified generic instantiation
8954 from the declaring class instead of the one passed in.
8956 2006-02-24 Raja R Harinath <harinath@gmail.com>
8958 Make generic method signature and method header handling lazy.
8959 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
8960 (inflate_generic_header): Likewise.
8961 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
8962 parameter to avoid inflating types.
8963 (mono_get_inflated_method): Empty out.
8964 * class.h (mono_class_inflate_generic_method): Update to changes.
8965 * loader.c (mono_get_method_from_token): Don't parse signature for
8966 generic methods, nor methods of generic classes.
8967 (mono_method_signature): Rename from 'mono_method_signature'.
8968 Inflate signature on demand.
8969 (mono_method_get_header): Inflate method header on demand.
8970 * reflection.c: Update to changes.
8972 2006-02-23 Raja R Harinath <rharinath@novell.com>
8974 * metadata.c (mono_metadata_inflate_generic_inst): If the
8975 instantiation is closed, don't bother expanding it in the new
8977 * class.c (inflate_generic_class): If the generic instantiation
8978 doesn't change after inflation, return the argument itself.
8979 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
8981 (inflate_generic_context): If neither the generic class nor the
8982 generic method instantiations change, return the original context.
8983 * reflection.c (mono_method_get_object): Do
8984 'mono_get_inflated_method' before accessing the ->klass field.
8985 (inflate_mono_method): Don't create a MonoGenericMethod unless
8987 (inflate_method): Don't pass a constructed type as the declaring
8988 type of a methodbuilder.
8990 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
8992 * object.c: fix memory overwrite.
8994 2006-02-22 Dick Porter <dick@ximian.com>
8996 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
8997 it doesn't work any more.
8998 (mono_threads_request_thread_dump): Fix unused variable warnings.
9000 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9002 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
9003 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
9004 the public header file.
9006 2006-02-21 Zoltan Varga <vargaz@gmail.com>
9008 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
9010 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9012 * class-internals.h, object.c: reduce the size of MonoVTable
9013 and store the interface_offsets array at negative offsets.
9015 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
9017 * metadata.c: tweak table descriptors data structures to reduce
9018 size and runtime relocations.
9020 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9022 * marshal.c: fix some types and opcodes to be type-safe
9023 in marshaling wrappers.
9025 2006-02-21 Ankit Jain <jankit@novell.com>
9027 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
9029 2006-02-21 Raja R Harinath <rharinath@novell.com>
9031 * metadata.c (get_constraints): Relax debugging checks for monodis.
9033 2006-02-21 Ankit Jain <jankit@novell.com>
9035 * metadata.c (mono_metadata_load_generic_params): Move the code
9036 checking for ambiguous generic params from here to mono/dis/get.c
9037 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
9039 2006-02-21 Raja R Harinath <harinath@gmail.com>
9041 Fix assertion triggered when compiling nemerle.
9042 * class.c (mono_get_shared_generic_inst): Rename from
9043 get_shared_inst and make non-static.
9044 * loader.c (mono_get_shared_generic_method): New. Used to create
9045 the MonoGenericContext-equivalent of a MonoGenericContainer.
9046 (mono_get_method_from_token): Initialize the 'context' field of
9047 the created MonoGenericContainer.
9048 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
9049 * metadata.c (get_constraints): Add sanity check.
9050 * class-internals.h: Add new internal methods.
9052 * reflection.c (verify_safe_for_managed_space): New sanity check.
9053 Currently checks that owner-less generic parameters aren't allowed
9055 (mono_type_get_object): Use it.
9056 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
9057 that are now in mono_type_get_object.
9058 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
9060 2006-02-19 Raja R Harinath <harinath@gmail.com>
9062 * metadata.c (mono_type_create_from_typespec): Rename from
9063 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
9064 argument and caching of types in the generic container.
9065 (unwrap_arrays, find_generic_param): Remove.
9066 * metadata-internals.h: Update.
9067 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
9069 2006-02-18 Zoltan Varga <vargaz@gmail.com>
9071 * class.c (mono_class_get_exception_for_failure): Fix a warning.
9073 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
9074 return values. Fixes #77581.
9076 * class.c (mono_fnptr_class_get): Switch name and name_space.
9078 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
9079 classes and add support for [In, Out] attributes.
9080 (mono_marshal_free_asany): Ditto. Fixes #77524.
9082 2006-02-18 Raja R Harinath <harinath@gmail.com>
9084 * class.c (mono_class_from_generic_parameter): Make more robust to
9085 incomplete MonoGenericContainers from monodis.
9087 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
9089 * class-internals.h: added some more exception types.
9090 * class.c, metadata.c: added a few checks to handle missing
9093 2006-02-17 Raja R Harinath <rharinath@novell.com>
9095 Use owner-less generic-params some more.
9096 * class.c (my_mono_class_from_generic_parameter): Remove.
9097 (mono_class_from_generic_parameter): Handle null image,
9098 param->name and param->owner.
9099 (mono_class_from_mono_type): Update.
9100 (mono_class_create_from_typespec): Remove 'container' parameter.
9101 If that parameter is non-null, the result is always inflated by
9102 'mono_class_get_full' anyway.
9103 (mono_class_get): Rename from _mono_class_get. Remove 'container'
9105 (mono_class_get_full): Update.
9107 * class.c (inflate_generic_type) [GENERICINST]: If the generic
9108 instance is not open, don't bother inflating.
9109 (mono_class_setup_fields): Hoist some loop-invariants. Don't
9110 parse metadata for inflated classes.
9111 (_mono_class_get): Change GenericContext* parameter to
9113 (mono_class_create_from_typespec): Likewise. Simplify, and
9114 implement trivially. All the cases are handled in
9115 mono_class_from_mono_type. Don't inflate returned class.
9116 (mono_class_get_full): Delegate GENERICINST optimization to
9117 inflate_generic_type.
9118 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
9120 2006-02-16 Dick Porter <dick@ximian.com>
9122 * socket-io.c (create_object_from_sockaddr): Fix typo.
9123 (create_sockaddr_from_object): Check array lengths before
9124 potentially accessing items off the end.
9125 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
9126 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
9127 (ves_icall_System_Net_Sockets_Socket_Send_internal)
9128 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
9129 length checks to avoid wraparound overflows.
9130 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
9131 contents of the array of sockets
9132 (hostent_to_IPHostEntry2)
9133 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
9134 Check return value of inet_ntop ().
9135 (addrinfo_to_IPHostEntry): Fix typo
9137 2006-02-16 Raja R Harinath <rharinath@novell.com>
9139 Type metadata parsing doesn't use generic-instantiation information.
9140 * metadata.c (mono_metadata_parse_array_full): Change
9141 MonoGenericContext* parameter to MonoGenericContainer*.
9142 (mono_metadata_parse_type_full): Likewise.
9143 (mono_type_create_from_typespec_full): Likewise.
9144 (mono_metadata_parse_mh_full): Likewise.
9145 (mono_metadata_parse_generic_inst): Likewise.
9146 (do_mono_metadata_parse_generic_class): Likewise.
9147 (do_mono_metadata_parse_type): Likewise.
9148 * metadata-internals.h: Update to changes.
9149 * class.c (mono_class_find_enum_basetype): Likewise.
9150 (mono_class_setup_fields): Likewise.
9151 (mono_class_create_from_typespec): Likewise.
9152 * loader.c (method_from_methodspec): Likewise.
9153 (mono_get_method_from_token): Likewise.
9154 (mono_method_get_header): Likewise.
9156 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9158 * marshal.c: handle additional GENERICINST case (patch from
9159 Thong Nguyen <tum@veridicus.com>).
9160 Fix a few cases where LDIND_I/STIND_I was used for references.
9162 2006-02-16 Raja R Harinath <rharinath@novell.com>
9164 * reflection.c (mono_reflection_get_token): Remove unused variable.
9166 2006-02-16 Martin Baulig <martin@ximian.com>
9168 * reflection.c (mono_reflection_get_token): Add support for fields
9169 in instantiated generic types.
9172 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
9174 2006-02-15 Martin Baulig <martin@ximian.com>
9177 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
9178 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
9179 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
9180 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
9182 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
9184 * class.c, metadata.c, metadata.h, object.c, icall.c,
9185 marshal.c: changed mono_type_get_underlying_type () to do
9186 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
9187 Fixed handling of instantiated generic valuetypes (bug #75479).
9189 2006-02-15 Raja R Harinath <rharinath@novell.com>
9191 * metadata.c (mono_metadata_decode_signed_value): Simplify.
9192 Delegate to mono_metadata_decode_value, and work on the returned value.
9194 * icall.c (ves_icall_MonoType_GetGenericArguments):
9195 Add consistency check here too.
9197 2006-02-15 Ankit Jain <jankit@novell.com>
9199 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
9202 2006-02-15 Ankit Jain <jankit@novell.com>
9204 * metadata.c (mono_metadata_decode_signed_value): New function to decode
9205 signed values, used only for representing lower bounds of arrays.
9206 (mono_metadata_parse_array_full): Use new
9207 mono_metadata_decode_signed_value to decode lower bounds.
9209 2006-02-14 Martin Baulig <martin@ximian.com>
9212 (mono_reflection_get_token): Support "MonoGenericMethod" and
9213 "MonoGenericCMethod" and allow generic instances / methods.
9215 2006-02-11 Zoltan Varga <vargaz@gmail.com>
9217 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
9218 to obtain the terminal size using an ioctl.
9220 * object.c (mono_nullable_init): Revert this as nullable reference
9221 types are not valid.
9222 (mono_nullable_box): Ditto.
9224 2006-02-09 Dick Porter <dick@ximian.com>
9226 * threads.c (mono_thread_detach): Drop a reference to the thread
9229 2006-02-09 Zoltan Varga <vargaz@gmail.com>
9231 * object.c (mono_nullable_init): Handle nullable reference types.
9232 (mono_nullable_box): Ditto. Fixes #77446.
9234 2006-02-07 Martin Baulig <martin@ximian.com>
9236 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
9238 2006-02-07 Ankit Jain <jankit@novell.com>
9240 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
9241 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
9242 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
9243 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
9244 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
9245 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
9247 2006-02-02 Zoltan Varga <vargaz@gmail.com>
9249 * class.c (mono_class_create_generic): Set type_token as well.
9251 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
9254 2006-02-02 Martin Baulig <martin@ximian.com>
9256 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
9257 has never been used so far.
9259 2006-02-02 Martin Baulig <martin@ximian.com>
9261 * mono-debug-debugger.h: Changed comment at the top of this file;
9262 the header is not installed, but it's safe to #include it from
9265 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
9266 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
9268 2006-02-02 Martin Baulig <martin@ximian.com>
9271 (MonoSymbolTable): Removed the `metadata_info' field.
9274 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
9276 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
9277 (mono_debugger_add_builtin_types): Removed.
9278 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
9279 (mono_debugger_create_notification_function): We now operate on a
9280 pre-allocated area; take a `gpointer' and return `void'.
9282 * mono-debug-debugger.c
9283 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
9284 (mono_debugger_add_builtin_types): Removed.
9286 2006-02-02 Martin Baulig <martin@ximian.com>
9288 * threads.c (mono_debugger_create_all_threads): New public method.
9290 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
9292 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
9293 breaks on several platforms.
9295 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
9297 * assembly.c: the VS.NET build doesn't supply default values for
9298 MONO_ASSEMBLIES and MONO_CFG_DIR.
9300 2006-02-01 Zoltan Varga <vargaz@gmail.com>
9302 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
9305 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
9307 * loader.c (method_from_memberref): Fix a warning.
9309 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
9311 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
9312 with explicit layout. Fixes #77433.
9314 2006-01-31 Zoltan Varga <vargaz@gmail.com>
9316 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
9317 max_interface_id is initialized before using it. Fixes #77398.
9318 (ves_icall_Type_GetInterfaces): Ditto.
9320 2006-01-30 Raja R Harinath <rharinath@novell.com>
9322 * metadata.c (mono_metadata_parse_method_signature_full): Don't
9323 allocate memory for parameter attributes when parsing memberref
9325 * loader.c (mono_loader_set_error_method_load): Don't warn.
9326 (method_from_memberref): Ensure MissingMethodException gets thrown
9327 if method is not found. Make warning more informative.
9329 2006-01-29 Raja R Harinath <harinath@gmail.com>
9332 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
9333 return true if is byref.
9334 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
9335 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
9336 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
9338 2006-01-27 Raja R Harinath <rharinath@novell.com>
9340 Fix tests/find-method.2.il
9341 * loader.c (find_method, find_method_in_class): Remove is_inflated
9342 argument. Revert 2006-01-18 change.
9343 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
9344 is generic, search for method in its generic definition.
9345 * class.c (mono_class_setup_vtable_general): Print generic
9346 arguments of generic types in debugging printf.
9348 2006-01-26 Zoltan Varga <vargaz@gmail.com>
9350 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
9352 * threads.c (mono_threads_request_thread_dump): New helper function.
9354 2006-01-25 Raja R Harinath <rharinath@novell.com>
9356 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
9358 2006-01-25 Ankit Jain <jankit@novell.com>
9360 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
9361 move definition to ..
9362 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
9364 2006-01-25 Ankit Jain <jankit@novell.com>
9365 Raja R Harinath <rharinath@novell.com>
9367 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
9368 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
9371 2006-01-25 Martin Baulig <martin@ximian.com>
9373 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
9374 `MonoDebuggerThread' into debug-debugger.c.
9376 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9378 * profiler.c: fix printing of data.
9380 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
9382 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
9383 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
9385 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
9387 * object.c: fix deadlock related to string interning.
9389 2006-01-23 Martin Baulig <martin@ximian.com>
9391 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
9393 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
9395 2006-01-23 Martin Baulig <martin@ximian.com>
9397 * mono-debug.h: Moved the prototypes of some functions which are
9398 used by the JIT here from mono-debug-debugger.h.
9400 2006-01-21 Martin Baulig <martin@ximian.com>
9402 * Makefile.am: Don't install mono-debug-debugger.h.
9404 2006-01-21 Martin Baulig <martin@ximian.com>
9406 * mono-debug-debugger.h: Enforce the private status of this header
9407 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
9408 Moved some stuff from mono-debugger-jit-wrapper.h here.
9410 2006-01-20 Raja R Harinath <rharinath@novell.com>
9412 * class.c (mono_class_from_typeref): Add a sanity test to help
9413 catch lack of assembly load/search hooks.
9415 2006-01-19 Zoltan Varga <vargaz@gmail.com>
9417 * marshal.c (emit_struct_conv): Relax the fields with same offset
9418 check even more. Fixes #77230.
9420 2006-01-18 Martin Baulig <martin@ximian.com>
9422 * loader.c (find_method_in_class): Added `gboolean is_inflated'
9423 argument; if false, we compare the uninstantiated signatures.
9424 (method_from_memberref): Compare the uninstantiated signatures;
9427 2006-01-18 Robert Jordan <robertj@gmx.net>
9429 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
9430 Clear the weak link. Fixes bug #77170.
9432 * gc.c (mono_gchandle_free):
9433 Reflect *-gc.c changes (tiny optimization).
9435 2006-01-18 Zoltan Varga <vargaz@gmail.com>
9437 * metadata.c (mono_metadata_signature_dup): Applied patch from
9438 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
9441 2006-01-17 Zoltan Varga <vargaz@gmail.com>
9443 * marshal.c (emit_struct_conv): Allow fields with the same offset when
9444 marshalling from native to managed code. Fixes #77230.
9446 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9448 * threadpool.c: fix problem (Mac only) when more than one asynchronous
9449 connect. Fixes bug #77020.
9451 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
9453 * class.c: fixed id assignement for nested interfaces (bug #77275).
9454 Added also better info for --print-vtable debugging.
9456 2006-01-12 Martin Baulig <martin@ximian.com>
9458 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
9459 interfaces on-the-fly; fixes #76625.
9462 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
9463 don't need that anymore.
9465 2006-01-12 Miguel de Icaza <miguel@novell.com>
9468 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
9469 To avoid initing the nested_classes when not needed I turned the
9470 PeerCredData as a toplevel internal class, as it has to be shared
9473 Fixes the CASA issue.
9475 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
9477 * domain.c: Accessors for MonoJitInfo
9479 * profiler-private.h: Add jitinfo to the end jit hook
9481 * profiler.[ch]: Define new hooks, called after jitting which give
9482 the MonoJitInfo that was compiled
9484 2006-01-10 Martin Baulig <martin@ximian.com>
9486 * class.c (mono_class_setup_events): Add support for generic
9487 classes; fixes #76440.
9489 2006-01-06 Raja R Harinath <rharinath@novell.com>
9492 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
9493 on passed-in method.
9495 2006-01-03 Zoltan Varga <vargaz@gmail.com>
9497 * object.c (mono_runtime_invoke_array): Add Nullable support.
9499 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
9501 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
9503 * file-io.c: Don't consider sockets as directory and avoid an endless
9504 loop. Fix bug #76966.
9506 2006-01-03 Zoltan Varga <vargaz@gmail.com>
9508 * object.c (mono_nullable_init): New helper function.
9509 (mono_nullable_box): Ditto.
9511 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
9513 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
9515 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
9517 2006-01-02 Zoltan Varga <vargaz@gmail.com>
9519 * class.c (mono_class_is_assignable_from): Make T assignable to
9522 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
9524 * appdomain.c: Bump corlib version to 46.
9525 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
9526 serialization purpose) and changed ves_icall_System_Reflection_
9527 Assembly_get_code_base signature to accept a boolean (to escape, or
9528 not, the assembly code base).
9530 2005-12-23 Dick Porter <dick@ximian.com>
9534 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
9535 CreateEvent icall now returns "created" boolean parameter.
9537 2005-12-22 Zoltan Varga <vargaz@gmail.com>
9539 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
9542 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
9543 when attr_klass is an interface. Fixes #77045.
9545 2005-12-20 Zoltan Varga <vargaz@gmail.com>
9547 * marshal.c (emit_struct_conv): Fix previous patch.
9549 * marshal.c (emit_struct_conv): Add a check for fields with the same
9552 2005-12-20 Raja R Harinath <rharinath@novell.com>
9554 Fix regression in Mono.C5.
9555 * class.c (mono_class_create_generic): If 'klass' is an interface
9556 set up the interface offsets.
9557 (mono_class_is_assignable_from): Don't throw away generic arguments.
9559 2005-12-19 Raja R Harinath <rharinath@novell.com>
9561 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
9564 2005-12-15 Raja R Harinath <rharinath@novell.com>
9566 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
9568 (do_mono_metadata_parse_generic_class): Don't pass the current
9569 generic context when parsing the type being instantiated: it
9570 cannot use it, anyway.
9572 * loader.c (method_from_memberref): Don't inflate a signature if
9573 it doesn't contain any type parameters.
9575 2005-12-15 Zoltan Varga <vargaz@gmail.com>
9577 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
9579 2005-12-14 Martin Baulig <martin@ximian.com>
9582 (mono_type_get_name_recurse): Don't return null for type
9583 parameters and open generic classes.
9584 (mono_class_setup_methods): Don't exclude generic instances.
9585 (mono_get_unique_iid): Use different IDs for different
9586 instantiations of the same generic type.
9587 (mono_class_setup_vtable): Only use setup_generic_vtable() for
9588 open generic instances; create a normal vtable for closed generic
9590 (mono_class_setup_vtable_general): We're now also called for
9591 closed generic instances.
9594 (mono_reflection_bind_generic_parameters): Correctly use
9595 mono_metadata_lookup_generic_inst() everywhere.
9597 2005-12-14 Zoltan Varga <vargaz@gmail.com>
9599 * object.c (mono_class_create_runtime_vtable): Call
9600 mono_class_setup_vtable ().
9602 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
9604 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
9607 * loader.c (mono_loader_set_error_type_load): Print the type load
9608 warnings to the console so they are more visible to the user.
9609 (mono_loader_set_error_method_load): Ditto.
9611 * reflection.c (ensure_runtime_vtable): Revert the last change as it
9614 * reflection.c (ensure_runtime_vtable): Fix build.
9616 * reflection.c (ensure_runtime_vtable): Disable an optimization which
9617 doesn't work in all cases.
9619 2005-12-13 Zoltan Varga <vargaz@gmail.com>
9621 * object.c (mono_array_new_full): Treat a single dimensional array
9622 with 0 lower bounds as an szarray. Fixes #76973.
9624 * reflection.c (custom_attr_visible): Really fix this.
9626 2005-12-12 Zoltan Varga <vargaz@gmail.com>
9628 * reflection.c (custom_attr_visible): Allow nested public attributes
9631 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
9634 2005-12-12 Raja R Harinath <harinath@gmail.com>
9636 * class.c (set_generic_param_owner): Delete.
9637 (mono_class_create_from_typedef): Don't set ->owner field of
9638 generic parameters to "param containers" of enclosing classes.
9639 * reflection.c (mono_reflection_initialize_generic_parameter):
9642 2005-12-11 Zoltan Varga <vargaz@gmail.com>
9644 * reflection.c (custom_attr_visible): Fix build.
9646 2005-12-10 Zoltan Varga <vargaz@gmail.com>
9648 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
9651 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
9652 handling of null parameter defaults.
9654 2005-12-09 Raja R Harinath <rharinath@novell.com>
9656 * class.c (mono_class_from_generic_parameter): Don't set
9657 klass->generic_container.
9658 (my_mono_class_from_generic_parameter): Likewise.
9660 2005-12-07 Zoltan Varga <vargaz@gmail.com>
9662 * reflection.c (load_public_key): Fix a warning.
9663 (method_encode_code): Fix unaligned accesses.
9665 2005-12-07 Martin Baulig <martin@ximian.com>
9667 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
9670 (write_generic_param_entry): Encode our custom attrs.
9672 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
9674 2005-12-07 Martin Baulig <martin@ximian.com>
9676 * reflection.c (encode_new_constraint): Removed; we don't use the
9677 `NewConstraintAttribute' anymore.
9679 2005-12-06 Zoltan Varga <vargaz@gmail.com>
9681 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
9682 not fire a TypeResolve event when Assembly.GetType () is called.
9684 2005-12-05 Ben Maurer <bmaurer@ximian.com>
9686 Beginning of support for nullable types in the runtime. Parts of
9687 this patch are from Martin.
9689 * appdomain.c (MONO_CORLIB_VERSION): Bump
9691 * domain.c (mono_init_internal): get the nullable type
9693 * class.c (mono_class_is_nullable): New method
9694 (mono_class_get_nullable_param): New mehod
9695 (mono_class_create_generic): In types T? set cast_class to T
9697 * class-internals.h (MonoDefaults): new nullable default class
9698 (mono_class_get_nullable_param, mono_class_get_nullable_param):
9701 2005-12-05 Raja R Harinath <rharinath@novell.com>
9703 * metadata.c (select_container): New. Refactor code to select the
9704 appropriate GenericContainer given the type of generic parameter
9706 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
9707 not a MonoGenericContext. Use select_container. Update parameters.
9708 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
9710 (unwrap_arrays): Remove duplicate tests.
9711 (find_generic_param): Rename from 'has_same_context'. Now walks a
9712 generic instantiated class to find any arguments that are generic
9714 (mono_type_create_from_typespec_full): Use find_generic_param to
9715 avoid evicting some generic instantiations from the typespec
9718 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
9720 * reflection.c: fixed writing of doubles on ARM FPA.
9722 2005-12-02 Robert Jordan <robertj@gmx.net>
9724 * icall.c: Fixed EventInfo.ReflectedType (#76829).
9726 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9728 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
9729 least on SUSE 10 they are not the same (on debian, they are just the
9732 2005-12-01 Raja R Harinath <rharinath@novell.com>
9734 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
9735 DeclaringType for VARs and MVARs.
9736 * class.c (set_generic_param_owner): Fix initialization of owner
9739 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
9741 * icall.c: fixed Enum.ToObject() to correctly convert the values.
9743 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9745 * threadpool.c: workaround for a bug that shows up on the Mac:
9746 select()+connect() on a blocking socket is not like it should
9747 be, so we proceed to connect() in that case, wasting the I/O
9748 threadpool thread until connect succeedes. Fixes bug #75436.
9750 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9752 * threadpool.c: fix typo when setting file descriptor states.
9754 2005-11-28 Raja R Harinath <rharinath@novell.com>
9756 * class-internals.h (MonoGenericContainer.is_signature): Remove.
9757 * metadata.c (mono_metadata_parse_method_signature_full): Don't
9758 create a temporary signature container.
9759 (mono_metadata_parse_generic_param): Update to changes.
9760 (mono_type_create_from_typespec_full): Update to changes.
9761 * loader.c (method_from_memberref): Don't use a
9762 MonoGenericContainer while parsing a memberref signature.
9763 (method_from_methodspec): Remove dead-store of the 'container'
9764 variable. It's overwritten before use.
9766 * metadata.c (mono_type_create_from_typespec_full): Make debugging
9768 (mono_metadata_parse_generic_param): Likewise.
9769 * loader.c (find_method_in_class): Does not need a
9770 MonoGenericContainer. Use 'mono_method_signature' rather than
9771 'mono_method_signature_full'.
9772 (find_method, mono_get_method_constrained, method_from_memberref):
9775 * metadata.c (mono_type_create_from_typespec_full): Ensure that
9776 owner-less generic-parameters are never evicted from the typespec
9779 * loader.c (method_from_memberref): Don't use the current context
9780 when parsing signatures.
9781 (method_from_methodspec, mono_get_method_from_token): Update to changes.
9783 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
9784 side-effects in g_assert.
9785 * loader.c (mono_get_method_from_token): Resolve klass earlier so
9786 that we don't potentially lose information.
9788 2005-11-26 Dick Porter <dick@ximian.com>
9791 * threads.c: icalls to implement basic (ie, not named)
9792 System.Threading.Semaphore.
9794 2005-11-24 Dick Porter <dick@ximian.com>
9797 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
9798 Use GetProcessId() if it's available.
9800 2005-11-23 Zoltan Varga <vargaz@gmail.com>
9802 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
9804 2005-11-23 Raja R Harinath <rharinath@novell.com>
9805 Ankit Jain <jankit@novell.com>
9807 * loader.c (mono_get_method_from_token): Initialize 'method' field
9808 of all generic parameters before parsing the signature. Remove
9809 code that "fixed"-up MVAR references.
9811 2005-11-23 Ankit Jain <jankit@novell.com>
9813 * metadata.c (mono_metadata_has_generic_params):
9814 (mono_metadata_load_generic_param_constraints):
9815 (mono_metadata_load_generic_params): Move duplicate code ...
9816 (mono_metadata_get_generic_param_row): ... here. Returns the
9817 first row-id in GenericParam table for a given owner (token).
9818 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
9821 2005-11-23 Raja R Harinath <rharinath@novell.com>
9822 Ankit Jain <jankit@novell.com>
9824 * metadata.c (mono_metadata_class_equal): Pass signature_only when
9826 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
9827 type->data.generic_param only if the type is an MVAR.
9828 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
9829 leak owner-less VARs and MVARs into managed space.
9831 2005-11-21 Martin Baulig <martin@ximian.com>
9834 (MonoMethod): Moved the `generic_container' here from
9835 `MonoMethodNormal' since we now also need it for
9836 `MonoMethodPInvoke';
9837 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
9838 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
9839 an union containing both `MonoMethodNormal' and
9840 `MonoMethodPInvoke'.
9843 (mono_get_method_from_token): Allow implementing generic methods
9847 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
9850 2005-11-17 Dick Porter <dick@ximian.com>
9854 * process.c: Split the Process Start_internal icall into
9855 ShellExecuteEx_internal and CreateProcess_internal, which are
9856 called depending on whether UseShellExecute is true. Fixes bug
9859 * appdomain.c (MONO_CORLIB_VERSION): Incremented
9861 2005-11-17 Zoltan Varga <vargaz@gmail.com>
9863 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
9864 'msize' parameters, use the information in 'mspec' instead.
9865 (emit_object_to_ptr_conv): Ditto.
9867 * marshal.c (emit_struct_conv): Handle explicit layout structs with
9868 fields out of order. Fixes #76733.
9870 2005-11-17 Ankit Jain <jankit@novell.com>
9872 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
9874 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
9876 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
9879 2005-11-16 Zoltan Varga <vargaz@gmail.com>
9881 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
9882 for types with non-auto layout. Fixes #76717.
9884 2005-11-16 Ankit Jain <jankit@novell.com>
9886 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
9887 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
9888 if generic_context is null.
9889 (mono_metadata_generic_param_equal): param->owner can be null.
9890 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
9893 2005-11-16 Zoltan Varga <vargaz@gmail.com>
9895 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
9898 2005-11-15 Martin Baulig <martin@ximian.com>
9900 * object.c (set_value): Use mono_class_from_mono_type() instead of
9901 the hack for generic instances; fixes #76136.
9903 2005-11-15 Zoltan Varga <vargaz@gmail.com>
9905 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
9908 * image.c (load_metadata_ptrs): Initialize the new fields.
9910 * reflection.c (create_dynamic_mono_image): Ditto.
9912 * reflection.c (build_compressed_metadata): Use the new fields.
9914 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
9917 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
9920 2005-11-15 Ankit Jain <jankit@novell.com>
9921 Raja R Harinath <harinath@gmail.com>
9923 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
9924 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
9925 new per-generic_container cache if the cached MonoType's context matches
9926 the current context.
9927 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
9928 to the expected context.
9929 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
9931 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
9933 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
9934 we changed the signature of an icall.
9935 * icall.c: Modify to mono_double_ParseImpl return true/false
9936 depending on the success, instead of throwing the exception. This will
9937 help us in Double.TryParse methods.
9939 2005-11-14 Zoltan Varga <vargaz@gmail.com>
9941 * marshal.c (emit_marshal_object): Throw an exception when
9942 marshalling 'object' instead of crashing. Fixes #76696.
9944 2005-11-11 Zoltan Varga <vargaz@gmail.com>
9946 * class-internals.h: Add prototype for mono_type_get_full_name ().
9948 2005-11-11 Dick Porter <dick@ximian.com>
9950 * threads.c (mono_thread_manage): Make sure the main thread has
9951 abandoned all its mutexes when cleaning up. Fixes bug 74680.
9953 2005-11-11 Zoltan Varga <vargaz@gmail.com>
9955 * loader.c (mono_loader_set_error_type_load): Log a warning to the
9956 console about the missing type.
9957 (mono_loader_set_error_method_load): Ditto.
9959 2005-11-09 Miguel de Icaza <miguel@novell.com>
9961 * mono-config.c (mono_get_config_dir): Set the system defaults if
9964 * assembly.c (mono_set_dirs): New API entry point to set the
9965 assembly and the config directory in one call
9967 2005-11-09 Zoltan Varga <vargaz@gmail.com>
9969 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
9970 the ftnptr was created from a delegate in a domain other than the
9971 current domain. Fixes #75377.
9973 * exception.h exception.c: Add mono_get_exception_not_supported ().
9975 2005-11-08 Martin Baulig <martin@ximian.com>
9977 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
9979 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
9981 * security-manager.h: Added definitions to deal with strongname key
9982 pairs bigger (and smaller) than 1024 bits.
9983 * reflection.c: Remove hardcoded strongname size (128 bytes) and
9984 adjust wrt the public key length being used.
9986 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
9988 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
9989 Windows build (r51396-51397).
9991 2005-11-03 Martin Baulig <martin@ximian.com>
9993 * class.c (mono_class_setup_vtable_general): Also add generic
9994 methods to the vtable; fixes #76581.
9996 2005-11-01 Miguel de Icaza <miguel@novell.com>
9998 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
9999 sure that we lookup GetString method from the System.Text.Encoding
10000 class, not the derived class or we get an empty method.
10002 Fixed class #76612.
10004 2005-10-25 Miguel de Icaza <miguel@novell.com>
10006 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
10007 if it has been previously set (embedders).
10009 Make mono_set_rootdir available also on Unix.
10011 005-10-24 Robert Jordan <robertj@gmx.net>
10013 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
10015 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
10017 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
10018 only calls which are made to native code use this flag.
10020 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
10022 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
10024 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
10025 Add support for FieldBuilders.
10027 2005-10-29 Martin Baulig <martin@ximian.com>
10030 (mono_debug_using_mono_debugger): New public method; returns
10031 whether we're running inside the debugger.
10033 2005-10-27 Zoltan Varga <vargaz@gmail.com>
10035 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
10036 for Method/Constructor/FieldBuilders.
10038 2005-10-26 Zoltan Varga <vargaz@gmail.com>
10040 * reflection.c (module_add_cattrs): Save custom attributes for global methods
10041 and fields as well.
10043 2005-10-26 Martin Baulig <martin@ximian.com>
10045 * mono-debug-debugger.c
10046 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
10048 2005-10-24 Raja R Harinath <harinath@gmail.com>
10050 * icall.c (base64_to_byte_array): Don't pass an out-of-range
10051 integer to isspace.
10053 2005-10-21 Zoltan Varga <vargaz@gmail.com>
10055 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
10056 when passing valuetypes byref. Fixes #76502.
10058 2005-10-19 Jackson Harper <jackson@ximian.com>
10060 * profiler.c: Don't put a . in front of types that are not in a
10063 2005-10-18 Zoltan Varga <vargaz@gmail.com>
10065 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
10067 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
10069 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
10071 (mono_marshal_get_ldflda_wrapper): Fix a warning.
10073 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
10075 * assembly.c metadata-internals.h icall.c: Define an additional
10076 parameter for mono_assembly_name_parse_full, so we can avoid creating
10077 S.R.AssemblyName.Version when no version info wasn't passed.
10079 2005-10-09 Miguel de Icaza <miguel@novell.com>
10081 * class.c (mono_type_get_full_name): Reimplement method that was
10084 * image.c: Some docs
10086 2005-10-10 Zoltan Varga <vargaz@gmail.com>
10088 * profiler.c (output_newobj_profile): Fix printing of Total memory
10091 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
10093 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
10095 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
10097 * threads.c: remove debug output.
10099 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
10101 * threads.c (mono_thread_manage): Fix crashes if more than 64
10102 threads need to be aborted. Hopefully fixes #75899.
10104 * assembly.c (mono_stringify_assembly_name): New helper function.
10106 * class.c: Use mono_stringify_assembly_name instead of the similar
10109 * assembly.h assembly.c: Add support for calling a postload search
10110 hook if an assembly cannot be loaded.
10112 * appdomain.c: Register new search hooks which call the AssemblyResolve
10113 events in AppDomain. Fixes #75231
10115 2005-10-07 Martin Baulig <martin@ximian.com>
10117 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
10118 methods without debug info.
10120 2005-10-07 Zoltan Varga <vargaz@gmail.com>
10122 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
10125 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10127 * file-io.c: now that we return symlinks, use lstat and, when the file
10128 is a symbolic link, stat, to get the file attributes. Also avoid the
10129 conversion to/from utf16/external.
10131 2005-10-06 Zoltan Varga <vargaz@gmail.com>
10133 * class.c (mono_class_layout_fields): Compute klass->has_references
10134 correctly if an embedded valuetype is not yet initialized. Fixes
10137 2005-10-04 Martin Baulig <martin@ximian.com>
10140 (mono_metadata_load_generic_param_constraints): New public
10141 function; splitted the constraints loading out from
10142 mono_metadata_load_generic_params().
10144 * class.c (mono_class_create_from_typedef): Call
10145 mono_metadata_load_generic_param_constraints() after setting up
10146 the type and creating our parent; fixes #75329.
10148 2005-10-04 Martin Baulig <martin@ximian.com>
10150 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
10151 non-dynamic parent classes.
10153 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
10155 * file-io.c : win32 build fix (ETXTBSY seems not found).
10157 2005-10-04 Martin Baulig <martin@ximian.com>
10160 (mono_image_get_methodspec_token): Make the cache actually work;
10163 2005-10-04 Martin Baulig <martin@ximian.com>
10165 * class.c (mono_class_name_from_token): Removed the unneccessary
10166 `MonoGenericContext *' argument.
10168 2005-10-04 Martin Baulig <martin@ximian.com>
10171 (method_from_methodspec): Make the caching work again; fixes the
10172 performance regression from #76262.
10174 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10178 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
10179 GetFileSystemEntries that performs the same work but without going
10180 into io-layer, locking, etc.
10182 2005-09-30 Zoltan Varga <vargaz@gmail.com>
10184 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
10185 ThreadState_Stopped as well. Fixes #76047.
10187 2005-09-29 Martin Baulig <martin@ximian.com>
10190 (inflate_generic_context): If the new context has a `gmethod', set
10191 its `container' that that gmethod's `container'.
10194 (mono_metadata_parse_generic_param): Simplify things;
10195 `generic_container = generic_context->container;' is just fine.
10197 * loader.c (method_from_methodspec): Code cleanups.
10199 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
10201 * decimal.c: fix warning (and let gcc generate correct
10202 code on ARM with optimizations).
10204 2005-09-28 Martin Baulig <martin@ximian.com>
10207 (method_from_memberref): Added `MonoGenericContext *class_context'
10208 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
10209 (method_from_methodspec): If we're a memberref, use the enclosing
10210 context when parsing its parent. Fixes #76262; see gtest-206.cs.
10212 2005-09-28 Martin Baulig <martin@ximian.com>
10214 * object.c (mono_runtime_invoke_array): Added support for
10215 MONO_TYPE_GENERICINST; fixes #75917.
10217 2005-09-27 Martin Baulig <martin@ximian.com>
10219 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
10220 `k->byval_arg.type' to determine the actual type.
10222 * loader.c (method_from_methodspec): Removed some hacks.
10224 2005-09-27 Ben Maurer <bmaurer@ximian.com>
10226 * class-internals.h (mono_field_is_deleted): Do the test for
10227 rtspecialname before we check the actual name of the field. This
10228 prevents us from dereferencing a pointer into the string table,
10229 saving us from accessing a few pages
10231 * *.c: Replace the use of {Enter,Leave}CriticalSection with
10232 macros. This will allow a deadlock debugger to easily be plugged
10235 2005-09-27 Martin Baulig <martin@ximian.com>
10237 * loader.c (method_from_methodspec): Create a "signature"
10238 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
10240 2005-09-27 Martin Baulig <martin@ximian.com>
10243 (inflate_generic_class): Correctly set the new context's
10247 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
10248 instead of a `MonoGenericContext *'.
10249 (mono_method_signature_full): Take a `MonoGenericContainer *'
10250 instead of a `MonoGenericContext *'.
10253 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
10254 instead of a `MonoGenericContext *'.
10255 (mono_metadata_parse_method_signature_full): Likewise.
10257 2005-09-26 Martin Baulig <martin@ximian.com>
10260 (mono_class_from_generic_parameter): Set `klass->generic_container'
10261 (mono_class_from_generic_parameter): Likewise.
10262 (mono_bounded_array_class_get): We inherit the generic container
10263 from the element class.
10266 (find_method, find_method_in_class): Take a `MonoGenericContext *'
10267 argument rather than computing it here.
10268 (method_from_memberref): Correctly set the generic context before
10269 parsing the signature. Fixes #75681.
10271 2005-09-26 Zoltan Varga <vargaz@gmail.com>
10273 * object.c (mono_class_has_special_static_fields): Fix warnings.
10275 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
10277 * assembly.c: Add parse_public_key function, to
10278 par the public keys. Also added mono_assembly_name_parse_full,
10279 to define it the parsed key should be freed or not.
10280 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
10281 to parse a long format assembly name.
10282 * metadata-internals.h: Keep mono_assembly_name_parse_full as
10283 private, since calling it to preserve the key requires
10284 freeing it manually.
10286 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
10288 * locales.c : removed HAVE_ICU part.
10290 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
10292 * object.c (mono_class_create_runtime_vtable): Avoid calling
10293 field_is_special_static if the klass has no special static fields.
10295 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
10296 (MonoCachedClassInfo): Likewise.
10298 * object.c (mono_class_has_special_static_fields): New helper function.
10300 2005-09-23 Zoltan Varga <vargaz@gmail.com>
10302 * class.c (mono_class_create_from_typedef): Don't call
10303 interfaces_from_typedef_full for enums.
10304 (mono_class_create_from_typedef): Compute the base types of enums directly
10305 without calling mono_class_setup_fields ().
10306 (mono_class_find_enum_basetype): New helper function.
10308 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
10309 one place inside the string heap.
10311 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
10313 * class.c: locking fixes, code cleanups, some docs added.
10314 Allocate some data structures in the image mempool.
10316 2005-09-23 Zoltan Varga <vargaz@gmail.com>
10318 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
10321 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
10323 * class-internals.h, class.c, reflection.c: reduce memory taken by
10326 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
10328 * metadata.c, metadata.h, loader.h: documentation updates, code and
10331 2005-09-23 Zoltan Varga <vargaz@gmail.com>
10333 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
10336 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
10337 page faults caused by the runtime while reading metadata.
10339 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10341 * socket-io.c: the field names were changed 3 months ago and no one
10342 realized until bug #76077 got filed!
10344 2005-09-20 Martin Baulig <martin@ximian.com>
10346 * icall.c (assembly_icalls): Removed some unused debugger icalls.
10348 2005-09-20 Martin Baulig <martin@ximian.com>
10350 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
10351 write the rank into the class entry.
10353 2005-09-20 Martin Baulig <martin@ximian.com>
10355 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
10357 2005-09-19 Zoltan Varga <vargaz@gmail.com>
10359 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10361 * icall.c (custom_attrs_defined_internal): New icall.
10363 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
10365 (mono_custom_attrs_construct_by_type): New helper function.
10367 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
10369 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
10370 terminate the resulting string. Fixes #76123.
10372 2005-09-16 Martin Baulig <martin@ximian.com>
10375 (mono_debug_add_method): Ignore inflated methods for the moment.
10377 2005-09-14 Martin Baulig <martin@ximian.com>
10379 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
10381 2005-09-13 Zoltan Varga <vargaz@gmail.com>
10383 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
10384 return a success/failure indication.
10385 (mono_metadata_interfaces_from_typedef_full): Ditto.
10386 (get_constraints): Ditto.
10388 2005-09-12 Zoltan Varga <vargaz@gmail.com>
10390 * marshal.c (emit_marshal_array): Fix handling of null arrays.
10392 * marshal.c (emit_marshal_array): Add support for returning string
10393 arrays from delegates. Fixes #76063.
10395 * marshal.c: Use the emit_ldloc/stloc macros where possible.
10397 2005-09-11 Zoltan Varga <vargaz@gmail.com>
10399 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
10402 2005-09-09 Zoltan Varga <vargaz@gmail.com>
10404 * reflection.c icall.c: Fix after mono_get_exception_type_load
10407 * assembly.c (mono_assembly_get_assemblyref): New helper function.
10408 (mono_assembly_load_reference): Use the new helper.
10410 * class-internals.h (MonoLoaderError): New structure containing
10411 information about type loading errors.
10413 * class-internals.h loader.c: Add APIs to store per-thread loader
10416 * loader.c class.c: Set the loader error if needed.
10418 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
10420 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
10422 * decimal.c: fixed to handle the broken ARM fp format.
10424 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
10426 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
10429 2005-09-06 Martin Baulig <martin@ximian.com>
10431 * domain.c (supported_runtimes): Added v2.0.50727.
10433 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
10435 * culture-info.h: reduce the size of some structures.
10437 2005-09-05 Martin Baulig <martin@ximian.com>
10439 Reflect latest API changes in the August CTP.
10442 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
10443 ("MonoType.HasGenericArguments"): Removed.
10444 ("MonoMethod.BindGenericParameters"): Renamed to
10445 "MakeGenericMethod".
10446 ("MethodBuilder.BindGenericParameters"): Renamed to
10447 "MakeGenericMethod".
10449 2005-09-05 Martin Baulig <martin@ximian.com>
10451 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
10453 2005-09-05 Martin Baulig <martin@ximian.com>
10455 Applying a patch from Michal Moskal <malekith@nemerle.org>.
10457 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
10458 generic_container is non-NULL.
10460 2005-09-05 Martin Baulig <martin@ximian.com>
10462 Applying a patch from Michal Moskal <malekith@nemerle.org>.
10464 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
10466 2005-08-29 Michal Moskal <malekith@nemerle.org>
10468 * reflection.c (encode_locals,
10469 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
10470 for large generic types.
10472 2005-09-05 Martin Baulig <martin@ximian.com>
10474 Applying a patch from Michal Moskal <malekith@nemerle.org>.
10476 * class.c (mono_dup_array_type): New public method.
10477 (mono_metadata_signature_deep_dup): New public method.
10478 (dup_type): Correctly duplicate array and function types.
10480 2005-09-05 Martin Baulig <martin@ximian.com>
10482 Applying a patch from Michal Moskal <malekith@nemerle.org>.
10484 * reflection.c (get_default_param_value_blobs): Handle generic types
10485 and generic methods.
10487 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
10489 * class.c: Fixed error reporting (method/class were inversed) for
10490 inheritance demands.
10491 * security-manager.c|h: Added the AppDomain when calling the managed
10492 System.Security.SecurityManager.InheritanceDemand method.
10494 2005-09-01 Raja R Harinath <rharinath@novell.com>
10496 * reflection.c (encode_marshal_blob): 'marshaltype' and
10497 'marshaltyperef' are alternate sources for the custom marshaler
10500 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
10502 * class.c: fix creation of array classes with rank == 1
10503 (patch by Ankit Jain <jankit@novell.com>).
10505 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
10507 * object.c: fix check for creating the bound data for arrays vs
10510 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10512 * object.c: configuration file name is now based on the executable name,
10513 not the image name. Fixes bug #75931.
10515 2005-08-29 Zoltan Varga <vargaz@gmail.com>
10517 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
10518 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
10520 2005-08-25 Zoltan Varga <vargaz@gmail.com>
10522 * rand.c: Use wincrypt.h instead of WinCrypt.h.
10524 2005-08-24 Ankit Jain <jankit@novell.com>
10525 Raja R Harinath <rharinath@novell.com>
10527 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
10528 called by it recursively.
10529 (mono_class_init): Remove special case in pending_init handling, since it's
10530 superseded by the fix to mono_class_from_typeref.
10532 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
10534 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
10535 BROKEN_THREAD_START stuff.
10537 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
10539 * class-internals.h object.c: Add a new kind of trampoline called a delegate
10542 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
10544 * object.c (mono_delegate_ctor): Replace the original function address with
10545 a delegate trampoline.
10547 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
10549 * icall.c: add boolean argument to base64_to_byte_array and
10550 InternalFromBase64String to control whether a whitespace-only string
10551 is allowed (or should casue a FormatException to be thrown). We need
10552 this as the behavior has changed between MS.NET 1.x and 2.0, and we
10553 to match the MS behaviour in both profiles.
10554 * appdomain.c: Bump corlib version.
10556 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
10558 This patch implements a big portion of publisher policy
10559 support, used to bind assembly versions and redirect
10560 one assembly from version A to version B.
10563 New GSList loaded_assembly_bindings, for storing the cached
10565 (assembly_binding_maps_name): New static function for checking if a
10566 assembly binding information maps an assembly name.
10567 (mono_assembly_binding_info_free): New function for freeing
10568 assembly binding information resources.
10569 (get_publisher_policy_info): New static function for retrieving
10570 assembly binding information from a MonoImage.
10571 (compare_versions): New static function for comparing an assembly
10572 binding information data and the version of an assembly name.
10573 (check_policy_versions): New static function for checking if an
10574 assembly binding info mapping an assembly name is valid for it.
10575 (mono_assembly_load_publisher_policy): New static function for
10576 loading the 'policy.major.minor.MyAssembly' image for an assembly
10577 with an assembly name 'aname'.
10578 (mono_assembly_bind_version): New static function for updating
10579 assembly redirection.
10580 (mono_assembly_apply_binding): New static function for applying
10582 (search_binding_loaded): New static function for searching
10583 loaded assembly binding infos in the cache domain.
10584 (mono_assembly_load_full): Don't apply assembly binding for
10585 reflection only assemblies.
10587 * metadata-internals.h: Add MonoAssemblyBindingInfo,
10588 which contains information about assembly binding. Also
10589 declare signature for mono_config_parse_publisher_policy ()
10590 function, used to retrieve pub policy info.
10593 (publisher_policy_start): New static function used to parse publisher
10594 policy config files.
10595 (publisher_policy_parser): New static MonoParseHandler containing
10596 the functions used when parsing config files.
10597 (mono_config_parse_publisher_policy): New function for parsing
10598 publisher policy files.
10600 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
10602 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
10604 * marshal.c (mono_delegate_free_ftnptr): Ditto.
10606 * object.c (mono_get_addr_from_ftnptr): New helper function.
10608 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
10610 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10612 2005-08-19 Dick Porter <dick@ximian.com>
10614 * threads.c, threads.h, appdomain.c, appdomain.h,
10615 profiler-private.h, monitor.c, object.c, object-internals.h,
10616 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
10617 store the thread ID, so it can hold a 64 bit value if needed.
10619 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
10621 * reflection.c (mono_reflection_create_dynamic_method): Store the
10622 handle class into the method references as well so ldtoken works in
10625 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
10628 2005-08-19 Ankit Jain <jankit@novell.com>
10631 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
10632 here rather than using the method signature of a arbitrary function
10633 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
10635 Hack done with Harinath.
10637 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10639 * threadpool.c: disable printing stack traces when we get a exception
10640 in a threadpool thread. I need to do more testing to figure out which
10641 cases actually print this. Fixes bug #75828.
10643 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10645 * icall.c: there might be ignored whitespace after the last '='. This
10646 fixes length computation and bug #75840.
10648 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
10650 * assembly.c (mono_assembly_load_full): Consider .exe extension as
10651 well. Fixes #75809.
10653 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
10656 * reflection.c (create_custom_attr_data): Ditto.
10658 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
10660 * locales.c, culture-info.h : removed RegionLCIDMap.
10661 * culture-info-tables.h : regenerated.
10663 2005-08-16 Martin Baulig <martin@ximian.com>
10665 * class.c (mono_type_get_name_recurse): Small fix.
10667 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
10669 * locales.c : indentation fixie.
10671 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
10673 * object-internals.h,
10677 icall.c : added RegionInfo table support.
10678 * culture-info-table.h : regenerated for region support.
10680 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
10682 * reflection.c (resolve_object): handle all kinds of MonoMethod
10683 including generic ones
10685 2005-08-12 Ankit Jain <jankit@novell.com>
10687 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
10688 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
10690 2005-09-12 Lluis Sanchez <lluis@ximian.com>
10692 * process.c: Don't close a thread handle when it's NULL. This is a
10693 workaround for bug #75733.
10695 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
10697 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
10699 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
10701 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
10703 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10705 * threadpool.c: if a work item in the thread pool has a callback that
10706 catches a exception, don't propagate it after invoking the callback.
10709 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
10711 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
10713 * class-internals.h (MonoCachedClassInfo): Add some new fields.
10715 * class.c (mono_class_init): Load field info lazily in the AOT case.
10717 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
10719 2005-08-03 Ankit Jain <jankit@novell.com>
10722 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
10723 PInvoke calling convention is 0.
10725 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
10727 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
10728 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
10730 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
10732 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
10733 to handle threads not started by the GC (patch by Michael Meeks
10734 <michael.meeks@novell.com>).
10736 2005-07-31 Kamil Skalski <nazgul@omega.pl>
10738 * reflection.c: Make buffer used in emitting types larger for some
10739 big generic types (patch by Michal Moskal).
10741 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
10743 * mono-debug.c: Fix some (not all) alignment problems.
10745 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
10747 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
10748 Invoke mono_image_load_from_data_full passing the refonly
10752 (mono_assembly_open_from_bundle): Add the refonly argument,
10753 in order to pass it to other methods it calls to.
10754 (do_mono_assembly_open): Add the refonly argument, in order
10755 to pass it to other methods it calls to.
10756 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
10757 the refonly parameter to it.
10759 * image.c: Add loaded_images_refonly_hash and
10760 loaded_images_refonly_guid_hash to cache the reflection
10761 only loaded images.
10762 (mono_images_init): Initialize the hash tables used for
10763 caching the reflection only images.
10764 (load_modules): Invoke mono_image_open_full passing the refonly
10765 parameter to load the modules the correct way.
10766 (build_guid_table): Add the refonly argument, to re-build the
10767 correct hash table.
10768 (do_mono_image_open): Added the refonly argument, in order to
10769 define it for the loaded image.
10770 (mono_image_loaded_full): New function, which receives an
10771 additional parameter to look for the image in the refonly or
10772 non-refonly section.
10773 (mono_image_loaded): Updated, using mono_image_loaded_full.
10774 (mono_image_loaded_by_guid_full): The same case that happens
10775 with mono_image_loaded_full.
10776 (mono_image_loaded_by_guid): Likewise.
10777 (register_image): Use the ref_only variable inside MonoImage
10778 to decide in which hash table store the current image.
10779 (mono_image_open_from_data_full): Rename
10780 mono_image_open_from_data to mono_image_open_from_data_full,
10781 adding the refonly argument, to define the ref_only variable
10783 (mono_image_open_from_data): Return
10784 mono_image_open_from_data_full.
10785 (mono_image_open_full): Rename mono_image_open to
10786 mono_image_open_full, receiving the new refonly argument,
10787 to pass it to inner methods.
10788 (mono_pe_file_open): Update this function, to open
10789 a MonoImage as a non-refonly image.
10790 (mono_image_close): Use the refonly variable inside
10791 MonoImage to remove the image from the correct caches.
10793 * image.h: Add the signatures of mono_image_open_full,
10794 mono_image_open_from_data_full, mono_image_loaded_full,
10795 mono_image_loaded_by_guid_full.
10797 * metadata-internals.h: Add the ref_only field to
10800 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
10802 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
10803 Fix the last behavior, which used to load the assemblies and
10804 extract MonoReflectionAssemblyName information, instead of
10805 extract it from the metadata tables. Needed for Reflection
10808 2005-07-29 Martin Baulig <martin@ximian.com>
10810 * mono-debug-debugger.c
10811 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
10815 (mono_debug_address_from_il_offset): Check whether we have
10816 debugging support before attempting to take the lock.
10817 (mono_debug_source_location_from_address): Likewise.
10818 (mono_debug_source_location_from_il_offset): Likewise.
10819 (mono_debug_il_offset_from_address): Likewise.
10820 (mono_debug_address_from_il_offset): Likewise.
10822 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
10824 * class.c (mono_class_from_name_case): Add support for dynamic images.
10827 * object.c (mono_class_compute_gc_descriptor): Add a workaround
10830 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
10832 * reflection.c (mono_method_get_object): Fix warning.
10834 2005-07-28 Martin Baulig <martin@ximian.com>
10837 (mono_debug_add_wrapper): Also write the wrapper type.
10839 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
10841 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
10843 * class.c (mono_class_init): Avoid reading nested classes if the AOT
10844 data indicates the class has none.
10846 2005-07-26 Ben Maurer <bmaurer@ximian.com>
10848 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
10849 loader lock with the debugger lock. Prevents deadlocks for beagle.
10851 Beagle can now run on an smp box for a weekend without any
10854 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
10856 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
10857 in a module. Fixes #75629.
10859 2005-07-26 Martin Baulig <martin@ximian.com>
10861 * mono-debug.c (mono_debug_add_wrapper): New static method.
10862 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
10863 interncall or a wrapper.
10865 * mono-debug.h (MonoDebugWrapperData): New public typedef.
10866 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
10867 (MONO_DEBUGGER_VERSION): Bump to 51.
10869 * mono-debug-debugger.c
10870 (mono_debugger_add_type): Removed this empty function.
10871 (mono_debugger_add_method): Likewise.
10873 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
10875 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
10876 before accessing method->slot.
10878 2005-07-21 Jb Evain <jbevain@gmail.com>
10880 * reflection.c (method_encode_clauses/class): Handle filters clauses.
10883 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
10885 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
10888 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
10890 * image.h image.c: Add mono_image_get_guid () API function.
10892 2005-07-19 Ben Maurer <bmaurer@ximian.com>
10894 There were issues when multiple threads tried to load
10895 assemblies. A deadlock was created between assemblies_mutex and
10896 mono_domain_assemblies_lock. This fixes the issue by making the
10897 assembly ref counting be lock free. See bug 75586.
10899 * image.c (mono_image_close): The add ref function here was using
10900 Interlocked operations while the unref was using a mutex and a
10901 --. I don't think this was ever a bug that would be exposed in a
10902 non-pendantic way (ie, by an embedder doing a ref on one thread
10903 and an unref on another), but for the sake of correctness, this is
10906 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
10907 (mono_assembly_load_reference): Call mono_assembly_addref rather
10908 than touching the refcount ourselves.
10909 (mono_assembly_close): Use InterlockedDecrement to unref the
10910 assembly. Don't acquire the lock unless it is actually needed.
10912 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
10914 * class.c (mono_class_layout_fields): Fix calculation of has_references
10917 2005-07-12 Martin Baulig <martin@ximian.com>
10919 Applying a patch from Michal Moskal <malekith@nemerle.org>.
10922 (mono_type_hash): Provide better hashing for generic instances.
10923 (mono_generic_inst_hash): Improve hashing.
10924 (mono_generic_class_hash): Likewise.
10926 * reflection.c (mymono_metadata_type_hash): Improve hashing for
10929 2005-07-12 Martin Baulig <martin@ximian.com>
10931 * reflection.c (mono_reflection_create_runtime_class): Remove the
10932 hack for generic type definitions and non-`Run' assemblies.
10933 (mono_reflection_bind_generic_parameters): Also use
10934 `klass->wastypebuilder' to check for TypeBuilders.
10936 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
10938 * class.c (mono_class_layout_fields): Fix calculation of has_references
10941 * class.c (inflate_generic_class): Fix a leak.
10942 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
10945 2005-07-11 Martin Baulig <martin@ximian.com>
10947 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
10950 2005-07-11 Martin Baulig <martin@ximian.com>
10952 * loader.c (find_method): Also lookup in
10953 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
10955 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
10957 * appdomain.c (mono_domain_unload): Don't free the error message
10958 before passing it to mono_get_exception_...
10960 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
10962 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
10964 * threads.c: try to better guess an available RT signal (bug #75387).
10966 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
10968 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
10971 2005-07-07 Martin Baulig <martin@ximian.com>
10973 * class.c (mono_type_get_name_full): Return NULL for
10974 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
10977 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
10979 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
10980 exit the appdomain as well being aborted.
10982 * threadpool.c: Create all threadpool threads inside the root appdomain, and
10983 change back to the root domain after calling managed code. This enables
10984 appdomains using threadpools to be unloaded.
10986 2005-07-07 Martin Baulig <martin@ximian.com>
10988 * class-internals.h
10989 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
10990 into `MonoDynamicGenericClass' since we only need it for dynamic
10993 * reflection.c (mono_class_bind_generic_parameters): We don't need
10994 to compute the `parent' here.
10996 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
10998 * culture-info-table.h : regenerated.
11000 2005-07-06 Martin Baulig <martin@ximian.com>
11003 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
11005 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
11007 2005-07-06 Martin Baulig <martin@ximian.com>
11009 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
11010 we're doing a signature-only comparision; fixes #74945.
11012 2005-07-06 Martin Baulig <martin@ximian.com>
11014 * class-internals.h (MonoGenericClass): Moved some things out into
11015 a new `MonoInflatedGenericClass' type.
11016 (MonoInflatedGenericClass): New type; the `klass' of a
11017 `MonoGenericClass' is now computed lazyly in
11018 mono_get_inflated_generic_class().
11020 * class.c (mono_get_inflated_generic_class): New public function.
11021 (mono_class_inflate_generic_method): Removed the unused
11022 `MonoClass *' argument.
11023 (setup_generic_vtable): Don't call mono_get_inflated_method() on
11025 (mono_class_create_generic): Make this static and merge it with
11026 mono_class_create_generic_2(); we're now called automatically from
11027 mono_get_inflated_generic_class().
11029 * loader.c (mono_method_signature): Call
11030 mono_get_inflated_method() here.
11032 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
11034 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
11035 type of fields with RVA.
11037 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
11038 for this pseudo class.
11039 (my_mono_class_from_generic_parameter): Likewise.
11040 (mono_class_init): Allow interfaces to have cctors.
11042 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
11044 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
11045 lazily for AOT methods.
11047 2005-07-05 Martin Baulig <martin@ximian.com>
11049 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
11050 returns FALSE for a successful match, not TRUE.
11052 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
11054 * loader.c (mono_method_get_index): Optimize this a bit.
11056 2005-07-04 Martin Baulig <martin@ximian.com>
11059 (class_compute_field_layout): Move the check for generic type
11060 definitions into mono_class_layout_fields(). Fixes #74684.
11061 (mono_class_from_generic_parameter): Correctly compute
11062 `klass->parent'; fixes #75457.
11064 * reflection.c (register_assembly, register_module): Make sure
11065 `domain->rejobject_hash' is already created.
11067 2005-07-02 Martin Baulig <martin@ximian.com>
11069 * class-internals.h
11070 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
11071 `MonoDynamicGenericClass'.
11073 2005-07-01 Lluis Sanchez <lluis@ximian.com>
11075 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
11076 returned by a field getter is null, since null is a valid value.
11078 2005-07-01 Martin Baulig <martin@ximian.com>
11080 * reflection.c (mono_reflection_generic_class_initialize): Update
11081 the `dgclass->fields [i].parent' to the correct class.
11082 (mono_image_get_fieldref_token): Use the declaring type, not the
11085 2005-07-01 Martin Baulig <martin@ximian.com>
11087 * loader.c (find_method): Also look in the interfaces; fixes #75429.
11089 2005-06-30 Ben Maurer <bmaurer@ximian.com>
11091 * threads.c (thread_cleanup): assert that thread != NULL
11092 (wait_for_tids_or_state_change): We were using the wrong variable
11093 when accessing wait->threads. `i' was always out of the bounds of
11096 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11098 * loader.c: map user32 and kernel32 to libMonoSupportW
11100 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
11102 * appdomain.c (unload_thread_main): Mark this as WINAPI.
11104 2005-06-28 Martin Baulig <martin@ximian.com>
11106 * loader.c (method_from_methodspec): Fix #75334.
11108 2005-06-28 Martin Baulig <martin@ximian.com>
11110 Fix #74953 - Arrays now implement the generic IList<T> interface
11111 on the 2.0 platform.
11113 * class-internals.h (MonoDefaults): Added `generic_array_class'.
11115 * reflection.c (mono_class_bind_generic_parameters): New public
11116 function; similar to mono_reflection_bind_generic_parameters(),
11117 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
11119 * domain.c (mono_init_internal): Try to initialize.
11120 `mono_defaults.generic_array_class' here; this'll only succeed if
11121 we're using the 2.0 corlib.
11124 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
11125 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
11126 (mono_lookup_internal_call): Added support for nested classes.
11129 (mono_get_method_from_token): Set `result->signature->pinvoke' if
11130 we're an interncall and have generic arguments.
11133 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
11134 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
11135 instance of System.Array.InternalArray<T> for arrays, so they
11136 implement the generic IList<T> interface.
11138 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
11140 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
11141 (chastamar@yahoo.com). Fixes #75374.
11143 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
11145 * culture-info-table.h: regenerated.
11147 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11149 * icall.c: handle spaces correctly for base64 strings.
11151 2005-06-26 Ben Maurer <bmaurer@ximian.com>
11153 * *.c: Kill some warnings.
11155 2005-06-23 Duncan Mak <duncan@novell.com>
11157 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
11158 that this builds on Solaris 10 (x86).
11160 2005-06-23 Martin Baulig <martin@ximian.com>
11163 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
11164 generic type definitions.
11166 2005-06-23 Martin Baulig <martin@ximian.com>
11170 * metadata.c (mono_class_get_overrides): Renamed to
11171 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
11172 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
11173 pass it to mono_get_method_full().
11175 2005-06-22 Ben Maurer <bmaurer@ximian.com>
11177 * reflection.c (mono_reflection_create_runtime_class): take the
11178 mono_domain_lock in this method. Prevents deadlocks
11180 2005-06-22 Martin Baulig <martin@ximian.com>
11182 * loader.c (method_from_methodspec): Fix #75330.
11184 2005-06-22 Martin Baulig <martin@ximian.com>
11186 * reflection.c (type_get_qualified_name): Use
11187 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
11188 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
11189 argument; use it if we don't have an assembly name.
11191 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
11193 * object.c: In mono_message_init, set "copy out" flag for in
11194 parameters with the [Out] flag.
11196 2005-06-21 Martin Baulig <martin@ximian.com>
11199 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
11202 2005-06-21 Martin Baulig <martin@ximian.com>
11204 * class.c (mono_class_init): Don't initialize `class->fields' for
11205 generic instances since they're initialized again in
11206 compute_field_layout().
11207 (compute_field_layout): Set the field's `generic_info' here; fix
11210 2005-06-21 Martin Baulig <martin@ximian.com>
11212 * class-internals.h
11213 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
11215 * metadata.c (mono_metadata_generic_method_equal): Also
11216 distinguish the `generic_class'; fixes #75334.
11218 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11222 * domain-internals.h:
11223 * reflection.c: 'domain_assemblies' field is now protected by its own
11224 lock. Don't call into managed code to run the AssemblyLoad event if we
11225 now there are no registered delegates for it.
11227 2005-06-20 Martin Baulig <martin@ximian.com>
11229 * class.c (mono_class_is_assignable_from): Use a custom version of
11230 mono_class_has_parent() to make things work for generic instances;
11233 2005-06-20 Martin Baulig <martin@ximian.com>
11235 * loader.c (method_from_methodspec): Apply a patch from
11236 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
11238 2005-06-20 Martin Baulig <martin@ximian.com>
11240 * class.c (mono_class_init): Reverted Zoltan's last change; it
11243 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
11245 * threads.c (wait_for_tids_or_state_change): Add missing locking.
11247 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11249 * socket-io.c: fix the index in the socket array for writable/error
11250 sockets. Fixes bug #75306.
11252 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
11254 * class.c (mono_class_init): Allow interfaces to have static ctors.
11256 2005-06-17 Martin Baulig <martin@ximian.com>
11258 * loader.c (method_from_methodspec): Use `context->container' when
11259 parsing the `gmethod->inst'.
11261 2005-06-17 Martin Baulig <martin@ximian.com>
11263 * class.c (mono_type_get_name_recurse): Don't add the assembly
11264 name for type arguments.
11266 2005-06-15 Martin Baulig <martin@ximian.com>
11268 * reflection.c (mono_image_get_inflated_method_token): Encode
11269 correct klass; fixes #75260.
11271 2005-06-13 Michal Moskal <malekith@nemerle.org>
11273 * icall.c: Make GetCorrespondingMethod/Constructor take
11274 MonoReflectionMethod method not MonoMethod. Removed
11275 MonoType.GetCorrespondingField, and make
11276 MonoGenericType.GetCorrespondingField take name not
11279 2005-06-13 Michal Moskal <malekith@nemerle.org>
11281 * reflection.c (field_encode_signature, encode_locals):
11282 Make sizes of buffers for types larger (for big generic types).
11283 (create_generic_typespec,
11284 mono_reflection_sighelper_get_signature_local,
11285 mono_reflection_sighelper_get_signature_field):
11286 Add asserts for too small buffers.
11288 2005-06-15 Martin Baulig <martin@ximian.com>
11290 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
11291 if our parent is not a dynamic type.
11293 2005-06-15 Martin Baulig <martin@ximian.com>
11295 * class-internals.h (MonoTypeNameFormat): New enum.
11298 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
11299 (mono_type_get_full_name): Removed.
11300 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
11301 argument instead of the boolean's.
11303 * icall.c (ves_icall_System_MonoType_getFullName):
11304 Added `gboolean assembly_qualified'.
11307 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
11309 * reflection.c (mono_reflection_parse_type): Parse the new type
11312 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11314 * icall.c: no need to convert from utf16 to utf8 and then back again
11315 after the call to GetLogicalDrives.
11317 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11319 * icall.c: frombase64. Fix problems exposed by new tests.
11321 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11323 * icall.c: added internal calls for converting char [] and strings in
11324 base64 into byte [].
11326 2005-06-10 Martin Baulig <martin@ximian.com>
11328 * class.c (mono_class_create_generic_2): Read the nested classes
11329 from the metadata rather than from `gklass->nested_classes' since
11330 `gklass' might not be initialized yet.
11332 2005-06-09 Duncan Mak <duncan@novell.com>
11334 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
11335 all public headers. Fixes #74919.
11337 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
11339 * domain.c: The key for proxy_vtable_hash is now a pointer
11340 array. Added new GHashFunc and GCompareFunc functions for this.
11342 * class.h: The list of interfaces in MonoRemoteClass is known in
11343 advance and can't grow (we create a new MonoRemoteClass if needed),
11344 so now the interface array can be allocated together with
11347 * object.c: Added a new method create_remote_class_key.
11348 Fixed mono_remote_class so it does not depend on
11349 mono_upgrade_remote_class.
11350 Removed extend_interface_array.
11351 Added new method clone_remote_class(), which makes a copy of a remote
11352 class and adds a new interface or class to it.
11353 mono_upgrade_remote_class() now creates a new remote class (or gets
11354 it from the cache) if an vtable upgrade is needed. In this way
11355 we make sure that other objects sharing the same remote class
11356 don't get the new vtable with unwanted interfaces.
11358 * object-internals.h:
11359 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
11361 * marshal.c: Track changes in mono_upgrade_remote_class().
11363 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
11364 * icall.c: Add runtime methods for obtaining members of inflated
11365 class, which were created from supplied non-inflated members. It
11366 is used in internal Get{Method,Constructor,Field} methods in
11369 2005-06-09 Martin Baulig <martin@ximian.com>
11372 (mono_reflection_bind_generic_method_parameters): Fix #75169.
11374 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
11375 * reflection.c (mono_image_basic_init): Define
11376 Version in MonoDynamicAssembly.
11378 2005-06-08 Martin Baulig <martin@ximian.com>
11383 (mono_method_signature_full): New public method; takes a
11384 `MonoGenericContext *'.
11385 (find_method): Use mono_method_signature_full() and pass the
11386 klass'es context to it.
11388 * class.c (mono_class_is_inflated_method): Use
11389 mono_method_signature_full() and pass the context to it.
11391 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
11393 * object.c: add proper locking in mono_remote_class_vtable(),
11394 fixes possible memory corruption.
11396 2005-06-08 Michael Meeks <michael.meeks@novell.com>
11398 * marshal.c (mono_remoting_marshal_init): set
11399 initialized after initialization.
11401 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
11403 * locales.c : hush.
11405 2005-06-06 Michael Meeks <michael.meeks@novell.com>
11407 * object.c (extend_interface_array): fix really silly
11408 memory corrupting / comparison bug.
11410 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
11412 * reflection.c: Functions added to support the creation
11413 of CustomAttributeData, which includes Attribute data
11414 used by ReflectionOnly methods.
11416 * reflection.h: mono_reflection_get_custom_attrs_data and
11417 mono_custom_attrs_data_construct added (functions exposed).
11419 * icall.c: Added mono_reflection_get_custom_attrs_data
11422 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
11424 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
11427 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
11429 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
11431 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
11432 dynamic DllImportAttribute.
11434 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
11435 dynamic DllImportAttribute.
11437 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
11440 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11442 * threads.c: avoid segfault when an unstarted thread is aborted.
11444 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
11446 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
11447 Returns the name and version of the runtime for reporting.
11449 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11451 * appdomain.c: bump corlib version.
11452 * object-internals.h: new field in MonoReflectionAssembly.
11454 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11456 * object-internals.h: Carlos forgot to add this field.
11458 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
11460 * icall.c: Added create_version to create instances
11461 of Version of MonoReflectionAssemblyName. This change helps
11462 the AssemblyName tests to keep running fine.
11464 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
11466 * object.c (mono_method_return_message_restore): A somehow less
11467 intrusive fix for #75138.
11469 2005-06-03 Raja R Harinath <rharinath@novell.com>
11471 * object.c (mono_method_return_message_restore): Fix computation
11472 of expected number of out args.
11474 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
11476 * reflection.c (mono_image_get_method_info): Fix the case when the
11479 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
11481 * object.c: Added missing null check in
11482 mono_method_return_message_restore.
11484 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
11486 * reflection.c (mono_image_get_method_info): Handle the case when
11489 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
11491 * object.c: When creating the vtable for a proxy, take into account
11492 all inherited interfaces, not only the ones registered in
11493 iclass->interfaces. This fixs bug #74996.
11494 Also, in mono_method_return_message_restore, verify that the array
11495 of out args has the expected lengh.
11497 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11499 * socket-io.c: update the timeout in Poll when the call is interrupte.
11501 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11503 * socket-io.c: support abort/suspend in Select_internal after last
11506 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11508 * threadpool.c: remove warning.
11510 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11513 * socket-io.[ch]: Select_internal uses poll() now when available, thus
11514 removing the 1024 limit from select(). Runtime part of the fix for
11517 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11519 * socket-io.c: when resolving the addresses for the same
11520 host returned by gethostname(), get the local IPs from the interface
11521 list. Loopback addresses are discarded if the are interfaces up with
11522 non-loopback ones. Fixes bug #63265.
11524 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
11526 * appdomain.c, verify.c, object-internals.h, reflection.c:
11527 bumped corlib number to 36, and added new extra_flags field
11528 to ReflectionMethodBuilder and friends. Fixes #75060.
11530 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
11532 * gc.c: register a new weak link only if the object is non-null
11535 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
11537 * culture-info.h : short time pattern too.
11539 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
11541 * culture-info.h : expand long time pattern string length.
11543 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
11545 * culture-info-table.h : update (more French date format; #72788).
11547 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
11549 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
11550 the method is static. Fixes #75029.
11552 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
11554 * reflection.c: Update the table_idx field of method builders after
11555 saving the module, since it can change. This is a workaround for
11558 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
11560 * culture-info-table.h : update (additional French date format).
11562 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
11564 * icall.c (ves_icall_type_Equals): Revert last change.
11566 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
11568 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
11570 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
11572 * class-internals.h: Added executioncontext_class field to
11573 MonoDefaults structure.
11574 * domain.c: Cache System.Threading.ExecutionContext class in
11576 * object.c: Capture the ExecutionContext for asynchroneous calls in
11577 mono_async_result_new.
11578 * object-internals.h: Added execution_context and original_context
11579 fields to MonoAsyncResult. Added execution_context to MonoThread.
11580 * security-manager.c|.h: Added mono_get_context_capture_method to
11581 return the capture method (if required by the security manager or by
11582 the framework version used).
11583 * threadpool.c: Apply capture (if present) ExecutionContext in
11584 mono_async_invoke and revert to original context after it completes.
11586 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
11588 * culture-info-table.h : updated (real hacky solution for zh-CHT).
11590 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
11592 * culture-info-table.h : zh-CHT related workaround.
11594 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
11596 * marshal.c (emit_marshal_custom): Add some error checking and call the
11597 methods in the ICustomMarshaler interface. Fixes #74875.
11599 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
11600 native->managed wrappers.
11602 2005-05-12 Martin Baulig <martin@ximian.com>
11604 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
11605 here and use the loader lock.
11607 * mono-debug.c: Properly lock when the debugger is not attached.
11608 (mono_debug_init): Release the initial lock if we're not running
11611 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
11613 * marshal.c (emit_marshal_custom): Pass through NULL values without
11614 calling the custom marshalling routines.
11616 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
11617 conversion in structures. Fixes #74882.
11619 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
11621 * culture-info-table.h : zh-* cultures were missing.
11623 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
11625 * threads.c: Added a new event background_change_event which is signaled
11626 when a thread changes its background mode.
11627 Moved here several checks previously done in managed code. The checks
11628 require the thread lock, and using the thread lock in managed code
11629 can result in deadlocks.
11630 Merged Start_internal and Thread_internal into a single method. Now
11631 Thread_internal does all work of creating and starting a thread.
11632 Added icalls for setting and getting the state of the object. Moved from
11633 managed code to avoid locking there.
11634 Added wait_for_tids_or_state_change() which is called instad of
11635 wait_for_tids when waiting for non-backround threads to end. This method
11636 will return if one of the threads ends or the background_change_event
11638 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
11639 the background mode. This method signals the background_change_event
11642 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
11643 removed Start_internal.
11645 2005-05-11 Martin Baulig <martin@ximian.com>
11647 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
11648 to order of some fields to get proper alignment on 64-bit machines.
11650 2005-05-11 Martin Baulig <martin@ximian.com>
11652 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
11653 changes as they're broken and completely fuck up the debugger.
11655 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
11657 2005-05-10 Martin Baulig <martin@ximian.com>
11659 * reflection.c (mono_reflection_generic_class_initialize): Don't
11660 call mono_class_setup_parent() here.
11662 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11664 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
11665 send/receive timeout use an integer in milliseconds. We were using a
11668 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11671 (internal_get_cultures): reserve the first slot of the array for the
11672 InvariantCulture, which will be filled in managed code.
11674 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
11676 * reflection.c (mono_image_fill_module_table): Initialize the
11677 GENERATION field as well.
11679 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11681 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
11682 Monitor.Enter on the object.
11684 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
11686 * threads.c: Enable the wait for running threads when exiting.
11687 * icall.c: Suspend all threads before exiting.
11689 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
11691 * assembly.c (mono_assembly_load_reference): Fix warning.
11693 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11695 * threadpool.c: changed the default number of threads per cpu. From now
11696 on, the default will be 20 + (5 * number of cpus) instead of 50.
11698 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
11700 * loader.c (mono_method_get_signature_full): Add locking here.
11702 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
11704 * appdomain.c: Moved methods for parsing and freeing assembly
11705 names to assembly.c.
11706 * assembly.c, domain-internals.h: Created public methods for parsing
11707 assembly names. Fixed mono_assembly_load_with_partial_name:
11708 it now finds the best match, taking into account the version,
11709 token and culture specified in the partial name. Also return
11710 the latest version if no version information is specified.
11712 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
11714 * threadpool.c: replace check for SocketAsyncCall class.
11716 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11718 * threadpool-internals.h:
11719 * Makefile.am: added threadpool-internals.h
11721 * threadpool.c: call mono_unhandled_exception on exceptions not handled
11722 that happen in threadpool threads (tested on MS).
11723 (mono_thread_pool_remove_socket): new function that dispatch any pending
11724 AIO call on a socket that is closing. By now only epoll really needs it,
11725 as select/poll wake up when the socket closes.
11728 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
11730 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
11732 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
11734 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
11736 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
11738 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
11740 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
11741 has an abort request, convert it into a suspend request.
11743 2005-04-30 Ben Maurer <bmaurer@ximian.com>
11745 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
11746 warning for the usage of `UnmanagedFunctionPointerAttribute' which
11747 is not supported yet.
11749 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11751 * image.c: register assemblies loaded from data (bundles) in the loaded
11752 assemblies hash. Fixes bug #74772.
11754 2005-04-29 Martin Baulig <martin@ximian.com>
11756 * class.c (mono_type_get_name_recurse): Update to the new naming
11757 schema from the latest .NET 2.x beta2.
11758 (mono_class_setup_vtable_general): If we're a generic instance,
11759 copy the vtable from our generic type definition and inflate all
11762 * loader.c (find_method): Update to the new naming schema from the
11763 latest .NET 2.x beta2.
11765 2005-04-29 Raja R Harinath <harinath@gmail.com>
11767 * class.c (mono_class_init): Add a mono_loader_unlock to the
11770 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
11772 * icall.c (ves_icall_System_Environment_Exit): Remove the
11773 suspend_all_other_threads () call for the time being, since it can hang.
11775 * threads.c (mono_thread_manage): Similarly, disable the waiting for
11776 the background threads to exit, since it can also hang.
11778 * class.c (mono_class_init): Applied patch from Ankit Jain
11779 (radical@gmail.com). Avoid pending init errors when a field refers
11780 to a nested class using a typeref. Fixes #74734.
11782 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
11783 this for dynamic modules.
11785 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11787 * threads.c: don't wait for threads that are in the process of aborting
11788 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
11789 and waiting for background threads to finish. This makes xsp and
11790 mod-mono-server exit without random length delays and/or hangs.
11792 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11794 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
11796 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
11798 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
11799 dynamic types to prevent infinite loops. Fixes #74727.
11801 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
11802 ..._is_assignable_to.
11804 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
11806 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
11808 2005-04-25 Martin Baulig <martin@ximian.com>
11810 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
11813 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
11815 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
11817 * reflection.c (build_compressed_metadata): Set metadata header
11820 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
11822 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
11823 number into an integral and a decimal part. Fixes #70473.
11825 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
11827 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
11829 * culture-info-table.h : reflected the latest locale-builder output.
11831 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11833 * threadpool.c: check for SuspendRequested too when deciding if
11834 mono_thread_interruption_checkpoint should be called.
11836 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11838 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
11839 * threads.c: remove interruption_mutex and use Interlocked instead. When
11840 suspending all the threads, wait for all the suspended events at once.
11841 If we're shutting down and get an APC that is going to be queued,
11842 call mono_thread_execute_interruption immediately, as the thread might
11843 be sleeping on a pthread condition or mutex.
11845 * icall.c: call mono_runtime_set_shutting_down before suspending the
11848 Fixes bug #74693. And now xsp is happier when exiting.
11850 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
11852 * loader.c (mono_stack_walk): Fix #74690.
11854 2005-04-22 Martin Baulig <martin@ximian.com>
11856 * mono-debug.h (MonoDebugMethodJitInfo): Added
11857 `MonoDebugMethodJitInfo *jit'.
11859 * mono-debug.c (mono_debug_read_method): Cache the
11860 MonoDebugMethodJitInfo in `address->jit'.
11861 (mono_debug_free_method_jit_info): New public method.
11863 2005-04-22 Martin Baulig <martin@ximian.com>
11865 * class.c (mono_class_is_assignable_from): Disallow
11866 type parameter -> interface.
11868 2005-04-21 Dick Porter <dick@ximian.com>
11870 * threads.c (mono_thread_create): Turn an assertion into an error.
11872 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
11874 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
11876 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
11877 Fix some gcc 4.0 warnings.
11879 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
11881 * file-io.c: fix alt dir separator char on unix systems
11882 and cleanup (fixes bug #71214).
11884 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
11886 * marshal.c: Use CALLVIRT instead of CALL when dispatching
11887 a call to a remote domain, since the method may be an
11888 interface method in the client domain. This fixes bug #74192.
11890 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11892 * threadpool.c: recv/send are now performed before going back to managed
11893 code to save one transition.
11895 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11897 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
11899 * metadata/threadpool.c: removed hack to workaround the bug above.
11903 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
11905 * reflection.c reflection.h: Fix handling of parameter defaults in
11906 dynamic methods. Also fixes handling of parameter attributes.
11909 * mono-debug.c (mono_debug_close_image): Fix warning.
11911 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11913 * socket-io.h: replaced old unused field with new 'blocking'.
11914 * threadpool.c: restore socket blocking state on windows(tm).
11916 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
11918 * icall.c: don't return the codebase in the AssemblyName[] returned by
11919 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
11920 * object-internals.h: Removed FIXME (fields were presents) and fixed
11921 versioncompat declaration.
11923 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11925 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
11926 not closed, so don't cleanup when it happens.
11928 2005-04-13 Chris Toshok <toshok@ximian.com>
11930 * mono-debug-debugger.h: change prototype for
11931 mono_debugger_lookup_type.
11933 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
11934 this function, although it should probably be named
11935 mono_debugger_init_type.
11937 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11939 * threadpool.c: fix non-AIO case.
11941 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
11943 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
11944 the built-in profiler to measure just JIT compilation times.
11946 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11948 * threadpool.c: the epollfd might be closed by another thread at
11949 any time, so ignore EBADF at treat it as a "we're closing" sign.
11951 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11953 * threadpool.c: release the semaphores with a count equals to the number
11954 of working threads in both IO and regular pools. Fixed typo that messed
11955 up the count of IO pool threads. Don't initialize the pipe handles if
11958 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11960 * threadpool.c: some systems don't like a NULL when deleting the socket
11963 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11965 * threadpool.c: fix semaphore allocation.
11967 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11969 * threadpool.c: added epoll() based implementation for asynchronous IO
11970 that is used instead of the default poll() when available.
11971 It can be disabled by setting MONO_DISABLE_AIO.
11973 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11975 * threadpool.c: windows needs 'closesocket' and instead of returning
11976 0 when the stream is closed while in select, it returns -1. Fixes bug
11979 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
11981 * class.c (class_compute_field_layout): Fix the regression caused by
11984 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11986 * threadpool.c: separate pool for socket async. IO.
11987 * threadpool.h: mono_max_worker_threads is not a global any more.
11989 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
11991 * class.c (class_compute_field_layout): Fix #74549.
11993 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11995 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
11996 use 2 connected sockets instead.
11998 2005-04-08 Miguel de Icaza <miguel@novell.com>
12000 * mono-config.c: Add new entry point for mkbundle
12001 mono_config_parse_memory.
12003 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12005 * threadpool.c: removed another unused function.
12007 2005-04-08 Ankit Jain <radical@corewars.org>
12009 * reflection.c (get_default_param_value_blobs): Add 'types'
12010 parameter to get the types encoded in the constant table.
12011 (mono_param_get_objects): Use the type from the constant table,
12012 not the type of the parameter, when creating default values.
12013 Handle null default values correctly.
12015 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12022 * socket-io.c: removed dead code for async IO.
12024 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12026 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
12028 * threadpool.c: intercept socket async. calls and pass them to a thread
12029 that is polling and dispatching the job items to the threadpool as
12030 socket become ready. Fixes bugs #71217, #71933.
12032 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
12033 between char and short/ushort arrays.
12035 * socket-io.c: remove dead code.
12037 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
12040 icall.c : removed InternalToUpper_Comp() and
12041 InternalToLower_Comp().
12043 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
12045 * char-conversions.h : The tables were incorrectly generated. Should
12046 be generated against invariant culture.
12048 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
12050 * object.c (mono_runtime_invoke_array): Fix return value when
12051 passing pre-created valuetype objects to ctors.
12053 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
12054 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
12057 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
12059 * domain.c: removed g_assert for runtimesecurityframe_class. This is
12060 only used with --security and hides the wrong corlib version error.
12062 2005-03-30 Joshua Tauberer <tauberer@for.net>
12064 * class.c: Changed mono_class_name_from_token so that types
12065 outside of a namespace don't have an initial period. Improved
12066 the g_warning message used in _mono_class_get when loading
12068 * assembly.c: In mono_assembly_load_reference, when an assembly
12069 can't be found, "No such file or directory" is misleading and
12070 unhelpful because a few paths were checked for the presence of
12071 the assembly. When that happens (ENOENT), display a nicer
12072 message indicating the directories that were searched. In all
12073 cases, the warning is made easier to read for non-hackers.
12075 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
12077 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
12079 * appdomain.h|domain.c: Removed inline from functions.
12080 * appdomain.c: Reduced warnings when compiling on windows.
12081 * icall.c: Fixed output_debug declaration to gunichar2*.
12082 * mono-config.c: Reduced warnings when compiling on windows.
12083 * rand.c: Added missing "windows.h". Added missing return value.
12084 * rawbuffer.c: Added missing winsock2.h for windows.
12085 * sysmath.h: Added mono-compiler.h header to allow/ease
12086 compilation with non-GCC compilers.
12087 * threads.c: Fixed declarations to compile with VS.NET C compiler.
12088 Removed cast warnings.
12090 Adapted from the work of J Lothian (for VC6).
12092 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
12094 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
12097 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
12099 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
12102 2005-03-27 Raja R Harinath <harinath@gmail.com>
12104 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
12105 has to be in $(exec_prefix). $(prefix) is for arch-independent
12106 stuff, and it would probably use $(prefix)/share rather than
12109 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12111 * console-io.c: added 2 includes that might be missing.
12113 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
12115 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
12118 * reflection.c (create_custom_attr): Allocate the params array using
12119 alloca so it gets GC tracking.
12121 2005-03-23 Chris Toshok <toshok@ximian.com>
12123 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
12126 2005-03-24 Raja R Harinath <rharinath@novell.com>
12128 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
12129 changes to pick up any changes in prefix, etc.
12131 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
12133 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
12135 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
12136 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
12138 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
12140 * class-internals.h object-internals.h class.c reflection.c: Extend the
12141 mono_lookup_dynamic_token () function to return the class of the
12144 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
12145 well. Fixes #73848.
12147 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
12149 * security-manager.c: Skip inheritance checks for intra-corlib
12150 class inheritance and method overrides. This skips a lot of checks
12151 and (anyway) permissions cannot work until corlib is loaded.
12153 2005-03-23 Martin Baulig <martin@ximian.com>
12155 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
12156 MONO_TYPE_GENERICINST.
12158 2005-03-23 Martin Baulig <martin@ximian.com>
12160 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
12162 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
12164 * class.c: added locking comments to some functions.
12165 Cache the interface offsets arrays (saves about 20 KB
12166 of runtime memory in a typical app).
12167 Reduce the time overhead in mono_class_setup_supertypes ().
12169 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
12171 * icall.c: speedup and fix leaks in GetMethodsByName and
12172 GetPropertiesByName.
12174 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
12176 * reflection.c: some locking fixes.
12178 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
12180 * metadata.c: added missing break in case statement.
12182 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
12184 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
12185 typedbyref return values. Fixes #73941.
12187 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
12189 * security-manager.c|h: Added demandunmanaged method and
12190 suppressunmanagedcodesecurity class to MonoSecurityManager.
12191 Renamed aptc class to allowpartiallytrustedcallers.
12193 2005-03-17 Martin Baulig <martin@ximian.com>
12195 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
12197 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12199 * file-io.c: disabled file async. IO using aio_*. It uses the
12200 threadpool now. Workaround for bug #73718.
12202 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
12204 * assembly.h, mono-config.c: added code to deal with bundled configs
12205 for bundled assemblies.
12207 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
12209 * *.c, private.h: cleanup, removing old private.h header file.
12211 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
12213 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
12214 and throw_on_unmappable_char attributes.
12216 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
12218 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
12219 _ProcessName_internal.
12221 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
12223 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
12226 * icall.c threads.c threads-types.h: Remove slothash icalls as they
12227 are no longer used.
12229 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
12231 * object.c (compute_class_bitmap): Add support for generics. Fixes
12234 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
12236 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
12238 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12240 * filewatcher.c: commented out the code for windows watcher, as we don't
12241 use it (we use the managed implementation instead).
12243 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
12245 * object-internals.h (MonoThread): Remove 'unused1' field.
12247 * appdomain.c: Bump corlib version.
12249 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
12251 * reflection.c (mono_reflection_create_runtime_class): Remove the
12252 AssemblyBuilder.Save optimization since it causes too many problems.
12254 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
12256 * exception.c|h: Added mono_get_exception_reflection_type_load to
12257 create a ReflectionTypeLoadException object.
12258 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
12259 to return NULL is a InheritanceDemand fails during reflection. Updated
12260 ves_icall_System_Reflection_Assembly_GetTypes to throw a
12261 ReflectionTypeLoadException if an InheritanceDemand fails during
12262 reflection. Added icall mapping for GetLinkDemandSecurity.
12263 * security-manager.c|h: Added ves_icall_System_Security_
12264 SecurityManager_GetLinkDemandSecurity internal call to return the
12265 class and methods permissions set for a LinkDemand. Removed unused
12266 fields in MonoSecurityManager.
12268 2005-03-10 Martin Baulig <martin@ximian.com>
12270 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
12271 it's a generic instance.
12273 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
12275 * reflection.c (mono_get_object_from_blob): Applied patch from
12276 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
12278 * class.c (mono_class_is_assignable_from): Another try at fixing
12279 #73469 without breaking anything.
12281 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
12283 * class.c: (mono_class_is_assignable_from): Revert the last changes
12284 since they don't work with generics.
12286 * class.c (mono_class_is_assignable_from): Fix build bustage.
12288 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
12289 the managed IsAssignableFrom method. Fixes #73469.
12291 * reflection.c (mono_reflection_call_is_assignable_from): New helper
12294 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
12296 * object.c (mono_load_remote_field_new): Fix returning uninitialized
12297 memory when the remoting callback does not sets the out arguments.
12300 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
12303 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
12305 * object-internals.h (MonoStackFrame): Sync with managed object layout.
12307 * appdomain.c: Bump corlib version.
12309 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
12311 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
12314 * threads.c (mono_thread_attach): Detect threads which are not started
12315 by the GC pthread wrappers.
12317 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
12319 * icall.c: Added new icall for RNG.
12320 * rand.c|h: Added new icall to open the RNG. This allows to share a
12321 single handle on Linux to access /dev/urandom and fix #73183.
12323 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
12325 * object.c: setting the new vtable in a transparent proxy object must
12326 not change the GC descriptor.
12328 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
12330 * object.c: fixed compilation without GCJ support.
12331 * reflection.c: for runtime-created types ensure klass->has_references
12332 is correct (bug #73215).
12334 2005-03-02 Martin Baulig <martin@ximian.com>
12336 * class.c (mono_class_is_assignable_from): Make this work if
12337 `oklass' is a generic instance; fixes #72831.
12339 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
12341 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
12344 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
12346 * marshal.c: Reorganize native->managed marshalling code to also use
12347 the emit_marshal_... functions.
12349 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
12351 * object.c: typed allocs have issues with bitmap sizes > 30,
12352 so check for max_set >= 30.
12354 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
12356 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
12357 managed code. Fixes #73012.
12359 * metadata.h (MonoMarshalSpec): Add elem_mult field.
12361 * metadata.c reflection.c: Load/Emit elem_mult as well.
12363 * metadata.h (MonoMarshalSpec): Add comment.
12365 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
12367 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
12368 num_elem to -1 if not given.
12370 * object-internals.h (MonoReflectionMarshal): Add has_size field.
12372 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
12375 2005-03-01 Marek Safar <marek.safar@seznam.cz>
12377 * null-gc.c (mono_gc_free_fixed): Was not compilable.
12379 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
12381 * reflection.c (encode_marshal_blob): Encode param_num field as well.
12383 * object-internals.h (MonoReflectionMarshal): Add param_num field.
12385 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
12387 * object.c: generalized the reference bitmap creation
12388 and added hooks for the new GC.
12389 * class-internals.c: removed the gc_bitmap field from MonoClass.
12391 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
12393 * domain.c: help the compiler to produce better code
12394 in mono_jit_info_table_find ().
12396 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
12398 * object.c: make all allocations look typed.
12400 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
12402 * socket-io.c: load Mono.Posix if it's not loaded already
12405 2005-02-24 Martin Baulig <martin@ximian.com>
12407 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
12408 * reflection.c (dup_type): Likewise.
12410 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
12412 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
12413 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
12415 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
12417 * domain.c, threads.c, object-internals.h: make the critical thread
12418 local vars use the fast access mode (even when we're compiled in
12419 a lib). Provide accessors to be used by the jit during codegen.
12421 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
12423 * appdomain.c: Changed hook functios behavior to include
12424 support for the reflection only assemblies. Some icalls were changed
12425 to support the mentioned assemblies too. Signatures of static methods
12426 try_assembly_resolve and real_load now have an additional parameter:
12429 * assembly.c: General changes to mono_assembly_ methods to support
12430 reflection only api. Functions mono_assembly_open, mono_assembly_load,
12431 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
12432 suffix, to support an additional gbool parameter to specify whether
12433 the assembli is reflection only or not. Created some new hook functions
12434 to add support for reflection only assemblies. Signatures of static
12435 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
12436 have now an additional parameter: refonly.
12438 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
12439 indicating whether the assembly is reflection only or not.
12441 * exception.c: Add mono_get_exception_invalid_operation.
12443 * icall.c: Throw an InvalidOperationException when trying to invoke
12444 a property/method/event, or trying to set/get the value of a field.
12445 Also add an icall to retrieve the ref_only flag to the
12446 MonoReflectionAssembly.
12448 2005-02-23 Chris Toshok <toshok@ximian.com>
12450 Part of fix for #72827.
12451 * mono-debug.c (mono_debug_add_method): add lexical block data to
12452 the info we write. Kind of a hack at the moment - we copy the
12453 lexical block info from the MonoDebugMethodInfo to the
12454 MonoDebugMethodJitInfo here, before writing it.
12455 (mono_debug_read_method): read the lexical block info.
12457 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
12459 * debug-mono-symfile.h: add lexical block support.
12461 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
12464 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
12466 * loader.c (mono_lookup_pinvoke_call): Fix warning.
12468 * object.c (mono_runtime_free_method): Call mono_free_method () and
12469 put the TODOs there.
12471 * loader.c (mono_free_method): Free up most memory allocated for
12474 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
12476 * reflection.c: properly flag a Type argument to a
12477 named custom attr value (bug #72248).
12479 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
12481 * reflection.c: reduce code duplication in named custom
12482 attribute encoding.
12484 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
12486 * reflection.c: properly encode custom attrs of type object
12489 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
12491 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
12493 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
12495 * socket-io.c: load System.dll if it's not loaded already
12496 (bug #72850 and #70477).
12498 2005-02-21 Martin Baulig <martin@ximian.com>
12500 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
12503 2005-02-21 Martin Baulig <martin@ximian.com>
12505 * reflection.c (mono_image_build_metadata): We also need to
12506 "fixup" the MethodImpl table after we computed the final method
12507 indices. Call fixup_methodimpl() to do that.
12508 (fixup_methodimpl): New private method.
12510 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
12512 * assembly.c: special case mscorlib.dll (bug#72536),
12513 patch from Carlos Alberto Cortez.
12515 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
12517 * threads-types.h threads.c: Fix build bustage.
12519 * threads.c: Use a union for long<->double conversions.
12521 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
12522 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
12524 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
12525 containing the checkpoint call with NOT_TAKEN.
12527 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
12528 checkpoint before pushing the arguments, so they won't have to be
12531 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
12533 * domain.c, assembly.c, domain-internals.h: make some data
12534 const and relocation-free.
12536 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
12538 * object.c, appdomain.c, class-internals.h: introduce the
12539 MonoClassRuntimeInfo structure to hold the info needed to
12540 use a class at runtime. Made mono_class_vtable() lock-free
12541 for all the appdomains.
12543 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
12545 * metadata-internals.h, image.c: introduce a per-image mempool to
12546 be used for memory that has the same lifetime as the image.
12548 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
12550 * domain.c: In mono_init_internal(), instead of selecting the first
12551 runtime version supported by an executable, get a list of all
12552 supported versions and select the one for which an mscorlib exists
12553 (since even if the runtime supports a given version, it doesn't mean
12554 that the framework for that version is installed).
12555 Modified get_runtimes_from_exe to support this behavior.
12556 In supported_runtimes, added information about additional system
12559 * assembly.c: Added support for more than one system assembly version
12560 per runtime version. Updated the assembly list.
12561 In mono_assembly_remap_version, removed the initial version check,
12562 since we don't know to which version we need to compare until we
12563 get the version set on which the assembly is based.
12564 Moved the code for loading corlib into the new method
12565 mono_assembly_load_corlib(), so it can be used by the initialization
12568 * domain-internals.h: Updated data structures and added declaration
12569 for mono_assembly_load_corlib.
12571 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
12573 * reflection.c (resolve_object): Fix the creation of the signature in
12574 the SignatureHelper case.
12576 * assembly.c (mono_assembly_remap_version): Fix binary search.
12578 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
12580 * class.c: Added inheritance check when a method is overloaded (from a
12581 virtual method or when implementing an interface) and when a class is
12582 inherited. Added functions to set a failure for a class and to
12583 retreive the exception from a failure.
12584 * class-internals.h: Added fields to MonoClass to keep the exception
12585 information status for inheritance (or other exceptions) to be thrown
12586 later (i.e. not at load time).
12587 * object.c: Throw the inheritance SecurityException when a type is to
12588 be created with either class or method inheritance violations.
12589 * reflection.c|h: Fix when getting declsec from a class. Removed
12590 unrequired code for class. Improved sanity in parameter naming.
12591 * security-manager.c|h: Added functions to check for class and method
12594 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
12596 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
12597 and has_finalize in dynamic types as well.
12599 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
12601 * culture-info-table.h : fixed currency format for en-GB (and so on).
12603 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
12605 * gc.c: ensure the GC handles never have 0 as a value.
12607 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
12609 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
12610 a pointer to a struct to unmanaged code. Fixes #72625.
12612 2005-02-16 Martin Baulig <martin@ximian.com>
12614 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
12616 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
12618 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
12620 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
12622 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
12624 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
12625 UnmanagedFunctionPointerAttribute, use it for determining calling convention
12628 * reflection.c (mono_custom_attrs_get_attr): New helper function.
12630 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
12632 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
12634 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
12635 changes to make the current context a field in MonoThread.
12637 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
12639 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
12642 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
12643 extracted from mono_marshal_get_native_wrapper.
12645 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
12646 to create wrappers around native functions.
12648 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
12649 delegates for arbitrary function pointers. Fixes #71472.
12651 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
12653 * threads.c: cleaned up the code a little.
12655 2005-02-15 Martin Baulig <martin@ximian.com>
12657 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
12660 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
12661 allocate larger chunks if needed.
12663 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
12665 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
12668 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
12670 * domain.c: keep the domains in an array and ensure the domain ids
12671 are kept small, so they can be used as indexes to domain-specific data
12672 with a small memory overhead.
12674 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
12676 * icall.c: Handle byref types in Type icalls. Fixes #72544.
12678 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
12680 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
12682 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
12684 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
12686 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
12689 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
12691 2005-02-12 Ben Maurer <bmaurer@ximian.com>
12693 * domain-internals.h: add the hashtable here.
12695 * class-internals.h: Remove `info' from MonoMethod
12697 * domain.c: Add a new hashtable, jit_trampoline_hash
12699 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
12701 * object.c: don't set the value of static fields
12704 2005-02-11 Martin Baulig <martin@ximian.com>
12706 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
12707 (mono_debug_add_method): Silently ignore the method if it's too big.
12708 (mono_debug_add_type): Likewise.
12710 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
12712 * threads.c, appdomain.c: remove #ifdefs from the code.
12714 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
12716 * metadata-internals.h: Added flags to MonoAssembly to cache the most
12717 common security informations. This allows us to stay in unmanaged code
12718 when doing LinkDemand and it's special cases (except for the first
12719 time for initialization). The flags a very much used with --security.
12720 * reflection.c|h: Added code to get declarative security attributes
12721 for LinkDemand and InheritanceDemand. This required to refactor the
12722 existing code for Demand.
12723 * security-manager.c|h: Added new method fields for the special cases
12726 2005-02-10 Martin Baulig <martin@ximian.com>
12728 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
12729 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
12731 2005-02-10 Martin Baulig <martin@ximian.com>
12733 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
12734 debugging code; this is almost a complete rewrite.
12736 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
12738 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
12740 * domain.c, object.h: expose mono_string_equal () and
12741 mono_string_hash ().
12742 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
12743 it's implemented in managed code.
12745 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
12747 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
12748 lo leak objects between appdomains.
12750 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
12752 * assembly.c: old compilers compilation fix from
12753 robertj@gmx.net (Robert Jordan).
12755 2005-02-09 Ben Maurer <bmaurer@ximian.com>
12757 * class-internals.h: Little reminder for the future.
12759 * debug-helpers.c: Fix up wrapper_type_names
12761 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
12763 * image.c, metadata-internals.h: when loading an image from a file,
12764 mmap all of it and use the same codepaths as when using a
12765 in-memory image: the code is simpler and we use less memory
12766 (both writable and readonly).
12768 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
12770 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
12771 API to alloc runtime data structures that need to be tracked by the
12772 GC and contain pointers.
12773 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
12774 make the code more readable and eventually use a different GC.
12776 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
12778 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
12781 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
12783 * object.c: In release_type_locks(), don't release the cctor lock
12784 if it has already been released. This fixes a crash in the
12787 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
12789 * gc.c, marshal.c, icall.c: register a delegate for finalization
12790 only when the native function pointer has been allocated for it.
12792 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
12794 * object.c: cleaned up some code, allocate objects that are
12795 pointer free with the atomic malloc variant. Allocate memory
12796 for static data from the mempool if it's pointer-free.
12797 Allocate the bounds array at the end of the array data, when needed.
12798 * object-internals.h, object.h: move a private function in a private
12800 * class.c: handle missing case in tracking references in fields.
12802 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
12804 * class.c, class-internals.h: keep track if a type has
12805 reference fields in either the instance or static fields.
12807 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
12809 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
12810 and renamed to MonoRuntimeInfo. Added fields to store the expected
12811 framework assembly version. Changed mono_get_framework_version and
12812 mono_get_runtime_version for a single mono_get_runtime_info method.
12814 * assembly.c: Added method to remap system assembly versions to the
12815 current executing runtime version. Removed old mapping code.
12816 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
12818 * icall.c, reflection.c: Track api changes.
12820 2005-02-06 Miguel de Icaza <miguel@novell.com>
12822 * loader.c (method_from_memberref): Improve error reporting,
12823 produce the class name instead of the typeref/typedef index.
12825 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
12827 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
12829 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
12831 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
12832 stdcall and charset name mangling. Reorganize the code and add
12833 some tracing stuff.
12835 2005-02-05 Ben Maurer <bmaurer@ximian.com>
12837 * monodiet.c: More iters!
12839 * marshal.c: Iter usage.
12841 * icall.c: Iter usage.
12843 * object.c: Use iters.
12845 * debug-helpers.c: More iters
12847 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
12849 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
12852 2005-02-05 Ben Maurer <bmaurer@ximian.com>
12854 * mono-debug-debugger.c: use iters
12856 * class.c, class-internals.h: mono_class_setup_events is static
12859 * All callers: use iters
12861 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
12863 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
12864 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
12866 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
12868 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
12870 * marshal.h: Add prototypes for ldfld/stfld_remote.
12872 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
12873 this is called during startup.
12875 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
12877 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
12878 MonoThreadsSync struct private in monitor.c. Changed the way
12879 MonoThreadsSync is allocated so it's faster and there is no
12880 need to keep track of it with a finalizer and it uses less memory.
12881 This also finally allows us to allocate mono objects as ptrfree when
12882 there are no reference fields.
12884 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
12886 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
12887 disappearing link to the GC interface and use them to simplify
12888 the gchandles code.
12890 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
12892 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
12893 stfld_remote which call mono_load/store_field_new. This allows methods
12894 calling ldfld/stfld wrappers to be AOTed.
12896 * console-io.c: Include sys/filio.h under solaris.
12898 * console-io.c: Include curses.h if needed correctly.
12900 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
12902 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
12903 method->klass as well.
12905 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
12907 * class.c (mono_class_init): Switch on lazy initialization of
12910 * class.c (mono_class_get_finalizer): Handle the case when the
12911 finalizer is inherited.
12913 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12915 * console-io.c: <curses.h> is needed by term.h on solaris.
12917 2005-02-03 Ben Maurer <bmaurer@ximian.com>
12919 * icall.c, class-internals.h, monodiet.c, class.c: Remove
12920 mono_class_setup_properties where possible. Remove this ftn from
12921 the header file, and make it static.
12923 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
12925 * loader.c: Add missing setup_... call.
12927 * class.c: Add missing setup_... calls.
12929 * class.c (mono_class_init): Switch on lazy initialization of
12930 the generic vtable.
12932 * class.c (mono_class_init): Fix generics broken by the recent changes.
12934 * monodiet.c (handle_type): Add missing setup_... calls.
12936 * class.c: Back out garbage in previous patch.
12938 * class.c: Add missing setup_... calls.
12940 * class.c (mono_class_get_method_from_name_flags): Avoid calling
12941 mono_class_setup_methods () if possible.
12943 * class-internals.h (MonoClass): Add 'has_cctor' flag.
12945 * class-internals.h (MonoCachedClassInfo): New structure.
12947 * class.c: Initialize properties and events fields of MonoClass lazily.
12949 * class.c: Add infrastructure for lazily initializing the methods and
12950 vtable fields of MonoClass. Not yet used.
12952 * class.c (mono_class_get_finalizer): New helper function.
12954 * class.c: Add infrastructure for loading some class related data from
12957 * object.c: Add infrastructure for initializing the vtable from data
12960 * gc.c (run_finalize): Use mono_class_get_finalizer ().
12962 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
12963 appropriate initialization function before accessing parts of the
12964 MonoClass structure.
12966 * marshal.c: Fix warnings.
12968 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
12970 * mono-debug-debugger.c (get_exception_message): Use
12971 mono_class_get_method_from_name_flags ().
12973 2005-02-02 Ben Maurer <bmaurer@ximian.com>
12975 * reflection.c, appdomain.c: Replace a few manual searches that
12976 Zoltan missed. (Paolo approved this part of my initial patch).
12978 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
12980 * profiler.c: disable recording statistical events at report time.
12982 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
12984 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
12985 to byteswap arrays of enum values, too (bug #72080).
12987 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
12989 * appdomain.c (set_domain_search_path): Allow this to be called if
12990 domain->setup is not yet set.
12992 * loader.c (mono_method_get_index): New helper function.
12994 * loader.c reflection.c: Use mono_method_get_index ().
12996 * class.c (mono_class_get_method_from_name_flags): New helper method.
12998 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
13001 * class.c (mono_class_get_cctor): New helper method.
13003 * string-icalls.c object.c class.c marshal.c reflection.c: Use
13004 mono_class_get_method () to look up methods.
13006 2005-02-01 Miguel de Icaza <miguel@novell.com>
13008 * console-io.c: Fix the build, this should work on Windows.
13010 2005-01-31 Ben Maurer <bmaurer@ximian.com>
13012 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
13013 be set to null to keep things valid
13015 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13017 * icall.c: added Console 2.0 icalls.
13018 * Makefile.am: added console-io.[ch]
13019 * console-io.[ch]: internal calls for Console 2.0 API.
13021 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
13023 * class.c: make sure we consider all the interfaces
13024 when calculating max_interface_id (bug found by
13025 Jeroen Frijters running ikvm).
13027 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
13029 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
13030 valuetype fields to null.
13032 * object.c (set_value): Ditto. Fixes #71669.
13034 2005-01-31 Martin Baulig <martin@ximian.com>
13036 * metadata.c (mono_metadata_has_generic_params): New public
13037 function; checks whether something is a generic method.
13039 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13041 * appdomain.c: fix infinite recursion when adding assemblies.
13043 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
13045 * object.c: Fix small typo to return all items for Environment.
13046 GetCommandLineArgs.
13048 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
13050 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
13051 reflection.c: more domain and assembly-unload related fixes
13052 and memory leaks plugs.
13054 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
13056 * 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.
13058 2005-01-29 Ben Maurer <bmaurer@ximian.com>
13060 * loader.c (mono_method_signature): Make this method lazy
13061 (mono_get_method_from_token): Don't computate the signature here.
13063 Doing this saves quite a bit of memory. I got 90 kb on starting up
13064 monodoc. It should also save some disk reads on startup.
13066 * *: MonoMethod->signature might be NULL now. You *MUST* use
13067 mono_method_signature.
13069 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
13071 * object.c (mono_runtime_get_main_args): Return an array from the
13072 current domain here. Fixes #71938.
13074 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
13076 * monitor.c: formatting changes to comply with the
13077 mono coding style and remove #ifdefs from the code.
13079 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
13081 * metadata.c, private.h: remove some unneeded data
13082 and use a more compact representation for table schemas.
13084 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
13086 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
13087 to get a better distribution in hash tables.
13088 * *.c: use mono_aligned_addr_hash() where appropriate.
13089 * assembly.c: make var static.
13091 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
13093 * domain-internals.h: Put MonoJitInfo on a diet.
13095 * domain.c: Fix a warning.
13097 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
13099 * gc.c: rework the gc handles code to reuse handles
13102 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
13104 * domain.c: fixed long standing bug in mono_string_equal() which
13105 was brought to light with the ldstr changes.
13107 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
13109 * reflection.c: Remove warning by adding missing include for marshal.h
13111 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
13113 * domain.c, object.c: change the ldstr_table to hold
13114 MonoString* as keys: makes the runtime isinterned lookup
13115 faster and simplifies memory management.
13117 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
13119 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
13120 possible to add imperative security checks before calling the icall.
13121 * reflection.c: Return security attributes on the original MonoMethod
13122 (and not the wrapped one). This fix permissions on icalls.
13124 2005-01-25 Dick Porter <dick@ximian.com>
13126 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
13127 the check for mktime() support actually test the mktime() return
13128 value. "Fixes" bug 71682, though the output is still different to
13131 2005-01-25 Martin Baulig <martin@ximian.com>
13133 * class.c (mono_class_is_assignable_from): Make this work for
13136 2005-01-24 Ben Maurer <bmaurer@ximian.com>
13138 * marshal.c (mono_string_utf8_to_builder)
13139 (mono_string_builder_to_utf16): We might not have ownership of the
13140 string. In thise case, we need to create a new buffer.
13142 * object-internals.h (mono_stringbuilder_capacity): sb->str might
13143 be null, in which case, use the default capacity.
13145 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
13147 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
13148 GC events to the profiler.
13150 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
13152 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
13153 if you don't want the GC to run.
13155 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
13157 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
13158 start providing a GC API and keeping different implementations in
13160 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
13162 2005-01-22 Ben Maurer <bmaurer@ximian.com>
13164 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
13165 mmap rather than allocating a huge buffer.
13166 (mono_debug_close_mono_symbol_file): Free the buffer allocated
13169 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
13171 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
13172 and CheckExecutionRights.
13173 * reflection.c|h: Keep the index of the declarative security to be
13174 used, instead of the pointer, when AOT compiler is used. Also add
13175 class initialization when requesting demands.
13176 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
13177 CheckExecutionRights. Both properties are now FALSE by default, and
13178 unmodifiable, unless the --security option is used.
13180 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
13182 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
13183 reflection.c: properly refcount images and assemblies, many leaks fixed.
13185 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13187 * threadpool.c: increase the timeout for threads in the thread pool to
13188 10s. Fixes bug #67159.
13190 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
13192 * class-internals.h: Sun's compiler insists on explicit
13193 signed on bit fields to handle then correctly.
13195 2005-01-19 Miguel de Icaza <miguel@ximian.com>
13197 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
13198 Make the size of the array fit only the number of invalid path
13199 chars that we have.
13201 * class.c (_mono_class_get): Improve the error reporting when a
13202 class referenced is not found, to assist debugging.
13204 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
13206 * threads.c: fix off-by-one error.
13207 * domain.c: free data allocated in the domain.
13209 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
13211 * reflection.c (mono_method_body_get_object): Fill out exception info
13214 * object-internals.h: Add MonoReflectionExceptionHandlingClause
13217 2005-01-19 Martin Baulig <martin@ximian.com>
13219 * loader.c (mono_get_method_constrained): Make this work again.
13221 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
13223 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
13224 guint16 to match the managed side.
13226 * reflection.c (mono_reflection_body_get_object): Fill out local
13229 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
13232 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
13233 'local_var_sig_token'.
13235 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
13237 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
13240 * reflection.c (mono_method_body_get_object): Handle abstract and
13243 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
13245 * marshal.c, loader.c, class-internals.h, reflection.c:
13246 store the emthod data for a wrapper in an array instead of a list.
13248 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
13250 * marshal.c: change the code to allocate memory more
13251 conservatively for method wrappers.
13253 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
13255 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
13256 fields from MonoClass to the marshal info structure where they belong.
13258 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
13260 * class.c, object.c, class-internals.h, marshal.c: rearrange
13261 some fields and tweak some types to lower memory usage.
13263 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
13265 * threads.c (signal_thread_state_change): Handle the case when the
13266 target thread is the current thread.
13268 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
13270 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
13271 emit_ptr_to_object_conv.
13273 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
13274 marshalling. Fixes #71352.
13276 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
13278 * metadata.h, blob.h: move table enum to blob.h so it can be included
13280 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
13281 cut the size of MonoImage/MonoDynamicImage.
13283 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
13285 * profiler.c (mono_profiler_install_simple): Fix default arguments.
13287 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
13289 * reflection.c, reflection.h, icall.c: add a function to check
13290 if an attribute type is defined for a metadata object.
13292 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
13294 * object-internals.h: Added some needed fields from StringBuilder class.
13295 * marshal.c: Set the maxCapacity when creating a StringBuilder.
13297 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
13299 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
13300 threads before shutting down the runtime.
13302 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
13304 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
13306 * object-internal.h, threads.c: implement stacksize and
13307 parameterized thread start functionality (requires
13308 matching corlib). Marked broken code for later removal.
13310 2005-01-12 Martin Baulig <martin@ximian.com>
13312 * class-internals.h (MonoGenericClass): Moved the `initialized'
13313 flag to MonoDynamicGenericClass, removed `init_pending'.
13314 (MonoGenericInst): Added `is_reference' flag.
13316 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
13318 * reflection.c (mono_image_create_pefile): Only set the pe_offset
13319 inside the MSDOS header. Fixes #71201.
13321 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
13323 (mono_domain_finalize): Ditto.
13325 2005-01-12 Martin Baulig <martin@ximian.com>
13327 * class.c (mono_get_shared_generic_class): Use the cache for
13328 non-dynamic generic classes.
13330 * class-internals.h (mono_class_create_generic_2): Removed
13331 function prototype, this function is now static inside class.c.
13333 * class.c (mono_class_create_generic_2): Made this static, only
13334 call it from mono_class_init() and mono_class_setup_parent().
13335 (collect_implemented_interfaces_aux): Call mono_class_init() on
13336 the interfaces we collect.
13337 (mono_class_setup_vtable): Call mono_class_init (class->parent).
13339 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
13341 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
13342 it a real thread handle.
13344 * domain-internals.h: Move exvar_offset from MonoJitInfo to
13345 MonoJitExceptionInfo, since each catch clause needs its own variable.
13347 2005-01-11 Dick Porter <dick@ximian.com>
13349 * image.c (mono_pe_file_open): New variant on mono_image_open()
13350 that does not set up the CLI metadata; used for FileVersionInfo so
13351 it can get the data for windows binaries too.
13353 * process.c (process_read_string_block): Don't read off the end of
13354 the StringTable block.
13356 These both fix bug 70766.
13358 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
13360 * gc.c: set some fields to NULL at GC cleanup time.
13361 * threads.c: if we quit the main thread, call exit ().
13363 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
13365 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
13367 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
13369 * threads.h, threads.c, object.c: added accessor and settor for
13370 main_thread. Handle it specially when exiting from it: wait
13371 for other foreground threads to exit.
13373 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
13375 * process.c, verify.c: remove some bloat.
13377 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
13379 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
13380 the calling convention to cdecl under win32.
13382 2005-01-08 Ben Maurer <bmaurer@ximian.com>
13384 * object.c (mono_object_get_size): New function to get the size of
13385 an object instance.
13387 * profiler.c (simple_allocation): Use above.
13389 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
13391 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
13392 ves_icall_System_AppDomain_getRootDomain (as it's not required to
13393 get an appdomain by it's id and we can't assume the root's id is 0).
13394 * domain-internals.h: Change the function prototype to match.
13395 * icall.c: Change the icall table for AppDomain.
13397 2005-01-08 Miguel de Icaza <miguel@ximian.com>
13399 * locales.c (string_invariant_compare_char): Only compute
13400 GUnicodeTypes in the case where we need them. Test for ordinality
13401 first and return if so.
13406 * FIXME: here we must use the information from c1type and c2type
13407 * to find out the proper collation, even on the InvariantCulture, the
13408 * sorting is not done by computing the unicode values, but their
13409 * actual sort order.
13412 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13414 * loader.c: for P/Invoke methods, allow the "Internal" shared
13415 library name to refer to the calling process symbol namespace.
13417 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
13419 * Makefile.am: Add the security manager to the build.
13420 * security-manager.c|h: New. Initialization of the security manager.
13422 2005-01-07 Dick Porter <dick@ximian.com>
13425 * monitor.c: Update thread state during Monitor and WaitHandle
13426 waits. Fixes bug 71031.
13428 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
13430 * reflection.c (property_encode_signature): Correctly handle when the
13431 property has no methods.
13433 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
13435 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
13437 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
13438 fields from mb, not rmb. Fixes #71017.
13440 * marshal.c (emit_ptr_to_str_conv): Add support for
13441 ByValTStr -> string conversion. Fixes #71015.
13443 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
13445 * mempool.c (mono_mempool_contains_addr): New helper function.
13447 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
13449 * metadata.c (mono_metadata_compute_size): Fix size calculation of
13450 HasSematics encoded fields.
13452 * metadata.c (mono_type_to_unmanaged): Improve error message for
13453 invalid string marshalling.
13455 * metadata.c: Fix warnings.
13457 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
13459 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
13462 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
13464 * domain.c object.c domain-internals.h: Revert part of r38077 since the
13465 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
13468 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
13470 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
13471 so methods containing these can be AOTed.
13473 2005-01-03 Martin Baulig <martin@ximian.com>
13475 * loader.c (find_method): Removed the hack for generic instances.
13476 (method_from_memberref): If our parent is a generic instance, pass
13477 its generic type definition to find_method() and then inflate the
13479 (mono_get_method_constrained): Pass the generic type definition to
13480 find_method() and inflate the method later.
13482 * class-internals.h (MonoStats): Added `generic_class_count'.
13484 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
13485 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
13487 * reflection.c (mono_custom_attrs_from_params): Don't ignore
13488 generic type definitions.
13490 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
13492 * loader.c icall.c: Fix warnings.
13494 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
13496 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
13497 blittable types. Fixes #70864.
13499 2004-12-29 Martin Baulig <martin@ximian.com>
13502 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
13504 * reflection.c (mono_method_get_object): Create a
13505 "System.Reflection.MonoGenericMethod" for inflated methods; don't
13506 call mono_get_inflated_method().
13508 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
13510 2004-12-27 Martin Baulig <martin@ximian.com>
13512 * class-internals.h (MonoMethod): Added `is_inflated' flag.
13513 (MonoMethodInflated): Added `inflated' field.
13515 * class.c (mono_class_inflate_generic_method): Don't really
13516 inflate the method here; just set the `is_inflated' flag in the
13518 (mono_class_get_inflated_method): Actually inflate the method here
13519 if it's not already inflated; we use the MonoMethodInflated's new
13520 `inflated' field as a cache.
13522 2004-12-26 Martin Baulig <martin@ximian.com>
13525 (inflate_generic_class): Moved some code out of inflate_generic_type().
13526 (mono_class_inflate_generic_method): If we're already inflated,
13527 inflate the context and use the declaring method; ie. make sure
13528 the declaring method of an inflated method is always the generic
13530 (mono_class_create_from_typedef): Create
13531 `class->generic_container->context->gclass'.
13533 2004-12-24 Ben Maurer <bmaurer@ximian.com>
13535 * metadata-internals.h, marshal.c, reflection.c: More
13536 MonoGHashTable->GHashTable.
13538 * domain-internals.h, class.c: Change MonoGHashTable's into
13539 GHashTables for some cases where no gc stuff is used
13541 All users: update apis
13543 2004-12-23 Ben Maurer <bmaurer@ximian.com>
13545 * metadata.c (builtin_types): Make this `const'. Makes this get
13546 put into the shareable section.
13547 (mono_metadata_init): Casts to make gcc happy.
13549 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
13551 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
13553 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
13555 * icall.c: Added an internal call to retrieve the position and length
13556 of assembly-level declarative security attributes (RequestMinimum,
13557 RequestOptional and RequestRefuse). This is used by the Assembly class
13558 to re-create the corresponding permission sets.
13560 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
13562 * marshal.c: fix the stelemref wrapper to be type correct
13565 2004-12-20 Ben Maurer <bmaurer@ximian.com>
13567 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
13568 to do key & 0x7fffffff. Hashtable already does this. It just
13569 results in longer code.
13571 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
13573 * appdomain.c: Bump corlib version.
13574 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
13575 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
13576 * reflection.c|h: Add functions to get declarative security infos
13577 (blob position and length) for assemblies, classes and methods.
13579 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
13581 * reflection.c: sort the constant table (bug #70693).
13583 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
13585 * object-internals.h, threads.c, domain.c: add accessors for
13586 the MonoThread and MonoDomain tls keys.
13588 2004-12-18 Martin Baulig <martin@ximian.com>
13590 * class.c (inflate_generic_type): If we're inflating a generic
13591 instance, set `ngclass->context->container = context->container';
13592 ie. the container we inflated into.
13594 * metadata.c (mono_metadata_parse_generic_param): Reflect above
13595 inflate_generic_type() changes.
13597 2004-12-17 Martin Baulig <martin@ximian.com>
13599 * class-internals.h
13600 (MonoGenericClass): Replaced `MonoType *generic_type' with
13601 `MonoClass *generic_class'. Removed `dynamic_info'; if
13602 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
13603 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
13605 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
13607 * exception.c (mono_exception_from_token): New helper function.
13609 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
13611 * assembly.c (mono_assembly_load_with_partial_name): Call
13612 mono_assembly_loaded before invoking the preload hooks. Fixes
13615 * object-internals.h (MonoThread): Change culture_info and
13616 ui_culture_info into an array.
13618 * threads.c: Cache culture info objects from more than one appdomain.
13620 * threads.c threads-types.h icall.c: Add icalls for manipulating the
13621 current UI culture.
13623 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
13625 * threads.h threads.c appdomain.c: Clear the culture_info field of
13626 all threads during unloading if they point to an object in the dying
13629 2004-12-13 Ben Maurer <bmaurer@ximian.com>
13631 * culture-info.h (TextInfoEntry): New struct
13632 * object-internals.h: sync with managed
13633 * locales.c: fill the `text_info_data' field
13634 * culture-info-tables.h: update
13636 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
13638 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
13641 2004-12-12 Ben Maurer <bmaurer@ximian.com>
13643 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
13644 (ves_icall_ModuleBuilder_getMethodToken): Ditto
13646 2004-12-12 Martin Baulig <martin@ximian.com>
13648 * mono-debug-debugger.c (write_type): If we're an enum and the
13649 builtin types have already been initialized, call mono_class_init().
13651 2004-12-11 Martin Baulig <martin@ximian.com>
13653 * metadata.c (mono_metadata_load_generic_params): Added
13654 `MonoGenericContainer *parent_container' argument; automatically
13655 compute `container->is_method'; pass the correct owner to
13658 * reflection.c (compare_genericparam): Sort the GenericParam table
13659 according to increasing owners.
13661 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
13663 * profiler.c: allow disabling the default profiler.
13665 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
13667 * decimal.c, icall.c: allow disabling System.Decimal support.
13669 2004-12-09 Marek Safar <marek.safar@seznam.cz>
13671 * reflection.c: Add support for null attribute arguments.
13673 2004-12-09 Martin Baulig <martin@ximian.com>
13675 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
13676 names to get rid of compiler warnings.
13678 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
13680 * marshal.c (mono_marshal_get_struct_to_ptr): Call
13681 mono_marshal_load_type_info (). Fixes #69625.
13682 (mono_marshal_get_ptr_to_struct): Likewise.
13684 2004-12-08 Martin Baulig <martin@ximian.com>
13686 * mono-debug.h: Bumped version number to 47.
13688 * mono-debug-debugger.c
13689 (mono_debugger_event_handler, mono_debugger_event): Take two
13690 guint64 arguments insteed of a gpointer and a guint32.
13692 2004-12-08 Martin Baulig <martin@ximian.com>
13694 * debug-mono-symfile.h
13695 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
13696 `address' to `native_offset'.
13698 2004-12-08 Martin Baulig <martin@ximian.com>
13700 * class.c (mono_class_create_from_typespec): Only inflate if we
13701 either have `context->gclass' or `context->gmethod'.
13703 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
13705 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
13707 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
13709 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
13711 * reflection.c (mono_assembly_get_object): Remove the workaround put
13712 in for the release.
13714 * appdomain.c: Use the corlib_internal field from MonoAssembly.
13716 * appdomain.c: Bump corlib version.
13718 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
13719 be visible in other appdomains.
13721 2004-12-07 Ben Maurer <bmaurer@ximian.com>
13723 * threads.c: Interlocked inc and dec for longs were messed up,
13724 use a KISS based impl for this. Fixes 70234
13726 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
13728 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
13730 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
13732 * icall.c: fix to follow policy not to allow struct
13733 arguments in icalls.
13735 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13737 * process.c: make the patch that handles spaces in file paths work
13738 on mono/windows too.
13740 2004-12-06 Martin Baulig <martin@ximian.com>
13742 * class.c (mono_class_create_generic): Call
13743 mono_class_setup_supertypes() if we're dynamic.
13744 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
13746 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
13748 * object-internals.h: Add new fields to MonoThread.
13750 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13752 * icall.c threads-types.h threads.c: Add new icalls.
13754 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
13756 * object-internals.h (MonoReflectionAssembly): Sync object layout with
13759 * appdomain.c: Bump corlib version.
13761 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
13762 internal assemblies. Fixes #69181.
13764 2004-12-05 Martin Baulig <martin@ximian.com>
13766 * class.c (mono_class_inflate_generic_signature): Make this a
13767 no-op if `context' is NULL or we don't have any type parameters;
13768 also copy `sentinelpos'.
13770 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
13772 * image.c: Add unbox_wrapper_cache.
13774 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
13776 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
13777 function generator.
13779 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
13782 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
13784 2004-12-04 Martin Baulig <martin@ximian.com>
13786 * loader.c (mono_method_get_signature_full): New public function;
13787 like mono_method_get_signature(), but with an additional
13788 `MonoGenericContext *' argument.
13790 * class.c (mono_class_inflate_generic_signature): Formerly known
13791 as inflate_generic_signature(); make this public.
13793 2004-12-04 Martin Baulig <martin@ximian.com>
13796 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
13797 instead of a `MonoGenericContainer *'.
13798 (mono_metadata_parse_array_full): Likewise.
13799 (mono_metadata_parse_signature_full): Likewise.
13800 (mono_metadata_parse_method_signature_full): Likewise.
13801 (mono_metadata_parse_generic_inst): Likewise.
13802 (mono_metadata_parse_generic_param): Likewise.
13803 (mono_metadata_parse_mh_full): Likewise.
13804 (mono_type_create_from_typespec_full): Likewise.
13806 2004-12-03 Martin Baulig <martin@ximian.com>
13808 * class-internals.h (MonoGenericContainer): Replaced the
13809 `MonoGenericContext * pointer with a `MonoGenericContext'
13810 structure and made it the first element.
13812 2004-12-03 Martin Baulig <martin@ximian.com>
13815 (inflate_generic_type): Set the `context->container' when creating
13816 a new MonoGenericContext.
13817 (mono_class_inflate_generic_method): Likewise.
13818 (mono_class_create_from_typespec): Just use `context->container'
13819 to get the container.
13821 * loader.c (method_from_methodspec): Set `context->parent' from
13822 `context->container' - and if that's a method container, use its
13823 parent. Also set the `context->container' when creating a new
13824 MonoGenericContext.
13825 (mono_get_method_from_token): Use just `context->container' to get
13828 * metadata.c (do_mono_metadata_parse_generic_class): Also set
13829 `gclass->context->container'.
13831 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
13832 the `context->container' when creating a new MonoGenericContext.
13834 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
13836 * reflection.c (compare_genericparam): Sort params with identical
13837 owner by their number. Fixes gen-111 on sparc.
13839 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
13841 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
13842 around the domain changes.
13844 * appdomain.c (mono_domain_unload): Handle the case when the thread
13845 calling Unload is itself being aborted during unloading. Fixes #70022.
13847 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
13849 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
13850 checkpoint_func as an icall so it gets a wrapper.
13851 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
13852 in the cross-appdomain wrappers too.
13854 * threads.c (mono_thread_has_appdomain_ref): Make this public.
13856 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
13858 * reflection.c: Fix some memory leaks.
13860 2004-12-02 Martin Baulig <martin@ximian.com>
13862 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
13864 * metadata.c (generic_class_cache): New static hashtable.
13865 (mono_metadata_lookup_generic_class): New public method.
13867 2004-12-02 Martin Baulig <martin@ximian.com>
13869 * class.c (mono_class_create_from_typedef): Call
13870 mono_class_setup_parent() and mono_class_create_mono_type() before
13871 parsing the interfaces.
13873 2004-12-02 Martin Baulig <martin@ximian.com>
13875 * metadata.c (generic_inst_cache): New static hashtable.
13876 (mono_metadata_lookup_generic_inst): New public function.
13877 (mono_metadata_inflate_generic_inst): New public function.
13878 (mono_metadata_parse_generic_inst): New public function.
13879 (do_mono_metadata_parse_generic_class): Use the new
13880 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
13881 since this'll also use the cache.
13883 * reflection.c (mono_reflection_bind_generic_method_parameters):
13884 Use mono_metadata_lookup_generic_inst() to use the new cache.
13886 * class.c (inflate_mono_type): Use
13887 mono_metadata_inflate_generic_inst() to inflate a generic
13888 instance; this'll also use the new cache.
13890 * loader.c (method_from_methodspec): Use
13891 mono_metadata_parse_generic_inst() and
13892 mono_metadata_inflate_generic_inst() rather than parsing it
13893 manually, so we can use the new cache.
13895 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
13897 * threads.c (wait_for_tids): Do not incorrectly free threads when
13898 the wait times out.
13900 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13902 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
13903 iter->args based on whether parameters are passed in registers (i.e.
13904 MONO_ARCH_REGPARMS is defined)
13906 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
13908 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
13909 the exception message. Fixes #70070.
13910 (method_from_methodspec): Fix warnings.
13912 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13914 * process.c: (complete_path) return the path quoted
13916 2004-12-01 Martin Baulig <martin@ximian.com>
13918 * class-internals.h (MonoGenericInst): New structure.
13919 (MonoGenericClass): Replaced `type_argc', `type_argv' and
13920 `is_open' with `MonoGenericInst *inst'.
13921 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
13922 `is_open' with `MonoGenericInst *inst'.
13924 2004-11-30 Martin Baulig <martin@ximian.com>
13926 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
13928 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
13929 to `generic_class_cache'.
13932 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
13933 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
13934 (mono_generic_inst_is_valuetype): Renamed to
13935 mono_generic_class_is_valuetype().
13937 * class-internals.h
13938 (MonoGenericInst): Renamed to MonoGenericClass.
13939 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
13940 (MonoClass): Renamed `generic_inst' to `generic_class'.
13941 (MonoGenericContext): Renamed `ginst' to `gclass'.
13943 * object-internals.h
13944 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
13946 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
13947 mono_reflection_generic_class_initialize().
13949 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
13950 now known as "System.Reflection.MonoGenericClass".
13951 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
13953 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
13955 * class-internals.h: Added a flag field to MonoClass to cache the
13956 declarative security attributes actions associated with the class.
13957 * domain-internals.h: Added booleans to MonoJitInfo to cache the
13958 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
13959 applicable to the JITted method.
13960 * reflection.c|h: Added functions to extract (as flags) which security
13961 actions are available (declaratively) for a method, class or assembly.
13962 * metadata.c|h: Added functions to search the declarative security
13963 table in the metadata.
13965 2004-11-29 Ben Maurer <bmaurer@ximian.com>
13967 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
13968 EXPORTEDTYPES are already in the class name cache, so there is no
13969 need to add extra code here to look at them. Just removes a bit of
13972 (ves_icall_System_Environment_get_TickCount): No need for #if
13973 WINDOWS. We already have the code in io-layer.
13975 2004-11-28 Martin Baulig <martin@ximian.com>
13978 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
13981 2004-11-27 Miguel de Icaza <miguel@ximian.com>
13983 * assembly.c (do_mono_assembly_open): Instead of having a
13984 conditional WITH_BUNDLE, incorporate support for bundles here, by
13985 having a global `bundles' variable holding a pointer to the actual
13988 (mono_register_bundled_assemblies): New API call used by the
13991 See mkbundle.1 for details.
13993 2004-11-27 Martin Baulig <martin@ximian.com>
13995 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
13996 the vtable for generic methods.
13998 2004-11-26 Martin Baulig <martin@ximian.com>
14001 (mono_metadata_generic_method_hash): New public function.
14002 (mono_metadata_generic_method_equal): Likewise.
14004 * class-internals.h
14005 (MonoGenericContainer): Added `GHashTable *method_hash'.
14007 * reflection.c (ReflectionMethodBuilder): Added
14008 `MonoGenericContainer *generic_container'.
14009 (reflection_methodbuilder_to_mono_method): Don't create a new
14010 MonoGenericContainer each time we're called.
14011 (mono_reflection_bind_generic_method_parameters): Use
14012 `container->method_hash' to cache the results so we don't create a
14013 different method if we're called several times with the same
14016 * loader.c (method_from_methodspec): Use the new
14017 `container->method_hash' here, too.
14019 2004-11-26 Martin Baulig <martin@ximian.com>
14021 * class.c (inflate_generic_signature): Correctly compute
14022 `res->has_type_parameters'.
14023 (mono_class_vtable): Use the `has_type_parameters' flag to
14024 determine whether we're a generic method.
14026 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
14028 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
14030 * object.c (mono_runtime_run_main): Fix a small memory leak.
14032 2004-11-25 Martin Baulig <martin@ximian.com>
14034 * class.c (set_generic_param_owner): Fixed the loop.
14036 2004-11-25 Martin Baulig <martin@ximian.com>
14038 * object.c (mono_class_vtable): Don't create any JIT wrappers for
14041 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
14043 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
14044 names. Fixes #69787.
14046 2004-11-24 Martin Baulig <martin@ximian.com>
14048 * class.c (mono_class_create_generic_2): If we don't have a
14049 `ginst->parent', inflate `gklass->parent' to get our parent.
14051 2004-11-24 Martin Baulig <martin@ximian.com>
14053 * reflection.c (compare_genericparam): Correctly sort the
14054 GenericParam table; fixes #69779.
14056 2004-11-23 Ben Maurer <bmaurer@ximian.com>
14058 * reflection.c: When writing a PE file, don't create a huge
14059 buffer in memory. Just write the arrays we have to the file.
14060 This reduces memory usage.
14062 * metadata-internals.h: MonoDynamicStream pefile is no longer used
14065 2004-11-17 Martin Baulig <martin@ximian.com>
14067 * class.c (mono_class_init): Don't setup `class->parent' for
14068 dynamic instances; moved this to mono_class_generic_2().
14069 (mono_class_create_generic): Also set `klass->inited' for dynamic
14071 (mono_class_create_generic_2): Don't do anything for dynamic
14072 generic instances. Set `klass->parent' here and also call
14073 mono_class_setup_parent() here.
14075 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
14076 `MonoType *parent' argument; set `ginst->parent' before calling
14077 mono_class_create_generic_2(), so we set the correct parent.
14079 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
14081 * reflection.c: allow getting attributes from ModuleBuilder
14084 2004-11-17 Martin Baulig <martin@ximian.com>
14086 * class.c (mono_class_create_from_typedef): If a type parameter is
14087 inherited from an outer class, set its owner to that class.
14089 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
14091 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
14092 for (int*) written size. This fixes bug #69592.
14094 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
14096 * icall.c: Added IsAuthenticodePresnet internal call.
14097 * image.c|h: New function that check a MonoImage for an Authenticode
14098 signature in the certificate PE data directory.
14099 * security.c|h: New internal call to ask the runtime if an
14100 Authenticode signature seems referenced in the PE header.
14102 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
14104 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
14106 * reflection.c (mono_image_create_pefile): Free the assembly streams
14107 after writing out the assembly file.
14109 * object.c (mono_runtime_run_main): Fix small memory leak.
14111 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
14112 property access modifiers. Fixes #69389.
14114 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
14116 * domain.c, object.c, object-internals.h, domain-internals.h,
14117 object.h, marshal.c: keep dynamic code info per domain.
14119 2004-11-15 Martin Baulig <martin@ximian.com>
14121 * class.c (mono_type_get_name_recurse): Put type arguments in
14122 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
14125 2004-11-15 Martin Baulig <martin@ximian.com>
14127 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
14128 (mono_class_setup_vtable): When computing `the_cname' for a
14129 generic instance, don't include the namespace since we'd otherwise
14132 2004-11-15 Martin Baulig <martin@ximian.com>
14134 * class.c (mono_class_create_generic): Changed return type to void.
14135 (mono_class_create_generic_2): New public function; setup
14136 `class->method', `class->field' and `class->interfaces' here
14137 instead of in mono_class_init().
14139 * class.h (mono_class_create_generic): Moved to class-internals.h.
14141 2004-11-14 Ben Maurer <bmaurer@ximian.com>
14143 * reflection.c (mono_image_create_pefile): take a file HANDLE.
14144 rather than writing to memory, write to this file. Right now,
14145 we are just writting into a buffer, and copying that. However
14146 we can avoid the buffer later.
14148 (mono_dynamic_stream_reset): new function
14150 * icall.c, object-internals.h: update for the above.
14152 2004-11-13 Ben Maurer <bmaurer@ximian.com>
14154 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
14155 have been using gc'd memory. First it is slower, unlikely
14156 the comment in the source code said, secondly, it increases
14157 our footprint to do it in the gc.
14159 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
14160 the method so that it does not have to copy to managed code.
14162 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
14164 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
14166 2004-11-12 Martin Baulig <martin@localhost>
14168 * reflection.c (mono_image_create_token): Allow generic method
14169 definitions here, since they may appear in an `.override'; see
14170 gen-98/gen-99 for an example.
14172 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
14174 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
14177 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
14180 2004-11-11 Martin Baulig <martin@ximian.com>
14182 * class.c (mono_class_setup_vtable): In an explicit interface
14183 implementation, the method name now includes the arity.
14185 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
14187 * object.c (mono_array_full_copy): Fix warning.
14189 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
14191 * appdomain.c: Removed look_for_method_by_name(). Use the new method
14192 mono_class_get_method_from_name() instead.
14194 * class-internals.h: Added two new types of wrappers.
14195 Added MonoRemotingTarget enum. Added new trampoline function type, which
14196 takes an additional MonoRemotingTarget value as parameter, so it is
14197 possible to request a trampoline for a specific target.
14199 * class.c: Added new mono_class_get_method_from_name() method.
14201 * class.h: In MonoRemoteClass, we can have now to vtables, one for
14202 general remoting sinks and one specific for cross domain calls.
14204 * debug-helpers.c: Added new wrapper names.
14206 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
14209 * image.c: Porperly delete value objects form the remoting invoke hashtable.
14211 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
14212 with several other methods (mono_marshal_get_xappdomain_dispatch,
14213 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
14214 and others) can generate a fast remoting wrapper for cross domain calls.
14215 More information can be found in docs/remoting.
14216 Other changes: Removed mono_find_method_by_name, and used
14217 mono_class_get_method_from_name instead.
14218 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
14219 is stored in the remoting invoke hashtable.
14221 * marshal.h: published the new method for getting the xdomain wrapper,
14222 and also added a method for getting the adequate wrapper for a given
14225 * object-internals.h, object.c: Added a couple of methods for capying and
14227 Modified mono_install_remoting_trampoline, which takes the new remoting
14228 trampoline that has a remoting target as parameter.
14229 mono_class_proxy_vtable now also takes a remoting target as parameter, and
14230 will return the most suitable vtable for the target.
14231 Added mono_remote_class_vtable, which returns the vtable of a remote class
14232 (which can be the normal remoting vtable or the xdomain vtable).
14234 * threads.c: the xdomain invoke and dispatch wrappers must also be
14235 protected against interruptions.
14237 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14239 * icall.c: use memmove in BlockCopyInternal when the source and
14240 destination arrays are the same.
14242 2004-11-09 Martin Baulig <martin@ximian.com>
14244 * class-internals.h (MonoGenericContainer): Removed `method' and
14245 `signature', replaced them with `is_method' and `is_signature'
14246 flags. Added `context'.
14248 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
14249 instead of a `MonoGenericContainer *'.
14251 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
14252 for dynamic type parameters.
14253 (mono_metadata_load_generic_params): Setup `container->context'.
14255 * reflection.c (mono_reflection_setup_generic_class): Setup
14256 `tb->generic_container->context'.
14257 (do_mono_reflection_bind_generic_parameters): Use
14258 mono_class_inflate_generic_type() to correctly inflate types,
14259 rather than using our own hack just for MONO_TYPE_VAR.
14261 2004-11-09 Martin Baulig <martin@ximian.com>
14263 * class.c (mono_class_inflate_generic_method): Small fix; don't
14267 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
14268 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
14269 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
14270 (ves_icall_Type_BindGenericParameters): Likewise.
14271 (ves_icall_Type_get_IsGenericInstance): Likewise.
14272 (ves_icall_Type_GetGenericParameterPosition): Likewise.
14273 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
14274 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
14275 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
14277 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
14279 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
14280 assembly versions and public key tokens. Fixes #69113.
14282 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
14284 * metadata.c: fix bug introduced with the type cache changes
14287 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
14289 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
14290 the MonoClass pointer instead of the token in exception clauses.
14291 * reflection.c: updates for the above and make the code not depend
14292 on the structure of MonoExceptionClause.
14294 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
14296 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
14297 Add support for dynamic assemblies. Fixes #69114.
14299 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
14301 2004-11-07 Ben Maurer <bmaurer@ximian.com>
14303 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
14304 since most only those methods use it. the code member of
14305 MonoMethodPInvoke was dead, so that can be removed too. Also,
14306 remove inline_count (again, not used), and move slot so that it
14307 can share bits with some other flags. This saves 8 bytes in the
14308 structure and gives us about 50 kb back for mcs helloworld.cs
14310 * *.[ch]: Do naming changes for the above.
14312 * loader.c (mono_method_get_header): Lazily init the header
14314 (mono_get_method_from_token): don't init the header here
14315 (mono_free_method): the header may never be allocated
14317 Overall, this saves 150 kb of unmanaged allocations
14318 for mcs helloworld.cs. That accounts for 10% of the unmanaged
14321 * loader.c, loader.h (mono_method_get_header): new accessor.
14323 * *.[ch]: use the above method. Prepares us to lazily load
14326 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
14327 three warnings, which are actual bugs (see 69206).
14329 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
14330 unused. Saves a cool 4 bytes / method.
14332 2004-11-06 Ben Maurer <bmaurer@ximian.com>
14334 * metadata.c (builtin_types): Add types for System.Object here.
14335 (mono_metadata_parse_type_full): Cache MonoType*'s that are
14336 for a class or valuetype from klass->this_arg or klass->byval_arg.
14338 On mcs for a hello world, this gets us down from 21836 MonoType's
14341 (mono_metadata_free_type): Account for the above change.
14343 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
14345 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
14346 exception instead of asserting if name is null.
14347 (ves_icall_System_AppDomain_GetData): Ditto.
14349 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
14351 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
14354 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
14355 Return NULL when the domain does not have entry_assembly set.
14357 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
14358 Add a 'resource_modules' argument.
14359 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
14361 * reflection.c (mono_reflection_create_runtime_class): Move setting
14362 of wastypebuilder here, so mono_get_type_object () returns a MonoType
14365 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
14366 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
14367 Throw an ArgumentNullException if 'ptr' is null.
14369 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
14370 assemblies here. Fixes #69020.
14372 2004-11-05 Geoff Norton <gnorton@customerdna.com>
14374 * reflection.c (build_compressed_metadata): Fix the previous patch for
14375 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
14378 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
14380 * assembly.c (mono_assembly_names_equal): Allow a match if one of
14381 the cultures is false. Fixes #69090.
14383 * reflection.c (build_compressed_metadata): Fix invalid memory read
14384 detected by valgrind.
14386 * reflection.c (mono_reflection_get_type): Avoid triggering a
14387 TypeResolve multiple times for the same type. Fixes #65577.
14389 2004-11-04 Ben Maurer <bmaurer@ximian.com>
14391 * marshal.c: Avoid using ldftn to call managed functions. It is
14392 much slower than just a call.
14394 * reflection.c (mono_module_get_object): free the basename we
14395 allocate here from glib.
14397 * reflection.c (ensure_runtime_vtable): make sure to free
14398 overrides. Also, we were allocating an array of MonoMethod not an
14399 array of MonoMethod*.
14401 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
14403 * image.c (mono_image_close): free image->guid here.
14405 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
14407 * reflection.c: Fix some spec conformance issues with the PE file
14408 structures so mcs compiled apps run on the Net 2.0 beta.
14410 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
14412 * string-icalls.c (ves_icall_System_String_ctor_encoding):
14413 Implement this. Fixes #67264.
14415 * debug-helpers.h debug-helpers.c marshal.c: Move
14416 mono_find_method_by_name to debug-helpers.c.
14418 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
14420 * object.c (mono_release_type_locks): type_initialization_hash is
14423 * reflection.c object.c object-internals.h: Fix warnings.
14425 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
14426 without accessors. Fixes #61561.
14428 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
14429 application base from the root domain if not set. Fixes #65641.
14430 (mono_runtime_init): Fix warning.
14432 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14434 * appdomain.c: call mono_thread_pool_init.
14435 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
14436 of worker threads based on the number of CPUs and the environment
14437 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
14438 for non-windows (windows) systems.
14440 2004-10-27 Chris Toshok <toshok@ximian.com>
14442 * mono-debug-debugger.c (write_class): don't call mono_class_init
14443 here, as even with the check for (!klass->init_pending), we get
14444 into a situation where we're hitting cycles in class
14445 initialization. Fixes #68816.
14447 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
14449 * image.c: Avoid overwriting values in the loaded_images_hash when an
14450 assembly is loaded multiple times. Fixes #61152.
14452 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
14453 so multiple satellite assemblies for the same name can be loaded.
14456 * mono_domain_assembly_preload: Actually return the loaded assembly,
14459 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
14460 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
14462 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
14463 pending finalizers are not invoked after the appdomain has been
14464 unloaded. Fixes #67862.
14466 2004-10-22 Martin Baulig <martin@ximian.com>
14468 * mono-debug-debugger.c
14469 (mono_debugger_runtime_invoke): Don't box valuetypes.
14471 2004-10-22 Chris Toshok <toshok@ximian.com>
14473 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
14474 don't hide private methods.
14476 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
14478 * icall.c: Allows the runtime to "share" (when known) the public key
14479 token of an assembly. This avoid the need to recalculate the token
14480 (from the public key) in managed code.
14482 2004-10-21 Chris Toshok <toshok@ximian.com>
14484 * debug-helpers.c (append_class_name): argh, revert last patch.
14486 2004-10-21 Chris Toshok <toshok@ximian.com>
14488 * debug-helpers.c (append_class_name): use '+' as the delimiter,
14489 not '/', so that it matches what the debugger uses to look up
14492 2004-10-21 Martin Baulig <martin@ximian.com>
14494 * mono-debug-debugger.c (mono_debugger_throw_exception): New
14495 public method; this is called each time an exception is thrown and
14496 allows the debugger to use exception catch points.
14498 2004-10-21 Martin Baulig <martin@ximian.com>
14500 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
14501 the stack pointer and the exception object in some struct and pass
14502 that to the debugger.
14504 2004-10-21 Chris Toshok <toshok@ximian.com>
14506 * mono-debug-debugger.c (do_write_class): add instance/static
14507 event support. We don't expose "raise" or "other" yet.
14508 (event_is_static): new method.
14510 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
14512 * mono-debug-debugger.c
14513 (mono_debugger_handle_exception): Remove
14514 bogus return value for fussy compilers.
14516 2004-10-20 Martin Baulig <martin@ximian.com>
14518 * mono-debug-debugger.c
14519 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
14520 (mono_debugger_handled_exception): Likewise.
14522 2004-10-20 Martin Baulig <martin@ximian.com>
14524 * mono-debug-debugger.h (MonoDebuggerEvent): Added
14525 MONO_DEBUGGER_EVENT_EXCEPTION.
14527 * mono-debug-debugger.c (mono_debugger_handle_exception): New
14528 public function to send the debugger a notification for an
14529 exception and inform it about a catch/finally clause.
14531 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
14533 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
14534 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
14537 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
14539 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
14541 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
14542 marshalled as [In,Out]. Fixes #58325.
14544 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
14546 * reflection.c (mono_method_body_get_object): Implement some fields.
14548 2004-10-12 Martin Baulig <martin@ximian.com>
14550 * reflection.c (mono_reflection_bind_generic_parameters): Small
14551 fix, correctly retrieve our parent from a generic instance.
14553 2004-10-12 Martin Baulig <martin@ximian.com>
14555 * metadata.c (mono_metadata_generic_param_equal): We always have
14559 (mono_class_from_generic_parameter): We need to have an owner.
14560 (my_mono_class_from_generic_parameter): Likewise.
14562 * reflection.c (mono_reflection_setup_generic_class): Renamed to
14563 mono_reflection_create_generic_class() and added a new
14564 mono_reflection_setup_generic_class().
14565 (mono_reflection_initialize_generic_param): If we're a nested
14566 generic type and inherited from the containing class, set our
14567 owner to the outer class.
14569 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
14571 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
14573 * reflection.c (mono_method_body_get_object): New function to create
14574 a MethodBody object.
14576 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
14578 2004-10-11 Martin Baulig <martin@ximian.com>
14580 * metadata.c (_mono_metadata_type_equal): Renamed to
14581 do_mono_metadata_type_equal() and made static.
14583 2004-10-11 Martin Baulig <martin@ximian.com>
14585 * appdomain.c: Bump corlib version number to 28.
14587 2004-10-10 Martin Baulig <martin@ximian.com>
14589 * class-internals.h
14590 (MonoGenericInst): Added `MonoGenericContainer *container'.
14591 (MonoGenericMethod): Likewise.
14592 (MonoGenericContext): Likewise.
14593 (MonoGenericParam): Added `MonoGenericContainer *owner'.
14596 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
14597 (do_mono_metadata_parse_generic_inst): Likewise.
14598 (mono_metadata_parse_type_full): New public method. This is the actual
14599 mono_metadata_parse_type() implementation - with an additional
14600 `MonoGenericContainer *' argument.
14601 (mono_metadata_parse_array_full): Likewise.
14602 (mono_metadata_parse_signature_full): Likewise.
14603 (mono_metadata_parse_method_signature_full): Likewise.
14604 (mono_metadata_parse_mh_full): Likewise.
14605 (mono_type_create_from_typespec): Likewise.
14606 (mono_metadata_interfaces_from_typedef_full): New public method;
14607 this is similar to the other _full() methods, but we take a
14608 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
14609 (mono_metadata_parse_generic_param): Take an additional
14610 `MonoGenericContainer *' argument and lookup the MonoGenericParam
14611 from that container.
14612 (mono_metadata_generic_param_equal): New static method to compare
14613 two type parameters.
14614 (_mono_metadata_type_equal): New static method; takes an
14615 additional `gboolean signature_only' argument - if true, we don't
14616 compare the owners of generic parameters.
14617 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
14618 with a TRUE argument - do a signature-only comparision.
14620 * loader.c: Use the new _full() methods and pass the
14621 MonoGenericContainer to them.
14623 * object-internals.h (MonoReflectionTypeBuilder): Added
14624 `MonoGenericContainer *generic_container' field.
14625 (MonoReflectionMethodBuilder): Likewise.
14627 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
14629 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
14630 case initial images of dynamic assemblies.
14632 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
14634 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
14636 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
14637 length of event->other array.
14638 (typebuilder_setup_events): Ditto.
14640 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
14641 'assembly_by_name' and add an 'assemblies' list.
14643 * assembly.h assembly.c: Add a new search hook for determining whenever
14644 an assembly is already loaded. Use this instead of searching in the
14645 loaded_assemblies list.
14647 * domain.c appdomain.c: Implement the new search hook so loaded
14648 assemblies are now scoped by appdomain. Fixes #67727.
14650 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
14652 * threads.c (mono_thread_attach): Initialize synch_lock field so
14653 mono_thread_detach works again.
14655 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
14656 'lib' too. Fixes #63130.
14658 2004-10-06 Jackson Harper <jackson@ximian.com>
14660 * culture-info-tables.h: regenerated.
14662 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
14664 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
14665 implemented by other interfaces in the result. Fixes #65764.
14667 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
14668 Handle unloadable modules without crashing.
14670 * image.c (load_modules): Revert the previous patch since modules must
14671 have a fixed index inside the array.
14673 * image.c (load_modules): Don't include native modules in the modules
14676 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
14678 * reflection.h: Add param_defaults field.
14680 * reflection.c: Add support for parameter defaults in dynamic methods.
14683 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
14684 an empty string when a type has no namespace. Fixes #64230.
14686 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
14688 * tabledefs.h: Added "internal" security actions to support non-CAS
14689 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
14690 Note: they do not seems to be used anymore in 2.0 (new metadata format)
14692 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
14694 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
14695 constructor of abstract class. Fixes #61689.
14697 2004-10-04 Martin Baulig <martin@ximian.com>
14699 * class-internals.h (MonoGenericContainer): New type.
14700 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
14701 `MonoGenericContainer *generic_container'.
14702 (MonoClass): Replaced `gen_params' and `num_gen_params' with
14703 `MonoGenericContainer *generic_container'.
14705 * metadata.c (mono_metadata_load_generic_params): Return a
14706 `MonoGenericContainer *' instead of a `MonoGenericParam *';
14707 removed the `num' argument.
14709 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
14711 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
14712 for dynamic images.
14714 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
14717 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
14719 * reflection.c: Save pe_kind and machine values into the generated
14722 * appdomain.c: Bump corlib version number.
14724 * object-internals.h: Reorganize layout of LocalBuilder.
14726 * class-internals.h class.c (mono_class_get_implemented_interfaces):
14727 New helper function.
14729 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
14730 created MonoType for dynamic types. Fixes #66180.
14732 2004-10-02 Ben Maurer <bmaurer@ximian.com>
14734 * threadpool.c: the ares hashtable needs a critical section around it.
14735 this prevents some nasty segfaults
14737 2004-10-02 Massimiliano Mantione <massi@ximian.com>
14739 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
14740 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
14743 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
14745 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
14747 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
14749 * image.c: Always canonicalize image file names, to avoid loading
14750 the same assembly twice when referenced using a relative path.
14752 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
14754 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
14756 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
14758 * marshal.c: Fix warnings.
14760 2004-09-29 Geoff Norton <gnorton@customerdna.com>
14762 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
14763 attempting to marshal the delegate_trampoline as the method_addr.
14764 This patch has a static hashtable of marshalled delegates so that
14765 we can map delegate_trampoline addresses back to delegates. This
14766 allows a delegate passed to managed code to be passed back into native
14769 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
14771 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
14773 * reflection.c (method_encode_code): Align method headers properly.
14776 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
14778 * marshal.c: In the runtime invoke wrapper, reset the abort
14779 exception if it is cached. This avoids the automatic rethrowal of
14780 the exception after the catch of the wrapper. Also check for pending
14781 interruptions before calling the managed method. This is done using
14782 the new method emit_thread_force_interrupt_checkpoint, since the
14783 normal checkpoint method is ignored when running the invoke wrapper.
14784 * object.c: If the abort exception is rethrown, set the abort_exc
14785 field of the thread, so it will be rethrown aftere every catch.
14786 * threadpool.c: Only run an interruption checkpoint if what has been
14787 requested is a stop of the thread (aborts will be ignored).
14788 * threads.c: By default, a thread will now never be interrumped while
14789 running the runtime invoke wrapper (this ensures that runtime_invoke
14790 will always return to the caller if an exception pointer is provided).
14791 There is a new special method mono_thread_force_interruption_checkpoint()
14792 to force an interruption checkpoint even if running a protected
14793 wrapper, which is used by the same runtime invoke wrapper to do a check
14796 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
14798 * object.c, object-internals.h: Implemented mono_release_type_locks,
14799 which releases the cctor locks held by a thread.
14800 * threads.c, threads.h: In thread_cleanup, release cctor locks held
14801 by a thread. Added mono_thread_exit() method to be used to safely stop
14804 2004-09-28 Raja R Harinath <rharinath@novell.com>
14806 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
14807 Move null check before dereference. Avoid indexing beyond the end
14808 of the 'modules' array.
14810 2004-09-28 Raja R Harinath <rharinath@novell.com>
14812 * metadata-internals.h (MonoImage): Add module_count field.
14813 * image.c (load_modules): Set image->module_count.
14814 (mono_image_load_file_for_image): Use image->module_count.
14815 * reflection.c (mono_image_load_module): Append to image->modules array
14816 of dynamic assembly.
14817 (mono_module_get_object): Fix loop to actually increment index.
14818 Use image->module_count.
14819 * assembly.c (mono_assembly_load_references): Use image->module_count.
14820 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
14823 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
14825 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
14826 Avoid assert on generic types.
14828 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
14830 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
14832 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
14834 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
14835 function to convert a MarshalSpec structure to its managed counterpart.
14837 * reflection.c: Fix warnings.
14839 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
14842 * icall.c (mono_create_icall_signature): Fix build.
14844 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
14846 * icall.c: Add MakePointType icall.
14848 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
14851 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14853 * threadpool.c: reuse allocated slots in the queue.
14855 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
14857 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
14859 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
14861 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
14864 * tabledefs.h: Add constants for pinvoke attributes BestFit and
14865 ThrowOnUnmappableChar.
14867 * icall.c (ves_icall_Type_GetPacking): New icall.
14869 2004-09-24 Martin Baulig <martin@ximian.com>
14871 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
14873 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14876 (mono_domain_set): allow setting a domain that is being unloaded.
14877 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
14880 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
14882 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
14883 the GetCustomAttributes icall.
14885 2004-09-23 Martin Baulig <martin@ximian.com>
14887 * object-internals.h (MonoReflectionGenericParam): Replaced
14888 'has_ctor_constraint', `has_reference_type' and `has_value_type'
14889 with `guint32 attrs'.
14891 2004-09-23 Martin Baulig <martin@ximian.com>
14893 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
14895 2004-09-23 Martin Baulig <martin@ximian.com>
14897 * object-internals.h (GenericParameterAttributes): New enum.
14899 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
14901 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
14903 * class.c (init_events): Fill out event->other field.
14905 * class.c: Fix warnings.
14907 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
14909 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
14911 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
14912 walk which doesn't supply the IL offset.
14914 2004-09-22 Martin Baulig <martin@ximian.com>
14916 * reflection.c (mono_reflection_setup_internal_class): If we're
14917 System.ValueType, System.Object or System.Enum, set
14918 `klass->instance_size' and create the vtable.
14919 (mono_reflection_create_internal_class): If we're an enum type,
14920 get the base class from our current corlib.
14922 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
14924 * reflection.h (MonoResolveTokenError): New type.
14926 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
14929 * icall.c: Add an 'error' argument to the ResolveToken icalls.
14931 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
14933 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
14934 Support also calling constructors, but only for already allocated objects.
14936 2004-09-17 Geoff Norton <gnorton@customerdna.com>
14938 * reflection.c (type_get_qualified_name): If the klass is null
14939 return the typename to avoid a NullRefEx.
14940 (encode_cattr_value): Get the qualified name of the boxed type,
14941 not the underlying enumtype. Fixes #62984.
14943 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
14945 * marshal.c: Fix problems with previous checkin.
14947 2004-09-21 <vargaz@freemail.hu>
14949 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
14950 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
14952 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
14954 2004-09-21 Geoff Norton <gnorton@customerdna.com>
14956 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
14957 should only return a type for pointers, arrays, and passbyref types.
14960 2004-09-21 Martin Baulig <martin@ximian.com>
14962 * domain.c (mono_debugger_check_runtime_version): New public
14965 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
14967 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
14969 * reflection.c: Added missing sort to the declarative security
14970 attributes table. MS implementation stops seeing the attributes if the
14971 token number regress in the table (as shown by ildasm and permview).
14973 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
14975 * object-internals.h (MonoReflectionModule): Add 'token' field.
14977 * reflection.c (mono_reflection_get_token): Add support for Module
14979 (mono_module_get_object): Set 'token' field.
14980 (mono_module_file_get_object): Set 'token' field.
14982 * icall.c: Add new Assembly and Module icalls.
14984 * appdomain.c: Bump corlib version.
14986 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
14988 * loader.h loader.c class.h class.c: Add helper functions for obtaining
14989 tokens of metadata objects.
14991 * reflection.h reflection.c (mono_reflection_get_token): New function
14992 to obtain the token of a metadata object.
14994 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
14996 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
14998 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
15000 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
15002 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
15004 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
15005 * object-internals.h: Added 3 MonoArray* members to MonoReflection
15006 AssemblyBuilder to access the permissions set in the class lib.
15007 * reflection.c: Added security attributes encoding step in
15008 mono_image_build_metadata.
15009 * tabledefs.h: Added new security actions defined in 2.0:
15010 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
15012 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
15014 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
15017 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
15019 * locales.c: nullify the ICU_collator member of CompareInfo when it is
15020 finalized. There where random SIGSEVs at program termination, when
15021 an object being finalized was trying to do a string comparison and
15022 the current culture was already finalized.
15024 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15026 * threads.c: call thread_cleanup before finishing the thread if we get
15029 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
15031 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
15032 assemblies from the parent. Fixes #65665.
15034 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
15036 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
15039 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
15041 * reflection.h: add prototype for mono_get_dbnull_object
15042 * reflection.c: add prototypes for get_default_param_value_blobs
15043 and mono_get_object_from_blob for fussier compilers
15045 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
15047 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
15048 false deadlock checks in class initialization.
15050 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
15052 * image.c (mono_image_addref): Fix comment.
15054 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
15057 2004-09-12 Jambunathan K <kjambunathan@novell.com>
15059 * reflection.c (mono_param_get_objects): Modified to return
15060 ParameterInfo.DefaultValue object.
15062 (get_default_param_value_blobs):
15063 (mono_get_object_from_blob):
15064 (mono_get_dbnull_object): New helper routines.
15066 * object.c (mono_get_constant_value_from_blob): New helper routine
15067 carved out from get_default_field_value ()
15069 * object-internals.h (mono_get_constant_value_from_blob): Added
15070 function declaration.
15072 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
15074 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
15075 referenced assemblies. Fixes #62135.
15077 * exception.h exception.c (mono_get_exception_file_not_found2): New
15080 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
15082 * class.h class.c: Add mono_type_get_underlying_type ().
15084 2004-09-09 Geoff Norton <gnorton@customerndna.com>
15086 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
15087 Fix GetTypes() to support dynamically created assemblies.
15089 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
15091 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
15093 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
15096 * reflection.h reflection.c loader.c: Allow dynamic construction of
15097 pinvoke methods. Fixes #65571.
15099 * reflection.c (mono_reflection_get_type): Revert previous change since
15100 it causes regressions.
15102 2004-09-08 Martin Baulig <martin@ximian.com>
15104 * class.c (class_compute_field_layout): Don't call
15105 mono_class_layout_fields() for open generic instances.
15107 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
15108 * threads.c appdomain.c: fix typo in GC macro
15110 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15112 * threads.c: don't call mono_thread_detach() in start_wrapper(),
15113 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
15115 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
15117 * image.c (mono_image_close): Applied patch from
15118 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
15119 assembly is loaded multiple times from data.
15121 * image.c (mono_image_open): Fix warning.
15123 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
15125 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
15126 once. Fixes #58334.
15128 * reflection.c (mono_reflection_create_runtime_class): Initialize
15129 klass->nested_classes. Fixes #61224.
15131 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
15133 * threads.c: sched_yield() on exit, to allow threads to quit.
15135 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
15137 * object.c (mono_unhandled_exception): Remove leftover debug code.
15139 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
15141 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
15143 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
15145 * marshal.c (emit_marshal_array): Really null terminate string arrays.
15147 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
15149 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
15151 * marshal.c (emit_marshal_array): Null terminate string arrays.
15153 * marshal.c (raise_auto_layout_exception): Fix warning.
15155 * reflection.c (mono_param_get_objects): Initialize the default value
15156 with DBNull.Value, not null. Fixes #62123.
15158 2004-09-01 Miguel de Icaza <miguel@ximian.com>
15160 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
15161 throw an exception with a cute explanation.
15163 2004-09-06 Dick Porter <dick@ximian.com>
15165 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
15166 Close the new process's thread handle, as we don't use it. The
15167 handle stays around forever otherwise.
15169 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
15171 * object.c (arith_overflow): Fix warning.
15173 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
15174 calling conventions in method refs. Fixes #65352.
15176 * reflection.c: Fix warnings.
15178 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
15180 * icall.c: Add a new icall for Array.Clear
15182 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
15184 * object.c: When allocating an array, we have to throw
15185 an overflow exception if any of the lengths are < 0.
15187 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
15189 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
15190 properly. Also move implementation of string array marshalling to
15191 managed code. Fixes #42316.
15193 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15195 * assembly.c: provide more information when loading an assembly fails.
15197 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15199 * filewatcher.c: don't expect the development fam package to be
15202 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
15204 * marshal.c: Make a copy of the signature cookie since it will be
15205 freed by the caller.
15207 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
15209 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
15211 * metadata.c (mono_metadata_free_marshal_spec): New function to free
15214 * marshal.c: More refactoring.
15216 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
15219 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
15221 * object.c: In mono_message_invoke, fill the output parameter array after
15222 calling the managed method (it was done before the call). This fixes
15225 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
15227 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
15230 2004-09-02 Martin Baulig <martin@ximian.com>
15232 * class.c (mono_class_instance_size): Don't allow generic type
15233 definitions or open generic instances.
15234 (mono_class_array_element_size): If we're a value type, call
15235 mono_class_instance_size() on the original class.
15237 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
15238 handle generic instances.
15240 * mono-debug-debugger.c (write_type): Handle generic instances
15243 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
15245 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
15246 the allocation request fails. Fixes #65089.
15248 * object.c (mono_runtime_free_method): Do not call mono_free_method.
15250 * object.c (mono_runtime_free_method): New function to free a dynamic
15253 * marshal.c (mono_delegate_free_ftnptr): New function to free the
15254 delegate trampoline.
15256 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
15257 with hasthis as dynamic,
15259 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
15261 * domain.c (mono_jit_info_table_remove): New function to remove an
15262 entry from the jit info table.
15264 * class-internals.h (MonoMethod): Add 'dynamic' field.
15266 * loader.c: Fix warnings.
15268 2004-09-01 Martin Baulig <martin@ximian.com>
15270 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
15271 instead of mono_debugger_lock() because the latter one is a no-op
15272 unless running in the debugger.
15274 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
15276 * class.c (class_compute_field_layout): Classes with auto-layout or
15277 reference fields are not blittable.
15279 2004-09-01 Dick Porter <dick@ximian.com>
15281 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
15282 mono_image_get_filename() to get the assembly location.
15285 * metadata.h: Fix compile warnings
15287 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
15289 * class.c (class_compute_field_layout): System.Object is blittable.
15291 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
15292 as in/out. Fixes #59909.
15294 2004-09-01 Martin Baulig <martin@ximian.com>
15296 * metadata.h (MONO_TYPE_ISREFERENCE): Call
15297 mono_metadata_generic_inst_is_valuetype() if we're a generic
15298 instance to check whether our underlying type is a reference type.
15300 2004-09-01 Martin Baulig <martin@ximian.com>
15302 * metadata.c (mono_type_size): If we're a generic instance, call
15303 mono_class_value_size() for value types.
15305 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
15307 * marshal.c: Implement more custom marshalling functionality. Fixes
15310 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
15312 * mono-debug.c, debug-mono-symfile.c: add some locking love.
15314 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
15316 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
15318 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
15320 * icall.c: Fix some warnings.
15322 * threads.c (abort_appdomain_thread): Fix unref errors.
15323 (mono_thread_current): Fix THREAD_DEBUG define.
15325 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
15327 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
15329 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
15331 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
15333 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
15336 2004-08-28 Martin Baulig <martin@ximian.com>
15339 (mono_metadata_generic_inst_is_valuetype): New public function.
15341 * metadata.h (MONO_TYPE_ISSTRUCT): Call
15342 mono_metadata_generic_inst_is_valuetype() if we're a generic
15343 instance to check whether our underlying type is a valuetype.
15345 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
15347 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
15350 2004-08-25 Martin Baulig <martin@ximian.com>
15352 * loader.c (mono_get_method_from_token): Abstract methods can also
15353 be generic and thus have type parameters.
15355 * metadata-internals.h
15356 (MonoDynamicImage): Added `GPtrArray *gen_params'.
15358 * reflection.c (mono_image_get_generic_param_info): Don't create a
15359 metadata row, just add an entry to the `gen_params' array.
15360 (build_compressed_metadata): Sort the `gen_params' array and then
15361 actually create the metadata.
15363 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15365 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
15367 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
15369 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
15371 2004-08-24 Martin Baulig <martin@ximian.com>
15373 * class.cs (mono_class_is_subclass_of): Like an interface, a
15374 generic instance also derives from System.Object.
15376 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
15378 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
15379 custom modifiers to be in any order. Fixes #61990.
15381 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
15383 * object.c: Register mono_object_new_fast icall.
15385 * object.c (mono_class_get_allocation_ftn): Return to calling
15386 mono_object_new_fast, since it seems faster to compute the object
15387 size in unmanaged code than passing it as a parameter.
15389 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
15391 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
15392 this function with Boehm as the oom handler, so we don't have to check
15393 the result of GC_malloc.
15395 * object.c: Remove checks for oom.
15397 * object.h object.c (mono_class_get_allocation_ftn): New function to
15398 return the icall which can be used to allocate an instance of a given
15401 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
15403 * class-internals.h: Add 'enabled' field.
15405 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
15407 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
15409 2004-08-18 Jambunathan K <kjambunathan@novell.com>
15410 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
15413 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
15415 * appdomain.c: use the Tls function for appdomain too,
15416 at Zoltan's request. Actually return in mono_context_get
15418 * appdomain.c, profiler.c, threads.c: use __thread
15420 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
15422 * appdomain.c threads.c: Call GC_CreateThread on windows.
15424 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
15425 multiple libraries since this don't work on windows.
15427 2004-08-18 Martin Baulig <martin@ximian.com>
15429 * class-internals.h
15430 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
15433 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
15434 MonoMethodNormal since we also need it for abstract and interface
15438 (build_compressed_metadata): Sort the GenericParam table.
15439 (mono_image_create_token): Added `gboolean create_methodspec'
15440 argument; this is false when generating a MethodImpl token.
15441 (reflection_methodbuilder_to_mono_method): Abstract and interface
15442 methods may also have generic parameters.
15444 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
15446 * appdomain.c: thread local alloc
15448 2004-08-17 Martin Baulig <martin@ximian.com>
15450 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
15453 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
15456 * class.c (mono_type_get_full_name): New public function.
15457 (mono_type_get_name): Don't include the type arguments.
15459 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
15461 * Makefile.am: Build static versions of libmetadata and libmonoruntime
15462 for inclusion into the mono executable.
15464 2004-08-16 Martin Baulig <martin@ximian.com>
15466 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
15467 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
15469 2004-08-14 Martin Baulig <martin@ximian.com>
15471 * class.c (dup_type): Also copy the `byref' field.
15473 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
15475 * reflection.c (create_dynamic_mono_image): Revert the last change
15476 since it breaks bootstrap.
15478 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
15480 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
15482 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
15483 not free them with g_free.
15485 2004-08-11 Martin Baulig <martin@ximian.com>
15487 * reflection.c (mono_reflection_setup_internal_class): Also call
15488 mono_class_setup_mono_type() if we already have a `tb->type.type'.
15490 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
15492 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
15493 called during default (first) AppDomain creation. Keep track of
15494 Evidence when loading assemblies.
15496 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
15498 * opcodes.c, opcodes.h: reduce runtime relocations.
15500 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
15502 * culture-info.h, locales.c: fixes and chages to sue the new
15503 optimized format of the locale data.
15504 * culture-info-tables.h: regenerated.
15506 2004-08-06 Geoff Norton <gnorton@customerdna.com>
15508 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
15510 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
15512 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
15513 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
15514 * domain-internals.h: icall declaration.
15515 * icall.c: icall registration.
15516 * object-internals.h: New fields in MonoAssembly for CAS.
15518 2004-08-05 Duncan Mak <duncan@ximian.com>
15520 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
15523 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
15525 * reflection.c: fix to deal with object[] arrays in custom ctors
15528 2004-08-05 Martin Baulig <martin@ximian.com>
15530 * class.c (mono_class_array_element_size): Added support for
15531 generic instances and correctly handle "recursive" types.
15533 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
15535 * assembly.c: Fix warnings.
15537 2004-08-04 Martin Baulig <martin@ximian.com>
15540 (mono_type_get_name_recurse): Added `gboolean include_arity'
15541 argument specifying whether or not we should include the generic
15542 arity in the type name.
15543 (_mono_type_get_name): New static function.
15544 (mono_class_setup_vtable): If we're a generic instance, don't
15545 include the generic arity in the names of explicit method
15548 2004-08-03 Martin Baulig <martin@ximian.com>
15550 * class.c (mono_type_get_name_recurse): Enclose the generic type
15551 arguments in `<', '>'.
15553 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
15555 * gc.c: make GC warning messages use the trace API, they are just
15556 noise to most of the users.
15558 2004-08-03 Martin Baulig <martin@ximian.com>
15560 * debug-mono-symfile.c (read_string): Correctly read the string.
15562 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15564 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
15566 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
15568 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
15570 2004-07-30 Martin Baulig <martin@ximian.com>
15572 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
15573 Reflect latest symbol writer changes.
15575 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
15577 * object.c: always create an object if null is passed
15578 to Invoke() where a valuetype is expected.
15580 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
15582 * marshal.c (mono_marshal_init): make managed
15583 signatures match native ones better for 64bits.
15585 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15587 * appdomain.c: hack to build correctly the private bin path on windows.
15590 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
15592 * assembly.c: Load mscorlib from the correct framework directory
15593 (mono/<version>/mscorlib.dll).
15594 * appdomain.h: Added prototypes for new functions.
15595 * internals.h: Added some prototypes.
15596 * domain.c: When initializing the runtime, get from the executable and
15597 the configuration files the runtime version that the app supports.
15598 Added support methods for reading app.exe.config. Added list of versions
15599 supported by the JIT. Added two new methods: mono_init_from_assembly,
15600 which initializes the runtime and determines the required version from
15601 the provided exe file, and mono_init_version, which initializes
15602 the runtime using the provided version.
15603 * icall.c: Get machine.config from version-specific directory.
15604 * reflection.c: When generating an image, embed the version number
15605 of the current runtime.
15607 2004-07-28 Dick Porter <dick@ximian.com>
15610 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
15611 returned sockaddr size before creating the remote address object.
15612 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
15615 2004-07-28 Dick Porter <dick@ximian.com>
15617 * locales.c (string_invariant_compare_char): Fix invariant char
15618 compares between upper and lower cases. Fixes bug 61458.
15620 2004-07-27 Ben Maurer <bmaurer@ximain.com>
15622 * marshal.c: actually cache stelem.ref wrappers.
15624 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15626 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
15627 sections and remove the mono_cli_rva_map () function.
15629 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
15631 * debug-mono-symfile.c: fix one more endianess issue, from a patch
15632 by Geoff Norton (<gnorton@customerdna.com>).
15634 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
15636 * class.c: fix class loads for pointer types (typeof(int) !=
15639 2004-07-27 Martin Baulig <martin@ximian.com>
15641 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
15642 reading the debugging information from an external ".mdb" file.
15644 2004-07-24 Martin Baulig <martin@ximian.com>
15646 * reflection.c (mono_image_get_type_info): Only write a class
15647 layout entry if we actually have a size or a packing size.
15649 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
15651 * reflection.c (type_get_fully_qualified_name):
15652 insert cast to get type checking of ?: with non-gcc compilers
15654 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
15656 * rand.c: use g_getenv for both lookups of
15659 2004-07-17 Martin Baulig <martin@ximian.com>
15661 * reflection.c (mono_reflection_bind_generic_method_parameters):
15662 Set `gmethod->reflection_info'.
15664 2004-07-17 Martin Baulig <martin@ximian.com>
15666 * class.c (mono_class_create_from_typedef): Insert the newly
15667 created class into the hash table before computing the interfaces
15668 since we could be called recursively.
15670 2004-07-16 Ben Maurer <bmaurer@ximain.com>
15672 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
15673 function to implement stelem.ref in managed code
15674 * class-internals.h, debug-helpers.c: a new wrapper type
15677 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
15679 * gc.c: allow GC handles to work even when no GC is compiled in.
15680 Fix part of bug #61134 (GetAddrOfPinnedObject).
15682 2004-07-13 Peter Williams <peter@newton.cx>
15684 * process.c (complete_path): Make sure we don't attempt to execute
15687 2004-07-12 Geoff Norton <gnorton@customerdna.com>
15689 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
15690 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
15691 and will add/subtract the hour if needed
15693 2004-07-12 Martin Baulig <martin@ximian.com>
15695 * reflection.c (mono_field_get_object): If we have
15696 `field->generic_info', take the attributes from
15697 `field->generic_info->generic_type'.
15699 2004-07-12 Martin Baulig <martin@ximian.com>
15701 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
15702 This function must be called before initializing the runtime.
15703 (mono_debug_init_1): New function; call this after initializing
15704 the runtime, but before loading the assembly. It tells the
15705 debugger to load corlib and the builtin types.
15707 * mono-debug-debugger.c: Did some larger changes in the debugging
15708 code; support recursive class declarations, make sure we actually
15711 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15713 * debug-helpers.c: undo my previous patch and fixed the real issue in
15714 ../mini/exceptions-x86.c
15716 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15718 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
15719 when no HOME env. variable was set and a NullRef was thrown in a .cctor
15720 called from other .cctors.
15722 2004-07-09 Miguel de Icaza <miguel@ximian.com>
15724 * loader.c: Removed the mono_loader_wine_init hack now that we are
15725 doing a managed version of Windows.Forms.
15727 2004-07-09 Ben Maurer <bmaurer@ximian.com>
15729 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
15730 threadpool.c, threads.c: remove static data from rootset.
15732 2004-07-09 Dick Porter <dick@ximian.com>
15734 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
15735 Don't do any more processing if the matched length was 0. It was
15736 increasing the size of the string before. Fixes bug 61167.
15738 2004-07-09 Dick Porter <dick@ximian.com>
15742 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
15743 Add support for SO_PEERCRED if its available.
15745 2004-07-09 Peter Bartok <pbartok@novell.com>
15746 * loader.c: winelib.exe.so error message is now only displayed if
15747 MONO_DEBUG is set. To help us avoid questions when people are trying
15748 out the new Managed.Windows.Forms.
15750 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
15752 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
15753 for isinst and castclass wrappers.
15755 * class-internals.h icall.c: Move registration and lookup of JIT icalls
15756 to libmetadata from the JIT, so they could be used by the marshalling
15757 code and the interpreter.
15759 * marshal.c: Register marshalling related JIT icalls here instead of
15760 in mini.c. Use CEE_MONO_ICALL instead of the family of
15761 CEE_MONO_PROC<x> opcodes to call marshalling functions.
15763 * metadata.h: Remove unneeded marshalling conversions.
15765 * opcodes.c: Update for new opcodes.
15767 2004-07-08 Martin Baulig <martin@ximian.com>
15769 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
15770 (mono_debug_get_domain_data): Make this function static.
15772 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
15774 * gc.c, object.h: add nice GC handle API for embedders.
15776 2004-07-06 Ben Maurer <bmaurer@ximian.com>
15778 * reflection.c: more changes for the new api
15780 * object.c: When we reflect on a field w/ a constant value, it
15781 will not have a memory location, so we must access metadata. Also,
15782 allow easier reading of strings so that we can read them from
15785 * class.c (mono_class_layout_fields): no need for literal fields here.
15787 * class-internals.h: api changes for const fields
15789 * icall.c (ves_icall_get_enum_info): use new apis for const fields
15791 2004-07-06 Martin Baulig <martin@ximian.com>
15793 * mono-debug.h: Increment version number to 44.
15795 * mono-debug.c (mono_debug_add_wrapper): The second argument is
15796 now a gpointer, rewrote this whole method.
15798 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
15799 function. Add information about the wrapper in a new "misc table".
15801 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
15802 for the new misc table.
15804 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
15806 * metadata-internals.h image.c: Add a cache for helper signatures.
15808 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
15810 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
15812 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
15813 delegates from a delegate. Fixes #61033.
15815 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
15816 marshalling of stringbuilder arrays. Fixes #59900.
15818 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
15820 * icall.c: Add EnumBuilder:setup_enum_type icall.
15822 2004-06-30 Ben Maurer <bmaurer@ximian.com>
15824 * icall.c: Added a new icall for the property version of
15825 OffsetOfStringData.
15827 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
15829 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
15830 it has a constant size across platforms.
15832 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
15835 2004-06-29 Martin Baulig <martin@ximian.com>
15837 * mono-debug.c (mono_debug_add_method): Protect the whole function
15838 in mono_debugger_lock(), not just parts of it.
15840 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
15842 * reflection.c: make sure padding bytes in heaps are zeroed.
15844 2004-06-24 David Waite <mass@akuma.org>
15846 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
15847 image.c, loader.c, locales.c, marshal.c, metadata.c,
15848 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
15849 string-icalls.c, threads.c: change to C90-style comments from C99 /
15852 2004-06-24 Dick Porter <dick@ximian.com>
15855 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
15856 return createdNew. Fixes bug 60412.
15859 * icall.c: Add createdNew parameter to CreateMutex icall
15861 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15863 * reflection.c, object-internals.h: save default value in params.
15865 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15867 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
15868 no need to build a new path combining that with the application base.
15871 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
15873 * reflection.c: fixed minor standard compliance issues.
15875 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
15877 * reflection.c: fixed issue with encoding some custom attributes
15878 (arrays in properties and fields, bug #60411).
15880 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15882 * reflection.c: fix start address when copying the public key token.
15884 2004-06-23 Martin Baulig <martin@ximian.com>
15886 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
15887 the `exc' object in a static object to put it into the GC's root set.
15889 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
15891 * reflection.c: make mono_reflection_setup_internal_class ()
15892 callable a second time to setup a new parent class.
15894 2004-06-23 Dick Porter <dick@ximian.com>
15896 * threads.c: Check for WAIT_IO_COMPLETION return values.
15898 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
15900 * appdomain.c: Removed the g_free on the public key token. Now copy
15901 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
15902 * assembly.c: Added public key token string value when loading
15903 assemblies. Fix bug #60439.
15904 * icall.c: Added missing informations (like public key) in
15905 GetReferencedAssemblies. Fix #60519.
15906 * image.h: Changed definition for public key token from const char*
15907 public_tok_value to guchar public_key_token [17];
15908 * reflection.c: Updated for changes to public key token.
15910 2004-06-22 Lluis Sanchez Gual
15912 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
15913 for the field in base classes.
15915 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
15917 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
15918 mark headers as not supported, they are installed only for use by the
15921 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
15923 * *.c, *.h: avoid namespace pollution in public headers.
15925 2004-06-21 Martin Baulig <martin@ximian.com>
15927 * exception.c (mono_get_exception_security): It's in
15928 "System.Security", not in "System".
15930 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
15931 the exception classes.
15933 2004-06-21 Martin Baulig <martin@ximian.com>
15935 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
15936 Protect the exception object from being finalized.
15938 2004-06-21 Martin Baulig <martin@ximian.com>
15940 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
15943 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
15945 * reflection.c: Load the assembly in mono_reflection_type_from_name,
15946 if it was not loaded before. Fix parts of #60439.
15948 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
15950 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
15951 code that was broken since Ben's change: wrappers are now
15952 dependent on the method signature only again.
15954 2004-06-21 Martin Baulig <martin@ximian.com>
15956 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
15957 added interface support.
15959 2004-06-21 Martin Baulig <martin@ximian.com>
15961 * class.c (mono_vtable_get_static_field_data): New public method.
15963 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
15965 * filewatcher.c : Windows build fix to be compliant with API changes.
15967 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
15969 * class.h, class.c: more accessors.
15970 * metadata.h, metadata.c: prepare for hiding MonoType and
15971 MonoMethodSignature: people should use the accessors from now on
15972 outside of the tree.
15974 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
15976 * *.c, *.h: more API cleanups.
15978 2004-06-18 Jackson Harper <jackson@ximian.com>
15980 * assembly.c: Trace loading assemblies.
15981 * loader.c: Trace loading native libraries.
15982 * mono-config.c: Trace loading config files.
15984 2004-06-18 Dick Porter <dick@ximian.com>
15986 * locales.c: Tell ICU the lengths of strings, it can cope with
15987 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
15989 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
15991 * image.c: swapped name/filename;
15993 2004-06-18 Martin Baulig <martin@ximian.com>
15995 * mono-debug-debugger.c (write_class): Write the parent class at
15996 the end of the header.
15998 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
16000 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
16002 2004-06-17 Raja R Harinath <rharinath@novell.com>
16004 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
16005 (bundle_obj): New conditional define.
16006 (BUILT_SOURCES): Remove.
16007 ($(bundle_srcs)): Make parallel-make safe.
16008 (libmonoruntime_la_LIBADD): Make unconditional.
16009 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
16010 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
16012 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
16014 * culture-info-tables.h: It was inconsistent with the latest
16017 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
16019 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
16022 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
16025 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
16027 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
16028 cleaned up public header threads.h.
16030 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
16032 * Makefile.am, *.c, *.h: more API cleanups.
16034 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16036 * Makefile.am: removed monosn from compilation.
16037 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
16038 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
16039 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
16040 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
16041 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
16042 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
16044 2004-06-15 Jackson Harper <jackson@ximian.com>
16046 * assembly.c: Make locales lower case when searching the GAC for
16047 assemblies. gacutil will always make locales lowercase when
16048 installing so this effectively makes them case insensitive.
16050 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
16052 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
16053 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
16054 parameter which allows to choose whether the wait can be interrupted or
16055 not. Also added the method mono_monitor_enter(), which locks the monitor
16056 using an infinite wait and without allowing interruption.
16057 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
16059 * object.h: Added new fields in MonoThread. suspend_event holds the event
16060 used to susped/resume the thread. synch_lock is the lock object to use for
16061 modifying the thread state.
16062 * threads.c: Use the new synch_lock object for locking, instead of "this",
16063 which can generate deadlocks.
16064 Moved thread state change in Thread.Sleep and Thread.Join from managed
16065 to unmanaged code. This avoids a deadlock when the thread was suspended
16066 just after acquiring the thread lock.
16067 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
16068 Implemented Thread.Suspend using an event instead of ThreadSuspend,
16069 which is not fully implemented in the io-layer.
16070 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
16072 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
16074 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
16075 threads-types.h: more API cleanups.
16077 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
16079 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
16080 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
16081 threadpool.c, threads.c: first pass at the exported API cleanup.
16083 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
16085 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
16087 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16089 * icall.c: added internalGetHome.
16091 2004-06-14 Dick Porter <dick@ximian.com>
16093 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
16094 possible to return successfully when '.' or '..' were the only
16095 entries in a directory, but were skipped. The MonoIOStat was not
16096 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
16099 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
16101 * reflection.c: make binaries run on .Net 1.1 by default.
16103 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
16105 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
16107 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
16109 * marshal.c: keep track of struct size with explicit layout
16112 2004-06-12 Martin Baulig <martin@ximian.com>
16114 * mono-debug-debugger.c: Comment out a debugging g_message().
16116 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
16118 * reflection.c, reflection.h: do not free custom attrs that are cached.
16119 * icall.c: use braces to make code clearer.
16121 2004-06-11 Martin Baulig <martin@ximian.com>
16123 * class.h (MonoInflatedField): New type.
16124 (MonoClassField): Replaced `MonoType *generic_type' with
16125 `MonoInflatedField *generic_info'.
16128 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
16130 2004-06-11 Martin Baulig <martin@ximian.com>
16132 * reflection.c (mono_image_create_method_token): Correctly encode
16135 2004-06-11 Martin Baulig <martin@ximian.com>
16137 * metadata.c (mono_metadata_parse_method_signature): When parsing
16138 a MethodDef which has VarArgs, also set sentinelpos if we don't
16139 have any parameters.
16141 2004-06-11 Martin Baulig <martin@ximian.com>
16143 * verify.c (mono_method_verify): In CEE_CALL, use
16144 mono_method_get_signature() to get the method's signature, unless
16145 we're a PInvoke method.
16147 2004-06-10 Jackson Harper <jackson@ximian.com>
16149 * assembly.c: Use <path>/lib/mono/gac for the extra paths
16150 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
16151 logical name as the supplied path is just a prefix to the gac not
16152 the direct path to it.
16154 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
16156 * reflection.c: make the token for a created method match
16157 the token of the MethodBuilder it was created from
16158 (IKVM requires this behaviour now).
16160 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
16162 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
16163 reflection.c, socket-io.c: leak fixes.
16165 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
16167 * icall.c: handle sentinel pos in vararg methods in position different
16170 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16172 * culture-info-tables.h: freshly generated.
16174 2004-06-09 Martin Baulig <martin@ximian.com>
16176 * loader.c (mono_get_method_constrained): Call `mono_class_init
16177 (constrained_class)'.
16179 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
16181 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
16182 any methods. Fixes #59629.
16184 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
16186 * culture-info-tables.h: reflecting locale-builder updates.
16188 2004-06-08 Dick Porter <dick@ximian.com>
16191 * locales.c: Fixed compile warnings, including a real bug in
16192 CompareInfo_internal_compare.
16194 2004-06-08 Dick Porter <dick@ximian.com>
16197 (ves_icall_System_Globalization_CompareInfo_internal_index):
16198 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
16199 Double-check the resuls of usearches, because ICU currently
16200 ignores most of the collator settings here. Fixes bug 59720.
16202 2004-06-08 Dick Porter <dick@ximian.com>
16205 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
16206 Fix memory leak and segfault-causing typo. No idea how this one
16207 lasted so long without being noticed.
16209 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
16211 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
16212 any methods. Fixes #59629.
16214 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16217 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
16218 own the critical section before). Removed dead code (that's done
16219 in the preload hook).
16221 (mono_assembly_load_with_partial_name): call the preload hook.
16223 2004-06-08 Martin Baulig <martin@ximian.com>
16225 * metadata.c (mono_metadata_signature_alloc): Default
16226 `sentinelpos' to -1.
16228 * reflection.c (mono_image_get_array_token): Likewise.
16230 2004-06-08 Martin Baulig <martin@ximian.com>
16232 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
16234 * metadata.c (mono_metadata_parse_method_signature): When parsing
16235 a MethodDef which has VarArgs, set sentinelpos.
16237 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
16238 `gint16' since we're using -1 for non-varargs methods.
16241 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
16242 (method_encode_signature): Added varargs support.
16243 (method_builder_encode_signature): Likewise.
16244 (mono_image_get_varargs_method_token): New static method.
16245 (mono_image_create_method_token): New public method; this is
16246 called via an icall instead of mono_image_create_token() when
16247 calling a varargs method.
16249 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
16251 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
16253 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
16255 * culture-info-tables.h : Reflecting the latest locale-builder that
16256 fixed empty array representation ({} to {0}).
16258 2004-06-07 Jackson Harper <jackson@ximian.com>
16260 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
16261 looking up extra gac paths. This allows MONO_GAC_PATH to act
16262 exactly like a prefix.
16264 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
16266 * reflection.c (mono_reflection_type_from_name): Make a copy of the
16267 type name before modifying it. Fixes #59405.
16269 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
16271 * culture-info.h: added fields for "all datetime patterns".
16272 * locales.c: ( ves_icall_System_Globalization_CultureInfo
16273 _construct_datetime_format ()): fill xxx_patterns fields.
16274 * object.h: added fields for "all datetime patterns" to
16275 MonoDateTimeFormatInfo.
16276 * culture-info-tables.h: reflecting locale-builder updates.
16278 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
16280 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
16281 the event has no add and remove methods. Fixes #59629.
16283 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
16285 * object.c: Fixed possible integer overflow when allocating large
16288 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
16290 * culture-info-tables.h: reflecting locale-builder updates.
16292 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
16294 * culture-info-tables.h: reflecting locale-builder updates.
16296 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
16298 * culture-info-tables.h: reflecting locale-builder updates.
16300 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
16302 * threads.c: Made Thread.Sleep abortable.
16304 2004-06-02 Martin Baulig <martin@ximian.com>
16306 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
16308 * debug-mono-symfile.h: Bumped symbol file version number to 37.
16310 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
16312 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
16314 2004-05-30 Jackson Harper <jackson@ximian.com>
16316 * reflection.c: Do not hardcode assembly versions or public key
16317 tokens anymore. All of this except the corlib section was dead
16320 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
16322 * object.c (mono_runtime_invoke_array): Automatically create boxed
16323 objects for byref valuetypes if needed. Fixes #59300.
16325 * object.c (mono_method_return_message_restore): Handle
16326 MONO_TYPE_OBJECT as well.
16328 2004-05-28 Jackson Harper <jackson@ximian.com>
16330 * reflection.c: The modified type encoding was causing build
16331 problems. Reverted for now.
16333 2004-05-28 Jackson Harper <jackson@ximian.com>
16335 * reflection.c/h: Take an assembly ref so that we dont create
16336 fully qualified names when encoding types in the same assembly as
16337 the custom attribute being emitted.
16338 * appdomain.c: Increment version number.
16340 2004-05-26 Duncan Mak <duncan@ximian.com>
16343 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
16344 Set the full version number (major, minor, build, revision).
16346 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
16348 * marshal.c (emit_struct_conv): increment src/dst after blit
16349 (mono_marshal_get_managed_wrapper,
16350 mono_marshal_get_native_wrapper): make sure we have marshalling
16351 info before marshalling params (info computation affects
16354 * class.c (class_compute_field_layout): correctly deal with
16356 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
16357 value types (as per what windows dows by default)
16358 (mono_class_setup_mono_type): System.ValueType is blittable
16359 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
16362 * marshal.c (mono_marshal_load_type_info): flag types as
16363 non-blittable if the native layout doesn't match the managed
16366 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16368 * appdomain.c: don't add stuff in the private search path that is
16369 above the application base. If application base is not set, there's
16370 no private search path.
16372 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
16374 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
16375 byref struct arguments in native->managed marshalling.
16377 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
16379 * marshal.c (mono_marshal_get_runtime_invoke): correctly
16380 cache methods using signature (special case for methods
16381 that are value type or string class)
16383 * image.c (mono_image_close): clean up allocated GSList's
16384 in runtime_invoke_cache.
16386 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16388 * mono-config.c: set the correct path for mono_cfg_dir on windows when
16389 there's no MONO_CFG_DIR environment variable defined.
16391 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16393 * threads.c: windows version must be >= 0x0500 to include OpenThread.
16395 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
16397 * threadpool.c: Really wait for 500ms after the async call, even if the wait
16399 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
16400 before waiting for it, and call CloseHandle after the wait to unref it.
16401 This will make sure that handles are not disposed too early.
16403 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16408 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
16411 * object.c: se the application_base only for the domain that runs
16412 Main. Fixes bug #59216,
16414 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16417 * object.c: only the domain in which Main is run have
16418 SetupInformation.ConfigurationFile set, so moved a few lines from
16419 appdomain.c to object.c.
16421 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16423 * appdomain.c: we tried to load [name].(dll|exe), but according
16424 to bug #57710, we must also try [culture]/[name].(dll|exe) and
16425 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
16426 There's a test case attached to bug #58922.
16428 2004-05-27 Dick Porter <dick@ximian.com>
16431 * file-io.c: Implemented icalls for locking and unlocking regions
16433 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
16434 FALSE on error (fixes both compiler warning and real bug.)
16436 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
16438 * culture-info-tables.h: reflecting locale-builder updates.
16440 (Added missing ChangeLog entry for 05/26)
16442 2004-05-27 Jackson Harper <jackson@ximian.com>
16444 * locales.c: Fix some cut and paste errors.
16446 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16448 * mono-config.c: set the correct path for config. directory on windows.
16450 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
16452 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
16455 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
16457 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
16458 from pinvoke functions.
16460 * marshal.c (mono_ftnptr_to_delegate): Implement this.
16462 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
16464 * culture-info-tables.h: reflecting locale-builder updates.
16466 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
16468 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
16471 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
16473 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
16474 * icall.c: Modified icalls for RNG.
16475 * rand.c|h: Changed RNG interface to allow thread-safe usage under
16476 Windows (CryptoAPI).
16478 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
16480 * locales.c: Fix build.
16482 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
16484 * culture-info-tables.h: reflecting locale-builder updates.
16486 2004-05-25 Jackson Harper <jackson@ximian.com>
16488 * locales.c: When creating the current culture use the $LANGs
16489 specific culture. So DateTimeFormat and NumberFormat entries are created.
16491 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
16493 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
16494 a char array as parameter.
16496 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
16498 * image.c: In mono_image_open(), always use an absolute path name to
16499 look for already loaded images.
16501 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
16503 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
16504 missing in the windows build (like older cygwin include files).
16506 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
16508 * icall.c: Fixed check for possible integer overflow in Buffer_
16509 BlockCopy icall. Replaced comments style // by /* */.
16511 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
16513 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
16515 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
16516 check after MONO_VTADDR. Fixes pinvoke2.exe.
16518 * marshal.h marshal.c metadata.h: Add beginnings of support for
16519 ftnptr -> delegate marshalling.
16521 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
16523 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
16524 * threads.c: Fix warnings.
16526 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
16528 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
16529 * icall.c: Registered icalls for Suspend and Resume.
16530 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
16532 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
16533 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
16534 * process.c: Use WaitForSingleObjectEx.
16535 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
16537 * threads.c, threads.h: Make use of new Ex wait methods. Improved
16538 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
16539 for Suspend and Resume. Added new mono_thread_stop, used for stoping
16540 background threads. Added basic support for Abort in Windows.
16541 Start new threads using a managed delegate invoke wrapper. This wrapper
16542 has an interruption checkpoint that is needed since an interruption
16543 can be requested before the thread leaves the unmanaged code that starts
16545 * marshal.c: Added interruption checkpoint after every native call, and
16546 also before managed calls for wrappers called from unmanaged code to
16547 go into managed code.
16548 * object.h: Added new field in MonoThread to keep track of interruption
16551 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
16553 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
16556 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16563 * rand.c: getenv -> g_getenv (windows!)
16565 * process.c: complete_path is also used on non-windows platforms.
16567 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16569 * icall.c: new signature for Process_Start.
16571 * process.[ch]: new signature for Process_Start. If we're on windows
16572 and UseShellExecute is false, we have to search for the program by
16573 ourselves if we don't get a full path.
16575 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
16577 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
16578 marshalling and call CleanUpNativeData if needed. Fixes #58646.
16580 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16582 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
16585 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16587 * process.c: use double quotes to quote program name and arguments on
16588 windows. Fixes bug #58575.
16590 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16592 * file-io.c: don't return "." and ".." when using windows Find*File.
16594 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
16596 * marshal.c: Don't pass wrappers to message init because method
16597 addressed used to lookup metadata. part of remoting[2|3] fix.
16599 2004-05-15 Jackson Harper <jackson@ximian.com>
16601 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
16602 path is essentially the same as MONO_PATH except that it points to
16603 GACs instead of lib directories.
16604 * loader.h: The user gac is gone so we dont need function to
16606 * mono-config.c: user gac option is now gone.
16608 2004-05-15 Jackson Harper <jackson@ximian.com>
16610 * culture-info.h: Make defines more consistent, add calendar data
16611 to the culture info table.
16612 * culture-info-tables.h: Add basic calendar data. Basically
16613 everyone gets default gregorian until all the data is
16615 * locales.c: Use the new consistent defines. Set calendar data for
16616 culture info objects.
16617 * object.h: add a field for calendar data to CultureInfo
16619 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
16621 * image.c: image->runtime_invoke_cache is keyed on signatures now.
16622 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
16624 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
16625 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
16626 an extra param that is the pointer of the method to invoke. The IL for
16627 the invoke method is no longer specific to the method, but to the
16628 signature of the method. Thus, we can share the same code for multiple
16629 methods. This reduces the number of methods that have to be compiled.
16631 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
16633 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
16635 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16637 * icall.c: Optimize Buffer.BlockCopy.
16639 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16641 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
16642 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
16643 quote). Changed them to "MMMM yyyy".
16645 2004-05-12 Miguel de Icaza <miguel@ximian.com>
16648 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
16650 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
16652 * reflection.h: Updated after changes to managed structures.
16654 * appdomain.c: Bump corlib version.
16656 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16658 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
16661 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16663 * Makefile.am: link to ../os/libmonoos.la on windows.
16666 -If MONO_DEBUG, warn about non-existing directories in
16668 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
16669 compile time variable.
16670 -Removed init_default_path and call mono_set_rootdir from
16671 libmonoos.a instead (windows only).
16673 * assembly.h: declare mono_assembly_getrootdir().
16676 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
16678 * loader.c: s/getenv/g_getenv/
16680 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
16682 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
16684 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
16686 * metadata.h: Add new marshalling conversions.
16688 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
16691 * reflection.c (mono_reflection_get_type): Lookup the type in all
16692 modules of a multi-module assembly. Fixes #58291.
16694 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
16696 * threads.c: Before aborting a background, set the StopRequested
16697 state. This avoids throwing the Abort exception.
16698 In mono_thread_manage, don't continue with the shutdown until all
16699 aborted threads have actually stopped.
16701 2004-05-10 Jackson Harper <jackson@ximian.com>
16703 * locales.c: Remove the modifier from culture names.
16705 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16707 * Makefile.am: monosn is not installed any more. It has been deprecated
16710 2004-05-07 Jackson Harper <jackson@ximian.com>
16713 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
16714 Fix array construction, add bailout if the length is 0.
16716 2004-05-07 Dick Porter <dick@ximian.com>
16718 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
16719 machine doesn't have a DNS entry. Patch by Urs Muff
16720 (umuff@quark.com), fixes bug 57928.
16722 2004-05-06 Jackson Harper <jackson@ximian.com>
16724 * reflection.c: Handle null PublicTokens properly. alloc mem for
16725 assembly names culture so we dont crash when freeing it.
16727 2004-05-06 Jackson Harper <jackson@ximian.com>
16729 * assembly.c: Check the usergac when loading with partial names.
16731 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
16733 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
16734 does nothing for now (not required for Linux/Windows) but the class
16735 library can call it (and a newer or modified runtime could need it).
16736 * icall.c: Registred icall.
16738 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16740 * loader.c: prints a message on module loading error we set MONO_DEBUG
16741 environment variable.
16743 2004-05-05 Jackson Harper <jackson@ximian.com>
16745 * appdomain.c: Handle PublicKeyToken=null properly.
16747 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
16749 * environment.c|h: Added icall ves_icall_System_Environment_
16750 GetOSVersionString to get the current OS version as a string.
16751 * icall.c: Registred icall.
16753 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
16755 * object.c: in mono_object_get_virtual_method(), take into account that
16756 non-virtual methods don't have a slot in the vtable. Check needed when
16757 the object is a proxy.
16759 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
16761 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
16762 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
16764 * object.c (mono_class_compute_gc_descriptor): Fix warning.
16766 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
16767 passed when a valuetype is expected.
16769 * object.c (mono_unhandled_exception): Only set the exit code if the
16770 exception happens in the main thread. Fixes thread5.exe.
16772 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
16773 invalid names. Fixes #58047.
16775 2004-05-03 Jackson Harper <jackson@ximian.com>
16777 * assembly.c: This line was committed accidently and is unneeded.
16779 2004-05-03 Jackson Harper <jackson@ximian.com>
16781 * icall.c: Add new icall for Assembly::LoadWithPartialName
16782 * assembly.c/.h: new function that probes the GAC to load partial
16783 assembly names by Paolo Molaro.
16785 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16787 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
16788 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
16789 (type_get_fully_qualified_name): Added PublicKeyToken when building a
16792 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16794 * appdomain.c: fixed check for 'neutral' culture and removed warning.
16795 * reflection.c: fix bug when parsing a full type name and Version is not
16796 the last thing in the string.
16798 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
16800 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
16801 crashes when it is freed.
16803 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16805 * assembly.c: print the compat warning to stderr.
16807 2004-05-01 Miguel de Icaza <miguel@ximian.com>
16809 * assembly.c (mono_assembly_load_references): Add a compatibility
16810 hack to run old applications that might be still referencing the
16811 3300-based assemblies, only do this for System.xxx.
16813 2004-05-01 Jackson Harper <jackson@ximian.com>
16815 * appdomain.c: If the culture is neutral we set it to "".
16817 2004-04-29 Jackson Harper <jackson@ximian.com>
16819 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
16821 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
16823 * string-icalls.c: added low overhead function for copying chars
16824 * icall.c: added needed icall for the above function
16826 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16828 * icall.c: fix return value of get_global_assembly_cache. Implemented
16829 Environment.GetLogicalDrives.
16831 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
16833 * rand.c: try and talk to egd or prngd
16834 for random bytes if opening devices fail.
16836 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
16838 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
16839 alignment for the type using the native alignment of its members
16840 instead of using klass->min_align.
16842 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
16844 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16847 * socket-io.c: added check for sys/aio.h.
16849 2004-04-28 Dick Porter <dick@ximian.com>
16851 * threads.c: Don't abort a thread thats already aborting, when
16852 terminating everything.
16854 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16856 * icall.c: added 2 new async calls for Socket.
16858 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
16859 IO on *nix systems.
16861 * threadpool.c: removed unused variable.
16863 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
16865 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
16867 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
16869 * locales.c: put back string_invariant_tolower () and
16870 string_invariant_toupper ().
16872 2004-04-26 David Waite <mass@akuma.org>
16877 * unicode.h: remove comma from end of enumeration declarations
16879 2004-04-26 David Waite <mass@akuma.org>
16881 * debug-mono-symfile.h:
16884 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
16887 2004-04-26 Jackson Harper <jackson@ximian.com>
16889 * appdomain.c: Increment version number.
16891 2004-04-26 Jackson Harper <jackson@ximian.com>
16893 * appdomain.c: Set assembly references public token value when
16894 PublicKeyToken is specified, not the hash_value. Free public token
16895 values when free assembly name data. Previously the public key
16896 token was hex decoded, however we are using hex encoded public key
16897 tokens, so this is not neccasary.
16898 * assembly.c: Lookup assemblies in the gac if their public token
16899 value is set. Add function to allow enabling user gac
16900 lookups. Specify whether or not the assembly was loaded from the
16901 GAC. Compare full assembly names when checking the cache for
16902 assemblies (Temporarily disabled see comment in code). Remove
16903 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
16904 specifies trace-loader they get extra info to stdout on the
16905 loading of assemblies.
16906 * image.h: Add a field for an assembly references public token
16907 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
16908 whether an assembly has been loaded from the GAC.
16909 * image.c: Remove a corlib -> mscorlib name mapping.
16910 * loader.h: Add function to enable/disable the user gac.
16911 * mono-config.c: Check if the usergac is enabled in the config
16913 * icall.c: New icall to determine whether or not an assembly has
16914 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
16915 * tabldefs.h: Add constant for assemblyref flag that specifies a
16916 full public key is used instead of a public token.
16917 * reflection.c: Remove mscorlib -> corlib mappings. Set
16918 PublicTokenValue instead of hash value. This value is a hex
16919 string so it does not need to be expanded.
16921 2004-04-26 Martin Baulig <martin@ximian.com>
16923 * mono-debug-debugger.c (mono_debugger_initialize): Set
16924 `mono_debugger_initialized' before calling mono_debug_lock().
16926 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
16928 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
16929 InternalToUpper/InternalToLower.
16930 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
16931 removed invariant culture shortcut. This is now done in managed code.
16932 * locales.c: (string_invariant_toupper/tolower) removed.
16934 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16936 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
16937 Added Poll internal call.
16939 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
16940 call for Poll. Select was too heavy for polling a single socket.
16942 * threadpool.[ch]: added mono_threadpool_cleanup.
16943 * threads.c: use it. Don't use Thread_Abort on windows.
16945 2004-04-23 Martin Baulig <martin@ximian.com>
16947 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
16949 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
16951 * icall.c: Registred new icalls for key pair protection and added an
16952 icall for Environment.GetFolderPath on Windows.
16953 * security.c|h: Added new icalls for key pair protection.
16955 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16957 * socket-io.c: don't display the non-supported family warning for known
16958 families. Now this is not displayed on windows when checking support
16961 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16963 * class.c: don't display the layout warning for static fields.
16965 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
16967 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
16968 * locales.c, locales.h: Added new icalls for culture-specific
16969 Char.ToLower and Char.ToUpper.
16971 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16973 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
16976 2004-04-20 Martin Baulig <martin@ximian.com>
16978 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
16979 of the type name before passing it to mono_reflection_type_from_name().
16981 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
16983 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
16984 encodings here. Fixes #56965.
16986 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
16988 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
16989 fix test on strstr result not that I can see anything that
16990 relies on the result.
16992 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
16994 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
16997 * marshal.c (mono_marshal_get_string_encoding): New helper function.
16999 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
17000 function to determine which marshalling to use for strings. Fixes
17003 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
17005 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
17007 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
17009 * icall.c: #include mono-config.h
17011 2004-04-15 Jackson Harper <jackson@ximian.com>
17013 * culture-info-tables.h: Fix date formats for en-US culture.
17015 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
17017 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
17018 ThreadPool.SetMinThreads.
17019 * threadpool.c: Implemented ThreadPool.GetMinThreads and
17020 ThreadPool.SetMinThreads.
17022 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
17024 * mono-config.c: also load the .config file in the directory
17025 where the assembly was found.
17027 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
17029 * assembly.c: load per-assembly config files.
17030 * icall.c: decrapified code to get the config dir and moved to
17032 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
17033 per-assembly config files. When doing a dll map lookup give precedence
17034 to the per-assembly data.
17036 2004-04-14 Martin Baulig <martin@ximian.com>
17038 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
17039 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
17040 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
17042 * mono-debugger-debugger.c: While the debugger is locked, remember
17043 whether the symbol tables have changes and send one single
17044 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
17046 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
17048 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
17050 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
17053 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
17054 account when marshalling string arrays. Fixes #56965.
17056 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
17058 * icall.c: Add new icalls mapping for security.
17059 * security.c|h: Add internal calls for WindowsIdentity,
17060 WindowsImpersonationContext and WindowsPrincipal.
17062 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
17064 * class.c: Added comment to ensure the System.MonoDummy class
17065 is removed when no longer necessary
17067 2004-04-13 Miguel de Icaza <miguel@ximian.com>
17069 * appdomain.c: Pass arguments to the bootstraping exceptions to
17070 minimize JITed methods at boot
17072 * metadata.c (mono_exception_from_name_two_strings): Allow for the
17073 second string to be null.
17075 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
17076 Change the protocol to minimize the JIT methods at startup. Now
17077 it Returns the internal codepage, if the value of "int_code_page"
17078 is 1 at entry, and we can not compute a suitable code page
17079 number, returns the code page as a string.
17081 2004-04-13 Jackson Harper <jackson@ximian.com>
17083 * culture-info-tables.h: Fix number of decimal digits for all
17086 2004-04-13 Jackson Harper <jackson@ximian.com>
17088 * icall.c: Clairfy out of sync error message. It is not always
17089 your corlib that is out of sync.
17091 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
17093 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
17094 properties when only the set accessor is overriden. Fixes #55874.
17096 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
17098 * assembly.c (mono_assembly_load_references): Make this thread safe.
17101 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
17103 * monosn.c: Add missing initialization calls.
17105 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
17108 ves_icall_System_Globalization_CultureInfo_construct_number_format
17109 Fix g_assert so it compiles on fussier compilers re int/ptr
17112 2004-04-08 Dick Porter <dick@ximian.com>
17115 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
17116 53992. Also rearrange the code so that the internal calls return
17117 an error value and exceptions are thrown from managed code.
17119 * icall.c: Add type info to the socket icalls.
17121 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17123 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
17126 2004-04-07 Martin Baulig <martin@ximian.com>
17128 * class.c (mono_class_from_generic_parameter): Don't default
17129 `klass->parent' to `mono_defaults.object_type'.
17131 2004-04-07 Martin Baulig <martin@ximian.com>
17133 * reflection.c (mono_reflection_initialize_generic_parameter): Set
17134 `param->pklass->reflection_info'.
17136 2004-04-07 Jackson Harper <jackson@ximian.com>
17138 * culture-info-tables.h: Fix date separator symbol.
17140 2004-04-07 Martin Baulig <martin@ximian.com>
17142 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
17143 from System.Type to System.MonoType.
17145 2004-04-07 Martin Baulig <martin@ximian.com>
17148 (MonoReflectionGenericParam): Added `has_reference_type' and
17149 `has_value_type' fields.
17151 * reflection.c (mono_image_get_generic_param_info): Encode the
17152 correct flags if we have the `class' or `struct' constraint.
17154 2004-04-07 Martin Baulig <martin@ximian.com>
17157 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
17159 2004-04-07 Jackson Harper <jackson@ximian.com>
17161 * appdomain.c: Revert extra patches, just wanted to bump the
17164 2004-04-07 Jackson Harper <jackson@ximian.com>
17166 * Makefile.am: Add culture-info private headers.
17167 * icall.c: Add new icalls for contructing locales.
17168 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
17169 * locales.h: Declare new culture info construction methods.
17170 * object.h: Add new fields used to avoid the CultureMap to
17172 * culture-info.h: Definition of structs used in the culture info
17174 * culture-info-tables.h: Autogenerated tables that contain culture
17175 info data. This file was generated with the locale-builder tool.
17176 * appdomain.c: Incement corlib version number.
17178 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
17180 * appdomain.c: (mono_runtime_init) move mono_thread_init
17181 to before mono_object_new calls so critical sections
17182 are initialized before use.
17184 2004-04-07 Martin Baulig <martin@ximian.com>
17187 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
17188 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
17189 (ves_icall_MonoGenericParam_initialize): Removed.
17190 (monogenericparam_icalls): Removed.
17191 (generictypeparambuilder_icalls): Added new table for
17192 System.Reflection.Emit.GenericTypeParameterBuilder.
17195 (mono_reflection_define_generic_parameter): Removed.
17196 (mono_reflection_initialize_generic_parameter): This is now called
17197 from GenericTypeParameterBuilder's .ctor.
17199 2004-04-06 Martin Baulig <martin@ximian.com>
17201 * class.c (mono_class_init): Don't inflate nested classes in a
17203 (mono_type_get_name_recurse): Include the generic arguments for
17204 generic instances and generic type declarations.
17205 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
17206 (_mono_class_get_instantiation_name): Removed.
17207 (mono_class_create_generic): Always use `gklass->name' as our name.
17209 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
17211 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
17212 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
17213 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
17214 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
17215 closed generic methods here.
17218 (mono_reflection_generic_inst_get_nested_types): Removed.
17219 (inflate_mono_method): Copy the generic parameters from the
17220 MonoMethodHeader into out MonoGenericMethod.
17222 2004-04-06 Martin Baulig <martin@ximian.com>
17225 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
17227 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
17229 * reflection.c (build_compressed_metadata): If we have any entries
17230 in the GenericParam, MethodSpec or GenericParamConstraint tables,
17231 set the header version to 1.1.
17233 2004-04-06 Martin Baulig <martin@ximian.com>
17235 * class.c (mono_class_init): If we're a generic instance,
17236 initialize our nested classes, too.
17237 (_mono_class_get_instantiation_name): Deal with the new `!%d'
17240 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17242 * process.c: quote the argument passed to the shell on windows.
17244 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
17246 * threads.c (mono_alloc_special_static_data): Allow this to be
17247 called during startup.
17249 2004-04-02 Martin Baulig <martin@ximian.com>
17252 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
17254 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
17256 * icall.c: Fix build.
17258 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
17260 * Makefile.am: Added security.c|h.
17261 * icall.c: Added icall for get_UserName;
17262 * security.c: New file for security related icalls. Added function
17263 get_UserName for System.Environment (fix #56144).
17264 * security.h: New. Header file for security.c
17266 2004-04-02 Dick Porter <dick@ximian.com>
17268 * icall.c: Deleted the icalls that were obsoleted some time ago
17269 by the ICU string code, and which were mixed into the icall
17270 rearranging. Fixes bug 55969.
17273 * string-icalls.c: Deleted the code that those icalls reference.
17275 2004-04-01 Martin Baulig <martin@ximian.com>
17277 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
17279 * class.c (mono_class_from_generic_parameter): Don't set
17280 TYPE_ATTRIBUTE_INTERFACE.
17281 (my_mono_class_from_generic_parameter): Likewise.
17283 2004-04-01 Martin Baulig <martin@ximian.com>
17285 * loader.c (find_method): Added an optional `MonoClass *ic'
17286 argument to search in a specific interface.
17287 (mono_get_method_constrained): New public function.
17289 2004-04-01 Martin Baulig <martin@ximian.com>
17291 * reflection.c (mono_image_get_generic_field_token): Use the
17292 `handleref' cache here.
17294 2004-04-01 Martin Baulig <martin@ximian.com>
17296 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
17298 * reflection.c (create_generic_typespec): Use the `typespec' hash
17299 here, not the `typeref' one.
17301 2004-04-01 Martin Baulig <martin@ximian.com>
17303 * class.c (mono_class_inflate_generic_type): Moved the
17304 functionality into a new static inflate_generic_type() which
17305 returns NULL if it didn't do anything. Only increment the
17306 `mono_stats.inflated_type_count' if we actually inflated
17308 (mono_class_get_full): Check the classes type to see whether we
17309 need to inflate it; also inflate MONO_TYPE_(M)VAR.
17311 2004-04-01 Jackson Harper <jackson@ximian.com>
17313 * reflection.c: Set culture for assembly references.
17315 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
17317 * reflection.[ch], icall.[ch], Fix support for pinning variables.
17319 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17322 (do_mono_assembly_open): the critical section also covers
17323 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
17325 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17328 (mono_manage_threads): abort the background threads when finishing.
17331 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17333 * gc.c: only close the done_event handle if there was no timeout.
17336 2004-03-30 Martin Baulig <martin@ximian.com>
17338 * icall.c (icall_entries): It's called "System.Activator", not
17339 "System.Activation".
17341 2004-03-30 Martin Baulig <martin@ximian.com>
17343 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
17344 (mono_class_create_from_typespec): Likewise.
17346 2004-03-30 Martin Baulig <martin@ximian.com>
17348 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
17349 `has_ctor_constraint' and `initialized'.
17351 2004-03-30 Martin Baulig <martin@ximian.com>
17353 * reflection.c (encode_new_constraint): New static function to add
17354 the constructor constraint attribute to a type parameter.
17355 (encode_constraints): Call encode_new_constraint() if necessary.
17358 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
17360 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
17362 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
17364 * reflection.c, icall.c: add support for pinning variables.
17366 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
17368 * marshal.c (mono_marshal_get_managed_wrapper):
17369 init bool local with zero rather than null.
17371 2004-03-29 Martin Baulig <martin@ximian.com>
17373 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
17374 the "official" behavior here.
17375 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
17377 2004-03-29 Martin Baulig <martin@ximian.com>
17379 * icall.c: Reflect latest API changes.
17381 2004-03-29 Martin Baulig <martin@ximian.com>
17383 * loader.c (mono_get_method_from_token): Also call
17384 mono_metadata_load_generic_params () for abstract and interface
17385 methods; replace the type arguments in the method signature with
17386 the ones which are loaded from the metadata.
17388 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
17390 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
17391 of the lock is not the current thread. MS.NET don't do it, in spite of
17392 what the documentation says. See bug #56157.
17394 2004-03-28 Martin Baulig <martin@ximian.com>
17396 * class.c (mono_class_init): Don't call init_properties() and
17397 init_events() for generic instances; set `prop->parent' when
17398 inflating properties.
17400 * reflection.c (mono_generic_inst_get_object): Call
17401 `mono_class_init (ginst->klass)'.
17402 (mono_type_get_object): Only create a MonoGenericInst if your
17403 generic type is a TypeBuilder.
17404 (do_mono_reflection_bind_generic_parameters): Only set
17405 `ginst->is_dynamic' if our generic type is a TypeBuilder.
17407 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
17409 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
17412 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17414 * icall.c: added Kill_internal icall.
17415 * process.[ch]: added Kill_internal icall.
17417 2004-03-25 Martin Baulig <martin@ximian.com>
17419 * class.h (MonoStats): Added `generic_instance_count',
17420 `inflated_method_count', `inflated_type_count' and
17421 `generics_metadata_size'.
17423 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17425 * reflection.c: no warnings now.
17427 2004-03-25 Martin Baulig <martin@ximian.com>
17429 * class.c (mono_class_get_full): New public function; does a
17430 mono_class_get(), but also takes a `MonoGenericContext *'.
17432 * loader.c (mono_field_from_memberref): Renamed to
17433 `field_from_memberref', made static and added `MonoGenericContext *'
17435 (mono_field_from_token): Added `MonoGenericInst *' argument.
17436 (method_from_memberef): Likewise.
17437 (mono_get_method_from_token): Likewise.
17438 (mono_get_method_full): New public function; does a
17439 mono_get_method(), but also takes a `MonoGenericContext *'.
17441 * verify.c (mono_method_verify): Get the method's generic context
17442 and pass it to mono_field_from_token(), mono_get_method_full() and
17443 mono_class_get_full().
17445 2004-03-25 Martin Baulig <martin@ximian.com>
17447 * class.c (mono_class_inflate_generic_type): Take a
17448 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
17449 `MonoGenericMethod *'.
17451 2004-03-25 Martin Baulig <martin@ximian.com>
17453 * loader.h (MonoMethodInflated): Store the MonoGenericContext
17454 instead of the MonoGenericMethod here.
17456 2004-03-25 Martin Baulig <martin@ximian.com>
17458 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
17459 each time we create a new MonoGenericInst, we also create a new
17460 context which points back to us.
17462 * class.c (inflate_method): Use `ginst->context' instead of
17463 creating a new context.
17465 * loader.c (method_from_memberref): Use
17466 `klass->generic_inst->context' instead of creating a new context.
17468 2004-03-25 Martin Baulig <martin@ximian.com>
17470 * class.h (MonoGenericContext): New struct.
17471 (MonoGenericMethod): Removed `generic_inst'.
17473 * class.c (mono_class_inflate_generic_method): Take a
17474 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
17476 2004-03-25 Martin Baulig <martin@ximian.com>
17478 * loader.h (MonoMethodInflated): New typedef.
17480 * metadata.h (MonoMethodSignature): Removed `gen_method', make
17481 `generic_param_count' consume just 30 bits, added `is_inflated'
17482 and `has_type_parameters' flags (one bit each).
17484 * class.c (mono_class_inflate_generic_method): Create a
17485 MonoMethodInflated instead of a MonoMethodNormal and set
17486 `is_inflated' in the method signature.
17488 * class.h (MonoGenericMethod): Removed `generic_method'.
17490 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
17492 * image.c: Make sure the name of a MonoImage is always an absolute path.
17493 This fixes bug #54415.
17495 2004-03-24 Martin Baulig <martin@ximian.com>
17497 * class.c (mono_class_setup_vtable): If we're a generic instance,
17498 use our generic type's vtable size.
17500 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
17502 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
17503 MONO_NO_UNLOAD env var as a temporary workaround for unloading
17506 2004-03-23 Martin Baulig <martin@ximian.com>
17508 * class.h (MonoDynamicGenericInst): Added `int count_events' and
17509 `MonoEvent *events'.
17511 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
17512 (typebuilder_icalls): Added "get_event_info"; calls
17513 mono_reflection_event_builder_get_event_info().
17515 * reflection.c (mono_reflection_generic_inst_initialize): Added
17516 `MonoArray *events'.
17517 (mono_reflection_event_builder_get_event_info): New function.
17519 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
17521 * object.h: add mono_type_initialization_init
17523 * object.c (mono_runtime_class_init):
17524 implement class constructor synchronization rules
17525 to cope with threading issues.
17526 add mono_type_initialization_init
17528 * appdomain.c (mono_runtime_init): call
17529 mono_type_initialization_init
17531 * class.h: removing initializing field from MonoVTable
17533 2004-03-23 Martin Baulig <martin@ximian.com>
17535 * class.c (my_mono_class_from_generic_parameter): Use
17536 `param->name' if it's not NULL.
17538 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
17540 * class.c: do not insert non-virtual methods in the vtable.
17541 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
17542 that means the method is non-virtual. This never would have
17545 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
17547 * profiler.c: Added lock for accessing coverage_hash.
17549 2004-03-22 Martin Baulig <martin@ximian.com>
17551 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
17552 `method->method->signature->generic_param_count != 0' to make it
17553 work for interface methods.
17555 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17557 * process.c: quote the string passed to the shell using g_shell_quote.
17559 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17562 (mono_threads_manage): don't remove the finalizer thread and self
17563 from the threads hash table so that mono_thread_manage can be called
17566 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17568 * process.c: quote the arguments when UseShellExecute is true. Fixes
17571 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17573 * threads.c: set mono_thread_detach as a cleanup routine for every
17574 thread. This way it's always executed upon thread termination, either
17575 aborted or finished normally. No more xsp hangs!
17577 2004-03-17 Martin Baulig <martin@ximian.com>
17579 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
17580 `int count_nested' and a `MonoType **nested'.
17582 * reflection.c (mono_reflection_bind_generic_parameters): Moved
17583 most of the functionality into a new static
17584 do_mono_reflection_bind_generic_parameters() and don't take a
17585 `MonoType *nested_in' argument any more. Don't compute nested
17587 (mono_reflection_generic_inst_get_nested_types): New public method
17588 to get nested types.
17590 * class.c (mono_class_create_generic): Set `klass->nested_in' if
17591 we're a nested class.
17593 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
17594 mono_reflection_generic_inst_get_nested_types() to compute the
17597 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
17599 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
17600 descriptive error message under windows.
17602 2004-03-17 Martin Baulig <martin@ximian.com>
17604 * class.c (dup_type): Added `const MonoType *original' argument;
17605 copy the attrs from the original type.
17607 2004-03-17 Martin Baulig <martin@ximian.com>
17609 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
17610 `m->generic_inst_cache' here.
17612 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
17614 * exception.h exception.c: Add stack_overflow_exception.
17616 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17619 (overlapped_callback): call SetEvent *after* invoking the callback.
17620 No need to call CloseHandle.
17622 2004-03-16 Martin Baulig <martin@ximian.com>
17624 * reflection.c (mono_image_get_fieldref_token): Take a
17625 `MonoReflectionField *' instead of a `MonoClassField *' and a
17626 `MonoClass *'; store the `MonoReflectionField *' in the hash.
17628 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17630 * appdomain.c: don't add the culture to the filename we're looking for
17631 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
17633 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17635 * locales.c: don't ignore symbols when doing case insensitive compares.
17636 Thanks Dick! Fixes bug #54046.
17638 * threads.c: surround 'threads' usage with enter/leave in
17639 mono_thread_manage.
17641 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
17643 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
17644 implicitly marshalled as [Out]. Fixes #55450.
17646 (mono_marshal_get_runtime_invoke): Zero out the result if there is
17649 2004-03-16 Martin Baulig <martin@ximian.com>
17651 * class.c (mono_class_from_generic_parameter): Use the actual
17654 2004-03-16 Martin Baulig <martin@ximian.com>
17656 * reflection.c (type_get_signature_size): New static function.
17657 Compues the size of the type in a method signature.
17658 (method_get_signature_size): New static function; calls
17659 type_get_signature_size() to compute the actual size of the
17660 method's signature.
17661 (method_encode_signature): Use method_get_signature_size() to get
17662 the signature's size rather than using `nparams * 10'.
17664 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17666 * file-io.h: define here WapiOverlapped on windows. I don't want the
17667 regular OVERLAPPED one.
17670 * threadpool.c: somehow, BindIoCompletionCallback is not found.
17671 Disabling AIO on windows.
17673 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17675 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
17678 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17680 * appdomain.c: upgraded corlib version.
17682 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
17683 and BeginWrite. Allow opening files for asynchrnous operations.
17685 * file-io.h: new struct that maps FileStreamAsyncResult.
17686 * icall.c: added new icalls.
17687 * process.[ch]: support setting child process environment variables
17688 and use the SHELL or COMSPEC when UseShellExecute is true.
17690 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
17691 callback for async. IO is here and also BindHandle.
17693 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
17696 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
17698 * reflection.c (create_custom_attr): Allow len == 0.
17700 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
17701 computation on big-endian machines.
17703 2004-03-13 Martin Baulig <martin@ximian.com>
17705 * class.h (MonoGenericInst): Added `int count_ifaces'.
17707 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
17708 `ginst->count_ifaces' instead `klass->interface_count' since we
17709 may get called before the vtable is created.
17711 * loader.c (mono_method_get_param_names): If we're a generic
17712 instance, return and don't initialize the class.
17714 * reflection.c (mono_reflection_setup_generic_class): Don't call
17715 ensure_runtime_vtable().
17716 (mono_reflection_bind_generic_parameters): Set
17717 `ginst->count_ifaces'.
17719 2004-03-11 Jackson Harper <jackson@ximian.com>
17723 * unicode.h: Remove unused System.Char icalls.
17725 2004-03-11 Miguel de Icaza <miguel@ximian.com>
17727 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
17728 code when we P/Invoke the first library in Windows.Forms, instead
17729 of when we first open the assembly.
17731 * assembly.c: Drop the lookup from here.
17733 2004-03-10 Martin Baulig <martin@ximian.com>
17735 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
17736 class for properties, fields and events. Finally fixes #54945.
17738 2004-03-10 Martin Baulig <martin@ximian.com>
17740 * metadata.c (mono_metadata_class_equal): New static function;
17741 checks whether two generic instances or two generic parameters are
17743 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
17746 2004-03-10 Martin Baulig <martin@ximian.com>
17748 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
17750 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
17751 argument and write it into the `reflection_info' field.
17754 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
17755 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
17757 2004-03-09 Jackson Harper <jackson@ximian.com>
17759 * char-conversions.h: use 8 bits for numeric data its all we need
17760 * icall.c: numeric data is only 8 bits now.
17762 2004-03-09 Martin Baulig <martin@ximian.com>
17764 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
17766 * class.c (init_properties, init_events): Initialize the new
17769 * reflection.c (typebuilder_setup_properties): Likewise.
17770 (typebuilder_setup_events): Likewise.
17772 * reflection.h (MonoEventInfo): Replaced `parent with
17773 `declaring_type' and `reflected_type'.
17775 * icall.c (ves_icall_get_property_info): Distinguish between
17776 declaring and reflected type.
17777 (ves_icall_get_event_info): Likewise.
17779 2004-03-09 Martin Baulig <martin@ximian.com>
17781 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
17782 (ves_icall_Type_GetField): Correctly set field->klass.
17784 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
17786 * loader.h: Fix warning.
17788 2004-03-08 Miguel de Icaza <miguel@ximian.com>
17790 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
17791 library routine if present. Notice that it will still continue
17792 executing even if its missing, for those working on the Gtk#
17793 edition of Windows.Forms.
17795 * assembly.c (do_mono_assembly_open): If loading the
17796 System.Windows.Forms call mono_loader_wini_init.
17798 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
17800 * class.h: Added MonoRemoteClass struct.
17801 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
17802 function for MonoStrings.
17803 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
17804 Added internal call for getting the proxy type.
17805 * marshal.c: Get the type of transparent proxies from its remote_class.
17806 Added methods that generate the IL for type checks and casts:
17807 mono_marshal_get_isinst, mono_marshal_get_castclass,
17808 mono_marshal_get_proxy_cancast.
17809 * marshal.h: Declaration of the previous new methods.
17810 * object.c: Added new moethods for creating and updating MonoRemoteClass
17811 instances: mono_remote_class, mono_upgrade_remote_class,
17812 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
17813 * verify.c: FIx transparent_proxy_fields layout.
17814 * appdomain.c: Bump corlib version.
17816 2004-03-04 Jackson Harper <jackson@ximian.com>
17818 * icall.c: Add icall to access char conversion tables.
17819 * char-conversions.h: Character conversion tables.
17820 * Makefile.am: Add char-conversions.h private header file.
17822 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
17824 * appdomain.c (unload_thread_main): Increase unloading timeout to
17825 10 sec as a temporary workaround for Nant problems.
17827 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
17829 * gc.c: Add checks for GC_enable and GC_disable.
17831 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
17832 (jaak@zd.com.pl). Fix memory corruption in String.Replace
17835 2004-02-27 Martin Baulig <martin@ximian.com>
17837 * reflection.c (mono_reflection_bind_generic_parameters): Take a
17838 `MonoReflectionType *' instead of a `MonoType *'.
17840 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
17842 * gc.c (run_finalize): Avoid finalizing the object representing the
17844 (finalizer_thread): Fix warning.
17846 2004-02-25 Martin Baulig <martin@ximian.com>
17848 * class.c (_mono_class_get_instantiation_name): Added `int offset'
17849 argument for nested types.
17850 (mono_class_create_generic): Added support for nested generictypes.
17852 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
17855 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
17857 * reflection.c (method_encode_signature): Increase the minimum
17858 value of `size' from 10 to 11.
17859 (mono_reflection_bind_generic_parameters): Take `int type_argc'
17860 and `MonoType **types' arguments instead of the `MonoArray
17861 *types'; added `MonoType *nested_in'. Recursively instantiate
17864 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
17866 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
17867 stack_overflow_ex members which are used by exception handling.
17869 * appdomain.c (mono_runtime_init): Initialize the new members.
17871 * gc.c (mono_gc_enable): New helper function.
17872 * gc.c (mono_gc_disable): New helper function.
17874 2004-02-23 Martin Baulig <martin@ximian.com>
17876 * icall.c: I must have been really stupid - make it actually work
17879 2004-02-23 Martin Baulig <martin@ximian.com>
17881 * loader.c (method_from_memberref): Only inflate the method if
17882 it's in another klass.
17884 2004-02-23 Martin Baulig <martin@ximian.com>
17886 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
17887 (mono_class_init): If we're a generic instance and an interface,
17888 compute `class->interface_id'; also create `class->interfaces'
17889 here and inflate them.
17891 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
17893 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
17895 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
17897 2004-02-15 Miguel de Icaza <miguel@ximian.com>
17899 * reflection.c (method_encode_code): Improved the error message
17900 generated by the exception.
17902 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17904 * icall.c: Martin did not do what he said in the ChangeLog for
17905 2004-02-18, but put back the changes for properties and events.
17906 Commenting those changes out again and adding comment to bug #54518.
17908 * process.c: removed warning.
17910 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
17912 * marshal.c (emit_struct_conv): Print an error message instead of
17913 asserting when a type does not have the StructLayout attribute.
17915 2004-02-20 Martin Baulig <martin@ximian.com>
17917 * reflection.c (mono_type_get_object): Also use the cache for
17919 (mono_reflection_bind_generic_parameters): Always compute
17922 2004-02-20 Martin Baulig <martin@ximian.com>
17924 * class.h (MonoGenericMethod): Removed `klass'.
17926 * class.c (mono_class_inflate_generic_method): Added `MonoClass
17929 2004-02-20 Martin Baulig <martin@ximian.com>
17931 * reflection.c (method_encode_methodspec): Actually use the
17932 uninflated signature for the memberref.
17934 2004-02-20 Martin Baulig <martin@ximian.com>
17936 * class.h (MonoGenericMethod): Removed `declaring'.
17938 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
17939 is NULL, compute it here.
17941 2004-02-20 Martin Baulig <martin@ximian.com>
17943 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
17945 * metadata.c (mono_metadata_generic_inst_hash): New method.
17946 (mono_metadata_generic_inst_equal): New method.
17948 * reflection.c (mono_reflection_bind_generic_parameters): Use the
17949 `klass->image->generic_inst_cache' cache to avoid creating
17950 duplicate MonoGenericInst's.
17952 * class.c (mono_class_inflate_generic_type): Use the cache.
17954 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
17956 * object.c: fixed gc descriptor calculation for embedded valuetypes.
17958 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17960 * icall.c: added Socket.WSAIoctl icall.
17962 * socket-io.[ch]: implemented
17963 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
17965 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
17967 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
17969 2004-02-18 Urs C Muff <umuff@quark.com>
17971 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
17972 this work on PPC and other big-endian architectures.
17974 * debug-mono-symfile.h: Prepended the names of all the `guint32'
17975 fields with an underscore to make sure they're only accessed by
17976 the read32() macro.
17978 2004-02-18 Martin Baulig <martin@ximian.com>
17980 * icall.c: Put the klass->refclass changes back for methods and
17981 fields, but not for properties and events. We're currently not
17982 distinguishing between DeclaringType and ReflectedType for
17983 properties and events, that's what caused the regressions.
17985 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17988 (mono_async_result_new): the handle can be NULL.
17990 * threadpool.c: Use an event instead of a semaphore, don't initialize
17991 it until needed. This saves quite a few semaphores from being created
17992 when using the threadpool.
17994 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
17996 * object.c (mono_string_is_interned_lookup): Fix interning of long
17997 strings. Fixes #54473.
17999 * domain.c (ldstr_equal): Optimize if the two strings are equal.
18001 * icall.c: Revert the klass->refclass changes since they introduce
18002 regressions (bug #54518).
18004 2004-02-18 Martin Baulig <martin@ximian.com>
18006 * class.c (mono_class_init): If we're a generic instance and don't
18007 come from a TypeBuilder, inflate our members here.
18008 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
18009 (mono_class_create_generic): New public method.
18010 (mono_class_initialize_generic): Removed.
18011 (get_instantiation_name): Renamed to
18012 _mono_class_get_instantiation_name() and made it public.
18014 2004-02-18 Martin Baulig <martin@ximian.com>
18016 * class.c (mono_class_inflate_generic_type): Clear the new
18017 instance's `nginst->klass' when inflating a generic instance.
18018 (mono_class_is_subclass_of): Added (basic) support for generic
18021 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
18023 * appdomain.h, domain.c: use a MonoCodeManager instead of a
18024 MonoMempool to hold compiled native code.
18026 2004-02-17 Martin Baulig <martin@ximian.com>
18028 * class.h (MonoDynamicGenericInst): Added `count_properties' and
18031 * reflection.c (mono_reflection_generic_inst_initialize): Added
18032 `MonoArray *properties' argument.
18034 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
18036 2004-02-17 Martin Baulig <martin@ximian.com>
18038 * icall.c (ves_icall_Type_GetFields): Renamed to
18039 ves_icall_Type_GetFields_internal() and added a
18040 `MonoReflectionType *rtype' argument; pass it to
18041 mono_field_get_object() to set the field's "reflected" type.
18042 (ves_icall_Type_GetConstructors): Likewise.
18043 (ves_icall_Type_GetEvents): Likewise.
18044 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
18045 argument; pass it to mono_method_get_object() to set the method's
18048 2004-02-17 Martin Baulig <martin@ximian.com>
18050 * class.h (MonoDynamicGenericInst): New type.
18051 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
18053 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
18054 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
18055 (ves_icall_MonoGenericInst_GetFields): New interncall.
18057 * class.c (mono_class_from_generic): Don't call
18058 mono_class_initialize_generic() if this is a dynamic instance;
18059 ie. it's being created from a TypeBuilder.
18060 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
18061 `class->byval_arg.type'.
18063 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
18064 to `inflate_method' and made static.
18065 (mono_reflection_inflate_field): Removed.
18066 (mono_reflection_generic_inst_initialize): New public method.
18068 * reflection.h (MonoReflectionGenericInst): Removed `methods',
18069 `ctors' and `fields'; added `initialized'.
18071 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
18073 * debug-helpers.c (mono_method_full_name): Fix output for empty
18076 2004-02-12 Martin Baulig <martin@ximian.com>
18078 * class.h (MonoClassField): Added `MonoType *generic_type'.
18080 * reflection.c (mono_image_get_fieldref_token): Added support for
18081 instantiated generic types.
18082 (field_encode_inflated_field): Removed.
18083 (mono_image_get_inflated_field_token): Removed.
18084 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
18086 * reflection.h (MonoReflectionInflatedField): Removed.
18088 2004-02-12 Martin Baulig <martin@ximian.com>
18090 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
18091 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
18093 * reflection.c (mono_image_get_methodspec_token): Take a
18094 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
18095 (mono_image_create_token): Check whether we have a
18096 `method->signature->gen_method' and call
18097 mono_image_get_methodspec_token() if appropriate.
18098 (inflated_method_get_object): Removed.
18099 (mono_reflection_bind_generic_method_parameters): Return a
18100 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
18101 (mono_reflection_inflate_method_or_ctor): Likewise.
18103 * reflection.h (MonoReflectionInflatedMethod): Removed.
18105 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
18107 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
18108 for custom valuetype marshalling.
18110 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
18112 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18114 * icall.c: fixed WSAGetLastError_internal name.
18116 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
18118 * threads.c (mono_thread_attach): Allow this to be called multiple
18119 times for a thread.
18121 * threads.c (build_wait_tids): Do not wait for ourselves.
18123 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
18124 appdomain list is empty.
18126 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
18127 memory returned by mono_string_builder_to_utf16, since it points into
18128 managed memory. Thanks to Bernie Solomon for noticing this.
18130 * icall.c: Add AppDomainSetup icalls.
18132 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
18134 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
18137 * reflection.c (reflection_methodbuilder_to_mono_method): Save
18138 custom attributes to the method_aux struct. Also fix array indexes etc.
18140 * loader.c (mono_method_get_param_names): Make dynamic case work again.
18142 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
18144 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
18145 (both static and runtime) and reduce startup time.
18147 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
18149 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
18150 AsAny marshalling conversion instead of crashing.
18152 * marshal.c: Fix warnings.
18154 2004-02-09 Martin Baulig <martin@ximian.com>
18156 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
18158 * reflection.h (MonoReflectionInflatedMethod): Removed the
18159 `declaring' field, it's now in the unmanaged MonoGenericMethod.
18161 * reflection.c (method_encode_methodspec): Removed the `method'
18162 argument; we get it from `gmethod->declaring'.
18163 (inflated_method_get_object): Removed the `declaring' argument.
18165 2004-02-09 Martin Baulig <martin@ximian.com>
18167 * class.h (MonoGenericMethod): New type.
18168 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
18171 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
18172 a `MonoGenericMethod *gen_method' one.
18174 * class.c (mono_class_inflate_generic_type): Take an additional
18175 `MonoGenericMethod * argument. This is only non-NULL if we're
18176 inflating types for a generic method.
18177 (mono_class_inflate_generic_signature): Renamed to
18178 inflate_generic_signature() and made static; take a
18179 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
18180 (inflate_generic_header): Take a `MonoGenericMethod *' argument
18181 instead of a `MonoGenericInst *' one.
18182 (mono_class_inflate_generic_method): Likewise.
18184 * reflection.c (encode_generic_method_sig): Take a
18185 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
18186 (method_encode_methodspec): Likewise.
18187 (inflated_method_get_object): Likewise.
18189 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
18190 field with a `MonoGenericMethod *gmethod' one.
18192 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
18194 * class.h (mono_class_has_parent): add parens to expansion
18197 2004-02-08 Martin Baulig <martin@ximian.com>
18199 * image.h (MonoImage): Removed `generics_cache'.
18201 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
18202 instead of a `MonoType *' argument; removed the `inflate_methods'
18203 argument. Don't inflate methods here.
18205 * loader.c (find_method): If it's a generic instance, call
18206 mono_class_init() on the `sclass->generic_inst->generic_type'.
18208 * metadata.c (mono_type_size): Make this work on uninitialized
18209 generic instances; call it on the `ginst->generic_type's class.
18211 * reflection.c (mono_reflection_bind_generic_parameters): Call
18212 mono_class_from_generic() to create the `ginst->klass'.
18214 2004-02-08 Martin Baulig <martin@ximian.com>
18216 * class.h (MonoClass): Changed type of `generic_inst' from
18217 `MonoType *' to `MonoGenericInst *'.
18219 2004-02-08 Martin Baulig <martin@ximian.com>
18221 * icall.c (ves_icall_Type_BindGenericParameters): Just call
18222 mono_type_get_object(), this is now creating a `MonoGenericInst'
18223 for MONO_TYPE_GENERICINST.
18224 (ves_icall_MonoGenericInst_GetParentType): Likewise.
18225 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
18227 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
18228 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
18229 (inflated_method_get_object): Added `MonoClass *refclass' argument.
18230 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
18231 and reflected type.
18233 * reflection.h (MonoReflectionInflatedMethod): Removed
18234 `declaring_type' and `reflected_type'.
18236 2004-02-08 Martin Baulig <martin@ximian.com>
18238 * class.h (MonoGenericInst): Added `MonoType *parent' and
18239 `MonoType **ifaces'.
18241 * reflection.h (MonoReflectionGenericInst): Removed `klass',
18242 `parent' and `interfaces'.
18244 * reflection.c (mono_reflection_bind_generic_parameters): Take a
18245 `MonoType *' argument and return a `MonoType *'.
18248 (ves_icall_MonoGenericInst_GetParentType): New interncall.
18249 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
18251 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
18253 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
18254 valuetype marshalling.
18256 2004-02-06 Martin Baulig <martin@ximian.com>
18259 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
18260 (my_mono_class_from_generic_parameter): Likewise.
18262 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
18264 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
18265 contents of the symbol files lazily.
18267 * object.h (MonoThread): Add 'name' and 'name_len' fields.
18269 * threads.h threads.c icall.c: New icalls for getting and setting the
18272 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
18274 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
18275 Raise an exception when the domain is not found.
18277 2004-02-03 Martin Baulig <martin@ximian.com>
18279 * reflection.c (mono_image_get_methodspec_token): Use the
18280 uninflated signature; fixes gen-33.
18282 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
18284 * gc.c threads.c: Make the finalizer thread a normal managed thread so
18285 the finalizer code can use thread functionality.
18287 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
18288 the finalizer thread.
18290 * threads.c: Make some functions more robust.
18292 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
18294 * metadata.h: Add new marshalling conventions.
18296 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
18297 stringbuilder marshalling. Fixes #53700.
18299 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
18301 * reflection.c (mono_image_get_type_info): Save declarative security
18304 * reflection.c (mono_image_get_field_info): Handle uninitialized
18305 unmanaged fields as well.
18307 * appdomain.c: Bump corlib version.
18309 2004-02-01 Martin Baulig <martin@ximian.com>
18311 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
18312 method type arguments.
18314 2004-01-30 Duncan Mak <duncan@ximian.com>
18316 * marshal.h: Add prototype for
18317 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
18319 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
18322 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
18324 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
18325 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
18327 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
18329 * marshal.c (mono_marshal_get_native_wrapper): Add support for
18330 custom marshalling of valuetypes.
18332 * marshal.c: Fix some warnings.
18334 2004-01-29 Martin Baulig <martin@ximian.com>
18336 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
18337 for generic method parameters.
18339 * reflection.c (method_encode_methodspec): Write the uninflated
18340 signature into the methodspec table.
18341 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
18342 is always the uninflated method.
18343 (reflection_methodbuilder_to_mono_method): Copy the generic
18344 parameters from the MethodBuilder into `header->gen_params'.
18346 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
18348 * class.c (mono_class_from_generic_parameter): Fix warning.
18350 2004-01-27 Martin Baulig <martin@ximian.com>
18352 * class.c (mono_class_from_generic_parameter): Don't create
18353 `klass->methods' here.
18355 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
18357 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
18358 extension since it does not work with libraries named lib<FOO>.dll.so.
18360 2004-01-25 Martin Baulig <martin@ximian.com>
18362 * class.c (mono_class_inflate_generic_type): Added support for
18363 MONO_TYPE_GENERICINST.
18365 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
18366 inflate methods on open constructed types.
18368 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18370 * object.c: fire ProcessExit event in the root AppDomain after running
18371 Main. Fixes bug #53299.
18373 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
18375 * socket-io.c: include the new socket-wrappers.h header.
18376 Use the wrappers instead of the unix socket functions to make the code
18379 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
18381 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
18383 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
18386 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
18388 * reflection.c (mono_image_create_pefile): Handle the case when the
18389 entry point is not a MethodBuilder.
18391 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
18392 field to ReflectionMethod since it is not allways a builder.
18394 * reflection.c (type_get_fully_qualified_name): New helper function to
18395 return the fully qualified name of a type.
18397 * reflection.c (encode_marshal_blob): Always emit the fully qualified
18398 type name for custom marshallers.
18400 * reflection.c (mono_marshal_spec_from_builder): Ditto.
18402 * class.c (mono_class_setup_vtable): If a parent class already
18403 implements an interface, use the implementing methods from that class.
18406 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18408 * threadpool.c: just return instead of ExitThread to allow for thread
18411 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
18413 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
18414 when closing resource modules.
18416 * reflection.c (mono_image_create_pefile): Handle the case when the
18417 entry point is not a MethodBuilder.
18419 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
18420 field to ReflectionMethod since it is not allways a builder.
18422 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
18424 * marshal.c (mono_marshal_get_managed_wrapper):
18425 mono_marshal_alloc takes native int so CONV_I
18426 the arg for 64bits.
18428 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
18430 * reflection.c (fixup_cattrs): New function to fixup the methoddef
18431 tokens in the cattr table. Fixes #53108.
18433 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18435 * loader.c: don't trim ".dll" before looking up in the config file.
18436 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
18438 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
18440 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
18441 Return the module which contains the resource as well.
18442 (ves_icall_System_Reflection_Module_Close): New icall.
18444 * appdomain.c: Bump corlib version number.
18446 * image.c (mono_image_addref): New public function.
18448 * assembly.c: Call mono_image_addref.
18450 * reflection.c (mono_module_get_object): Increase reference count of
18453 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
18456 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
18457 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
18458 proper exceptions on DllImport problems.
18460 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
18462 * class.c, metadata.c: eliminate CSIZE macro.
18464 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
18466 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
18467 * object.h: Added async_callback field in MonoAsyncResult.
18468 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
18469 * verify.c: Added async_callback in MonoAsyncResult layout.
18471 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
18473 * reflection.c (mono_reflection_get_custom_attrs): Add support
18476 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
18478 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
18480 (mono_marshal_method_from_wrapper): Add null pointer check.
18482 2004-01-16 Martin Baulig <martin@ximian.com>
18484 * debug-mono-symfile.h: Set version number to 36 and reflect
18485 latest symbol writer changes.
18487 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
18489 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
18490 multi-dimensional arrays.
18491 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
18492 (mono_class_from_mono_type): Use bounded_array_class_get.
18494 * class.c (mono_bounded_array_class_get): New function which takes
18495 a 'bounded' bool argument to distinguish vectors from one dimensional
18498 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
18499 bounded_array_class_get if the array has bounds.
18501 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
18502 Search modules loaded using AssemblyBuilder:AddModule as well.
18504 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18506 * appdomain.c: increased corlib version.
18507 * filewatcher.c: removed g_print.
18509 (get_property_info): only allocate what is actually requested.
18510 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
18512 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18514 * Makefile.am: added filewatcher.[ch]
18515 * filewatcher.[ch]: FileSystemWatcher runtime support.
18516 * icall.c: added new FSW icalls.
18518 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
18520 * string-icalls.c: fix stringbuilder regression as suggested by
18521 Iain McCoy <iain@mccoy.id.au>.
18523 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
18525 * process.c (process_read_stringtable_block): Recognize '007f' as
18526 a language neutral stringtable block.
18528 2004-01-12 Patrik Torstensson
18530 * object.h (MonoStringBuilder) : Changed layout to support our
18531 new stringbuilder class.
18532 * marshal.c: Change marshalling to support the new layout of
18534 * appdomain.c: increased version number because new layout of
18537 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
18539 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
18540 assembly name as an string instead of an AssemblyName, since it is
18541 easier to extract info from it.
18543 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
18544 the culture subdirectories too. Fixes #52231.
18546 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18548 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
18549 It takes 2 new parameters with an optional name for the method to look
18550 for and case ignoring info.
18552 * threadpool.c: removed unused variable.
18554 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18556 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
18557 It takes 2 new parameters with an optional name for the property to look
18558 for and case ignoring info.
18561 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
18563 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
18566 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18569 * assembly.c: escape the uri before passing it to g_filename_from_uri.
18572 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
18574 * reflection.c: Add support for more than one unmanaged resource.
18576 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
18577 in field->def_value, as done in all other cases.
18579 * reflection.c (mono_reflection_get_custom_attrs): Add support for
18582 * reflection.c (mono_reflection_create_runtime_class): Remove
18583 errorneous assignment to klass->element_class, since it is already
18584 done in mono_reflection_setup_internal_class.
18586 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18588 * gc.c: added missing LeaveCriticalSection.
18589 * icall.c: indented a couple of lines.
18590 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
18591 if we call EndInvoke inside a callback. Fixes bug #52601.
18593 2004-01-07 Martin Baulig <martin@ximian.com>
18595 * mono-debug-debugger.h
18596 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
18598 2004-01-06 Miguel de Icaza <miguel@ximian.com>
18600 * appdomain.c: Use messages in NotImplementedException.
18602 * exception.c (mono_get_exception_not_implemented): Now this takes
18603 a message argument.
18605 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
18606 exception instead of g_asserting an aborting when something is not
18609 Add some inline docs.
18611 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
18613 * reflection.h: Update after changes to object layout.
18615 * reflection.c: Implement saving of unmanaged aka win32 resources.
18617 * appdomain.c: Bump version number.
18619 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
18620 Handle missing domains gracefully.
18622 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
18624 * file-io.c : On Windows, there are much more invalid_path_chars.
18626 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
18628 * class.h, object.c: prepare for GetType () speedup.
18630 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
18632 * profiler.c: workaround for --profile null reference exception on
18633 cygwin. Patch by Patrik Torstensson.
18635 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
18637 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
18638 make work for unaligned access.
18640 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
18642 * class.c: small cleanup (class->fields [i] -> field).
18643 * image.c: check address of metadata is valid.
18645 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
18647 * assembly.h assembly.c (mono_assembly_loaded): New public function to
18648 search the list of loaded assemblies.
18650 * reflection.c (mono_reflection_type_from_name): Use
18651 mono_assembly_loaded instead of mono_image_loaded.
18653 * reflection.c: Fix warnings.
18655 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
18657 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
18658 is dynamic. This is needed since an assembly can contain both dynamic and
18659 non-dynamic images.
18661 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
18664 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
18666 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
18667 to store modules loaded using AddModule.
18669 * reflection.c (mono_image_fill_file_table): Generalize this so it works
18672 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
18674 * reflection.c (mono_image_fill_export_table_from_module): New function to
18675 fill out the EXPORTEDTYPES table from a module.
18677 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
18678 into a separate function. Also handle loaded non-dynamic modules.
18680 * reflection.c (mono_image_basic_init): Fix memory allocation.
18682 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18684 * assembly.c (mono_assembly_load_references): Make this public.
18686 2003-12-19 Martin Baulig <martin@ximian.com>
18688 * class.c (mono_class_initialize_generic): Made this static, take
18689 a `MonoGenericInst *' instead of a `MonoClass *'.
18690 (mono_class_from_generic): Call mono_class_initialize_generic()
18691 unless we're already initialized or being called from
18692 do_mono_metadata_parse_generic_inst().
18694 * class.h (MonoGenericInst): Added `initialized' and
18695 `init_pending' flags.
18697 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
18698 `mono_class_init (gklass)' or mono_class_initialize_generic()
18699 here; set `generic_inst->init_pending' while parsing the
18702 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
18704 * locales.c: include string.h for memxxx prototypes
18706 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
18708 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
18709 constructor when accessing literal fields.
18711 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
18713 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18715 * reflection.c (assembly_add_resource_manifest): New function to fill
18716 the MANIFESTRESOURCE table.
18718 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
18720 * reflection.h: Update to changes in class layout.
18722 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
18723 Reenable call to mono_runtime_is_shutting_down ().
18725 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
18726 determine if the runtime is shutting down.
18728 2003-12-16 Jackson Harper <jackson@ximian.com>
18730 * icall.c: comment out call to mono_runtime_is_shutting_down to
18733 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
18735 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
18736 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
18738 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
18740 * reflection.c: move definition of swap_with_size
18741 to before its first call
18743 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
18745 * appdomain.c (mono_runtime_is_shutting_down): New public function.
18747 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
18750 * object.c: Fix warnings.
18752 * icall.c (ves_icall_Type_Get...): Only consider inherited static
18753 members if FlattenHierarchy is set.
18755 * reflection.c (mono_image_add_decl_security): New function to emit
18756 declarative security.
18758 * reflection.h reflection.c: Add support for declarative security.
18760 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
18762 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
18764 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
18766 * appdomain.c verify.c: Moved corlib version checking into its own
18767 function in appdomain.c since it needs to create vtables etc.
18769 2003-12-13 Patrik Torstensson <p@rxc.se>
18771 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
18772 instead of unwrapped server.
18774 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
18776 * verify.c (check_corlib): Fix field index.
18778 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
18780 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
18783 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
18785 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
18786 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
18787 cope with sizeof(size_t) != sizeof(guint32).
18789 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18791 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
18792 in case of failure.
18794 2003-12-10 Mark Crichton <crichton@gimp.org>
18796 * icall.c: removed the GetNonZeroBytes. We now handle this case
18799 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
18801 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
18803 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
18806 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
18808 * verify.c (check_corlib): Handle the case when the version field is
18809 initialized by a static constructor.
18811 2003-12-08 Patrik Torstensson <p@rxc.se>
18813 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
18815 2003-12-08 Martin Baulig <martin@ximian.com>
18817 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
18818 a MonoReflectionGenericParameter, also take the parameter index
18819 and name as arguments.
18820 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
18821 (ves_icall_MonoGenericParam_initialize): New interncall.
18822 (ves_icall_Type_make_byref_type): New interncall.
18824 * reflection.h (MonoReflectionGenericParam): Derive from
18825 MonoReflectionType, not just from MonoObject. Added `refobj' and
18828 * reflection.c (mono_reflection_define_generic_parameter): Create
18829 and return a new MonoReflectionGenericParam; don't initialize the
18831 (mono_reflection_initialize_generic_parameter): New public method;
18832 initializes the constraints and creates the `param->pklass'.
18834 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
18836 * reflection.h reflection.c: Use the new fields 'num_types',
18837 'num_fields' and 'num_methods' to track the number of types etc.
18839 * verify.c (check_corlib): Check corlib version number.
18841 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
18843 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
18844 function works on all methods.
18846 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
18848 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
18849 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
18850 the custom_type_info flag of the transparent proxy.
18851 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
18852 objects that supports IRemotingTypeInfo.
18853 * object.h: Added custom_type_info field in transparent proxy.
18855 2003-12-06 Martin Baulig <martin@ximian.com>
18857 * class.c (mono_class_create_from_generic): Removed.
18858 (mono_class_from_generic): Check `ginst->klass' before doing
18859 anything else. This is important to fully support "recursive"
18862 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
18863 empty `generic_inst->klass' before doing anything else.
18865 2003-12-06 Dick Porter <dick@ximian.com>
18870 * locales.c: Use C structs to access class fields. Don't do a
18871 conversion between MonoString and UChar because both are
18872 platform-endian UTF-16. Compare now takes startindex and count
18873 parameters. Add a char overload for IndexOf. Speed up the
18874 invariant string IndexOf.
18876 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
18878 * Makefile.am (monosn_LDADD): Fix parallel build.
18880 2003-12-04 Martin Baulig <martin@ximian.com>
18883 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
18884 (ves_icall_Type_make_array_type): New interncall.
18886 2003-12-04 Martin Baulig <martin@ximian.com>
18888 * locales.c: also change it in the !HAVE_ICU case.
18890 2003-12-04 Dick Porter <dick@ximian.com>
18893 * locales.c: construct_compareinfo is now in CompareInfo, not
18896 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
18898 * image.c (mono_image_load_file_for_image): Cache loaded images in the
18899 image->files array.
18901 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
18904 * assembly.c (mono_assembly_load_references): Only load references
18907 * class.c (mono_class_from_name): Avoid linear search of the
18908 EXPORTEDTYPE table.
18910 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
18912 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
18914 * image.h (MonoImage): Add 'field_cache' field.
18916 * loader.c (mono_field_from_token): Cache field lookups.
18918 * reflection.c (mono_module_get_object): Fix name property.
18920 * icall.c (ves_icall_get_enum_info): Update after changes to
18921 mono_metadata_get_constant_index ().
18923 * icall.c: Get rid of get_type_info icall, use a separate icall for
18924 each type property to avoid needless memory allocations. Fixes #51514.
18926 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
18927 to avoid needless binary searches.
18929 * class.c (class_compute_field_layout): Move the initialization of
18930 field->def_value to mono_class_vtable ().
18932 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
18935 * object.c (mono_object_allocate): Make it inline.
18937 * object.c (mono_object_allocate_spec): Make it inline.
18939 2003-12-02 Dick Porter <dick@ximian.com>
18941 * locales.c (create_NumberFormat): NumberFormatInfo construction.
18942 Patch by Mohammad DAMT (mdamt@cdl2000.com).
18944 2003-12-01 Dick Porter <dick@ximian.com>
18946 * threads.c: Fix signature and call in CreateMutex and
18949 2003-12-01 Dick Porter <dick@ximian.com>
18952 * locales.c: Implement string compares and searching
18954 * object.h: Add extra Thread field
18956 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
18958 * reflection.c (fixup_method): Add support for MonoCMethod.
18960 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
18962 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
18964 * reflection.c (assembly_name_to_aname): Allow extra characters in
18965 assembly names. Fixes #51468.
18967 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
18969 * exception.c (mono_exception_from_name_domain): New helper function.
18971 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
18972 exception object in the correct domain.
18974 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
18975 formatting + make a copy a the input data.
18977 * loader.c (mono_get_method_from_token): Methods which contain
18978 native code do not have entries in the ImplMap.
18980 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
18981 Thanks to Gonzalo for spotting this.
18983 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
18984 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
18986 * assembly.h (mono_assembly_load_from): Split the second part of
18987 assembly loading into a new public function.
18989 * exception.h (mono_get_exception_bad_image_format): New function.
18991 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
18993 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
18994 Enumerate all modules inside a dynamic assembly. Fixes #51293.
18996 * icall.c: Add new icall for creating dynamic methods.
18998 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
19000 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
19002 * reflection.c (mono_reflection_create_dynamic_method): New icall to
19003 create a dynamic method.
19005 * reflection.c (resolve_object): New helper function.
19007 * reflection.c: Generalize ReflectionMethodBuilder and the functions
19008 which manipulate it so they can also work on dynamic methods.
19010 * reflection.c (reflection_method_builder_to_mono_method): Avoid
19011 creating the MonoReflectionMethodAux structure if it is not needed.
19013 * reflection.h verify.c: Update after changes to object layout.
19015 * reflection.c (method_builder_encode_signature): Fix compilation on
19018 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
19020 * appdomain.h: Added support for context static fields. Added static_data
19021 field to MonoAppContext and renamed thread_static_fields to a more
19022 generic special_static_fields in MonoAppDomain, since it can now contain
19023 context static fields.
19024 * domain.c: Updated hashtable name.
19025 * object.c: Replaced field_is_thread_static() for a more generic
19026 field_is_special_static() which also checks for context static attribute.
19027 In mono_class_vtable(), added support for static context fields.
19028 * threads.c: Changed methods that manage thread static fields to more
19029 generic methods so they can be reused both for thread and context static
19031 * threads.h: Declared some new methods.
19033 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
19035 * reflection.h: Update after changes to the managed types.
19037 * reflection.c (encode_custom_modifiers): New helper function.
19039 * reflection.c (method_encode_signature): Emit custom modifiers.
19041 * reflection.c (field_encode_signature): Emit custom modifiers.
19043 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
19045 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
19047 * icall.c (ves_icall_System_ValueType_Equals): New optimized
19050 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
19053 * object.c (mono_field_get_value_object): New function.
19055 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
19058 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
19060 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
19061 return a preallocated out-of-memory exception instance.
19063 * object.c (out_of_memory): Use the new function.
19065 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
19066 flag is before the custom modifiers. Fixes #49802.
19068 2003-11-16 Martin Baulig <martin@ximian.com>
19070 * class.c (mono_class_is_open_constructed_type): Implemented the
19071 MONO_TYPE_GENERICINST case.
19073 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
19075 * assembly.c (mono_assembly_fill_assembly_name): New function to
19076 fill out the MonoAssemblyName structure.
19077 (mono_assembly_open): Use the new function.
19079 * icall.c (fill_reflection_assembly_name): New helper function.
19081 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
19084 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
19086 2003-11-15 Martin Baulig <martin@ximian.com>
19088 * class.c (mono_class_is_open_constructed_type): New public
19089 function; checks whether a type is an open constructed type,
19090 ie. whether it still contains type parameters.
19091 (mono_class_inflate_generic_type): If we're a type parameter and
19092 the inflated type is also a MONO_TYPE_(M)VAR, return the original
19095 * class.h (MonoGenericInst): Added `guint32 is_open'.
19097 * loader.c (method_from_methodspec): Check whether we're an open
19098 or closed constructed type and set `ginst->is_open'.
19100 * reflection.c (mono_reflection_bind_generic_parameters): Check
19101 whether we're an open or closed constructed type and set
19103 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
19104 from open constructed types.
19106 2003-11-15 Martin Baulig <martin@ximian.com>
19108 * reflection.c (mono_reflection_bind_generic_parameters): If we're
19109 a generic instance (instead of a generic type declaration) with
19110 unbound generic parameters, bind them to our actual types.
19112 2003-11-14 Martin Baulig <martin@ximian.com>
19114 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
19116 * reflection.c (mono_reflection_bind_generic_parameters): If we're
19117 an interface type, populate `res->interfaces' with instantiated
19118 versions of all the interfaces we inherit.
19120 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
19122 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
19123 when MONO_PATH is set but doesn't contain the install dir.
19125 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19128 (ves_icall_Type_GetInterfaces): don't return an interface twice when
19129 it's also implemented in base classes. Fixes bug #50927.
19131 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
19133 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
19134 if this method is called from a finalizer. Fixes #50913.
19136 2003-11-12 Miguel de Icaza <miguel@ximian.com>
19138 * threads.c: Implement VolatileRead/VolatileWrite
19140 * icall.c: Add new icalls for VolatileRead/VolatileWrite
19142 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
19144 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
19145 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
19148 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
19149 from Peter Ross (pro@missioncriticalit.com).
19151 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
19153 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
19155 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
19157 * assembly.c (mono_assembly_load_references): Disable check because it
19158 triggers on older corlibs which lots of people have.
19160 2003-11-12 Jackson Harper <jackson@ximian.com>
19162 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
19163 load corlib.dll if mscorlib.dll is not found.
19164 * assembly.h: Remove corlib name define.
19167 * image.c: Change corlib name to mscorlib.
19169 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
19171 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
19173 2003-11-11 Miguel de Icaza <miguel@ximian.com>
19175 * appdomain.h: Added loader_optimization here to sync with the C#
19176 code, and add disallow_binding_redirects field.
19178 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
19180 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
19182 * reflection.c (mono_image_build_metadata): Fix crash on modules
19185 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
19187 * icall.c (ves_icall_get_method_info): Return callingConvention as
19190 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
19191 namespaces from the EXPORTEDTYPE table as well.
19193 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
19194 from all modules inside the assembly.
19196 2003-11-11 Martin Baulig <martin@ximian.com>
19198 * reflection.c (mono_reflection_bind_generic_parameters): Make
19199 this work for interfaces.
19201 2003-11-11 Martin Baulig <martin@ximian.com>
19203 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
19205 2003-11-11 Martin Baulig <martin@ximian.com>
19207 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
19208 "MonoInflatedMethod" and "MonoInflatedCtor".
19210 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
19212 * reflection.c (resolution_scope_from_image): Use the assembly table
19213 from the manifest module, since other modules don't have it.
19215 * debug-helpers.c (mono_type_full_name): New helper function.
19217 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
19219 * image.c (mono_image_load_file_for_image): New public function which
19220 is a replacement for the load_file_for_image in class.c.
19222 * assembly.c (mono_assembly_load_module): A wrapper for the function
19223 above which does assembly association and reference loading too.
19225 * class.c (mono_class_from_name): Call mono_assembly_load_module.
19227 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19229 * appdomain.c: not all of the attributes for the full assembly name
19230 are required and the order doesn't matter. Fixes bug #50787.
19232 2003-11-10 Dick Porter <dick@ximian.com>
19234 * locales.c: Use platform-endian UTF16
19236 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
19238 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
19240 2003-11-10 Martin Baulig <martin@ximian.com>
19243 (mono_metadata_load_generic_params): Make this actually work.
19245 * reflection.c (mono_reflection_bind_generic_parameters): If our
19246 parent is a generic instance, pass all the `types' to it, no
19247 matter whether it has the same number of type parameters or not.
19249 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
19251 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
19253 * assembly.c (mono_assembly_load_references): Move the image<->assembly
19254 assignment code to this function so it gets called recursively for all
19257 * image.c (load_modules): Remove the assembly assignment since it is
19258 now done by mono_assembly_load_references.
19260 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
19261 Add 'module' argument.
19262 (mono_module_get_types): New helper function.
19263 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
19265 2003-11-08 Martin Baulig <martin@ximian.com>
19267 * class.c (mono_class_inflate_generic_method): Interface method
19268 don't have a header.
19270 * reflection.c (mono_image_get_methodspec_token): Take an
19271 additional `MonoGenericInst *' argument instead of reading it from
19272 the header; this is necessary to support interfaces.
19273 (mono_image_create_token): Pass the `MonoGenericInst *' from the
19274 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
19275 (inflated_method_get_object): Take an additional `MonoGenericInst *'
19278 * reflection.h (MonoReflectionInflatedMethod): Added
19279 `MonoGenericInst *ginst'.
19281 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
19283 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
19285 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
19287 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
19289 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
19292 (reflection_methodbuilder_from_method_builder):
19293 (reflection_methodbuilder_from_ctor_builder): New helper functions to
19294 initialize a ReflectionMethodBuilder structure.
19295 (mono_image_get_methodbuilder_token):
19296 (mono_image_get_ctorbuilder_token): New functions to emit memberref
19297 tokens which point to types in another module inside the same assembly.
19299 * reflection.c: Use the new helper functions.
19301 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
19303 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
19304 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
19306 * reflection.c (resolution_scope_from_image): Emit a moduleref if
19309 * reflection.c (mono_image_build_metadata): Emit metadata only for the
19310 current module. Emit the manifest only for the main module.
19312 * reflection.c (mono_image_create_token): Add assertion when a
19313 memberref needs to be created.
19315 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
19317 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
19318 larger buffer for the custom attribute blob. Fixes #50637.
19320 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19322 * threadpool.c: notify listener on async processing handles after
19323 invoking the async callback. Thanks to Zoltan.
19325 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
19327 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
19328 avoid code duplication.
19330 * reflection.h (MonoDynamicImage): New type which is currently unused,
19331 but will be used through the ref.emit code in place of
19332 MonoDynamicAssembly.
19334 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
19337 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
19338 a MonoDynamicImage instead of just a MonoImage.
19340 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
19341 icalls to ModuleBuilder but keep their semantics, so they will work
19342 with moduleb->assemblyb. This will change later.
19344 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
19346 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
19349 * reflection.c (mono_image_build_metadata): Avoid creation of a default
19350 main module, since it is now done by the managed code.
19352 2003-11-03 Martin Baulig <martin@ximian.com>
19354 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
19355 `ginst->klass' here.
19356 (method_encode_methodspec): Don't use the `ginst->generic_method's
19357 klass if it's a generic instance, use `ginst->klass' in this case.
19359 2003-11-03 Martin Baulig <martin@ximian.com>
19361 * reflection.c (mono_image_get_generic_method_param_info):
19362 Removed, use mono_image_get_generic_param_info() instead.
19363 (mono_image_get_type_info): Write the GenericParam table before
19364 the Method table. This is neccessary because in the GenericParam
19365 table, type parameters of the class (ie. '!0' etc.) must come
19366 before the ones from its generic methods (ie. '!!0' etc).
19368 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
19370 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
19372 2003-11-02 Martin Baulig <martin@ximian.com>
19374 * reflection.c (create_generic_typespec): Take a
19375 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
19376 the generic parameters from it.
19378 2003-11-02 Martin Baulig <martin@ximian.com>
19380 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
19381 instead of a `MonoClassField *' since we just need the type.
19382 (create_generic_typespec): New static function. Creates a
19383 TypeSpec token for a generic type declaration.
19384 (mono_image_get_generic_field_token): New static function.
19385 (mono_image_create_token): If we're a FieldBuilder in a generic
19386 type declaration, call mono_image_get_generic_field_token() to get
19389 2003-11-02 Martin Baulig <martin@ximian.com>
19392 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
19393 `MonoReflectionGenericInst *declaring_type' and
19394 `MonoReflectionGenericInst *reflected_type' fields.
19396 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
19397 `MonoReflectionGenericInst *declaring_type' and a
19398 `MonoReflectionGenericInst *reflected_type' argument instead of a
19399 single `MonoReflectionGenericInst *type' one. Set
19400 `res->declaring_type' and `res->reflected_type' from them.
19401 (mono_reflection_inflate_field): Likewise.
19403 2003-11-02 Martin Baulig <martin@ximian.com>
19405 * class.c (mono_class_setup_vtable): Don't store generic methods
19408 2003-11-02 Martin Baulig <martin@ximian.com>
19410 * reflection.h (MonoReflectionGenericInst): Added
19411 `MonoReflectionType *declaring_type'.
19413 * reflection.c (mono_reflection_bind_generic_parameters): Use
19414 `if (tb->parent)' instead of `klass->parent'.
19416 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
19418 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
19419 with an empty ASSEMBLY table.
19421 * reflection.c (mono_image_build_metadata): Avoid using the same loop
19422 variable in the inner and outer loops.
19424 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
19426 * metadata.h (mono_metadata_make_token): Put parentheses around macro
19429 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
19431 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
19432 icalls. Instead, do everything in managed code. This is needed since
19433 it is hard to restore the original domain etc. in unmanaged code in the
19434 presence of undeniable exceptions.
19436 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
19437 New icalls to push and pop appdomain refs.
19439 2003-10-31 Martin Baulig <martin@ximian.com>
19441 * class.c (inflate_generic_type): Renamed to
19442 mono_class_inflate_generic_type() and made it public.
19444 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
19447 * loader.c (mono_field_from_memberref): Also set the retklass for
19450 * fielder.c (mono_image_get_inflated_field_token): New static
19451 method; creates a metadata token for an inflated field.
19452 (mono_image_create_token, fixup_method): Added support for
19453 "MonoInflatedField".
19454 (fieldbuilder_to_mono_class_field): New static function.
19455 (mono_reflection_inflate_field): New public function.
19458 (MonoReflectionGenericInst): Added `MonoArray *fields'.
19459 (MonoReflectionInflatedField): New typedef.
19461 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
19463 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
19464 for Solaris and other platforms without s6_addr16
19466 2003-10-30 Martin Baulig <martin@ximian.com>
19468 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
19469 argument instead of two.
19470 (mono_class_inflate_generic_signature): Likewise.
19471 (inflate_generic_header): Likewise.
19472 (mono_class_inflate_generic_method): Likewise. In addition, if
19473 `ginst->klass' is set, it becomes the new `method->klass'.
19475 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
19478 * reflection.c (encode_generic_method_sig): Write a 0xa as the
19479 first byte. [FIXME]
19480 (method_encode_methodspec): If we have generic parameters, create
19481 a MethodSpec instead of a MethodRef.
19482 (fixup_method): Added support for "MonoInflatedMethod" and
19483 "MonoInflatedCtor".
19484 (mono_image_create_token): Added support for "MonoInflatedMethod"
19485 and "MonoInflatedCtor".
19486 (inflated_method_get_object): New static function; returns a
19487 managed "System.Reflection.MonoInflatedMethod" object.
19488 (mono_reflection_bind_generic_method_parameters): Return a
19489 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
19490 (mono_reflection_inflate_method_or_ctor): Likewise.
19491 (mono_image_get_generic_method_param_info): Initialize unused
19493 (mono_image_get_generic_param_info): Likewise.
19495 * reflection.h (MonoReflectionInflatedMethod): New public
19496 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
19497 "S.R.MonoInflatedCtor" classes.
19499 * loader.c (method_from_memberref): If we're a TypeSpec and it
19500 resolves to a generic instance, inflate the method.
19502 2003-10-28 Dick Porter <dick@ximian.com>
19504 * object.c (mono_runtime_run_main): Convert command-line arguments
19505 into utf8, falling back to the user's locale encoding to do so.
19507 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
19509 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
19512 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
19514 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
19515 up icalls at method definition time. Partially fixes #33569.
19517 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
19519 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
19520 marshalling of arrays. Fixes #50116.
19522 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
19524 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
19525 points to a vtable in the dying appdomain.
19527 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
19528 listeners into unmanaged code inside the lock.
19530 * object.c (mono_class_vtable): Turn off typed allocation in non-root
19531 domains and add some comments.
19533 2003-10-25 Martin Baulig <martin@ximian.com>
19535 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
19537 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
19539 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
19540 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
19541 currently parsing. Create the generic class and store it in
19542 `generic_inst->klass' before parsing the type arguments. This is
19543 required to support "recursive" definitions; see mcs/tests/gen-23.cs
19545 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
19546 to support recursive typespec entries.
19548 * class.c (mono_class_setup_parent): If our parent is a generic
19549 instance, we may get called before it has its name set.
19550 (mono_class_from_generic): Splitted into
19551 mono_class_create_from_generic() and mono_class_initialize_generic().
19553 2003-10-25 Martin Baulig <martin@ximian.com>
19555 * icall.c (ves_icall_Type_BindGenericParameters): Return a
19556 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
19557 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
19558 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
19560 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
19561 (create_typespec): Likewise.
19562 (mono_reflection_bind_generic_parameters): Return a
19563 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
19564 (mono_reflection_inflate_method_or_ctor): New public function.
19566 * reflection.h (MonoReflectionGenericInst): New typedef.
19568 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
19570 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
19571 inside the domain lock. Fixes #49993.
19573 * object.c (mono_class_vtable): When typed allocation is used,
19574 allocate vtables in the GC heap instead of in the mempool, since the
19575 vtables contain GC descriptors which are used by the collector even
19576 after the domain owning the mempool is unloaded.
19578 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
19580 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
19581 reflect what it does. Also invalidate mempools instead of freeing
19582 them if a define is set.
19584 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
19587 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
19588 hold the finalizable objects in this domain.
19590 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
19593 * appdomain.c (mono_domain_set): New function to set the current
19594 appdomain, but only if it is not being unloaded.
19596 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
19597 appdomain which is being unloaded.
19599 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
19600 unloading of the root appdomain.
19602 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
19603 icall to execute a method in another appdomain. Intended as a
19604 replacement for InternalSetDomain, which can confuse the code
19605 generation in the JIT.
19607 * appdomain.c (mono_domain_is_unloading): New function to determine
19608 whenever an appdomain is unloading.
19610 * appdomain.c (mono_domain_unload): New function to correctly unload
19613 * assembly.c (mono_assembly_load_references): Check that an assembly
19614 does not references itself.
19616 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
19617 domain manually, it asks the finalizer thread to do it, then waits for
19618 the result. Also added a timeout.
19620 * icall.c: Register the new icalls.
19622 * threads.h threads.c: Export the mono_gc_stop_world and
19623 mono_gc_start_world functions.
19625 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
19626 function to fill out the mempool with 0x2a.
19628 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
19630 * reflection.h (MonoReflectionMethodAux): New structure to store
19631 information which is rarely used, thus is not in the MonoMethod
19634 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
19635 store the aux info.
19637 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
19638 and marshalling info into the aux structure.
19640 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
19641 from the aux structure.
19643 * loader.c (mono_method_get_param_names): Retrieve the param names from
19646 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
19648 * exception.h exception.c: Add AppDomainUnloadedException && fix
19651 2003-10-21 Dick Porter <dick@ximian.com>
19654 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
19655 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
19657 2003-10-21 Martin Baulig <martin@ximian.com>
19659 * reflection.c (mono_reflection_bind_generic_parameters):
19660 `klass->parent' is NULL for interfaces.
19662 2003-10-21 Martin Baulig <martin@ximian.com>
19664 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
19666 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
19668 * exception.c (mono_exception_from_name_msg): New helper function for
19669 creating exceptions and initializing their message field.
19671 * exception.c: Simplify functions using the new helper.
19673 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
19676 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
19677 mono_raise_exception, since otherwise gcc doesn't generate the function
19678 epilog for raise_exception, confusing the stack unwinding in the JIT.
19681 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
19682 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
19685 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19687 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
19690 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
19692 * icall.c: Removed GetUninitializedObject method because
19693 AllocateUninitializedClassInstance does the same.
19695 2003-10-18 Martin Baulig <martin@ximian.com>
19697 * class.c (inflate_generic_signature): Renamed to
19698 mono_class_inflate_generic_signature() and made it public.
19699 (my_mono_class_from_generic_parameter): New static function; if we
19700 don't already have the generic parameter's MonoClass, create a
19701 very simple one which is just used internally in the runtime and
19702 not passed back to managed code.
19704 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
19706 * metadata.h (MonoMethodSignature): Moved the
19707 `MonoGenericParam *gen_params' to the MonoMethodHeader.
19708 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
19710 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
19711 ves_icall_MonoMethod_GetGenericArguments(); this is now an
19712 interncall on the MonoMethod class, not on MethodInfo.
19713 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
19714 calling mono_reflection_bind_generic_method_parameters() directly.
19716 * loader.c (mono_method_get_signature): If this is a MethodSpec;
19717 return the already computed `method->signature'.
19718 (method_from_methodspec): New static function to load a method
19719 from a MethodSpec entry.
19720 (mono_get_method_from_token): Call the new method_from_methodspec()
19721 for MethodSpec tokens.
19722 (mono_get_method_from_token): If we're a generic method, load the
19725 * reflection.c (mono_image_get_memberref_token): Allow
19726 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
19728 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
19729 (mono_image_create_token): First check whether it's a generic
19730 method (so we'd need to create a MethodSpec), then do the other
19732 (mono_reflection_bind_generic_method_parameters): Return a
19733 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
19734 called directly from the interncall.
19736 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
19738 * reflection.c (load_public_key): Move loading of the public key
19741 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
19743 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
19746 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
19747 culture, hash_alg and public_key. Fixes #49555.
19749 2003-10-17 Martin Baulig <martin@ximian.com>
19751 * class.h (MonoGenericInst): Moved this declaration here and added
19752 `MonoMethod *generic_method'.
19755 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
19756 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
19758 * metadata.c (mono_metadata_type_equal): Two types of
19759 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
19760 index; ie. don't compare the address of the `MonoGenericParam'
19762 (mono_metadata_load_generic_params): Removed the `MonoMethod
19765 * metadata.h (MonoGenericInst): Moved declaration to class.h.
19766 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
19768 * reflection.c (method_encode_signature): Encode the number of
19769 generic parameters.
19770 (encode_generic_method_sig): New static function.
19771 (method_encode_methodspec): New static function; creates an entry
19772 in the MethodSpec table for a generic method.
19773 (mono_image_get_methodspec_token): New static function.
19774 (mono_image_create_token): Call mono_image_get_methodspec_token()
19775 for generic methods.
19776 (mono_reflection_bind_generic_method_parameters): New public
19777 function. Instantiates a generic method.
19779 2003-10-16 Martin Baulig <martin@ximian.com>
19781 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
19782 *gen_params' here from MonoMethodHeader.
19784 * metadata.c (mono_metadata_parse_method_signature): If we have
19785 generic parameters, initialize `method->gen_params' and then set
19786 the correct `type->data.generic_param' in all the parameters.
19788 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
19790 * threads.c (mono_threads_get_default_stacksize): New function to
19791 return the default stacksize.
19793 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
19794 termination of the finalizer thread, since the previous method had
19795 race conditions. Fixes #49628.
19797 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
19798 as for the other managed threads.
19800 2003-10-16 Martin Baulig <martin@ximian.com>
19802 * class.c (inflate_generic_signature): Copy `generic_param_count'
19805 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
19808 * metadata.c (mono_metadata_parse_method_signature): Actually set
19809 the `method->generic_param_count' here.
19810 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
19812 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
19814 * object.h: Add a new field to TypedRef to simplify the implementation
19815 of the REFANY opcodes in the JIT.
19817 * icall.c: Make use of the new field.
19819 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
19822 2003-10-15 Martin Baulig <martin@ximian.com>
19824 * class.c (mono_class_from_gen_param): Renamed to
19825 mono_class_from_generic_parameter() and moved most of the
19826 functionality from mono_reflection_define_generic_parameter()
19827 here; ie. we create a "real" class here.
19828 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
19829 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
19830 previously been called.
19832 * class.h (MonoGenericParam): Moved the declaration of this struct
19833 here from metadata.h and added `MonoMethod *method'.
19835 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
19838 * loader.c (mono_get_method_from_token): If we have any generic
19839 parameters, call mono_metadata_load_generic_params() to read them
19840 from the MONO_TABLE_GENERICPAR.
19842 * metadata.c (mono_metadata_load_generic_params): Added
19843 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
19845 * metadata.h (MonoMethodSignature): Replaced
19846 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
19847 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
19849 * reflection.c (mono_reflection_define_generic_parameter): Moved
19850 most of the functionality into the new
19851 mono_class_from_generic_parameter(); set the `method' field if
19852 we're a method parameter.
19854 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
19856 * marshal.c (emit_struct_conv): if native size is 0
19859 2003-10-14 Martin Baulig <martin@ximian.com>
19861 * icall.c: The generics API has changed in the spec since it was
19862 added to System.Type; these modifications make it match the spec
19864 (ves_icall_Type_GetGenericParameters): Renamed to
19865 `ves_icall_Type_GetGenericArguments'.
19866 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
19867 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
19868 `ves_icall_MonoType_get_HasGenericArguments'.
19869 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
19870 `ves_icall_MonoType_get_IsGenericParameter'.
19871 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
19872 this is no interncall anymore.
19873 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
19874 `ves_icall_TypeBuilder_get_IsGenericParameter'.
19876 2003-10-14 Martin Baulig <martin@ximian.com>
19878 * reflection.c (mono_reflection_bind_generic_parameters): Also
19879 inflate generic methods if we're reading the class from IL.
19881 2003-10-13 Martin Baulig <martin@ximian.com>
19883 * reflection.c (mono_reflection_define_generic_parameter): This
19884 method isn't called directly from the icall anymore; take a
19885 `MonoReflectionAssemblyBuilder *' so we can use this for type and
19886 method generic parameters.
19887 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
19888 (method_builder_encode_signature): Encode generic parameters.
19889 (mono_image_get_method_info): Write generic params to the
19890 MONO_TABLE_GENERICPARAM table.
19892 * reflection.h (MonoReflectionMethodBuilder): Added
19893 `MonoArray *generic_params'.
19895 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
19897 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
19898 wrapper for mono_reflection_define_generic_parameter().
19899 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
19901 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
19903 * marshal.h: Add missing function to fix build.
19905 * marshal.c (mono_marshal_get_native_wrapper): Add support for
19906 the SetLastError pinvoke attribute.
19908 * marshal.c (mono_marshal_set_last_error): New helper function called
19909 by the generated code.
19911 * marshal.c (mono_mb_emit_branch): New helper function.
19913 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
19915 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
19916 classes as parameters and return values of delegates. Fixes #29256.
19918 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
19920 * locales.c: use gint32 in non HAVE_ICU case
19922 2003-10-11 Martin Baulig <martin@ximian.com>
19924 * mono-debug.c (mono_debug_add_method): Added a workaround for
19927 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
19929 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
19930 delegates passed to native code must use the STDCALL calling
19931 convention. Fixes #35987.
19933 2003-10-10 Martin Baulig <martin@ximian.com>
19935 * class.c (inflate_generic_type): If we're inflating for a generic
19936 type instance (and not for a generic method), return
19937 MONO_TYPE_MVAR unchanged.
19939 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19941 * string-icalls.c: Join ignores null strings in the source array.
19942 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
19943 * threads.c: GetAvailableTheads is slightly more accurate.
19945 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
19947 * threads.h threads.c : add mono_threads_set_default_stacksize
19948 and pass default to CreateThread calls.
19950 2003-10-09 Dick Porter <dick@ximian.com>
19954 * locales.c: Internal calls for constructing CultureInfo and
19955 related objects from libicu (if its available.)
19957 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
19959 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
19961 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19963 * threadpool.c: added an argument to async_invoke_thread that is the
19964 item to process, pass the MonoAsyncResult to the thread start function
19965 when creating a new thread. This way we don't need to acquire any lock
19966 when we're creating a new thread. Readded a semaphore for faster
19967 response times (instead of that Sleep i added).
19969 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
19971 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
19972 get daylight change dates better on Windows, fix handling
19973 of platforms without tm_gmtoff.
19975 2003-10-06 Martin Baulig <martin@ximian.com>
19977 * class.c (inflate_generic_method): Renamed to
19978 mono_class_inflate_generic_method() and made public.
19979 (mono_class_init): Don't inflate the generic methods here.
19980 (mono_class_from_generic): Added `gboolean inflate_methods'
19981 argument. Inflate the methods here.
19983 * loader.c (mono_method_get_param_names): Ignore instances of
19984 generic types for the moment.
19986 * reflection.c (fixup_method): Added support for inflated methods.
19987 (mono_image_create_token): Use mono_image_get_methodref_token()
19988 for inflated methods.
19989 (mono_custom_attrs_from_param): Ignore instances of generic types
19991 (mono_reflection_bind_generic_parameters): New public function.
19992 Moved all the functionality from
19993 ves_icall_Type_BindGenericParameters() here and added support for
19995 (mono_reflection_define_generic_parameter): Initialize
19996 `klass->methods' here.
19998 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
19999 functionality into mono_reflection_define_generic_parameter().
20000 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
20001 TypeBuilder, return that TypeBuilder.
20003 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20005 * appdomain.c: removed mono_delegate_semaphore.
20008 (mono_thread_pool_add): moved hash table creation inside and the thread
20009 creation outside of the critical region.
20010 (mono_thread_pool_finish): removed obsolete code.
20011 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
20012 continue or exit the thread depending on the queue.
20014 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
20016 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
20017 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
20018 handle more bool marshalling options
20020 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
20022 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
20023 arrays of structs. Also add a more descriptive error message when
20024 a structure member is marshalled as LPArray.
20026 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
20028 * marshal.c (mono_marshal_get_native_wrapper): Add support for
20029 marshalling arrays of complex types. Fixes #29098. Also remove an
20030 usused and incomplete function.
20032 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
20034 * gc.c: report heap_size - free_bytes as total memory allocated
20037 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
20039 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
20040 fix timezone handling problems on Windows.
20042 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
20043 asserts when the year is outside the range handled by ms the functions.
20045 * class.c (setup_interface_offsets): If the class is an interface,
20046 fill out its interface_offsets slot.
20048 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20050 * threadpool.c: mark threadpool threads as background.
20052 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
20054 * decimal.c - define DECINLINE to nothing if not using GCC
20056 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
20058 * assembly.c: More refcount fixes.
20060 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20062 * string-icalls.c: if we're not trimming, return the same string.
20063 When not splitting, don't create a new string.
20065 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20068 (mono_image_open): increment the ref_count inside the critical section.
20070 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
20072 * image.c (mono_image_open): Fix reference counting bug.
20074 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
20076 * marshal.c (mono_marshal_type_size) struct alignment changed for
20077 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
20078 64bits. Avoid leak in mono_marshal_get_native_wrapper when
20079 mono_lookup_pinvoke_call throws.
20081 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
20083 * reflection.c (mono_reflection_parse_type): Fix #49114.
20085 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
20086 temporary workaround for cygwin header problem.
20088 * object.c (mono_object_isinst): Synchronize this with the code
20089 generated by the JIT for casts.
20091 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
20093 * reflection.c (encode_type): Fix #38332.
20095 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
20097 * marshal.c (mono_marshal_method_from_wrapper): New function to return
20098 the original method from the wrapper method.
20100 2003-09-25 Martin Baulig <martin@ximian.com>
20102 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
20103 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
20104 (ves_icall_Type_get_IsGenericInstance): New interncall.
20106 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
20108 * object.c: fix cast warning in big endian code.
20110 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
20112 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
20114 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20116 * assembly.c: don't call check_env from mono_assembly_load. It's
20117 already done once in mono_assemblies_init and may cause headaches when
20118 multiple threads are loading assemblies.
20120 2003-09-19 Martin Baulig <martin@ximian.com>
20122 * reflection.c (mono_reflection_define_generic_parameter): Don't
20123 allocate `klass->methods', set `klass->flags' to
20124 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
20126 2003-09-18 Martin Baulig <martin@ximian.com>
20128 * class.c (mono_class_init): Don't create `class->methods' if it's
20129 already initialized.
20131 * metadata.c (mono_metadata_load_generic_params): Make this
20134 * reflection.c (mono_reflection_define_generic_parameter): Set
20135 parent class and interfaces from the constraints.
20137 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
20138 to keep this struct in sync with the declaration in TypeBuilder.cs.
20140 2003-09-17 Martin Baulig <martin@ximian.com>
20142 * metadata.h (MonoType): Replaced the data's `int type_param'
20143 field with `MonoGenericParam *generic_param'.
20144 (MonoGenericParam): Added `MonoClass *klass'.
20146 * class.c (mono_class_from_gen_param): Removed the
20147 `MonoImage *image' and `int type_num' arguments.
20149 * metadata.c (mono_metadata_parse_generic_param): New static
20150 method; creates a MonoGenericParam which just contains the index.
20151 (do_mono_metadata_parse_type): Call
20152 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
20155 * reflection.c (mono_image_typedef_or_ref): Generic type
20156 parameters may be in the same assembly, but never use a typedef
20158 (mono_reflection_define_generic_parameter): We're now creating a
20159 "real" class for the type parameter; it's now safe to call
20160 mono_class_from_mono_type() on the class'es type, it'll do the
20163 2003-09-16 Martin Baulig <martin@ximian.com>
20165 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
20166 `symfile->range_entry_size' and `symfile->class_entry_size' here;
20167 the `symfile' data structure must be fully initialized before it
20168 gets added to the table.
20170 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
20172 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
20174 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
20175 class init trampolines.
20177 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
20179 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
20180 to the built-in profiler to turn off time and allocation profiling
20183 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
20185 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
20188 * debug-helpers.c (mono_method_full_name): Print the wrapper type
20189 in human readable form.
20191 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
20193 * reflection.c icall.c: Fixed warnings.
20195 * image.c (load_class_names): Use a temporary hash table to hold the
20196 namespaces in order to avoid doing many string comparisons.
20198 * image.h: Fix typo.
20200 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
20201 Pass NULL instead of g_direct_equal to the GHashTable constructor
20202 since the NULL case is short-circuited inside g_hash_table_lookup,
20203 leading to better performance.
20205 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
20206 obtain the first custom attribute for a given index. Depends on the
20207 CustomAttribute table being sorted by the parent field.
20209 * reflection.c (mono_custom_attrs_from_index): Use the new function
20210 for better performance.
20212 2003-09-07 Martin Baulig <martin@ximian.com>
20214 * class.c (mono_class_init): If we're a generic instance, inflate
20215 all our methods instead of loading them from the image.
20216 (mono_class_from_generic): Set `class->methods = gklass->methods'.
20218 2003-09-07 Martin Baulig <martin@ximian.com>
20220 * mono-debug-debugger.c: Added support for constructors.
20222 2003-09-06 Martin Baulig <martin@ximian.com>
20224 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
20227 * reflection.c (mono_reflection_setup_generic_class): Call
20228 ensure_runtime_vtable() to create the vtable.
20230 2003-09-05 Martin Baulig <martin@ximian.com>
20232 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
20235 2003-09-04 Martin Baulig <martin@ximian.com>
20237 * reflection.c (mono_reflection_define_generic_parameter): Generic
20238 parameters start with zero.
20240 2003-09-04 Martin Baulig <martin@ximian.com>
20242 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
20244 * reflection.h (MonoReflectionGenericParam): New typedef.
20245 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
20246 the generic parameters from the managed TypeBuilder.
20248 * reflection.c (mono_reflection_define_generic_parameter): New function.
20249 (mono_reflection_create_runtime_class): Encode generic parameters.
20250 (mono_reflection_setup_generic_class): New function; this is
20251 called after adding adding all generic params to the TypeBuilder.
20252 (encode_type): Added MONO_TYPE_VAR.
20254 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
20256 * class.h class.c (mono_class_needs_cctor_run): Moved this method
20259 * assembly.h assembly.c: Moved the AOT loading code into an assembly
20262 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
20264 * reflection.h reflection.c class.h class.c: Delete duplicate
20265 definition of mono_type_get_name () from reflection.c and export the
20268 * class.c: Class loading fixes from Bernie Solomon
20269 (bernard@ugsolutions.com).
20271 * reflection.c: Endianness fixes from Bernie Solomon
20272 (bernard@ugsolutions.com).
20274 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
20276 * assembly.h assembly.c: Define a file format version for AOT
20279 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
20281 * appdomain.h (MonoJitInfo): New field to determine whenever the
20282 code is domain neutral.
20284 2003-08-31 Miguel de Icaza <miguel@ximian.com>
20286 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
20288 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
20290 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
20291 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
20292 Avoid caching the result since strings must be domain specific. Fixes
20295 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
20297 * marshal.c (mono_marshal_init): Make this callable multiple times
20298 since it is hard to find a correct place to call it.
20300 * object.c (mono_runtime_class_init): Execute static constructors in
20301 the correct appdomain.
20303 * image.c (build_guid_table): Handle the case when multiple images have
20306 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20308 * icall.c: added a couple of icalls for System.Web.
20310 2003-08-28 Martin Baulig <martin@ximian.com>
20312 * icall.c (ves_icall_Type_BindGenericParameters): Use
20313 `klass->generic_inst' instead of `&klass->byval_arg' in the
20314 mono_type_get_object() call. The returned type must be
20315 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
20317 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
20321 * object.c (mono_class_proxy_vtable): Make it thread safe.
20323 * pedump.c: Fix warning.
20325 * object.c appdomain.h: Get rid of metadata_section.
20326 It is no longer needed and it was causing deadlocks with domain->lock.
20328 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
20330 2003-08-26 Martin Baulig <martin@ximian.com>
20332 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
20334 2003-08-26 Martin Baulig <martin@ximian.com>
20336 * pedump.c (main): Call mono_metadata_init(),
20337 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
20338 and mono_loader_init().
20340 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
20342 * loader.h: Add missing include to fix build.
20344 * image.h: mono_image_load_references is no more.
20346 * assembly.c: Reworked assembly loading to make it really thread safe.
20347 After these changes, the assembly returned by mono_assembly_open is
20348 fully initialized, i.e. all its references assemblies are loaded.
20350 * assembly.c (mono_image_load_references): Renamed to
20351 mono_assembly_load_references, and made private, since clients no
20352 longer need to call it.
20354 * class.c: Removed calls to mono_assembly_load_references, since it was
20355 a source of deadlocks.
20357 * loader.h loader.c class.h class.c: Protect data structures using a
20358 new lock, the loader lock.
20360 * class.c (mono_class_setup_vtable): Create temporary hash tables and
20361 GPtrArrays only when needed.
20363 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
20364 into empty structures by mcs. Fixes pinvoke7.cs.
20366 * domain.c (mono_init): Call a new initialization function.
20368 * appdomain.c (mono_runtime_init): Call the new initializer function
20369 of the marshal module.
20371 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
20372 inserted into empty structures by mcs. Fixes pinvoke7.cs.
20374 * marshal.h marshal.c: Added locks around the wrapper caches to make
20375 this module thread safe.
20377 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
20378 this argument. Fixes pinvoke1.exe.
20380 2003-08-25 Lluis Sanchez <lluis@ximian.com>
20382 * object.h: Added call_type field to MonoMethodMessage and the corresponding
20383 enumeration of values. Removed fields to store remote call output values in
20384 MonoAsyncResult. Not needed any more.
20385 * object.c: Initialize call_type and async_result fields in mono_message_init.
20386 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
20387 dispatching the message.
20388 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
20389 async call to finish. To do it use a message with EndInvoke call type.
20391 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
20393 * loader.h loader.c (mono_method_hash_marhal_info): New function which
20394 determines whenever a method has marshalling info.
20396 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20398 * assembly.c: fix the build on windows.
20400 2003-08-22 Lluis Sanchez <lluis@ximian.com>
20402 * object.cs: Fixed bug #47785.
20404 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
20406 * string-icalls.c (StringReplace): If their are no occurances of
20407 the old string found return a reference to the supplied
20408 string. This saves some memory and matches MS behavoir.
20410 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20412 * socket-io.c: fixed compilation for systems that define AF_INET6
20413 and don't define SOL_IP/SOL_IPV6.
20415 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
20417 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
20418 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
20420 * rawbuffer.c rawbuffer.h: Make this module thread safe.
20422 * domain.c: Make this module thread safe.
20424 * domain.c (mono_init): Call new initialization function.
20426 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
20427 reference types too. Fixes #38812.
20429 * image.c (mono_image_init): Fixed warnings.
20431 * class.c (mono_class_from_typeref): Handle assembly load failure
20434 * appdomain.c (add_assemblies_to_domain): Handle the case when
20435 the references of an assembly are not yet loaded.
20437 * metadata.c image.c assembly.c: Moved initialization of global
20438 variables to a separate function called at startup since lazy
20439 initialization of these variables is not thread safe.
20441 * image.c assembly.c: Made this module thread safe by adding locks in
20442 the appropriate places.
20444 * domain.c (mono_init): Call the new initialization functions of the
20447 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
20449 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
20450 make a direct call. It is proxy's work to make the call asynchronous.
20451 mono_delegate_end_invoke(): If the targe is a proxy, just collect
20453 * object.cs: mono_method_call_message_new(): read AsyncResult and
20454 state object from parameters list, if this info is requested.
20455 * object.h: Added fields to store remote call output values in
20456 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
20458 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
20460 * object.h: add needed fields to MonoThread.
20461 * threads.c, threads.h: allow registering a function to cleanup data
20462 allocated per thread by the JIT.
20464 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
20466 * loader.h: portability fix by Bernie Solomon
20467 * <bernard@ugsolutions.com>.
20469 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
20471 * reflection.h reflection.c (mono_param_get_objects): Changed this to
20472 return a MonoArray. This simplifies the code and also ensures that
20473 the cache allways contains an object reference as a value.
20475 * icall.c (ves_icall_get_parameter_info): Simplified using the new
20478 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20480 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
20481 fixes a problem with byte ordering when getting the address family for
20484 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
20486 * .cvsignore: Added monosn.
20488 * reflection.h reflection.c loader.c: Added support for parameter
20489 marshalling to dynamically created types. Fixes #47295.
20491 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
20493 * rand.c: remove useless warnings.
20495 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
20497 * class.c: implemented ldtoken for methods and fieldrefs.
20499 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20501 * threadpool.c: when mono_async_invoke was called, no one took care of
20502 monitoring the queue. So if the method invoked took some time and we
20503 got new async invoke requests after 500 ms (the thread created waited
20504 that long in WaitForSingleObject), the new async invoke was not called
20505 until the previous one finished.
20507 This is fixed now. Thanks to Totte for helping with it.
20509 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20511 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
20513 2003-08-11 Martin Baulig <martin@ximian.com>
20515 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
20517 2003-08-06 Martin Baulig <martin@ximian.com>
20519 * mono-debug-debugger.c: Added support for static fields,
20520 properties and methods.
20522 2003-08-06 Martin Baulig <martin@ximian.com>
20524 * mono-debug-debugger.c: Don't store the MonoString's vtable to
20525 make this work for applications with multiple application domains.
20527 2003-08-04 Martin Baulig <martin@ximian.com>
20529 * mono-debug-debugger.c: Completely reworked the type support; the
20530 most important thing is that we're now just using one single
20531 `MonoType' instance per type.
20533 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
20535 * mono-endian.h, mono-endian.c, icall.c: Added icall
20536 ves_icall_System_Double_AssertEndianity to assert double word endianity
20537 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
20539 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
20541 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
20542 support, icalls and fixes.
20544 2003-07-31 Miguel de Icaza <miguel@ximian.com>
20546 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
20547 classes that are a punctuation character in .NET is not the same a
20550 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
20552 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
20554 2003-07-29 Miguel de Icaza <miguel@ximian.com>
20556 * icall.c: Add new MemCopy internalcall.
20557 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
20558 Simplified code; It is not necessary to handle all the cases here,
20559 as the C# code takes care of it. Only handle the case of the name
20560 resource embedded into the assembly.
20562 Changed signature to return the data pointer and the size of the
20565 2003-07-26 Miguel de Icaza <miguel@ximian.com>
20567 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
20568 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
20570 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
20572 * socket-io.c: ignore EINTR error in select.
20574 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
20576 * class.h, class.c: removed unused subclasses field in MonoClass.
20578 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
20580 * icall.c: improve fix of get_base_definition(). If the parent class
20581 doesn't have the mehod, look at the parent of the parent.
20582 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
20583 to check if a parameter is an in or out parameter
20584 (PARAM_ATTRIBUTE_IN is not set by default).
20585 mono_method_return_message_restore(): Use mono_class_value_size to
20586 get the size of a value type. mono_type_stack_size (parameterType)
20587 does not return the correct value if parameterType is byRef.
20588 mono_load_remote_field(), mono_load_remote_field_new(),
20589 mono_store_remote_field(), mono_store_remote_field_new():
20590 raise exception if the remote call returns an exception.
20592 2003-07-28 Martin Baulig <martin@ximian.com>
20594 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
20595 method. This is a wrapper around mono_runtime_invoke() which
20596 boxes the instance object if neccessary.
20598 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
20600 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
20601 metadata.h, row-indexes.h, verify.c: first cut of generics support.
20603 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
20605 * icall.c: disable mcs bug workaround.
20607 2003-07-21 Miguel de Icaza <miguel@ximian.com>
20609 * object.c (mono_runtime_class_init): Take the metadata_section
20610 mutex before obtaining the domain mutex.
20612 * appdomain.h: Added definition of metadata_section mutex here.
20614 * object.c: define metadata_mutex here.
20616 2003-07-24 Ravi Pratap <ravi@ximian.com>
20618 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
20621 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
20623 * reflection.c: Fix bug #46669
20625 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20630 * object.h: fill in the type name for TypeLoadException.
20632 2003-07-23 Ravi Pratap <ravi@ximian.com>
20634 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
20635 relationship between TypeBuilders while compiling corlib) and bug
20636 45993 (Array types returned from the runtime while compiling
20637 corlib were from the loaded corlib).
20639 2003-07-22 Martin Baulig <martin@ximian.com>
20641 * mono-debug-debugger.c: Reworked the type support a bit more;
20642 distinguish between types and classes.
20644 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
20646 * icall.c: add IsArrayImpl icall.
20648 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
20650 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
20651 initializing real_size only once. Also fix bug #46602.
20653 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
20655 * object.c: Renamed mono_metadata_section to metadata_section.
20657 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
20659 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
20660 empty array if the type is an array. Fixed.
20661 ves_icall_MonoMethod_get_base_definition: if the base method
20662 is abstract, get the MethodInfo from the list of methods of
20664 * reflection.c: ParameterInfo.PositionImpl should be zero-based
20665 and it was 1-based. Fixed in mono_param_get_objects.
20667 2003-07-20 Martin Baulig <martin@ximian.com>
20669 * mono-debug.h: Set version number to 31.
20670 (mono_debug_init): Added `MonoDomain *' argument.
20672 * mono-debug-debugger.c: Reworked the type support; explicitly
20673 tell the debugger about builtin types; pass the `klass' address to
20676 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
20678 * image.c: Allow new metadata tables to be loaded without a
20679 warning. Also update the warning message to give the new constant value.
20681 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
20683 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
20684 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
20685 array type representation changes.
20687 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
20689 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
20690 on Environment.Exit () call.
20692 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
20694 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
20695 requires a matching corlib.
20697 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
20699 * Changelog: My editor decided to add a CR to each line. Sorry about that.
20700 Committed again without the CRs.
20702 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
20704 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
20705 getting it from the "this" socket instance. Did not work
20706 if the socket is a subclass of Socket.
20707 Also fixed bug #35371.
20709 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
20711 * metadata.c: fixed size for TypedByRef.
20712 * loader.c: when searching for a method, consider the vararg amrker.
20713 * unicode.c, decimal.c: constify some arrays.
20715 2003-07-15 Dick Porter <dick@ximian.com>
20717 * socket-io.c: Fixed compilation for gcc < 3.2.
20719 Fixed compilation for machines that don't have AF_INET6 (thanks to
20720 Bernie Solomon <bernard@ugsolutions.com> for that part.)
20722 Fixed compile warnings.
20724 Fixed formatting and line endings.
20726 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
20729 * socket-io.c: Added IPv6 support.
20731 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
20733 * class.c (mono_class_is_assignable_from): New function to implement
20734 the is_assignable_from logic. Used by mono_object_isinst,
20735 Type::IsAssignableFrom () and the interpreter.
20737 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
20738 Object, even interfaces.
20740 * object.c (mono_object_isinst): Implement in terms of
20741 is_assignable_from.
20743 * icall.c (ves_icall_type_is_assignable_from): New icall.
20745 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
20747 * domain.c (foreach_domain): fix compiler warning.
20749 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
20751 * image.c (load_metadata_ptrs): use g_strndup because strndup is
20752 not available on all plattforms
20754 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
20756 * image.h image.c: Store the metadata version string in MonoImage.
20757 * icall.c: New icall to retrieve the image version.
20758 * reflection.c (create_dynamic_image): Fill in the image version field
20759 * reflection.c (build_compressed_metadata): Use the image version
20760 from the image structure.
20762 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20764 * appdomain.c: modified comment.
20765 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
20766 That will be its last iteration when mono_gc_cleanup is called from
20767 mono_runtime_cleanup and before the domain is unloaded.
20771 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
20773 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
20776 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
20778 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
20779 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
20780 Bernie Solomon <bernard@ugsolutions.com>.
20782 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
20784 * object.c, object.h: provide mono_object_new_fast() for faster
20785 allocation in some special cases.
20787 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
20789 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
20790 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
20792 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
20794 * threadpool.c: fix leaks.
20796 2003-07-01 Dick Porter <dick@ximian.com>
20798 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
20799 using MonoGHashTables. Fixes threadpool bug posted to list.
20801 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
20803 * image.h, image.c: added support to load an assembly from a byte array.
20804 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
20805 assembly bundle support.
20807 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
20809 * threadpool.c (mono_thread_pool_add): keep a reference to the
20810 AsyncResult to prevent GC
20812 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
20814 * class.c: leak fix.
20816 2003-06-25 Dick Porter <dick@ximian.com>
20818 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
20819 for the async object, the WaitHandle object will close the handle.
20822 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
20824 * class.c: in mono_array_class_get (), lookup from the hash with the
20825 same type we insert: this works around a bug in
20826 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
20827 lluis. The real fix will have to wait for after the release.
20829 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
20831 * icall.c: fix memory leak when getting type members.
20833 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
20835 * reflection.c: added more pubtoken special cases.
20837 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
20839 * class.c: handle field offset correctly when class size
20840 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
20842 2003-06-20 Martin Baulig <martin@ximian.com>
20844 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
20847 2003-06-20 Martin Baulig <martin@ximian.com>
20849 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
20851 2003-06-20 Martin Baulig <martin@ximian.com>
20853 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
20854 just distinguish between variables in registers and variables at
20855 an offset relative to a register.
20857 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20859 * icall.c: #ifdef out latest changes until mcs is fixed.
20861 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
20863 * icall.c: return members in metadata order.
20865 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
20867 * icall.c: avoid infinite loop in GetTimeZoneData.
20869 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
20871 * icall.c: added Marshal.Prelink/All icalls.
20873 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
20875 * object.c, object.h: fix warnings and do some overflow checking
20876 when creating arrays.
20878 2003-06-17 Dick Porter <dick@ximian.com>
20881 * file-io.c: File attributes need to be tweaked slightly when
20882 passed from the managed to the w32 world.
20884 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
20885 * profiler.h profiler-private.h profiler.c: Rework last patch
20886 based on suggestion by Paolo.
20888 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
20890 * profiler.h profiler-private.h profiler.c: Added infrastructure for
20891 instruction level coverage data collection.
20892 * profiler.h profiler.c (: Added new callback function which can be
20893 used by the profiler to limit which functions should have coverage
20895 * profiler.c (mono_profiler_load): Call g_module_build_path to
20896 generate the file name of the profiler library.
20898 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
20900 * profiler.c, profiler.h, profiler-private.h: added basic block
20901 coverage profiling API.
20903 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
20905 * reflection.c (mono_reflection_create_runtime_class): Add support
20906 for events in dynamically generated code.
20908 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
20911 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
20913 * icall.c: when getting timezone info, return reasonable values if we
20914 can't get the actual data.
20916 2003-06-14 Dick Porter <dick@ximian.com>
20918 * threads.c (start_wrapper): Remove the reference to the thread
20919 object in the TLS data, so the thread object can be finalized.
20920 This won't be reached if the thread threw an uncaught exception,
20921 so those thread handles will stay referenced :-( (This is due to
20922 missing support for scanning thread-specific data in the Boehm GC
20923 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
20925 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
20927 * reflection.c: ensure streams and tables are first allocated with
20928 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
20930 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
20932 * icall.c: fixed GetElementType for byrefs (bug# 44792).
20934 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
20936 * reflection.c (mono_reflection_create_runtime_class): Add support for
20937 properties to dynamically created classes.
20938 * reflection.c: Fix a few places where non-MonoObjects were inserted
20939 into the tokens hashtable.
20941 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
20943 * object.c: some support to handle out of memory exceptions.
20945 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
20947 * marshal.c (mono_marshal_get_native_wrapper): support reference
20950 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
20952 * object.h, object.c: more portability stuff from Bernie Solomon.
20953 Unexport mono_object_allocate(). Added mono_object_unbox ().
20954 Set exitcode when an unhandled exception is thrown.
20956 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
20958 * marshal.c (mono_marshal_get_native_wrapper): use custom
20959 marshaler for return types.
20961 2003-06-10 Dick Porter <dick@ximian.com>
20963 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
20964 ip_mreq is available
20966 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
20968 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
20969 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
20970 by Bernie Solomon <bernard@ugsolutions.com>.
20972 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
20974 * gc.c (mono_gc_init): Avoid error message on shutdown when
20975 GC_DONT_GC=1 is used.
20977 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
20978 New icall to return the GUID of a module.
20980 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
20982 * class.c: ensure instance size always includes the parent's size
20983 even whem class size is set explicitly (fixes bug#44294).
20985 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
20987 * profiler.h, profiler.c: made the simple profiler thread-safe,
20988 get more accurate timing info. Allow the loading of an
20989 externally-developed profiler module.
20991 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
20993 * marshal.c (mono_marshal_get_native_wrapper): improved
20994 class/byref arguments.
20995 (mono_marshal_get_native_wrapper): better string marshaling support.
20997 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
20999 * class.c: ensure .pack and .size are handled correctly and
21000 simplified layout of static fields.
21002 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
21005 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
21007 * loader.c (mono_lookup_pinvoke_call): look for modules in the
21008 current directory (fix bug 44008)
21010 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
21012 * marshal.c (mono_marshal_get_native_wrapper): started support for
21014 (mono_delegate_to_ftnptr): consider marshalling specifications
21016 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
21018 * reflection.c, reflection.h: emit custom marshal info.
21020 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21022 * object.c: free the GError.
21023 * icall.c: added CloseEvent_internal.
21025 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
21028 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
21030 * loader.c (mono_method_get_signature): Add support for dynamic
21033 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
21035 * reflection.c: fixed bug #43905.
21037 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21039 * class.c, domain.c, icall.c, metadata.h, object.h: support for
21040 handling TypedReference and ArgIterator.
21041 * loader.c, loader.h: added function to get signature at call site.
21043 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
21045 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
21046 data readonly. Buglets and warning fixes. Some MethodSpec support.
21048 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
21050 * class.h, class.c, object.c: remove relative numbering support.
21052 2003-05-26 Miguel de Icaza <miguel@ximian.com>
21054 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
21055 free the string, until we get a chance to fix Gtk#
21057 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21059 * marshal.c: revert last patch.
21061 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
21063 * icall.c: updates for new mono_class_vtable() not calling
21064 the type constructor anymore.
21066 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
21068 * object.h, object.c: separate vtable creation from type
21069 initialization. Make running the .cctor thread safe.
21071 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
21073 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
21075 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
21077 * loader.c (mono_get_method): consider calling convention
21079 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
21081 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
21082 to return the invisible global type for a module.
21084 * reflection.c (mono_image_build_metadata): Emit global fields too.
21086 2003-05-20 Peter Williams <peterw@ximian.com>
21088 * loader.c (mono_lookup_internal_call): Add a few newlines.
21090 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
21092 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
21095 * appdomain.c (set_domain_search_path): Recalculate search path when
21096 AppDomainSetup.PrivateBinPath changes.
21098 * object.c (mono_class_compute_gc_descriptor): It turns out some
21099 parts of the class libs (like System.Thread) holds pointers to
21100 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
21101 to treat native int a pointer type here.
21103 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
21105 * appdomain.h, domain.c: add hashtable for jump target resolution.
21107 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
21109 * reflection.h reflection.c icall.c: Added new icalls
21110 GetManifestResourceInfoInternal, GetModulesInternal and support
21113 2003-05-16 Dick Porter <dick@ximian.com>
21117 * file-io.c: Implement System.IO.MonoIO::GetTempPath
21119 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
21121 * object.c: mono_store_remote_field: little fix to previous patch.
21123 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
21125 * class.c: add constructors to array classes.
21126 * icall.c: special case array construction for InternalInvoke (),
21128 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
21130 * class.h class.c reflection.c object.c: Added support for field
21131 defaults in dynamically generated classes.
21133 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
21135 * reflection.c: properly encode charset for ddlimport.
21137 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
21139 * threads.c: allow compiling without GC.
21141 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
21143 * appdomain.h, object.c, object.h, threads.c, threads.h: added
21144 handling of thread static data.
21146 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21148 * reflection.h, reflection.c: added mono_custom_attrs_free ().
21150 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
21152 * class.c (mono_array_class_get): always set the serializable flags
21153 (mono_array_class_get): always set the SEALED attribute for array types
21155 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
21157 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
21158 attributes (fix for bug 42021).
21160 2003-05-12 Dick Porter <dick@ximian.com>
21162 * gc.c: Don't run finalizers when the finalizer thread is
21163 finishing up, because the default domain has already been
21166 2003-05-11 Miguel de Icaza <miguel@ximian.com>
21168 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
21169 value is null, we should throw an exception. This is slightly
21170 different than the other conventions used for the constructor.
21172 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21174 * socket-io.c: fixed windows build.
21176 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21178 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
21180 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
21182 * object.c (mono_string_new_wrapper): Compatibility fix for MS
21185 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
21187 * class.c (mono_class_layout_fields): Add experimental GC aware
21188 auto layout facility. Requires class library changes to work correctly.
21190 (mono_class_setup_vtable): Avoid overriding explicit interface
21191 method implementations. Fixes iface3.exe test.
21193 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
21195 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
21196 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
21198 * metadata.h: Add new type classification macro which determines
21199 whenever the type holds an object reference.
21201 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
21203 * marshal.c (mono_marshal_get_native_wrapper): cleanups
21205 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
21207 * gc.c (finalizer_thread): Work around a GC bug.
21209 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
21211 * marshal.c (emit_struct_conv): allow unions
21213 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
21215 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
21217 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
21219 2003-05-06 Martin Baulig <martin@ximian.com>
21221 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
21223 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21226 (Select_internal): allow NULLs, don't create arrays if not needed.
21227 Coupled with Socket.cs changes.
21230 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
21231 register a finalizer for it that will close the semaphore handle. This
21232 fixes the leak and make Lupus' test run with > 4080 loops.
21234 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
21236 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
21237 Jerome Laban (bug #42287)
21239 2003-05-02 Martin Baulig <martin@ximian.com>
21241 * debug-mono-symfile.h
21242 (MonoSymbolFile): Moved declaration into mono-debug.h.
21243 (MonoDebugMethodJitInfo): Likewise.
21244 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
21246 (_mono_debug_address_from_il_offset): Take a
21247 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
21250 (MonoDebugDomainData): New struct.
21251 (mono_debug_get_domain_data): New function.
21252 (mono_debug_add_method): Take an additional `MonoDomain *'
21254 (mono_debug_source_location_from_address): Likewise.
21255 (mono_debug_il_offset_from_address): Likewise.
21256 (mono_debug_address_from_il_offset): Likewise.
21258 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
21260 * reflection.c: one more check for null type in custom attrs.
21262 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21264 * reflection.c: avoid warning (comparison is always false due to limited
21265 range of data type).
21267 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21269 * icall.c: throw an exception in Type.GetField if the argument 'name'
21272 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
21274 * reflection.c: fixed handling of enums in named arguments to custom
21275 attributes (bug #42123).
21277 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21279 * reflection.c: use the right array element type and handle
21280 a null for a Type argument, too.
21282 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
21284 * reflection.c: handle arrays as arguments to custom attributes.
21286 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
21288 * reflection.c: handle a string value in a custom attr
21289 ctor that takes an object.
21291 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
21293 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
21296 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
21298 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
21300 2003-04-27 Martin Baulig <martin@ximian.com>
21302 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
21303 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
21304 MONO_DEBUGGER_EVENT_BREAKPOINT.
21305 (mono_breakpoint_trampoline_code): Removed.
21306 (mono_debugger_event_handler): The last argument is now a
21308 (mono_debugger_insert_breakpoint_full): Removed the
21309 `use_trampoline' argument.
21310 (mono_debugger_method_has_breakpoint): Likewise.
21311 (mono_debugger_trampoline_breakpoint_callback): Renamed to
21312 mono_debugger_breakpoint_callback(); take the method and
21313 breakpoint number as arguments.
21315 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21317 * metadata.c: fix off by one when loading parameters attributes.
21319 2003-04-24 Martin Baulig <martin@ximian.com>
21321 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
21323 2003-04-24 Martin Baulig <martin@ximian.com>
21325 * mono-debug-debugger.c: Moved all code which interacts with the
21326 Mono Debugger here.
21328 * debug-mono-symfile.c: This code now just deals with the symbol
21329 file itself, the debugger code is now in mono-debug-debugger.c.
21331 2003-04-23 Martin Baulig <martin@ximian.com>
21333 * mono-debug.c (mono_debug_source_location_from_il_offset):
21334 New method; like mono_debug_source_location_from_address(), but
21335 takes an IL offset instead of a machine address.
21337 2003-04-23 Martin Baulig <martin@ximian.com>
21339 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
21340 `line' field; this is now computed by the debugger.
21342 2003-04-23 Martin Baulig <martin@ximian.com>
21344 * mono-debug.[ch]: New files. This is the new debugging interface.
21346 * mono-debug-debugger.[ch]: New files. Moved all code which
21347 interacts with the Mono Debugger here.
21349 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
21351 * domain.c (mono_init): initialize mono_defaults.monitor_class
21353 2003-04-21 Miguel de Icaza <miguel@ximian.com>
21355 * reflection.c (method_encode_code): Add a spicy exception to help
21356 future compiler authors.
21358 2003-04-21 Martin Baulig <martin@ximian.com>
21361 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
21362 Make this work with relative pathnames; g_filename_to_uri() needs
21363 an absolute filename.
21365 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
21367 * icall.c: Track name changes in Object and ValueType.
21369 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
21371 * metadata.c (mono_type_stack_size): size should be a multiple of
21374 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21377 (internal_domain_finalize): moved into mono_domain_finalize. No need
21378 to create another thread because the finalizers will be run in the
21381 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
21382 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
21383 to be run (MS does this too).
21385 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
21387 * object.c (mono_class_compute_gc_descriptor): Update comment.
21389 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
21391 * image.h: Add synchronized wrapper cache.
21393 * image.c (do_mono_image_open): Initialize cache.
21395 * reflection.c (create_dynamic_mono_image): Initialize cache.
21397 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21399 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
21400 ves_icall_System_Buffer_ByteLengthInternal.
21402 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
21404 * reflection.c: setup klass->nested_in earlier. Allow
21405 a dash in the assembly name.
21407 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
21409 * metadata.c (mono_type_to_unmanaged): dont access
21410 type->data.klass for MONO_TYPE_OBJECT
21411 (mono_type_to_unmanaged): consider System.Delegate class
21413 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
21415 * class.c: just setup supertypes in the proper place instead of
21416 initializing the full element class for arrays.
21418 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
21420 * class.c: ensure the element class of arrays is initialized.
21421 Setup the supertype info for array classes, too.
21423 2003-04-14 Miguel de Icaza <miguel@ximian.com>
21425 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
21427 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21429 * Makefile.am: re-added -m option when running cygpath. This way,
21430 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
21432 * mono-config.c: same codepath for locating mono config file for WIN32
21434 * assembly.c: if mono_assembly_setrootdir is called, don't override
21437 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21439 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
21440 MONO_ASSEMBLIES variable.
21442 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
21444 * icall.c: added Assembly::GetNamespaces() icall.
21446 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21448 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
21450 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
21452 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
21453 * object.c: fixed bug in the construction of vtable for proxies
21455 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
21457 * object.c (mono_array_new): Mark mono_array_new as an icall.
21459 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21461 * class.c: fixed test for public method when overriding interfaces.
21464 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21466 * appdomain.h, domain.c: added mono_domain_foreach() to
21467 be able to access the currently loaded appdomains.
21468 * object.c: make string interning work across sppdomains.
21469 Mark some functions for use as icalls.
21471 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
21473 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
21475 * reflection.h reflection.c: Allocate long living data using
21476 GC_MALLOC_ATOMIC so the collector does not need to scan it.
21478 * reflection.c: Double the allocation size in streams instead of
21479 increasing it, to prevent unneccesary copying on large assemblies.
21481 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
21482 creation if the assembly does not have the Run flag set.
21484 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21486 * class.h: avoid the C++ keywords in header files (Jerome Laban
21487 spotted and fixed this).
21489 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21492 (mono_unhandled_exception): fill in the arguments for the
21493 UnhandledException event. Only trigger that event for the default
21494 domain (as MS does).
21496 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
21498 * object.c: Improve typed allocation stuff based on suggestions from
21499 Paolo. Also turn it on if the GC library supports it.
21501 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
21503 * object.c object.h class.h: Added experimental typed allocation
21504 facility using the interfaces in gc_gcj.h.
21506 * os/gc_wrapper.h: Added new include files.
21508 2003-04-03 Martin Baulig <martin@ximian.com>
21510 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
21511 which is not yet enabled by default.
21513 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
21515 (mono_gc_lock, mono_gc_unlock): New static functions.
21517 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
21518 functions; stop/start the world for the garbage collector. This
21519 is using the windows API; we need to complete the SuspendThread()/
21520 ResumeThread() implementation in the io-layer to make this work on Unix.
21521 (mono_gc_push_all_stacks): New public function; tells the garbage
21522 collector about the stack pointers from all managed threads.
21524 2003-04-03 Martin Baulig <martin@ximian.com>
21526 * object.h (MonoThread): Added `gpointer stack_ptr'.
21528 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
21530 2003-04-03 Martin Baulig <martin@ximian.com>
21532 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
21534 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
21536 * reflection.c (typebuilder_setup_fields): Initialize field.first and
21539 2003-04-02 Miguel de Icaza <miguel@ximian.com>
21541 * loader.c (mono_lookup_internal_call): Report the corlib that is
21544 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
21546 * icall.c (ves_icall_type_GetTypeCode): fixed check for
21547 System.DBNull (it's class not valuetype).
21549 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
21551 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
21552 if the array method was already assigned a token (fixes bug#40646).
21554 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
21556 * reflection.c (mono_reflection_get_type): Attempt type resolve even
21557 if no assembly is given.
21559 2003-04-01 Miguel de Icaza <miguel@ximian.com>
21561 * metadata.h: Added the new tables.
21563 * row-indexes.h: Added definitions for new tables.
21565 * metadata.c: Add schemas for new tables, and add support for
21566 computing the sizes of them.
21568 * class.c: Update for handling the new type cases.
21570 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
21572 * metadata.h (MONO_TYPE_IS_VOID): new macro
21574 2003-03-31 Martin Baulig <martin@ximian.com>
21576 * threads.h (MonoThreadCallbacks): Added `thread_created'.
21578 * threads.c (mono_thread_new_init): Call `thread_created' in the
21579 mono_thread_callbacks.
21581 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
21583 * loader.h: added marshalbyrefobject_class to mono_defaults
21584 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
21585 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
21586 generation of output parameters.
21587 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
21588 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
21589 contextbound and the target object belongs to the context of the caller.
21590 * object.h: added context and unwrapped_server variables in MonoRealProxy.
21591 * object.c: Implemented support for interfaces and abstract classes
21592 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
21593 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
21595 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
21597 * class.h class.c (mono_class_is_subclass_of): New function.
21599 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
21600 routines for most common case (calls from ArrayList::ToArray).
21602 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
21603 routine so programs which call Environment::Exit() can be profiled.
21605 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
21606 Added MONO_ARCH_SAVE_REGS.
21608 * icall.c (ves_icall_type_is_subtype_of): Use new function.
21610 2003-03-29 Miguel de Icaza <miguel@ximian.com>
21612 * blob.h: Add a couple of new MonoType types definitions.
21614 * tabledefs.h: Add a couple of new call convs.
21616 2003-03-27 Zoltan Varga <vargaz@freemail.h>
21618 * reflection.h (MonoReflectionDynamicAssembly): track changes in
21619 the layout of the class.
21621 * reflection.c (alloc_table): double the size on overflow to avoid
21622 unnecessary copying.
21624 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
21625 avoid filling out metadata tables and blobs. Also set mb->ilgen to
21626 null so it can be garbage collected.
21628 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
21630 * reflection.c (mono_reflection_get_type): Return the resolved type
21631 only if it is in the assembly we searched.
21633 * reflection.c (ensure_runtime_vtable): Initialize method slots.
21635 * class.c (mono_class_setup_vtable): Set the slot of the overriding
21638 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21641 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
21642 the right one is 'file:///blah', but MS allows it.
21644 (mono_assembly_open): allow 'file://blah'
21646 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
21648 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
21650 * socket-io.c: fixes bug #40310.
21652 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
21654 * reflection.c (mono_reflection_parse_type): handle deeply nested
21657 * reflection.c (mono_image_create_token): Use unique token values
21658 since they will be put into a hash table.
21660 * class.c (mono_class_setup_vtable): If a method occurs in more than
21661 one place in the vtable, and it gets overriden, then change the
21662 other occurances too.
21664 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
21665 object as return type.
21667 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
21669 * icall.c: Deleted "ToString" implementation for double and float
21670 because they are full implemented in managed code.
21672 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
21674 * reflection.c, reflection.h: implemented and exported functions
21675 to retrieve info about custom attributes.
21677 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21679 * appdomain.c: moved Uri handling to assembly.c
21680 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
21681 work when using a file Uri in *nix and windows.
21683 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
21684 GetReferencedAssemblies.
21686 2003-03-18 Dick Porter <dick@ximian.com>
21688 * icall.c: Rename a couple of internal calls
21690 * threads.c: Set the thread state to Stopped when a thread exits.
21693 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
21695 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
21698 * object.c (mono_class_vtable): fix warning.
21700 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
21702 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
21704 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
21706 (method_encode_clauses): Create exception info structures in the right
21708 (mono_reflection_setup_internal_class): Initialize supertypes field.
21710 * class.c object.c: Handle interfaces which implement other interfaces
21713 * class.h class.c: Move the supertypes array initialization code into
21714 a separate function so it can be used for dynamic types too. Also call
21715 it earlier, in mono_class_init(), since it can be used before the
21716 type is initialized.
21718 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21722 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
21727 * object.c: remove warnings.
21729 2003-03-13 Martin Baulig <martin@ximian.com>
21731 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
21732 (MonoDebugLexicalBlockEntry): New types.
21734 * debug-mono-symfile.c
21735 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
21737 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21739 * process.c: ret can be any non-zero value accroding to MS doc.
21741 2003-03-07 Miguel de Icaza <miguel@ximian.com>
21743 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
21744 fixing a warning for a miss-used prototype, would have cause
21745 random memory corruption.
21747 2003-03-07 Martin Baulig <martin@ximian.com>
21749 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
21750 getting really annoying ....
21752 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
21754 * reflection.c (fixup_method): added support for array methods.
21756 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
21758 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
21759 (pointed out by Michael Adams).
21761 2003-03-04 Dick Porter <dick@ximian.com>
21763 * icall.c: Temporarily reverted the Double and Single ToString()
21764 change, because it broke nunit.
21766 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
21768 * object.h, threads.h: make include files compatible with C++
21769 (patch by Jerome Laban <jlaban@wanadoo.fr>).
21771 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
21773 * icall.c: Erased ToString helper functions for Double and Single.
21774 Now, that implementations ar all in managed code (Double and Single
21777 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
21779 * appdomain.c: Added method for initializing the default context of
21780 a domain. Added internal call for getting the default context.
21781 * appdomain.h: Added context variable in MonoDomain struct.
21782 * domain.c: mono_domain_set also sets the default context of the domain
21783 * icall.c: Mapped internal method InternalGetDefaultContext.
21784 * object.c: mono_object_get_virtual_method returns always a remoting
21785 wrapper if the object is a transparent proxy.
21786 mono_runtime_invoke_array: when creating an object by calling the
21787 constructor, if the created object is a proxy, then the constructor should
21788 be called using the a remoting wrapper.
21790 2003-03-03 Dick Porter <dick@ximian.com>
21792 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
21793 variable so it compiles on solaris. Problem spotted by
21794 Christopher Taylor <ct@cs.clemson.edu>
21796 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21799 (get_info_from_assembly_name): don't leak value.
21802 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
21805 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
21807 * assembly.c: export mono_image_load_references ().
21808 * class.c: handle function pointers. mono_class_from_name() now
21809 supports nested type names directly.
21811 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
21813 * reflection.h reflection.c: Encode already created dynamic methods
21814 and fields correctly as a DEF instead of a REF.
21816 * reflection.c: Get rid of the force_ref argument to
21817 mono_image_typedef_or_ref since it was wrong in the first place.
21819 * string-icalls.c: add error checking to string constructors according
21822 * reflection.c: Emit types in the order their TypeBuilders were
21823 created. Previously, a new table index was assigned to each type before
21824 the tables were emitted. This was wrong because the signature blob
21825 might already refer to a type by its original table index.
21827 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
21829 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
21832 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21834 * Makefile.am: make assemblies dir have \ instead of / on windows.
21836 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
21838 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
21839 iterate over the NESTEDCLASS table using a linear search since the
21840 table is not guaranteed to be sorted by the secondary key.
21842 * class.c (mono_class_create_from_typedef): fixed up call to
21843 mono_metadata_nesting_typedef.
21845 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
21847 * marshal.c (mono_string_to_byvalstr): clear the memory as
21848 suggested by Jerome Laban <jlaban@wanadoo.fr>
21850 2003-02-26 Dick Porter <dick@ximian.com>
21852 * process.c: Cope with padding in .rsrc blocks
21854 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
21856 * metadata.h: reverted the filter_len change, it breaks reflection
21858 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
21860 * metadata.h: added a new field to store the filter_len
21863 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
21865 * reflection.c: handle custom attributes for types and members
21866 created with Reflection.Emit (bug#38422).
21868 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
21870 * reflection.c: define RTSpecialName automatically for constructors for
21871 compatibility with MS.NET.
21873 * reflection.c (mono_reflection_create_runtime_class): initialize
21874 nested_in field of dynamically created classes.
21876 2003-02-22 Martin Baulig <martin@ximian.com>
21878 * debug-mono-symfile.h: Incremented version number.
21880 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
21882 * object.h icall.c process.c: fix warnings.
21884 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
21886 * appdomain.h appdomain.c:
21887 (mono_domain_try_type_resolve): split the
21888 name_or_tb argument into a name and a tb argument.
21889 (mono_domain_has_type_resolve): new function to check whenever the
21890 application has registered a TypeResolve event handler.
21892 * icall.c reflection.h reflection.c: move the type resolve logic into
21893 mono_reflection_get_type () so it will be invoked when
21894 Assembly::GetType () is called.
21897 (mono_reflection_get_type): renamed to get_type_internal.
21898 (mono_reflection_get_type): fixed type name generation so it works
21899 for nested types too.
21900 (mono_reflection_get_type): call has_type_resolve () to avoid the
21901 costly type name generation if there is no resolve event handler.
21903 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
21905 * class.c, image.c: load exported types from file references.
21907 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
21909 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
21910 used to cache the managed methods used to create proxies and make
21911 remote invocation of methods.
21912 * class.h: Added in MonoVTable a flag to indicate that a class needs
21913 to be remotely created.
21914 * object.c: Modified the method mono_class_vtable(). It now initializes
21915 the remote flag of the vtable. Modified mono_object_new_specific(),
21916 so now it checks the remote flag.
21917 * icall.c: Added a couple of internal methods, one for enabling instance
21918 creation interception for a type, and one for creating objects bypassing
21921 2003-02-18 Martin Baulig <martin@ximian.com>
21923 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
21924 New interncall to get a method's metadata token.
21926 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
21927 New interncall for the debugger.
21929 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
21931 * class.c (mono_class_setup_vtable): allocate supertype array
21933 2003-02-18 Martin Baulig <martin@ximian.com>
21935 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
21937 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21940 (assembly_name_to_aname): jump over unknown properties (i've found
21941 something like: 'type, assembly, version=xxx, custom=null, public...',
21942 so now will ignore custom=null and still get the rest of the values).
21944 2003-02-17 Dick Porter <dick@ximian.com>
21946 * threads.c: Have Thread.Start() wait for a semaphore to signal
21947 that the thread has set up all its local data. This fixes bug
21948 34323, where Abort() raced the new thread's TLS data.
21950 Also removes the handle_store() call from start_wrapper, because
21951 threads are now always created suspended and there is no longer a
21952 race between the parent and child threads to store the info.
21954 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
21956 * image.c: explain the #- heap issue in a message, hopefully
21957 avoiding FAQs on mono-list.
21959 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21962 (GetEntryAssembly): if the domain has not invoked
21963 AppDomain.ExecuteAssembly yet, return the assembly of the default
21966 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
21968 * class.c (mono_ldtoken): make it work in dynamic assemblies.
21970 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
21972 * metadata.c, reflection.c: simple speedup to type hash
21975 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
21977 * image.c, image.h, class.c, assembly.c: move module loading
21978 to MonoImage. When loading metadata, consider alignemnet from
21979 the start of metadata, not from the metadata address in memory.
21981 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
21983 * reflection.c (mono_reflection_get_custom_attrs): Added support for
21984 AssemblyBuilder objects. Factored out custom attribute creation into
21985 a separate function.
21986 (create_custom_attr): new function to create custom attributes.
21988 2003-02-12 Miguel de Icaza <miguel@ximian.com>
21990 * Makefile.am: Got tired of typing the full pathname to pedump.
21991 Until there is another option, am installing this.
21993 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
21995 * class.c (class_compute_field_layout): always set field->parent
21996 (mono_ldtoken): use mono_defaults.fieldhandle_class;
21998 2003-02-11 Dick Porter <dick@ximian.com>
22001 * monitor.c: Rewrote Monitor, making lock much faster and
22002 Pulse/Wait work as specified. Also uses much fewer handles, and only
22003 creates them as needed.
22005 * exception.c: Added SynchronizationLockException
22007 * threads.c: Deleted old Monitor implementation. The new one is
22010 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
22012 * class.c: handled TypedReference type code. Set the correct size for
22013 class data. Setup interface_offsets for interface classes, too.
22015 2003-02-09 Martin Baulig <martin@ximian.com>
22017 * debug-mono-symfile.h: Reflect latest symbol writer changes.
22019 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
22021 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
22022 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
22023 * object.c: fixed mono_object_get_virtual_method () for interfaces.
22024 * verify.c: check for code that runs after the end of the method.
22026 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
22028 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
22029 "System.Math::Round2".
22030 * sysmath.h: Added Floor, Round and Round2 definitions.
22031 * sysmath.c: Modified certain functions that were not 100% compliant
22032 with MS.NET (math precision) and added the implementation of Floor,
22035 2003-02-07 Martin Baulig <martin@ximian.com>
22037 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
22039 2003-02-07 Martin Baulig <martin@ximian.com>
22041 * debug-mono-symfile.c: Reflected latest symwriter changes.
22042 (mono_debug_create_mono_symbol_file): Removed.
22043 (mono_debug_open_mono_symbol_file): Take an argument which
22044 specifies whether to create a dynamic symbol file.
22046 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
22048 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
22050 2003-02-05 Martin Baulig <martin@ximian.com>
22052 * reflection.c (mono_image_build_metadata): Make this public,
22053 protect it against being called multiple times, don't create
22054 resources and don't build the compressed metadata here.
22055 (mono_image_create_pefile): Do this here.
22058 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
22060 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22062 * socket-io.c: fixed bug #36322.
22064 2003-02-06 Piers Haken <piersh@friskit.com>
22068 * debug-mono-symfile.c:
22074 * socket-io.c: warning cleanups
22076 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
22078 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
22079 function. works like remoting invoke, but does a check for the Proxy first.
22081 2003-02-05 Miguel de Icaza <miguel@ximian.com>
22083 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
22085 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
22087 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
22089 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
22090 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
22092 * object.c (mono_store_remote_field_new): used by the new jit
22093 instead of mono_store_remote_field
22094 (mono_load_remote_field_new): used by the new jit
22095 instead of mono_load_remote_field
22097 2003-02-05 Patrik Torstensson
22099 * appdomain.c: changed unload to take the domain id instead
22102 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
22105 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22107 * appdomain.c: don't look for assemblies in ApplicationBase if
22108 PrivateBinPathProbe is set.
22110 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22112 * object.c: make the first argument in main_args contain the absolute
22113 path to the assembly. Fixes bug #37511.
22115 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22117 * icall.c: get correct UTC offset for countries not using daylight
22118 time saving. Fixes bug #30030.
22120 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22122 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
22123 and 1 are the family).
22125 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
22127 * icall.c (ves_icall_InternalExecute): removed wrong assertion
22129 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
22131 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
22133 * reflection.c: added support for SignatureHelper tokens, which is
22134 needed by the Calli opcode.
22136 * reflection.h: track changes to SignatureHelper class.
22138 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
22140 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22142 * appdomain.c: fixed loading assemblies from PrivateBinPath.
22144 2003-02-03 Patrik Torstensson
22145 * appdomain.[c|h], domain.c :
22146 - Added support for getting a domain via domain id
22147 - Support for setting and getting domain from System.AppDomain
22148 (used in cross appdomain channel)
22149 - Added support for get/set for a MonoAppContext on a thread
22150 (Context class in System.Runtime.Remoting.Contexts),
22151 - Removed hack in Get/SetData and ExecuteAssembly.
22153 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
22154 the managed world to get control when a proxy is created.
22156 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
22158 2003-02-03 Miguel de Icaza <miguel@ximian.com>
22161 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
22162 Populate the codebase field as well.
22164 2003-02-02 Martin Baulig <martin@ximian.com>
22166 * debug-mono-symfile.c
22167 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
22168 (mono_debug_symfile_add_method): Allow interncalls.
22170 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22172 * icall.c: throw parse exception if strtod fails or the string is empty.
22174 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
22176 * marshal.c: handle object type separately from defined
22179 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
22181 * marshal.c: handle NATIVE_LPSTR for strings when it's
22182 explicitly specified.
22184 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
22186 * reflection.c, reflection.h, icall.c: setup the reflection
22187 handle cache for ModuleBuilders and AssemblyBuilders.
22189 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
22191 * reflection.c (reflection_methodbuilder_to_mono_method): set
22194 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22196 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
22198 2003-01-29 Dick Porter <dick@ximian.com>
22200 * threads.c: No need for the fake_thread kludge now that Thread
22201 doesn't run a class constructor
22203 2003-01-29 Dick Porter <dick@ximian.com>
22205 * threads.c: Use g_direct_hash instead of the rather bogus
22208 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
22210 * marshal.c (mono_marshal_get_native_wrapper): add check for null
22211 (fix pinvoke12.exe)
22212 (mono_marshal_get_struct_to_ptr): generate valid IL code
22213 (mono_marshal_get_ptr_to_struct): generate valid IL code
22214 (*): correctly set sig->pinvoke, we need to memdup the signature
22217 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
22219 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
22220 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
22222 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
22224 * profiler.c: provide more callers information.
22226 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
22228 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
22230 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
22232 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
22234 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
22236 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
22237 exception instead of going into an infinite loop on dates which it
22240 * string-icalls.c (ves_icall_System_String_get_Chars): raise
22241 out-of-range exception if needed.
22243 * class.c (mono_class_setup_vtable): allow a virtual method to provide
22244 an implementation for an interface method and to override an inherited
22245 method at the same time.
22246 Imagine a scenario when a virtual method is used to override a
22247 virtual abstract method in a parent class, and this same method
22248 provides an implementation for an method inherited from an interface.
22249 In this case, the interface resolution code will set im->slot, which
22250 means that the virtual method override pass will skip this method
22251 which means a pointer to the abstract method inherited from the parent
22252 will remain in the vtable of this non-abstract class.
22254 * class.c: (mono_class_setup_vtable): continue search for a real
22255 method if only an abstract method is found.
22257 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
22259 * reflection.c: add size to encoding for ByValStr and ByValArray
22260 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
22262 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
22264 * class.c (mono_class_setup_vtable): pass the override info as an
22267 * class.c (mono_class_setup_vtable): set the slot of overriding methods
22270 * reflection.c (ensure_runtime_vtable); add support for method
22273 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
22275 * reflection.c (resolution_scope_from_image): Hack to work to work with
22276 dynamic assemblies.
22278 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
22279 added a 'force_ref' argument to force this function to allways return
22280 a TypeRef. This is needed by mono_image_get_memberref_token ().
22282 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
22284 * reflection.c (mono_image_get_type_info): interfaces really don't have
22287 * reflection.c (mono_image_basic_init): fill out missing fields of
22290 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
22291 dynamic assemblies. This is required so dynamic assemblies show up in
22292 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
22293 Type::GetType() etc. This is consistent with MS behaviour.
22295 * image.c image.h reflection.c: add newly created classes to the name
22296 cache so mono_class_get () will find them.
22298 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
22300 First part of changes to get IKVM.NET running under mono.
22302 * appdomain.h, appdomain.c: added new function
22303 mono_domain_try_type_resolve() which will emit TypeResolve events.
22304 This function will call AppDomain::DoTypeResolve to do the actual work.
22306 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
22307 moved existing code dealing with dynamic tokens to a new function
22308 called mono_reflection_lookup_dynamic_token (). This function will
22309 raise TypeResolve events when appropriate. Since reflection.c is not
22310 part of libmetadata, a new hook function called
22311 mono_lookup_dynamic_token() is added to class.c which will call this.
22313 * assembly.h assembly.c: make the invoke_load_hook function public,
22314 so it can be called for dynamic assemblies.
22316 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
22318 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
22321 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
22322 MonoGHashTable, since it contains pointers to objects which the GC
22325 * assembly.c (search_loaded): remove unused variable.
22327 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
22329 * object.c: fixed issue exposed by gcc-generated IL programs
22330 that use RVA data for pointers.
22332 2003-01-25 Martin Baulig <martin@ximian.com>
22334 * threads.c (start_wrapper): Moved the initialization of
22335 `start_func' above the mono_new_thread_init() call to which we
22336 pass it as argument.
22338 2003-01-24 Martin Baulig <martin@ximian.com>
22340 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
22341 the MonoThread pointer.
22343 2003-01-21 Miguel de Icaza <miguel@ximian.com>
22345 * icall.c: Rename `PowImpl' to Pow.
22347 2003-01-23 Dick Porter <dick@ximian.com>
22349 * threads.c (start_wrapper): Create a Thread object if needed, so
22350 the Main() thread can do the class initialisation in a subthread
22351 that has been set up to allow managed code execution.
22353 Pass the thread ID instead of the MonoThread pointer to the thread
22354 start and attach callbacks. This change is required, because the
22355 jit thread start callback must be called _before_ the Thread
22356 object can be created.
22358 (mono_thread_init): Removed much object creation code that is no
22359 longer needed. No managed code is called from here now.
22361 * object.c (mono_runtime_exec_managed_code): Create a subthread
22362 for Main, and call back to the runtime to use it.
22363 Set the exit code when Main exits.
22365 * gc.c: Make sure domain finalisation happens in a subthread.
22366 Re-enable threaded GC, fixing bug 31333 (again).
22368 * environment.c: System.Environment internall calls (so far just
22369 ExitCode is here, the others are still in icall.c)
22371 * appdomain.c (mono_runtime_cleanup): All threads running managed
22372 code should have finished before mono_runtime_cleanup() is
22373 reached, so no need to clean up threads.
22375 2003-01-22 Martin Baulig <martin@ximian.com>
22377 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
22378 `gpointer func' arguments.
22379 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
22380 but added `MonoThread *thread' argument.
22381 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
22383 * threads.c (mono_new_thread_init): Added `gpointer func' argument
22384 and pass it to the mono_thread_start_cb callback.
22385 (mono_install_thread_callbacks): New public function to install a
22386 set of callbacks which are set by the debugger.
22387 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
22389 2003-01-22 Martin Baulig <martin@ximian.com>
22391 * Makefile.am: Install debug-mono-symfile.h.
22393 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
22395 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
22397 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
22399 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
22400 * class.c (mono_ptr_class_get): correctly set access levels of pointers
22401 (mono_array_class_get): correctly set access levels of arrays
22403 2003-01-20 Patrik Torstensson
22404 * image.h (MonoAssemblyName): changed major, minor, build, revision
22405 from signed to unsigned.
22407 2003-01-20 sean kasun <skasun@azstarnet.com>
22409 * reflection.c (load_cattr_value): Now this handles
22410 MONO_TYPE_SZARRAY. Fixes bug #35629
22412 2003-01-20 Miguel de Icaza <miguel@ximian.com>
22414 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
22417 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22419 * decimal.c: fixed bug #26056.
22421 2003-01-17 Martin Baulig <martin@ximian.com>
22423 * gc.c: Raise an ExecutionEngineException instead of using g_error().
22425 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22428 (mono_get_exception_type_initialization): new function.
22430 * object.c: throw a TypeInitializationException when an exception is
22431 thrown invoking the class constructor.
22433 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22435 * reflection.c: fixed attribute reading.
22437 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22440 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
22441 provided, look for the type in the calling assembly and then in
22442 mscorlib; if the assembly name is provided, only try that one.
22444 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
22446 * object.c: register the vtable before there is a chance it's
22447 queried again recursively.
22449 2003-01-13 Duncan Mak <duncan@ximian.com>
22451 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
22454 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
22456 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
22458 2003-01-11 Martin Baulig <martin@ximian.com>
22460 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
22461 this to 20 for the release.
22463 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
22465 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
22467 * loader.c (mono_method_get_marshal_info): bug fix
22469 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
22470 structures with explicit layout
22472 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
22474 * profiler.c: made the output more readable (and sorted).
22475 Added caller information for the allocation profiler.
22477 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
22479 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
22481 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22483 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
22484 to get value types.
22486 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
22488 * object.c, profiler.h, profiler.c, profiler-private.h:
22489 Added object allocation profiler.
22491 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
22493 * reflection.h, reflection.c: handle global methods.
22494 Compress blob entries.
22496 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
22498 * marshal.c: fix compilation.
22500 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
22502 * loader.c (mono_method_get_marshal_info): impl.
22504 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
22506 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22508 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
22509 for reference types.
22511 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
22513 * loader.c: fixed off by one error in loaded parameter names.
22515 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
22517 * marshal.c (mono_marshal_get_icall_wrapper): like
22518 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
22519 instead of a MonoMethod.
22521 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22523 * decimal.c: fixed bug #36537.
22525 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
22527 * marshal.c: throw a missing method exception if a
22528 P/Invoke method is not found.
22530 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
22532 * icall.c: allow a null this for constructors.
22534 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
22536 * icall.c: raise the proper exceptions if the arguments to the
22537 internal Invoke are incorrect.
22539 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
22541 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
22543 2003-01-03 Martin Baulig <martin@ximian.com>
22545 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
22547 2002-12-31 Martin Baulig <martin@ximian.com>
22549 * debug-mono-symfile.c: Completely rewrote the type section.
22550 Instead of using individual malloc()ed fields, we use one big
22551 continuous memory area and offsets into this area.
22552 See the comments in the source code for details.
22554 2002-12-30 Martin Baulig <martin@ximian.com>
22556 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
22558 2002-12-30 Martin Baulig <martin@ximian.com>
22560 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
22561 line number table in this data blob instead of using an external
22564 2002-12-28 Martin Baulig <martin@ximian.com>
22566 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
22568 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
22570 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
22571 as a boxed return type.
22573 2002-12-21 Miguel de Icaza <miguel@ximian.com>
22576 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
22577 g_build_filename to properly get separators on the filename created.
22579 * object.h: Small change, introduce MonoMarshalByRefObject to
22580 track the layout of that structure in the C# universe as we make
22583 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
22585 * object.c: removed assert to allow static fields on interfaces.
22586 * loader.c: a TypeSpec may be used for any type, not just arrays.
22588 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
22590 * class.c, class.h: added mono_class_array_element_size ().
22591 Ignore static methods in interfaces.
22593 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22595 * threads.c: fixed the build under cygwin.
22597 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
22599 * reflection.c: handle nullref constants. Allocate keys for
22600 reflection handles with the GC.
22602 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
22604 * threads.c, threads.h: added mono_thread_get_abort_signal()
22605 to get a suitable signal for thread abort.
22607 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
22609 * metadata.c: fix handling of ExportedType table.
22611 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22613 * icall.c: added WriteWindowsDebugString internal call.
22615 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22617 * reflection.h: added fields to match C# implementation.
22619 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22621 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
22623 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
22625 * gc.h, gc-internal.h: Rename header for GC internal calls to
22626 gc-internal.h from gc.h as to not clash with Boehm GC having its
22627 header installed as <gc.h> in outside include paths.
22628 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
22629 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
22631 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22633 * icall.c: assign minor, build and revision in FillName.
22635 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
22637 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
22638 Added support for running code generated by Reflection.Emit.
22640 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22642 * appdomain.c: check for NULL argument in LoadFrom.
22644 2002-12-10 Dick Porter <dick@ximian.com>
22646 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
22648 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22650 * appdomain.c: fix buglet when building exe file name. Handle full
22651 assembly name (needed after latest changes to AssemblyName).
22653 (mono_image_close): free some hashtables.
22655 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
22657 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
22658 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
22659 on some systems (redhat 7.3)
22661 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
22663 * threads.c: delete the critical section of a sync block,
22664 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
22666 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
22668 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
22670 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22672 * appdomain.[ch]: handle the assembly preload event to try loading the
22673 assemblies using the paths we have in the current domain.
22675 * assembly.[ch]: created an assembly preload hook that is called to try
22676 loading the assembly by other means that the ones provided here.
22678 * domain.c: initialize the domain search path.
22680 From now on, assemblies (TODO: except corlib and System) are loaded
22681 according to these rules when using mono_assembly_load ():
22683 1. It tries to load the assembly from the ApplicationBase
22684 of the current domain appending .dll and .exe (TODO: have to
22685 try loading from name/name.dll and name/name.exe).
22687 2. It tries the search path specified in PrivateBinPath for the
22688 current domain (if any).
22690 3. Previous behavior.
22692 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
22694 * icall.c: implemented GetInterfaceMap() related icall.
22695 * domain.c, loader.h: load MethodInfo in mono_defaults.
22697 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
22699 * gc.c: disable the finalizer thread for now, untill all the issues
22700 with it are resolved.
22702 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
22704 * string-icalls.c: handle embedded nulls in string ctor when the
22705 length is specified.
22707 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
22709 * class.c: look for explicit interface implementation in parent
22712 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
22714 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
22716 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
22718 * gc.c: protect handles with a critical section.
22720 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22723 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
22724 parameters. If no assembly specified, try getting the type from all
22725 the assemblies in the current domain, else, load the assembly and get
22728 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22730 * marshal.c: applied patch from Aleksey Demakov that fixes
22731 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
22733 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22735 * icall.c: fixed get_location.
22737 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
22739 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
22740 declarations to make it work with older gcc.
22742 * loader.c (mono_get_method): set signature->pinvoke for native calls
22744 2002-11-20 Dick Porter <dick@ximian.com>
22746 * threads.c (mono_thread_init): Set the main thread's handle
22748 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
22750 * gc.c: allow compilation without GC support. Changed to match the
22753 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
22755 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
22757 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
22759 * reflection.c: set a public key token on the core assemblies.
22761 2002-11-18 Dick Porter <dick@ximian.com>
22763 * threads.c: Split out some thread initialisation so that other
22764 files can set the start callback function.
22766 * gc.c: Run finalisers in a separate thread, to avoid stack
22767 overflow. Fixes bug 31333.
22769 * appdomain.c: Set up GC finalisation thread.
22773 * domain.c: Use gc.h macros for GC_malloc
22775 2002-11-15 Dick Porter <dick@ximian.com>
22779 * appdomain.c: Removed mono_runtime_init_with_attach(),
22780 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
22781 merging the extra parameter with the existing function. Removed
22782 unneeded code in mono_thread_attach().
22784 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
22786 * image.c (mono_image_loaded_by_guid): a method to get loaded
22788 (load_metadata_ptrs): we store the guid as string.
22790 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
22792 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
22794 * metadata.c (mono_guid_to_string): imported method form Zoltan
22795 Varga (slightly modified)
22797 * assembly.c (mono_assembly_open): load precompiled code
22799 * loader.h (MonoMethod): we store the method token for use in the
22802 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22804 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
22805 the hook function called when an assembly is loaded.
22807 * domain.c: Modified file.
22808 (mono_domain_assembly_load): removed hash table insertion of assemblies.
22812 2002-11-07 Miguel de Icaza <miguel@ximian.com>
22814 * reflection.c: Map PEFileKind to the value expected by the WinNT
22817 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22819 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
22820 Read until the buffer is filled completely.
22822 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22824 * icall.c: implemented MonoType.InternalGetEvent ().
22826 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22828 * appdomain.c: implemented InitAppDomainSetup. Delayed
22829 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
22830 the entry_assembly.
22832 * assembly.c: base_dir is now an absolute path ending with
22835 * icall.c: modified get_location according to the above changes.
22837 * object.c: init AppDomain.SetupInformation for the default domain after
22838 we have the entry assembly.
22840 * domain.c: when unloading a domain, setup = NULL.
22842 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
22844 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
22846 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
22848 * object.h, object.c: introduced mono_object_get_virtual_method ()
22849 to lookup the method invoked on an object when a callvirt is done on
22851 * icall.c: make MethodInfo::Invoke() always do a virtual call.
22853 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22855 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
22856 current domain when loaded an assembly and failed to load it.
22858 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
22860 2002-10-31 Dick Porter <dick@ximian.com>
22864 * file-io.c: Return the error status in a parameter, as the
22865 GetLastError() value has long since been blown away if we try and
22866 look it up in a subsequent internal call invocation. Delete the
22867 GetLastError() internal call, because it's useless.
22869 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
22871 * class.[ch]: added cast_class to fix bug 29517
22873 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
22875 * marshal.c: create valid IL code in the filter clause:
22876 the new JIT is less forgiving:-)
22878 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22880 * icall.c: removed get_property internal call.
22882 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
22884 * appdomain.h domain.c: Added an ID to appdomains.
22886 * threads.c threads.h icall.c: Implement icall
22887 Thread:GetDomainID(), and remove unused icall
22888 CurrentThreadDomain_internal.
22890 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22892 * icall.c: Don't recurse through the base types in GetConstructor.
22895 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
22897 * mempool.h, mempool.c: added mono_mempool_empty() and
22898 mono_mempool_stats().
22900 2002-10-23 Dick Porter <dick@ximian.com>
22904 * icall.c: Added MonoIO.GetFileType internal call
22906 2002-10-17 Dick Porter <dick@ximian.com>
22908 * appdomain.c (mono_runtime_cleanup): Don't signal the async
22909 delegate semaphore before waiting for all threads to finish,
22910 because new threads can also call async delegates. Fixes bug
22913 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
22914 of 3 seconds, in case another async job is queued. (This part is
22915 needed because the bug fix reintroduced the 3s exit lag.) This
22916 makes the mono_runtime_shutdown flag superfluous.
22918 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
22920 * reflection.c: include ehader size in method section headers.
22921 Really check for suplicated modules entries.
22923 2002-10-17 Martin Baulig <martin@gnome.org>
22925 * debug-mono-symfile.c: Added back support for locals.
22927 2002-10-14 Martin Baulig <martin@gnome.org>
22929 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
22932 2002-10-14 Martin Baulig <martin@gnome.org>
22934 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
22935 mono_class_get() instead of looking in the class cache.
22937 2002-10-13 Martin Baulig <martin@gnome.org>
22939 * debug-mono-symfile.c: Set version number to 28, include the
22940 signature in method names.
22942 2002-10-13 Martin Baulig <martin@gnome.org>
22944 * debug-mono-symfile.h: Set version number to 27.
22946 2002-10-11 Martin Baulig <martin@gnome.org>
22948 * gc.c: Don't register/unregister NULL pointers as disappearing links.
22950 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
22952 * metadata.c, metadata.h: added helper function to allocate signatures.
22954 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22956 * icall.c: added internal call to get the location of machine.config.
22958 2002-10-08 Martin Baulig <martin@gnome.org>
22960 * debug-mono-symfile.c: Ignore classes with a pending init for the
22963 2002-10-03 Dick Porter <dick@ximian.com>
22965 * threads.c: Freebsd pthread_t is a pointer
22967 2002-10-03 Dick Porter <dick@ximian.com>
22969 * socket-io.c: Implemented GetHostName_internal
22971 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22974 (mono_config_parse_file): don't leak the text.
22976 2002-10-02 Martin Baulig <martin@gnome.org>
22978 * debug-mono-symfile.c: Added support for methods.
22980 2002-10-01 Martin Baulig <martin@gnome.org>
22982 * debug-mono-symfile.c: Don't emit methods and line numbers for
22983 the dynamic symbol file, just write the type table. We can easily
22984 have an external helper program which creates a symbol file for an
22987 2002-10-01 Dick Porter <dick@ximian.com>
22989 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
22990 Only add the handle to the cleanup array when we're about to
22991 launch the thread. Bug 31425 deadlocked when the test was run on
22994 2002-10-01 Martin Baulig <martin@gnome.org>
22996 * debug-mono-symfile.c: Added support for properties.
22998 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
23000 * reflection.c: unaligned store fix from Mark Crichton
23001 <crichton@gimp.org>.
23003 2002-09-27 Martin Baulig <martin@gnome.org>
23005 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
23008 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
23010 * assembly.h, assembly.c: use a sane API to hook into the assembly
23011 loading process instead of a useless special-purpouse hack
23012 (ngen needs a hook, too, for example).
23014 2002-09-27 Dick Porter <dick@ximian.com>
23016 * threads.c (mono_thread_init): Call GetCurrentProcess() so
23017 io-layer can set up some process handle info. Not needed on w32,
23018 but doesn't hurt either.
23020 * process.c: Pass the program name in the second parameter to
23021 CreateProcess, so the path is searched. Include the working
23022 directory. Implemented process name, process enumeration, and some
23023 process detail internal calls.
23025 * icall.c: Added internal calls for process lookup, and some
23028 2002-09-26 Martin Baulig <martin@gnome.org>
23030 * assembly.c (mono_install_open_assembly_hook): New global
23031 function to install a function to be invoked each time a new
23032 assembly is loaded.
23033 (mono_assembly_open): Run this callback function if set.
23035 * debug-mono-symfile.c: Put back line numbers for the dynamic
23036 symbol file and also record the .il file as source file. This
23037 allows us to install the temporary symbol file as `file.dbg' just
23038 like a compiler-generated one.
23040 2002-09-26 Nick Zigarovich <nick@chemlab.org>
23042 * Corrected typo in gc.c (BOHEM vs BOEHM).
23044 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23046 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
23047 GetProperties. Also avoid calling g_slist_length in GetProperties and
23050 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
23052 * reflection.c: avoid unaligned stores (bug spotted by
23053 Mark Crichton <crichton@gimp.org>).
23055 2002-09-25 Martin Baulig <martin@gnome.org>
23057 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
23058 instead of guint64 for addresses and added prologue/epilogue info.
23060 2002-09-25 Martin Baulig <martin@gnome.org>
23062 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
23063 store line number info. For the dynamic symbol file, we only need
23064 to provide the JIT generated dynamic line number info for the dynamic
23067 2002-09-25 Martin Baulig <martin@gnome.org>
23069 * debug-mono-symfile.h: Incremented version number.
23071 2002-09-24 Martin Baulig <martin@gnome.org>
23073 * class.c (mono_debugger_class_init_func): New global function
23075 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
23078 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
23079 function. This is called via the mono_debugger_class_init_func
23080 hook to add all types to the dynamic type table.
23081 (ves_icall_MonoDebugger_GetType): New interncall to get a class
23082 from its metadata token.
23084 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
23085 New interncall for the debugger.
23087 2002-09-24 Nick Drochak <ndrochak@gol.com>
23089 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
23090 before using it in case it is null.
23092 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
23094 * metadata.c: allow custom modifiers in local var signatures
23095 (bug spotted by Zoltan Varga).
23097 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
23099 * class.c: deal with the <Module> class that may have a NULL vtable.
23100 Eliminate warnings.
23102 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
23104 * image.c, image.h: more strong name helpers.
23105 * monosn.c: more work: convert pem keys to cryptoapi format.
23107 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
23109 * string-icalls.c: speedup IndexOf.
23111 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
23113 * icall.c: updates from Zoltan.2.Varga@nokia.com.
23115 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
23117 * icall.c: cleanup: use mono_object_domain ().
23119 2002-09-23 Martin Baulig <martin@gnome.org>
23121 * debug-mono-symfile.c: Improved type support.
23123 2002-09-22 Martin Baulig <martin@gnome.org>
23125 * debug-mono-symfile.c: Added support for reference types and strings.
23127 2002-09-22 Martin Baulig <martin@gnome.org>
23129 * debug-mono-symfile.c: Started to work on the type table.
23131 2002-09-21 Martin Baulig <martin@gnome.org>
23133 * debug-mono-symfile.c: Largely reworked the symbol table format.
23134 The symbol table is now incrementally updated each time a new
23135 method is added. We're now also using our own magic and version
23136 so that you don't need to recompile all your classes if the
23137 dynamic table changes.
23138 (mono_debug_update_mono_symbol_file): Removed.
23139 (mono_debug_symfile_add_method): New function to add a method.
23141 2002-09-21 Martin Baulig <martin@gnome.org>
23144 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
23147 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
23148 New interncall to get a method from its metadata token.
23150 2002-09-21 Martin Baulig <martin@gnome.org>
23152 * debug-mono-symfile.c: Create type table.
23154 2002-09-20 Martin Baulig <martin@gnome.org>
23156 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
23158 2002-09-20 Martin Baulig <martin@gnome.org>
23160 * debug-mono-symfile.c: Provide information about params and locals.
23162 2002-09-20 Martin Baulig <martin@gnome.org>
23164 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
23167 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
23168 interncall to get a method from its metadata token.
23170 2002-09-20 Martin Baulig <martin@gnome.org>
23172 * debug-mono-symfile.c: Added a few checks for method->header
23173 being non-NULL. This should never happen, but for the moment
23174 let's use a g_warning() rather than a g_assert().
23176 2002-09-19 Mark Crichton <crichton@gimp.org>
23178 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
23179 even if support for it isn't present. Added an #ifdef to fix this.
23181 * socket-io.c: Added checks back for Solaris support.
23183 2002-09-19 Martin Baulig <martin@gnome.org>
23185 * debug-mono-symfile.c (read_string, write_string): Reflect latest
23186 changes in the symbol file format.
23188 2002-09-18 Martin Baulig <martin@gnome.org>
23190 * debug-mono-symfile.c: Set version number to 21.
23192 2002-09-18 Dick Porter <dick@ximian.com>
23194 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
23195 on netbsd. Fixes bug 30051.
23197 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23200 (set_version_from_string): little fix.
23202 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
23204 * monosn.c, Makefile.am: added strong name utility.
23205 * reflection.h, reflection.c: implemented delayed signing,
23206 locale, version and hash id assembly attributes.
23208 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
23210 * loader.c, metadata.c: load param attributes in signatures.
23212 2002-09-16 Martin Baulig <martin@gnome.org>
23214 * debug-mono-symfile.c: Added string table with all method names.
23216 2002-09-14 Martin Baulig <martin@gnome.org>
23218 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
23219 fast method lookup.
23221 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
23223 * reflection.c: record the public key token of referenced assemblies.
23225 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
23227 * image.c, image.h: added functions to get the strong name and the
23228 public key of an assembly.
23229 * pedump.c: use them.
23231 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
23233 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
23235 2002-09-12 Miguel de Icaza <miguel@ximian.com>
23237 * marshal.c (mono_marshal_get_managed_wrapper): Added
23240 2002-09-11 Martin Baulig <martin@gnome.org>
23242 * gc.c: Call GC_unregister_disappearing_link() on all links when
23243 finalizing them, this is necessary to aviod a crash in boehm's
23246 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
23248 * gc.c: handle GetTarget for finalized objects spotted and fixed by
23251 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
23253 * icall.c: implemented MonoType::Module.
23254 * reflection.c, reflection.h: mono_module_get_object () from
23255 Tomi Pakarinen <tomi.pakarinen@welho.com>.
23257 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
23259 * icall.c: ignore overridden methods in GetMethods ().
23260 Fix for FieldInfo::SetValue().
23261 * object.c: handle float/double in runtime invoke.
23263 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
23265 * object.c: allow a constructor to be called again on an object.
23267 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
23269 * class.h, class.c: move field layout code to it's own function and
23270 export it. Get an interface id earlier. Move fields in MonoClass
23271 so they are more cache friendly and align the bitfields.
23272 * loader.c: temporary handle get_param_names() for a runtime method.
23273 * reflection.c, reflection.h: more code to handle runtime creation of
23276 2002-09-09 Martin Baulig <martin@gnome.org>
23278 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
23279 signature with the pinvoke field being set for the actual call.
23281 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
23283 * icall.c: removed some unused icalls. Start of map of glib charsets
23284 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
23286 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
23288 * debug-helpers.c: break infinite loop (found and fixed by
23289 Holger Arnold <harnold@gmx.de>).
23291 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
23293 * icall.c: target may be null in create_delegate.
23295 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
23297 * marshal.c: handle a boolean return type.
23299 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
23301 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
23303 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
23305 * gc.c: fix weakreferences.
23307 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
23309 * icall.c: added icall to get default codepage.
23311 2002-09-03 Dick Porter <dick@ximian.com>
23314 * threads.c: Use MonoThread instead of MonoObject where
23317 Store running thread objects in a hash table, so that we have all
23318 the info to hand when waiting for them to finish
23319 (means we don't need OpenThread() any more, so mingw builds should
23320 be fully functional again.)
23323 * object.h: Added thread ID to MonoThread
23325 2002-09-03 Martin Baulig <martin@gnome.org>
23327 * icall.c (System.Reflection.Assembly::get_location): New interncall.
23329 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23331 * icall.c: fixed leak in get_temp_path. Thanks lupus.
23333 2002-09-03 Martin Baulig <martin@gnome.org>
23335 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
23336 argument to store the end address of the disassembled instruction.
23338 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
23339 here from debug-symfile.h.
23340 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
23341 JIT into this struct.
23342 (MonoSymbolFile): Added `char *image_file' field.
23343 (MonoDebugGetMethodFunc): Removed.
23344 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
23345 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
23346 (mono_debug_find_method): New method.
23348 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
23349 create a full symbol file.
23350 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
23351 and static symbol files.
23352 (mono_debug_find_method): The symbol file keeps an internal method hash,
23353 call this to get a MonoDebugMethodInfo from a MonoMethod.
23355 * debug-symfile.[ch]: Removed.
23357 2002-08-29 Miguel de Icaza <miguel@ximian.com>
23359 * image.c (do_mono_image_open): Remove linker version check.
23361 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
23363 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
23364 wrappers for instance methods.
23366 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23368 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
23370 2002-08-28 Dick Porter <dick@ximian.com>
23372 * Makefile.am: Export HOST_CC for w32 builds
23374 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
23376 * file-io.c process.c: MonoString are null terminated, no
23377 need for mono_string_to_utf16() anymore.
23379 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
23381 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
23383 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
23385 * icall.c, reflection.h: speedup System.MonoType.
23387 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
23389 * reflection.c: allow null as the value of a string argument in
23390 custom attributes constructors.
23392 2002-08-27 Martin Baulig <martin@gnome.org>
23394 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
23395 `trampoline_address' field.
23397 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
23399 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
23400 check (fixes bug #29486)
23402 2002-08-27 Martin Baulig <martin@gnome.org>
23404 * debug-mono-symfile.c: Changed the file format in a way that allows us
23405 open it read-only and to use a specially malloced area for all the
23406 dynamic data. We can now also generate a symbol file on-the-fly if we're
23407 debugging IL code and there is no MCS generated symbol file for it.
23409 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
23411 * object.c: added a define for a good string and array
23412 creation speedup (not enabled by default because we need to deal with
23415 2002-08-26 Martin Baulig <martin@gnome.org>
23417 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
23418 function to create a dynamic symbol file. This is used by the
23419 debugger to create a symbol file for IL code on-the-fly.
23421 2002-08-26 Martin Baulig <martin@gnome.org>
23423 * loader.c (mono_lookup_pinvoke_call): Include the error message
23424 from g_module_error() in the error message.
23426 2002-08-24 Martin Baulig <martin@gnome.org>
23428 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
23429 function to update the symbol file. The symbol file is mmap()ed
23430 writable, but private. This allows us to install the symbol file
23431 together with the assembly.
23433 2002-08-24 Martin Baulig <martin@gnome.org>
23435 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
23436 but they can read the new symbol file format which mcs is now creating.
23438 * debug-symfile.c (mono_debug_find_source_location): Moved to
23439 debug-mono-symfile.c; this is now operating on the new symbol file.
23441 2002-08-23 Martin Baulig <martin@gnome.org>
23443 * debug-helpers.c (mono_method_desc_from_method): New function to get
23444 a MonoMethodDesc from a MonoMethod.
23446 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
23448 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
23449 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
23451 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
23453 * string-icalls.[ch]: make helper methods static.
23455 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23457 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
23458 types to it and to SetValueInternal.
23460 * object.c: Moved handle_enum label to its proper place. This was the
23463 This time i compiled mcs and gtk-sharp and they both work.
23465 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23467 * icall.c: reverted partially my previous patch until
23468 object.c:set_value handles enums correcly.
23470 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23473 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
23474 (ves_icall_System_Environment_get_MachineName): removed warning when
23475 compiling under cygwin.
23477 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
23479 * object.c: fixed field_get_value() for reference types.
23481 2002-08-22 Dick Porter <dick@ximian.com>
23483 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
23484 Don't free a buffer while it's still needed. Patch from Jonathan
23485 Liger <Jonathan.liger@wanadoo.fr>
23487 2002-08-21 Miguel de Icaza <miguel@ximian.com>
23489 * icall.c (ves_icall_System_Environment_get_Platform): Add new
23492 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
23494 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
23495 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
23497 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
23498 we call unmanaged code which throws exceptions.
23500 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
23502 * appdomain.h: added per-domain entry_assembly.
23503 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
23505 * icall.c: Assembly::GetEntryAssembly icall.
23506 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
23507 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
23509 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
23511 * appdomain.h, gc.c: added mono_domain_finalize ().
23513 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23516 (mono_print_unhandled_exception): changed g_warning by g_printerr
23517 because g_log has a 1024 characters limit (yeah, i got a big stack
23518 trace). Don't print exception name, that should be in ToString
23521 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23523 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
23524 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
23526 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23529 (mono_print_unhandled_exception): after previous commit, i realized
23530 that MS calls ToString on the exception. I changed this function to
23531 do that. This way we get stack_trace for free.
23533 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23536 (mono_print_unhandled_exception): invoke Message property instead of
23537 getting 'message' field from Exception. Don't allocate memory for
23538 'trace' and 'message' if not needed.
23540 2002-08-18 Dick Porter <dick@ximian.com>
23542 * unicode.c: Fix asserts to match Encoder.cs checks
23544 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
23546 * marshal.c: fix unaligned store issue and a few wrong
23547 opcode argument types.
23549 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23551 * icall.c: added GetUninitializedObjectInternal internal call.
23553 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
23555 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
23556 to the right domain.
23558 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
23560 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
23562 * class.c (class_compute_field_layout): set blittable to false for Strings
23564 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
23566 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
23568 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
23569 first chunk of code to create types at runtime. Code to
23570 handle ReflectedType/DeclaringType. Make reflection handles
23573 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
23575 * class.c: set correct name in arrays.
23577 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
23579 * appdomain.c (mono_domain_transfer_object): make it work with
23580 valuetypes. bug fixes.
23582 2002-08-12 Dick Porter <dick@ximian.com>
23584 * object.h: Rename some parameters to avoid c++ keywords (Patch
23585 from Joseph Wenninger <kde@jowenn.at>)
23587 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
23589 * icall.c: added icall to implement Assembly.GetFile*.
23591 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
23593 * reflection.h, reflection.c: code to embed managed resources.
23595 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
23597 * class.c: move all the type size stuff into
23598 class_compute_field_layout().
23600 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
23602 * class.c: ensure enums have always the correct instance size.
23603 * unicode.c: remove wrong assert.
23605 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
23607 * assembly.c: fix mem corruption issue.
23608 * image.h, image.c: added mono_image_get_resource () to access
23610 * icall.c: implemented Assembly.EntryPoint property and some
23611 Managed Resources related internalcalls.
23614 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
23616 * image.c, image.h: impemented mono_image_get_entry_point ().
23617 * appdomain.c: use mono_image_get_entry_point.
23619 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
23621 * reflection.c: support the object type argument when loading
23624 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
23626 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
23627 String as return type.
23629 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
23631 * reflection.c: fix encoding of named args for custom attrs to match
23632 the ms implementation. Read them back when instantiating custom
23635 2002-08-02 Radek Doulik <rodo@ximian.com>
23637 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
23638 by Dietmar as quick fix
23639 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
23640 16 as stack size, used on more places as quick fix before Dietmar
23641 will fix it properly
23643 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
23645 * object.h, object.c: added accessors for fields and properties.
23647 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
23649 * class.c, class.h: made mono_class_get_field_from_name ()
23650 loop on parent types.
23651 Added mono_class_get_property_from_name ().
23653 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
23655 * class.c, class.h: move the code to setup the type vtable in its own
23656 function so that it can be reused also for types created at runtime.
23657 Eliminate the "class" identifier from the header file.
23658 * reflection.c: setup the vtable for enums so that we can create
23659 objects for use in SetConstant ().
23661 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
23663 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
23664 instead of the delegate itself as this pointer (bug #28383)
23666 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
23668 * marshal.c (mono_marshal_get_managed_wrapper): added return type
23671 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
23673 * loader.c: don't set the pinvoke bit on icalls.
23675 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
23677 * debug-helpers.c (mono_method_full_name): only print a number to
23678 indicate wrapper type (so that the output is more readable in traces).
23680 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
23682 * class.c (mono_class_init): include method override patch from Paolo
23684 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
23686 * icall.c: fixed GetTypeCode().
23688 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
23690 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
23691 use real delegate invoke function to make it work with multicast
23692 delegates (fix bug# 28291).
23694 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
23696 * object.c: load constant strings.
23698 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
23700 * reflection.c: no magic numbers.
23701 * tabledefs.h: security action enum.
23703 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
23705 * assembly.c: fix possible memory corruption.
23707 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
23709 * reflection.h, reflection.c: added support for linking resources.
23710 * verify.c: check we have an updated corlib.
23712 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
23714 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
23716 (mono_marshal_string_array): null terminate unmanaged string arrays.
23717 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
23719 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
23721 * icall.c: Type.GetType () can now return also types from the
23724 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
23726 * loader.h, loader.c: stack walking support.
23727 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
23728 GetCallingAssembly.
23730 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
23732 * marshal.c: added optimisations for blittable types
23734 * class.c (mono_array_class_get): do not set blittable attribute on arrays
23735 (mono_class_setup_mono_type): set blittable attribute for single
23738 * marshal.c (mono_string_utf8_to_builder): impl.
23739 (mono_string_builder_to_utf8): impl.
23740 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
23742 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
23744 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
23745 (mono_marshal_get_managed_wrapper): impl. byref types
23747 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23750 (search_method): don't display debug message.
23752 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
23754 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
23756 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
23758 * appdomain.c: set the missing filename when throwing exception.
23760 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
23762 * metadata.c (mono_type_size): code cleanup
23763 (mono_type_stack_size): removed some test code
23765 2002-07-21 Miguel de Icaza <miguel@ximian.com>
23767 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
23768 mono_get_exception_file_not_found now.
23770 * exception.c (mono_exception_from_name_two_strings): New version
23771 that will call a constructor with two string arguments.
23772 (mono_get_exception_file_not_found): New helper routine, used to
23773 report file-not-found errors.
23775 2002-07-20 Dick Porter <dick@ximian.com>
23778 * process.c: Pass file handles to CreateProcess
23782 * file-io.c: Implemented CreatePipe
23784 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
23786 * metadata.c (mono_get_param_info): set alignment for value types
23788 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
23790 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
23791 Constify mono_domain_assembly_open().
23792 * loader.c: handle null namespace in icalls.
23794 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
23796 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
23797 (emit_str_to_ptr_conv): marshal object as structs
23799 * metadata.c (mono_type_to_unmanaged): marshal object as structs
23801 * marshal.c (mono_marshal_get_runtime_invoke): support value types
23803 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
23805 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
23806 (mono_marshal_get_native_wrapper): we an now return value types
23808 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
23810 * verify.c: more checks implemented.
23812 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
23814 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
23816 (mono_marshal_get_native_wrapper): allow byref arguments
23817 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
23818 impl. PtrToStringXXX methods
23819 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
23820 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
23821 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
23822 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
23823 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
23825 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
23827 * reflection.c: fix buglet in parsing an assembly name.
23829 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
23831 * marshal.c (emit_ptr_to_str_conv): first impl.
23833 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
23835 * object.c, class.h: cache the vtable in the class as suggested by
23836 vargaz@freemail.hu (Zoltan Varga).
23838 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
23840 * class.h, loader.c: added mono_field_from_token().
23841 * verify.c: first cut of type checking code.
23843 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
23845 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
23847 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
23849 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
23851 (mono_marshal_get_remoting_invoke): impl.
23852 (mono_delegate_begin_invoke): impl.
23853 (mono_mb_emit_save_args): impl.
23854 (mono_delegate_end_invoke): impl.
23855 (mono_marshal_get_delegate_begin_invoke):
23856 (mono_marshal_get_delegate_end_invoke):
23857 (mono_marshal_get_delegate_invoke): generate a special name for
23858 those methods (including the signature) and associate them whith
23859 the delegate class.
23861 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
23864 (mono_reflection_type_from_name): now it has a MonoImage parameter
23865 which is used as the default image to search the type in. If the image
23866 is NULL or getting the type from it fails, it defaults to corlib.
23868 * icall.c: changed 1 call to mono_reflection_type_from_name to match
23871 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
23873 * reflection.c: update the parameter table index.
23875 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
23877 * domain.c: don't include the mark byte in the string hash.
23879 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
23881 * icall.cs: icall for Type.GetTypeCode ().
23882 * verify: a couple of fixes and disabled local initialization checks.
23884 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
23886 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
23888 * debug-helpers.c (mono_method_full_name): print the type of the
23891 * metadata.c (mono_signature_hash): a hash function for signatures
23892 (mono_signature_hash): better hash algorithm
23894 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
23896 * debug-helpers.c (mono_method_full_name): this can now generate
23897 method names with signatures
23899 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
23900 method dont have this pointers.
23902 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
23904 * reflection.c: fixup typebuilder tokens.
23905 * image.c: fix buglet.
23906 * marshal.h: remove whitespace.
23907 * metadata.h, metadata.c: reinstate code that was removed.
23908 * verify.c: handle catch directives and fix another couple of bugs.
23910 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
23912 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
23913 (mono_marshal_get_native_wrapper): make it comp. with the old code
23914 (mono_marshal_get_native_wrapper): support boolean
23915 (mono_marshal_get_managed_wrapper): support more types
23917 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
23919 * class.c (class_compute_field_layout): compute class->blittable attribute.
23921 2002-07-09 Dick Porter <dick@ximian.com>
23923 * threads.c: Make the thread cleaning up cope with threads that
23926 2002-07-08 Radek Doulik <rodo@ximian.com>
23928 * reflection.c (method_encode_code): use non-translated values to
23929 compute finally_start, this fixes exception handling on ppc, yay!
23931 * decimal.h (struct signscale): fix endianess
23933 2002-07-07 Radek Doulik <rodo@ximian.com>
23935 * reflection.c: swap box_val and not val
23937 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
23939 * reflection.c, reflection.h: handle full assembly info in type name.
23940 Handle Type arguments when loading custom attributes.
23941 * icall.c: updated to use new mono_reflection_type_from_name () method.
23943 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23946 (method_from_memberref): also print assembly name when method not found.
23948 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23951 (ves_icall_TypeGetProperties): fixed bug #27473.
23953 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23955 * reflection.c: display image name and token when cannot find the
23956 .ctor for an attribute.
23958 2002-07-05 Martin Baulig <martin@gnome.org>
23960 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
23962 2002-07-04 Dick Porter <dick@ximian.com>
23964 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
23965 compile on mingw. This will cause mingw builds to not wait for
23966 subthreads to terminate after the main thread does. I've lodged a
23967 bug with the mingw developers for them to wrap OpenThread().
23969 2002-07-03 Dick Porter <dick@ximian.com>
23971 * threads.c: Store thread IDs instead of handles, because
23972 GetCurrentThread() returns a pseudohandle and therefore stores
23973 useless values. mono_thread_cleanup() continues checking the
23974 array of threads until it is empty, to cope with subthreads
23975 spawning new threads after the main thread has finished.
23979 * profiler-private.h: Pass the thread ID to thread profiler
23980 functions, instead of a handle
23982 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
23984 * verify.c: fixes to make it more usable.
23985 * pedump.c: added --verify code to verify IL code in an assembly.
23987 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
23989 * reflection.c: turn errors into warnings to allow compiling corlib.
23991 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
23993 * reflection.c: add special cases to compile corlib.
23995 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
23997 * reflection.c: handle properties with only a set method.
23999 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
24001 * opcodes.h: add enum with opcodes in opval order.
24003 2002-07-01 Dick Porter <dick@ximian.com>
24006 * object.c (mono_runtime_run_main): Removed unneeded argument
24008 2002-06-28 Martin Baulig <martin@gnome.org>
24010 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
24012 2002-06-27 Dick Porter <dick@ximian.com>
24014 * threads.c: Store the handle in both the parent thread and in the
24015 subthread, to minimise the time between starting a new thread and
24018 2002-06-26 Dick Porter <dick@ximian.com>
24020 * appdomain.c (mono_runtime_cleanup): Close the socket library
24021 after all the threads have finished, not before
24023 2002-06-26 Martin Baulig <martin@gnome.org>
24025 * debug-symfile.c (mono_debug_find_source_location): Added
24026 `guint32 *line_number' argument. If it's not NULL, store the line number
24027 there and return the file name without the line number.
24029 2002-06-25 Dick Porter <dick@ximian.com>
24033 * process.c: Process forking and other support functions
24035 2002-06-25 Dick Porter <dick@ximian.com>
24037 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
24038 things dont happen when the image is closed.
24039 (mono_image_lookup_resource): Walk the resource section looking
24040 for a particular entry
24042 * cil-coff.h: PE resource section decoding
24044 2002-06-25 Dick Porter <dick@ximian.com>
24048 (mono_assembly_foreach): Accessor functions to walk the list of
24050 (mono_assembly_set_main):
24051 (mono_assembly_get_main): Process methods need to know which
24052 assembly is the "main" one
24054 * object.c (mono_runtime_run_main): Record the main assembly
24056 * debug-helpers.c: Fix typo
24058 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
24060 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
24061 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
24063 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
24065 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
24067 2002-06-21 Miguel de Icaza <miguel@ximian.com>
24069 * image.c (do_mono_image_open): Initialize reference count,
24070 otherwise we leak the MonoImage.
24072 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
24074 * reflection.c: small tweak to handle self-hosting.
24076 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
24078 * reflection.c: fix type name parse code.
24080 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
24082 * reflection.c: break out of the loop.
24083 * image.c: special case corlib.
24085 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
24087 * reflection.c: add all the custom attrs at the end to ensure the
24088 ctors have been properly initialized when the attributes are defined
24089 in the current assembly.
24091 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
24093 * reflection.c: handle correctly multiple-nested types.
24095 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
24097 * row-indexes.h: fix typos.
24098 * reflection.c: adjust for typos and fix method_def_or_ref
24099 encoding in MethodImpl table.
24101 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
24103 * reflection.c: fix entry point patching (thanks Serge!).
24105 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
24107 * verify.c: add check for System.Exception
24109 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
24111 * image.c, class.c: minifix for code just c&p'ed.
24112 * reflection.c: warning fix.
24113 * object.h, loader.h, domain.c: load also StringBuilder.
24115 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
24117 * marshal.h, marshal.c: some support code to handle complex marshaling.
24119 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24121 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
24122 Better signatures with vtable error dump.
24124 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
24126 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
24128 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
24130 * icall.c (ves_icall_Type_GetField): impl.
24132 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24134 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
24135 to retrieve a marshal description blob for a field or param.
24137 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
24139 * reflection.h, reflection.c: change order of nested type emission
24140 to avoid table corruption. The NestedTypes table is sorted.
24141 * icall.c: change order of GetConstructor results to workaround mcs bug.
24143 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
24145 * reflection.h, reflection.c: handle field and param marshal
24148 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
24150 * icall.c, marshal.c marshal.h: more Marshal class implementation.
24152 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
24154 * reflection.c: fix call convention.
24156 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
24158 * reflection.h, reflection.c: mono_image_get_memberref_token()
24159 takes a type instead of a class, now. Added
24160 mono_image_get_array_token() to create tokens for the special
24161 multi-dim array methods.
24163 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
24165 * assembly.c: handle modules (no assembly table). Split
24166 loading references in its own function.
24167 * class.c: handle moduleref resolution scope.
24168 * image.c, image.h: cache module name in image.
24170 2002-06-07 Martin Baulig <martin@gnome.org>
24172 * reflection.c (mono_image_get_type_info): Only add a class layout entry
24173 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
24175 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
24177 * icall.c: more signature fixes that used uint instead of int.
24179 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24181 * reflection.c: fixed signature of field refs.
24183 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
24185 * class.c, reflection.c: handle typerefs of nested types
24186 (both on read and when writing files).
24188 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
24190 * icall.c: fix method signatures that tried to workaround the previous
24193 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
24195 * debug-helpers.c: fix typo.
24197 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
24199 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
24200 rewrote the PE/COFF writing code (our programs are understood by the
24203 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
24205 * gc.c, gc.h, icall.c: weakreference support.
24207 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
24209 * Makefile.am, mono-config.c: use $(sysconfdir).
24211 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
24213 * icall.c: changed default precision of Double.ToString() to 15.
24214 Fixed memory leak. Unified with Single.ToString.
24216 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
24218 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
24220 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
24222 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
24223 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
24224 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
24227 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
24229 * debug-symfile.c, sysmath.c: yet more compilation fixes.
24231 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24233 * reflection.c, socket-io.c: more compilation fixes.
24235 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
24237 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
24238 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
24239 unicode.c: warning and compiler compatibility fixes.
24241 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
24243 * class.h, metadata.c: fixed warnings/compilation errors.
24245 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
24247 * Makefile.am, mono-config.c, mono-config.h: configuration file
24249 * loader.c, loader.h: make Dll mapping configurable at runtime in the
24250 config file. Export methods to insert and lookup mappings.
24252 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
24254 * reflection.c: handle types and boxed objects in custom attr
24257 2002-05-30 Martin Baulig <martin@gnome.org>
24260 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
24262 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
24264 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
24265 to lookup the implmap row for a P/Invoke method.
24266 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
24267 P/Invoke method from the runtime on an as needed basis.
24269 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
24271 * metadata.c (mono_metadata_parse_signature): impl.
24273 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
24275 * class.c: handle .pack directive.
24277 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
24279 * object.c: initialize static fields with RVA data.
24281 2002-05-25 Martin Baulig <martin@gnome.org>
24284 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
24286 2002-05-24 Martin Baulig <martin@gnome.org>
24289 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
24290 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
24291 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
24293 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
24295 * object.c: special case string ctros in invoke.
24296 * gc.c: silly whitespace changes.
24298 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
24300 * threadpool.[ch]: impl. a threadpool that can
24301 be used by mint and mono.
24303 2002-05-22 Martin Baulig <martin@gnome.org>
24305 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
24306 The first argument is now a `MonoReflectionModuleBuilder *', the return
24307 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
24308 `methods' field to get the method builder. The `token' argument is the
24311 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
24312 invalid characters instead of g_assert_not_reached()ing. This seems
24313 to be the behaviour of mscorlib.
24315 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
24317 * object.c (mono_runtime_invoke_array): applied patch from Rachel
24318 Hestilow to fix bug #25104
24320 2002-05-21 Martin Baulig <martin@gnome.org>
24322 * debug-symfile.c (mono_debug_find_source_location): New function.
24323 Looks up an IL offset in the line number table and returns the source
24324 location as a string.
24326 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24329 (mono_double_ToStringImpl): changed %f by %g until we have something
24332 2002-05-21 Nick Drochak <ndrochak@gol.com>
24334 * icall.c : Use different name for Math.Pow's icall. Needed to check
24335 parameters first in C#.
24337 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
24339 * icall.c, reflection.h: added icall to get info about an event.
24341 2002-05-20 Radek Doulik <rodo@ximian.com>
24343 * object.c (mono_value_box): don't use memcpy for boxing on BIG
24345 (mono_value_box): don't use memcpy for small sizes on
24346 architectures with unaligned access
24348 2002-05-20 Martin Baulig <martin@gnome.org>
24350 * reflection.c (mono_reflection_setup_internal_class): Don't crash
24351 if `tb->parent == NULL'.
24352 (mono_reflection_create_internal_class): New function. This is
24353 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
24356 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
24359 2002-05-19 Martin Baulig <martin@gnome.org>
24361 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
24362 argument to get the length, don't default to the array length.
24364 2002-05-18 Miguel de Icaza <miguel@ximian.com>
24366 * assembly.c (mono_assembly_setrootdir): New function used to
24367 override the MONO_ASSEMBLIES directory.
24369 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
24371 * icall.c: ValueType_GetHashCode() initialize local var.
24373 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
24375 * reflection.c: sort custom attributes table.
24377 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
24379 * reflection.c: support named args in custom attributes (write support).
24381 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
24383 * reflection.c: fix finally position calculation.
24385 2002-05-15 Radek Doulik <rodo@ximian.com>
24387 * reflection.c: fixed endianess at many places
24389 * icall.c (ves_icall_InitializeArray): comment out debug msg
24391 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
24393 * object.c (mono_unhandled_exception): new function to handle
24394 unhandled exceptions.
24395 (mono_unhandled_exception): call the UnhandledException event.
24396 (mono_runtime_delegate_invoke): impl.
24398 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
24400 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
24401 returns the RVA, not the direct pointer to the data. Handle the case
24402 when the class size is fixed.
24404 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
24406 * reflection.c: fix some endianess issues.
24408 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
24410 * object.c (mono_runtime_invoke): is now able to catch exceptions.
24412 * threads.c (mono_thread_init): added a callback which is invoked
24415 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
24417 * icall.c: make GetHashCode return non-negative values.
24419 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
24421 * object.c, icall.c, gc.c: revert to address-based hashcode.
24423 2002-05-13 Miguel de Icaza <miguel@ximian.com>
24425 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
24427 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
24429 * icall.c, class.c: special case <Module>.
24431 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
24433 * icall.c: fix bug in GetNow().
24435 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
24437 * object.c (mono_runtime_class_init): make sure that we call all
24438 static class constructors.
24440 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
24442 * reflection.c: sort methodsemantics table.
24444 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
24446 * reflection.h, reflection.c: honour init locals setting.
24448 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
24450 * icall.c: copied Double ToStringImpl for Single ToStringImpl
24452 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
24454 * reflection.c: support ContructorBuilders in attribute blob creation.
24456 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
24458 * reflection.c: some changes to build a binary that can be run
24459 directly in windows.
24461 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
24463 * loader.c: print a big message when an icall can't be found.
24465 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24467 * string-icalls.c: fix bug 24248.
24469 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
24471 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
24472 icall.c, reflection.h: separate assembly loading by pathname and by
24473 assembly name. Use the MONO_PATH env var to search for assemblies.
24475 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
24477 * assembly.c, image.h: add some support for assemblies
24478 with multiple modules.
24479 * class.c, class.h: export mono_class_from_typeref().
24480 * loader.c: remove duplicated code and use mono_class_from_typeref(),
24483 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
24485 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
24486 documentation says (the ECMA one is correct).
24488 2002-05-02 Dick Porter <dick@ximian.com>
24490 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
24491 Don't name the synchronisation mutex.
24493 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
24496 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
24497 Make the prototypes match.
24498 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
24502 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
24503 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
24504 all systems have tm.tm_zone, so use strftime() with %Z to print
24505 the timezone abreviation into a temp string.
24507 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
24508 rather than mono_array_addr() on a MonoString on Big Endian
24511 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
24513 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
24516 2002-04-30 Dick Porter <dick@ximian.com>
24518 * socket-io.c: Cope with SOCKET being an integer rather than a
24521 * threads.c: Added Thread_free_internal, to deal with thread
24522 handle cleanup. Moved calls to handle_store() and handle_remove()
24523 to start_wrapper(), so each can only be called once. Allocate
24524 synchronisation blocks with GC_malloc(), and use GC finalisation
24525 to close the handles.
24527 * icall.c: added System.Threading.Thread::Thread_free_internal
24529 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
24531 * icall.c: support Environment.Exit, CommandLineArgs().
24533 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
24535 * object.c, object.h: added mono_runtime_run_main () and
24536 mono_runtime_get_main_args () for use in System.Environment.
24538 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
24540 * gc.c: fix thinko, enable actual finalization since the jit is now
24543 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
24545 * gc.c, object.c: take into account that an object may be offset wrt the address
24546 returned by GC_malloc().
24548 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
24550 * image.c: handle files without entries in the assembly table (modules).
24552 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
24554 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
24555 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
24556 allowed to be null when it's System.Object class setup.
24558 2002-04-27 Martin Baulig <martin@gnome.org>
24560 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
24561 if `tb->parent == NULL' rather than crashing.
24563 2002-04-28 Nick Drochak <ndrochak@gol.com>
24565 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
24566 calling acos() where asin() should have been called.
24568 2002-04-26 Martin Baulig <martin@gnome.org>
24570 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
24571 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
24572 there's a subdirectory called `System', but we don't want to read that
24573 subdirectory as an assembly.
24575 2002-04-25 Martin Baulig <martin@gnome.org>
24577 * debug-symfile.c: Reflect latest MonoString changes.
24579 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
24581 * rand.c, rand.h: instance method icalls need to have an explicit
24582 this pointer as first argument in the C implementation.
24584 2002-04-25 Nick Drochak <ndrochak@gol.com>
24586 * icall.c: Fix typo in map for GetNonZeroBytes
24588 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
24590 * string-icalls.c : String does now passes unit tests without any
24591 errors, the following changes has been made:
24593 Implemented replace methods.
24594 Renaming of methods to (try) follow the standard.
24595 Fixed compare ordinal
24596 Made all memory allocated directly to function instead of via icall function.
24597 Small performance fix in is_in_array function
24599 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
24601 c (mono_string_Internal_ctor_charp_int_int):
24602 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
24603 sindex < 0, throw ArgumentOutOfRangeException instead of
24604 ArgumentNullException.
24606 Added new check for length == 0, however
24607 I need to make it return String.Empty from the C code.
24609 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
24610 that calculate the length for us here.
24612 (mono_string_Internal_ctor_sbytep_int_int): Replaced
24613 mono_string_new_utf16 with mono_string_new, since value is utf8.
24615 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
24617 * object.c: register the object for finalization if needed.
24618 Allocate one more char in the string for the terminating 0 char.
24620 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
24622 * class.c, class.h, image.c: check if a type implemenst a destructor.
24623 Use the proper key for array class lookups.
24624 * icall.c: register the icalls in the System.GC class.
24625 * gc.c, gc.h: GC-related functions and icalls.
24627 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24631 * unicode.c: free some strings gotten from mono_string_to_utf8 and
24632 changed a couple of free () by g_free ().
24634 * decimal.c: one-liner in the comments for decimal2string ().
24636 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
24638 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
24640 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
24642 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
24643 * object.c (mono_runtime_invoke_array) : handle null in params
24645 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
24647 * string-icalls.c: fixed bug in split (one off bug)
24649 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
24651 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
24652 * icalls.c: added String::Equals as internal method
24654 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
24656 * threads.c: fixed bug in the double interlocked functions
24658 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
24660 * threads.c: implemented all of the new interlocked icalls.
24661 * string-icalls.c: fix a bug in insert.
24662 * icalls.c: added the icalls for interlocked, removed old string functions.
24664 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
24666 * loader.c: fix off-by-one error when reading argument names.
24668 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
24670 * profiler.c: win32 counter implementation (untested).
24671 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
24672 (the latter needs testing and more complete impl. from win32 folks).
24674 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
24676 * object.c: mono_array_new_full workaround mono_array_class_get
24679 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
24681 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
24682 * object.h (mono_string_chars): Changed casting type.
24684 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
24686 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
24687 method signatures to use gunichar2 instead of gint16.
24689 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
24691 * object.h, object.c: domain-specific versions of mono_object_new and
24694 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
24696 * object.c: changed String layout
24698 * string-icalls.c (mono_string_Internal_ctor_chara): added
24699 internal string constructors.
24701 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
24703 * threads.c: pass 'this' to the thread start routine.
24705 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24707 * string-icalls.c: fix IndexOf and LastIndexOf. Now
24708 InternalCompareStr don't call twice mono_string_cmp_char for the last
24709 character. Improved performance in mono_string_cmp_char.
24711 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
24713 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
24714 code into its own library: libmonoruntime.
24716 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
24718 * object.h, object.c: changed array format so that szarrays do not
24719 require a bounds structure.
24720 * icall.c, appdomain.c: support for new szarray format.
24722 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
24724 * metadata.c: compare also the retuns type when comparing signatures:
24725 we didn't do this as an optimization since really overloaded methods
24726 must differ also in the arguments, but this doesn't work with
24727 low-level IL code (or when using explicit conversion operators: see
24728 bug#23498 for an example).
24730 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
24732 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
24734 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
24736 * icall.c: make MonoType::GetElementType its own icall.
24738 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
24740 * icall.c: remove MonoMethod_get_Name().
24741 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
24744 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
24746 * string-icalls.c: optimized a few methods.
24748 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
24750 * icall.c: added all new string internal calls
24751 * string-icalls.c: added, new string internal call implementation.
24752 * object.c: added mono_string_new_size for allocating a string a size
24754 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
24756 * object.c (mono_object_isinst): use the same code as in the
24757 optimized x86 version.
24759 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
24761 * profiler.c: TSC-based timer code (faster and more accurate).
24762 Not hooked up in configure, yet (set USE_X86TSC to 1).
24764 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
24766 * profiler.c, profiler.h: track time spent compiling methods.
24767 * threads.c: track thread creation/destruction.
24769 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
24771 * profiler.c, profiler.h, profiler-private.h: profiling interface
24772 and sample implementation. Moved here so that it can be used also by
24775 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
24777 * reflection.c, reflection.h: keep types and other handles separate in
24778 the hash tables for referred tokens. Add guid for modules.
24780 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
24782 * assembly.c: fix bugs found with valgrind.
24783 * metadata.h, metadata.c: added mono_metadata_guid_heap().
24785 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
24787 * threads: added icall support for getting current domain for
24790 2002-04-13 Martin Baulig <martin@gnome.org>
24792 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
24793 (MonoDebugVarInfo): Added `index' field for register based addresses.
24794 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
24795 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
24796 `MonoDebugVarInfo *params' and `guint32 this_offset' with
24797 `MonoDebugVarInfo *this_var'.
24799 * debug-symfile.c (relocate_variable): New static function to write
24800 a location description for a local variable or method parameter.
24802 2002-04-12 Martin Baulig <martin@gnome.org>
24804 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
24805 stack offset and begin/end scope address of a local variable.
24806 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
24807 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
24808 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
24810 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
24811 Added new relocation types for start/end scope of a local variable.
24813 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
24815 * object.h: add mono_object_domain() macro.
24816 * reflection.c: handle typespecs.
24817 * icall.c: MonoMethod::get_Name() implementation.
24819 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
24821 * icall.c: String::GetHashCode() icall implementation.
24823 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24825 * icall.c: String::IndexOfAny icall.
24826 * object.c, object.h: make array->max_length more useful.
24827 Intrduced mono_object_class() and mono_string_length() macros.
24829 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24831 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
24832 instead of g_unichar_isdigit.
24834 2002-04-11 Nick Drochak <ndrochak@gol.com>
24836 * icall.c: Implement a simple Double.ToString().
24838 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
24840 * appdomain.h: only io-layer.h is supposed to be included.
24841 * icall.c: explicitly import environ. Fix warning.
24843 2002-04-10 Nick Drochak <ndrochak@gol.com>
24845 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
24846 return true even if it's not Daylight Savings time.
24847 Only return false for the case where the function isn't
24848 implemented for a plaform (read Windows).
24850 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24852 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
24855 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
24857 * mempool.c (mono_mempool_alloc): only use g_malloc when
24858 absolutely necessary.
24860 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
24862 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
24864 * class.c (mono_class_vtable): use domain mempool to allocate vtable
24865 (mono_class_proxy_vtable): use domain mempool
24867 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
24869 * appdomain.h, appdomain.c: split initialization that requires the
24870 execution engine support into mono_runtime_init().
24872 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
24874 * class.c (mono_class_init): don't include vtable inside MonoClass
24875 to save some memory, gather some statistics.
24876 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
24878 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
24880 * icall.c: internalcall implementation for ValueType.Equals().
24882 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
24884 * object.c (mono_message_init): moved
24885 (mono_runtime_exec_main): new arch. independent impl.
24886 (mono_runtime_invoke_array): new method - like
24887 mono_runtime_invoke, but you can pass an array of objects.
24888 (mono_remoting_invoke): new arch. independent impl.
24889 (mono_message_invoke): new arch. independent impl.
24890 (mono_runtime_class_init): new arch. independent impl.
24891 (mono_runtime_object_init): new arch. independent impl.
24893 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
24895 * metadata.c, object.c, reflection.c: documented the exported
24898 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
24900 * icall.c: simpler code to pass the assembly builder data to corlib.
24901 Implement GetNestedTypes() internalcall.
24903 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
24905 * class.c: warn if a type can't be loaded.
24907 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
24909 * image.h: typedef MonoImageOpenStatus
24910 * types.h: removed unused file
24912 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
24914 * icall.c: Enum_ToObject accepts enum value arguments.
24916 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
24918 * class.c: move initialization of properties, events and nested
24919 classes, so that they happen for interfaces, too.
24921 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
24923 * icall.c: cleanup some ugly casts in Array_SetValue*.
24925 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
24927 * icall.c: the values array fro enums is of the correct type, now.
24928 Implement (correctly) getFullName instead of assQualifiedName for
24930 * reflection.h, reflection.c: added mono_type_get_name ().
24932 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
24934 * assembly.c, image.h: for each MonoImage, record from wich assembly
24936 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
24937 Make Type.Assembly work.
24939 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
24941 * debug-symfile.h: use char* instead of gpointer to avoid
24944 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
24946 * icall.c (ves_icall_InternalExecute): impl. FielSetter
24947 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
24949 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
24951 * icall.c (mono_message_init): impl. (code cleanup)
24952 (ves_icall_InternalExecute): impl. FieldGetter
24954 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
24955 defined we call all (non-static)methods through the vtable.
24957 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
24959 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
24960 finalizer even though the memory is still referenced (and the chunk of
24961 memory is not freed).
24963 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
24965 * assembly.c: fix brokeness.
24967 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
24969 * class.c: kill some warnings. Check explicit interface method
24970 implementation also without considering the namespace.
24971 Load also literal strings in static class data.
24973 2002-03-29 Miguel de Icaza <miguel@ximian.com>
24975 * assembly.c (default_assembly_name_resolver): Kill memory leak.
24976 (default_assembly_name_resolver): Make the resolver take the
24977 "base" directory where the assembly was originally defined, so we
24978 can load DLLs that are in the same directory as the assembly that
24979 is being referenced.
24981 2002-03-28 Dick Porter <dick@ximian.com>
24987 * unicode.c: Warning cleanups
24989 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
24991 * object.h, reflection.h: use the correct type instead of MonoObject.
24993 2002-03-28 Martin Baulig <martin@gnome.org>
24995 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
24996 (mono_debug_update_symbol_file): Initialize classes if necessary.
24998 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
25000 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
25001 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
25003 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
25005 * assembly.h: fix function prototype.
25006 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
25007 * mono-endian.h: use const cast.
25009 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
25011 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
25013 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
25015 * loader.c: don't assert when a typeref can't be loaded, give
25016 a chance to the runtime to trow an exception instead.
25017 * loader.h: fix warning.
25019 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
25021 * class.c (mono_class_proxy_vtable): added proxy support
25023 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
25025 * icall.c: removed last of PAL calls, added System.Environment
25026 * file-io.h, file-io.c: MonoIO implementation
25027 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
25029 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
25031 * appdomain.c: do not use the byte marker in ldstr table lookup.
25032 * debug-helpers.c: allow two ':' to separate class and method name.
25033 * object.c: allocate arrays bounds with the GC, too.
25034 * verify: add a few more checks.
25036 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
25038 * reflection.c: output also literal strings. Allocate parameter data
25039 with GC_malloc() (thanks, Martin, for catching this!).
25041 2002-03-26 Martin Baulig <martin@gnome.org>
25043 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
25044 include the `this' offset in the `param_offsets'.
25046 2002-03-25 Martin Baulig <martin@gnome.org>
25048 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
25049 mono_debug_get_class() function to get the classes. Added new
25050 relocation types for arrays and strings.
25051 (mono_debug_get_class): New static function to search in all
25052 referenced assemblies for a metadata token.
25054 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
25056 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
25058 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
25059 hold gc-allocated objects. Make the string heap a stream like the
25060 others. Removed duplicated code when writing stream info.
25061 Added asserts to catch possible buffer overflows. Set the sorted map
25062 for tables that need sorting. Added some documentation.
25064 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
25066 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
25067 for interned strings and vtables.
25069 2002-03-24 Martin Baulig <martin@gnome.org>
25071 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
25072 it in the array since it was created with g_slist_prepend().
25074 2002-03-24 Martin Baulig <martin@gnome.org>
25076 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
25077 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
25078 (mono_debug_method_from_token): Renamed to
25079 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
25080 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
25082 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
25085 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
25087 2002-03-24 Martin Baulig <martin@gnome.org>
25089 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
25090 (mono_debug_method_from_token): New func.
25092 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
25093 New interncall, calls mono_debug_local_type_from_signature().
25094 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
25095 calls mono_debug_method_from_token().
25097 2002-03-23 Martin Baulig <martin@gnome.org>
25099 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
25100 specifies the number of bytes to be converted, not the array size.
25101 Return the number of chars, not the number of bytes.
25102 (ves_icall_iconv_get_chars): The `byteCount' argument
25103 specifies the number of bytes to be converted, not the array size.
25105 2002-03-23 Martin Baulig <martin@gnome.org>
25107 * reflection.h (MonoReflectionSigHelper): New type.
25109 * reflection.c (mono_reflection_sighelper_get_signature_local),
25110 (mono_reflection_sighelper_get_signature_local): New functions.
25112 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
25113 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
25116 2002-03-23 Martin Baulig <martin@gnome.org>
25118 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
25119 is_writeable is set.
25120 (mono_raw_buffer_update): New function to write the modified map
25123 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
25125 * debug-symfile.c (mono_debug_update_symbol_file): Call
25126 mono_raw_buffer_update() when done writing.
25128 2002-03-23 Martin Baulig <martin@gnome.org>
25130 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
25132 * debug-symfile.c: Added support for arguments and local variables.
25134 2002-03-23 Dick Porter <dick@ximian.com>
25136 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
25137 protected by ifdefs, hence breaking the w32 build.
25139 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
25141 * object.c: implement is_interned() the right way.
25143 2002-03-21 Martin Baulig <martin@gnome.org>
25145 * debug-symfile.[ch]: New files to handle debugging information
25146 files. There's also support to dynamically update these symbol
25147 files to include machine dependent information.
25149 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
25151 * threads.c (mono_thread_create): new function to create thread
25154 2002-03-20 Martin Baulig <martin@gnome.org>
25156 * icall.c (ves_icall_InternalInvoke): Create a new object if the
25157 method is a constructor.
25158 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
25159 points to ves_icall_InternalInvoke().
25161 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
25163 * file-io.c: Flush shouldn't throw exceptions.
25165 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
25167 * file-io.c: FileStream flush support; FileSetLength now
25168 restores file pointer.
25170 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
25172 * class.c: set image for pointer classes.
25174 2002/03/19 Nick Drochak <ndrochak@gol.com>
25176 * sysmath.c: Forgot one.
25178 2002-03-18 Miguel de Icaza <miguel@ximian.com>
25180 * sysmath.c: Avoid redefining existing names.
25182 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
25184 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
25185 handled by runtime as icall rather than dllimport from libm.so
25186 * file-io.c, file-io.h: fixed handle argument type.
25188 2002-03-18 Dick Porter <dick@ximian.com>
25190 * reflection.c (mono_image_get_type_info): rename interface to
25191 iface, because of "#define interface struct" on windows.
25193 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
25195 * class.c, class.h: rename and export mono_ptr_class_get().
25196 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
25197 * reflection.c, reflection.h, icall.c: better/saner type name
25198 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
25201 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
25203 * class.c (mono_class_init): removed hardcoded GHC_SLOT
25205 * icall.c (ves_icall_InternalInvoke): impl.
25207 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
25209 * reflection.c: output the interface map table, too.
25211 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
25213 * class.c (class_compute_field_layout): separate computation of
25214 static field layout
25216 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
25218 * icall.c: added System.Buffer support.
25219 * file-io.c: moved file icalls from PAL to FileStream.
25221 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
25223 * icall.c (ves_icall_System_Object_GetHashCode): impl.
25225 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
25227 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
25229 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
25231 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
25233 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
25235 * debug-helpers.{c,h}: moved here from monograph some useful functions
25236 to locate a method by name/signature in a class or image. Included
25237 also a small and flexible IL disassembler.
25239 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
25241 * reflection.c: fixup tokens in methods with small header size, too.
25243 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
25245 * object.c (mono_string_to_utf8): remove assert(!error), instead
25248 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
25250 * icall.c: update to the new mono_Array_class_get interface.
25252 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
25254 * appdomain.c, object.c: Boehm-GC enable.
25255 * icall.c: make get_data_chunk() support split data requests.
25256 Ensure a class is initialized in more cases. Return only the first
25257 property found in GetProperties() or the compiler gets confused.
25258 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
25259 * reflection.h, reflection.c: add fixup mechanism for field and method
25260 tokens. Initialize assembly->typeref in a single place. Output
25261 properties after events. Support custom attributes for events, too.
25262 Typo fix for paramter custom attrs.
25264 2002-03-07 Martin Baulig <martin@gnome.org>
25266 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
25268 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
25270 * class.c (mono_array_class_get): fix. for multi. dim. arrays
25272 2002-03-06 Martin Baulig <martin@gnome.org>
25274 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
25275 non-zero lower bounds. See testcases #F10-#F13.
25277 2002-03-05 Martin Baulig <martin@gnome.org>
25279 * exception.c (mono_get_exception_argument_out_of_range): New exception.
25281 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
25282 ves_icall_System_Array_GetValue(), only calculate the absolute array position
25284 (ves_icall_System_Array_SetValue): Likewise.
25285 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
25286 as argument and does the actual work. This function is used when copying a
25287 multi-dimensional array.
25288 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
25289 now do all the widening conversions of value types.
25290 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
25292 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
25294 * class.c: remove some magic numbers and use the smbolic names,
25295 instead. Added init_events() to load event info at class init time.
25296 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
25297 and mono_metadata_methods_from_event().
25298 * reflection.h, reflection.c: added support for writing out the evnets
25299 related information.
25301 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
25303 * reflection.h, icall.c: use a different method (GetInterfaces)
25304 to gather interface info and add isbyref, isprimitive and
25305 ispointer to the ves_icall_get_type_info() return value.
25307 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
25309 * class.h: stared adding support for events.
25310 * icall.c: split find_members implementation. Added debug icall to get
25311 the address of an object.
25312 * reflection.c: handle TypeBuilders in mono_type_get_object().
25314 2002-03-01 Martin Baulig <martin@gnome.org>
25316 * icall.c (ves_icall_System_Array_GetLength): This must throw an
25317 ArgumentOutOfRangeException(), not an ArgumentException().
25318 (ves_icall_System_Array_GetLowerBound): Likewise.
25319 (ves_icall_System_Array_GetValue): Improved argument checking.
25320 (ves_icall_System_Array_SetValue): Improved argument checking.
25322 2002-03-01 Martin Baulig <martin@gnome.org>
25324 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
25325 called with invalid arguments rather than just dying with g_assert().
25326 (ves_icall_System_Array_SetValue): Likewise.
25327 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
25328 raise a NotImplementedException instead.
25329 (ves_icall_System_Array_GetLength): Added argument checking.
25330 (ves_icall_System_Array_GetLowerBound): Added argument checking.
25332 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
25334 * object.h (mono_assert): new macros mono_assert and
25335 mono_assert_not_reached
25337 2002-02-28 Martin Baulig <martin@gnome.org>
25339 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
25340 and "System::String::IsInterned" to "System::String::_IsInterned".
25342 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
25344 * icall.c: remove hacks for typebuilder. Added icall to create a
25345 modified type from a tybebuilder.
25346 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
25347 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
25348 to create a backing MonoClass for a TypeBuilder.
25350 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
25352 * class.c, class.h: more refactoring of class init.
25353 Export mono_class_setup_mono_type() and mono_class_setup_parent().
25355 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
25357 * marshal.c, marshal.h: start of marshaling interface.
25359 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
25361 * icall.c: fix order in assembly qualified name icall.
25363 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
25365 * class.c: do not free str, since we store it in the hash table.
25366 * reflection.h: add label field to MonoILExceptionInfo.
25367 * reflection.c: handle references to more than one assembly. Handle
25368 case when there isn't a module created in the assembly.
25370 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
25372 * class.c: Fix typo. Start refactoring of class init code.
25374 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
25376 * appdomain.c: exit with 1 on error.
25377 * class.c: we already have the name in MonoClassField.
25378 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
25379 MonoStreamHeader instead of an offset of image->raw_metadata.
25381 2002-02-26 Miguel de Icaza <miguel@ximian.com>
25383 * appdomain.c (mono_init): Be even more descriptive about the error.
25385 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
25387 * appdomain.c: give the user an informative message when corlib can't
25390 2002-02-26 Martin Baulig <martin@gnome.org>
25392 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
25393 New icall to get the time zone data.
25395 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
25397 * reflection.c: set virtual and raw size of section correctly.
25398 * threads.c: transfer domain information to newly created threads.
25400 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
25402 * class.c: when instancing a class in a domain, load the default
25403 vaules for static fields from the constant table. Fix System.Enum to
25405 * icall.c: implement Object::GetType() internalcall. Implemented
25406 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
25407 Fixed checking of binding flags in find_members().
25408 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
25409 * reflection.c: handle enumerations when writing to the constant
25410 table. Use a different object cache for types.
25413 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
25415 * object.c (mono_object_isinst): fix for arrays
25417 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
25419 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
25421 * object.c: don't use mprotect () and fix intern pool hash table
25422 lookup for big endian systems.
25424 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
25426 * icall.c: change type_is_subtype_of () signature.
25428 2002-02-21 Mark Crichton <crichton@gimp.org>
25430 * rand.c, rand.h: Added random number generator for
25431 System.Security.Cryptography classes.
25433 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
25435 * icall.c: Added System.Security.Cryptography calls.
25437 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
25439 * class.c, icall.c, metadata.c: better support for pointer types.
25440 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
25441 * reflection.c: Add support for getting custom attrs for properties
25442 and simplify some code.
25444 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
25446 * icall.c: change getToken () and add custom attribute GetBlob()helper
25448 * reflection.h: add custom attrs array to the reflection builder structures.
25449 * reflection.c: encode and emit custom attributes for all the relevant
25450 reflection objects. Cache fieldref and methodref tokens. Change
25451 mono_image_create_token() interface to take a MonoDynamicAssembly.
25452 More complete custom attributes decoder. Load custom attributes for
25453 Assembly, Field, Method and Constructor objects, too. Make the
25454 returned array an Attribute[] one, not object[]. Added
25455 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
25456 custom attribute constructor.
25458 2002-02-20 Dick Porter <dick@ximian.com>
25462 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
25463 problem code out for now).
25465 2002-02-19 Radek Doulik <rodo@ximian.com>
25467 * object.c (mono_ldstr): use hash table to avoid multiple swapping
25469 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
25471 * icall.c: register the GetCustomAttributes method.
25472 * object.c, object.h: add mono_string_new_len ().
25473 * reflection.h, reflection.c: added mono_runtime_invoke(),
25474 mono_install_runtime_invoke(). Added
25475 mono_reflection_get_custom_attrs () to load custom attributes and
25476 create the attribute objects.
25478 2002-02-19 Dick Porter <dick@ximian.com>
25479 * threads-dummy-types.c:
25480 * threads-dummy-types.h:
25483 * threads-pthread-types.c:
25484 * threads-pthread-types.h:
25485 * threads-pthread.c:
25486 * threads-pthread.h: Deleted obsolete files
25488 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
25490 * class.c (mono_class_vtable): runtime init the class when we
25491 allocate static class data.
25493 * icall.c (ves_icall_System_Array_SetValue): check for null values.
25495 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
25496 and String - but we will need generic marshalling support in the
25498 (mono_init): set the domain name in a ms compatible way
25500 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
25503 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
25505 * object.c (mono_array_clone): use alloca() instead of g_malloc
25508 * appdomain.c (mono_domain_unload): impl.
25510 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
25512 * appdomain.c, object.c: fix intern pool implementation.
25513 * class.c: fix alignment code.
25515 2002-02-16 Radek Doulik <rodo@ximian.com>
25517 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
25518 and s2 > s1, just copy lower bytes to be compatible with little
25519 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
25520 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
25522 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
25523 force big_endian to be 1 for big endian machines
25524 (ves_icall_iconv_new_decoder): ditto
25526 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
25528 * socket-io.c (convert_sockopt_level_and_name): If the system
25529 doesn't define SOL_IP or SOL_TCP, get them by hand using
25530 getprotobyname() and caching the values (because this could be a
25532 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
25533 Use the appropriate struct when the system does support it. Ie,
25534 not all systems have struct ip_mreqn so use struct ip_mreq when
25537 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
25539 * reflection.c: handle finally clauses.
25541 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
25543 * socket-io.c: use g_snprintf() instead of snprintf.
25545 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
25547 * reflection.c (mono_param_get_objects): Cast second argument to
25548 mono_method_get_param_names to a const char** to silence the
25551 * appdomain.c (mono_domain_assembly_open): Put parens around the
25552 truth statement in the for-loop.
25554 * unicode.c (iconv_convert): Got rid of a compiler warning about
25555 int i being unused when the system has a new iconv.
25556 (iconv_get_length): Same.
25558 * image.c (load_class_names): Cast the second argument to
25559 g_hash_table_insert() to char* to hush compiler warnings about the
25561 (mono_image_open): Same here.
25563 * socket-io.c: Don't conditionally include sys/filio.h or
25564 sys/sockio.h here anymore since we now get them from
25565 io-layer/io-layer.h
25566 (inet_pton): If the system doesn't support inet_aton, implement
25567 using inet_addr and also #define INADDR_NONE if it isn't defined
25570 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
25572 * metadata.c, metadata.h: added function to get packing and size info
25574 * reflection.h, reflection.c: handle field RVA data. Save info about
25575 the table layout if needed. Assign typedef indexes to all the types
25576 before dumping the info about them to avoid forward reference problems.
25578 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
25580 * socket-io.c (convert_sockopt_level_and_name): ifdef
25581 SO_ACCEPTCONN because it is not defined on my system (old debian)
25583 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
25585 * opcode.c: use stddef.h to get NULL.
25587 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
25589 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
25590 for FIONBIO, FIONREAD and SIOCATMARK.
25591 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
25592 define INADDR_NONE and besides, inet_addr() is deprecated and
25593 should not be used. Use inet_pton() instead - it also has the
25594 added bonus that it can easily handle IPv6 addresses as well.
25595 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
25597 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
25599 * decimal.c: remove _MSC_VER conditional.
25601 2002-02-13 Dick Porter <dick@ximian.com>
25604 * icall.c: Internal calls for Blocking, Select, Shutdown,
25605 GetSocketOption and SetSocketOption
25607 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
25609 * assembly.cs: better resolver: use it instead of some kludgy
25612 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
25614 * reflection.c: the best way to speed-up the compiler is to avoid
25617 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
25619 * class.c (mono_class_vtable): changed the object layout
25620 (obj->vtable->class).
25621 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
25623 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
25625 * assembly.c: look for assemblies in the assembly dir, too.
25627 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
25629 * class.c: fix thinko in mono_class_from_type().
25631 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
25633 * exception.h, exception.c: added TypeLoadException.
25634 * object.h, object.c: added mono_array_clone ().
25635 * icall.c: handle throwOnError in AssemblyGetType().
25636 Added Array.Clone().
25637 * opcode.h, opcode.c: use a single value for the opcode val.
25638 Compile fix for non-gcc compilers.
25640 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
25642 * opcodes.c, opcodes.h: export interesting info about opcodes.
25644 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
25646 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
25649 * class.c (class_compute_field_layout): set element_class for enums
25650 (mono_class_create_from_typedef): set element_class for normal classes
25652 * icall.c (ves_icall_System_Enum_get_value): impl.
25654 * class.c (mono_class_create_from_typedef): do not set valuetype
25655 flag for System.ValueType and System.Enum
25657 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
25659 * unicode.c (iconv_convert): fix big endian problem.
25661 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
25663 * class.c: add asserts if we are ever going to scribble over memory.
25664 * socket-io.c: not all systems have AF_IRDA defined.
25666 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
25668 * class.c (class_compute_field_layout): do not consider static
25669 fields to compute alignment
25671 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
25673 * appdomain.c (mono_appdomain_get): impl.
25674 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
25676 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
25678 * icall.c: ignore "file://" prefix when loading an assembly.
25680 2002-01-23 Dick Porter <dick@ximian.com>
25684 * Makefile.am: Added socket support
25686 2002-01-23 Miguel de Icaza <miguel@ximian.com>
25688 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
25689 code back. This should return the assemblies that are loaded by
25690 the runtime on behalf of an application domain.
25692 The current implementation is still broken, it just returns every
25693 assembly loaded, but until we get real applications domain this
25696 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
25698 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
25701 2002-01-23 Miguel de Icaza <miguel@ximian.com>
25703 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
25704 the mono_class_from_name lookup.
25705 (ves_icall_get_parameter_info): ditto.
25706 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
25708 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
25710 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
25712 * class.c: load also nested classes on class init.
25713 System.ValueType instance methods gets passed boxed
25714 values, unless methods in derived classed that get a pointer to the
25716 * icall.c: use better name parsing code in GetType().
25717 * image.c, image.h: add mono_image_loaded ().
25718 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
25719 * reflection.c, reflection.h: added mono_reflection_parse_type().
25721 2002-01-22 Veronica De Santis <veron78@interfree.it>
25723 * icall.c : Added mapping of internal calls for Manual and Auto reset events
25724 * threads.c : Added the implementation of internal calls for events
25725 * threads.h : Added prototypes of internal calls for events
25727 2002-01-21 Radek Doulik <rodo@ximian.com>
25729 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
25731 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
25733 * class.c (mono_class_init): set min_align to 1 (instead of 0)
25734 (mono_class_value_size): use min_align
25736 2002-01-20 Dick Porter <dick@ximian.com>
25739 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
25740 so it compiles on w32.
25742 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
25744 * metadata.c (mono_type_stack_size): impl.
25746 * class.c (mono_class_get_field): impl. memberref token
25748 2002-01-16 Veronica De Santis <veron78@@interfree.it>
25750 * icall.h : Added the internal calls mapping for CreateMutex_internal
25751 and ReleaseMutex_internal.
25752 * threads.h : Added the prototype of mutexes internal calls.
25753 * threads.c : Added the implementations of mutexes internal calls.
25755 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
25757 * metaparse.h: removed unused file.
25758 * reflection.c, reflection.h: added stream_data_align () function
25759 to align data in streams and keep stream aligned. Add support for
25760 exception support in method headers.
25762 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
25764 * unicode.c: make iconv_convert () return the number of bytess written
25765 in the output buffer.
25767 2002-01-15 Dick Porter <dick@ximian.com>
25768 * threads.c: Make the runtime's idea of infinite timeouts coincide
25769 with the class library's
25771 Fix a particularly egregious bug in mono_thread_cleanup(). That
25772 code was so utterly bogus it must have been written on a Monday.
25774 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
25776 * reflection.h: add subtypes field to TypeBuilder.
25777 * reflection.c: encode constants for literal fields.
25778 Handle subtypes. Fix user string token (and add a zero byte)
25781 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
25783 * class.c (mono_class_init): bug fix: assign slot numbers for
25786 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
25788 * reflection.c: don't try to output a code RVA for abstract methods.
25789 Small fixes for method header format. Output parameter info to the
25790 ParamDef table. Save method overriding info to MethodImpl table.
25791 Fix property support. Allow typedef.extends to be a type in the
25793 * verify.c: fix off-by-one error.
25795 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
25797 * class.c: fix mono_class_from_mono_type () for szarray types.
25798 Remove unused cache check in mono_class_from_type_spec().
25799 * icall.c: *type_from_name () functions handle simple arrays and byref.
25800 * reflection.c: handle byref and szarray types. Handle methods without
25801 body (gets P/Invoke compilation working). Handle types and fields in
25803 * reflection.h: add rank to MonoTypeInfo.
25805 2002-01-10 Dick Porter <dick@ximian.com>
25807 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
25810 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
25812 * icall.c: initialize class in type_from_handle ().
25813 Loop also in parent classes for get_method ().
25814 * reflection.c: properly encode class and valuetype types.
25815 Start on encoding TypeBuilder types. Handle fieldrefs.
25816 Use correct length when registering a user string.
25817 Handle ConstructorBuilder and MonoMethod in get_token ().
25818 Make mono_type_get_object () aware of cached types.
25819 * object.c: back out change to mono_string_new ().
25821 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
25822 * object.c: mono_string_new should return a NULL when the string
25823 passed in is NULL -- not try to deference it.
25825 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
25827 * icall.c: hack to make IsSubType work for TypeBuilders.
25828 * reflection.c: emit constructors before methods.
25829 Retrieve param names in mono_param_get_objects().
25831 2002/01/05 Nick Drochak <ndrochak@gol.com>
25833 * Makefile.am: fix list of headers and sources so automake 1.5
25834 doesn't complain. Removed \# at end of list.
25836 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
25838 * reflection.c: get token for a method ref. Set return type of
25839 constructor to void.
25840 * loader.c: debug message.
25841 * class.c: typo fix.
25843 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
25845 * icall.c: fix array init with rank > 1. FindMembers
25846 loops in parent class as well.
25847 * image.c: do not insert nested types in name cache.
25848 * reflection.c: warning fix.
25849 * reflection.h: add override method (for interface impl).
25851 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
25853 * metadata.c: fix customattr decoding.
25855 2001-12-21 Miguel de Icaza <miguel@ximian.com>
25857 * rawbuffer.cs: Added native Win32 implementation, avoids using
25858 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
25860 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
25862 * class.c: make the low-level routines handle the cache.
25864 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
25866 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
25868 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
25870 * class.c: fix mono_array_element_size() for objects.
25871 * class.h, class.c: add properties to MonoClass and load them
25873 * icall.c: check with isinst() when assigning a value to an array
25874 instead of requiring the classes to match exactly.
25875 Implemented icall for System.Type::GetType().
25876 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
25877 enums. Handle bindingflags when looking for methods and fields.
25878 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
25879 and mono_metadata_methods_from_property().
25880 * reflection.h, reflection.c: added structures for propreties,
25881 parameters and enums. Implemented mono_property_get_object() and
25882 mono_param_get_objects().
25884 2001-12-18 Dick Porter <dick@ximian.com>
25886 * file-io.c: Use mono_string_to_utf16() instead of
25887 mono_string_chars()
25889 * object.c: Added mono_string_to_utf16(), which copies the non
25890 NULL-terminated MonoString into a new double-null-terminated
25893 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
25895 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
25897 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
25899 * file-io.c: raise exceptions if handle is invalid.
25901 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
25903 * assembly.c: yet another check for mscorlib.
25904 * class.c, class.h: load nesting info for classes.
25905 * icall.c: many new functions to support the Reflection classes.
25906 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
25907 * reflection.h, reflection.c: mono_image_create_token(),
25908 mono_assembly_get_object(), mono_type_get_object(),
25909 mono_method_get_object(), mono_field_get_object(): methods to return
25910 objects that parallel the C representation of assemblies, types,
25913 2001-12-11 Dick Porter <dick@ximian.com>
25916 * file-io.c: Internal calls for file IO.
25918 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
25920 * tabledefs.h: missing FileAttributes.
25921 * verify.h, verify.c: use is_valid_string () to simplify and check for
25922 valid strings more correctly. Fix warnings and speeling.
25923 Check more tables: Filed, File, ModuleRef, StandAloneSig.
25924 Check code: branches, maxstack, method calls.
25926 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
25928 * object.c (mono_object_allocate): removed static, so that the jit
25929 can allocate value types.
25931 * icall.c (ves_icall_System_DateTime_GetNow): impl.
25933 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
25935 * class.c: init enum types right away and register the
25936 token->MonoClass map in mono_class_create_from_typedef ().
25937 * verify.h, verify.c: first cut of the verifier.
25938 * pedump.c: add --verify switch to verify metadata tables.
25939 * tabledefs.h: add some missing enums.
25941 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
25943 * class.c (mono_install_runtime_class_init): impl.
25944 (mono_class_init): renamed mono_class_metadata_init to
25945 mono_class_init, also removed the metadata_inited flag
25947 * object.c (mono_object_isinst): use faster algorithm
25949 2001-11-30 Radek Doulik <rodo@ximian.com>
25951 * mono-endian.h: reverted last change
25952 added function prototypes
25954 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
25955 add mono-endian.c back
25957 * mono-endian.c: returned back, as Paolo pointed out, it's needed
25958 for unaligned access, I've mistaked it with endianess. I am
25960 (mono_read16): fix reverted endianess
25961 (mono_read64): ditto
25962 (mono_read32): ditto
25964 2001-11-30 Dick Porter <dick@ximian.com>
25966 * exception.c: Implement mono_exception_from_name()
25968 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
25970 * metadata.h, metadata.c: remove params_size and locals_size and their
25971 calculation from the metadata code: they are only usefult to the
25974 2001-11-29 Radek Doulik <rodo@ximian.com>
25976 * object.c (mono_ldstr): swap bytes here, it's probably not the
25977 best place, but works for me now, I'll redo it once I know mono
25978 better, also note that I add PROT_WRITE and don't reset back, also
25979 note that it's only affects big endians, so x86 should be OK
25981 * mono-endian.h (read16): use just glib macros for both endians
25983 * mono-endian.c: removed as glib macros are used in in
25984 mono-endian.h so we don't need to care about endianess for read
25985 macros as glib does that for us already
25987 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
25989 * class.h, class.h: take minimum alignment into consideration so
25990 that the fields of a class remain aligned also when in an array.
25992 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
25994 * loader.h, loader.c: add mono_method_get_param_names().
25995 * class.c: 0-init class fields.
25997 2001-11-26 Dick Porter <dick@ximian.com>
26001 * threads.c: New file that handles System.Threading on all platforms
26004 * object.h: Remove the synchronisation struct from MonoObject,
26005 replace it with a pointer that gets initialised on demand
26007 * Makefile.am: Replace all the system-specific threading code with
26008 a single file that uses the new wrapper library
26010 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
26012 * class.c, class.h: add mono_install_trampoline() so that the runtime
26013 can register a function to create a trampoline: removes the ugly
26014 requirement that a runtime needed to export arch_create_jit_trampoline.
26015 * object.h, object.c: added mono_install_handler() so that the runtime
26016 can install an handler for exceptions generated in C code (with
26017 mono_raise_exception()). Added C struct for System.Delegate.
26018 * pedump.c: removed arch_create_jit_trampoline.
26019 * reflection.c: some cleanups to allow registering user strings and
26020 later getting a token for methodrefs and fieldrefs before the assembly
26022 * row-indexes.h: updates and fixes from the new ECMA specs.
26024 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
26026 * class.h, class.c: add enum_basetype field to MonoClass.
26027 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
26028 to get index in the constant table reated to a field, param or
26030 * reflection.h, reflection.c: handle constructors. Set public-key and
26031 version number of the built assembly to 0.
26032 * row-indexes.h: update from new ECMA spec.
26034 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
26036 * class.h, class.c: add a max_interface_id to MonoClass.
26037 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
26038 since it's used to do that. Added mono_type_type_from_obj().
26039 Make GetType() return NULL instead of segfaulting if the type was not
26040 found. Handle simple arrays in assQualifiedName.
26041 * object.h: add a struct to represent an Exception.
26042 * reflection.c: output call convention in method signature.
26043 Add code to support P/Invoke methods and fixed offsets for fields.
26045 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
26047 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
26049 * icall.c: use mono_array_addr instead of array->vector: fixes the
26050 reflection image writing.
26051 * reflection.c: init call convention byte to 0 in method signature.
26052 Encode the property signature. Don't output property-related methods
26053 twice. Really process the properties for a type (don't cast a field to
26054 a property, my mom always told me that).
26055 Fix 64 bit issues in pointer alignment in a different and more
26058 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
26060 * loader.h: Removed type class from MonoDefaults, added monotype
26062 * loader.c: Loaded MonoType, removed loading of Type
26064 * icall.c (my_mono_new_object): Now returns a System.MonoType,
26065 and fills in System.Type._impl with a RuntimeTypeHandle rather
26066 than the actual MonoClass *
26068 (ves_icall_type_from_handle): change from type_class to
26071 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
26074 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
26077 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
26079 (ves_icall_System_Reflection_Assembly_GetType): implemented
26081 (ves_icall_System_MonoType_assQualifiedName): implemented
26083 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
26085 2001-11-09 Miguel de Icaza <miguel@ximian.com>
26087 * assembly.c (mono_assembly_open): Implement a cache for the
26090 (mono_assembly_close): only destroy the assembly when the last
26093 2001-11-09 Dick Porter <dick@ximian.com>
26095 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
26097 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
26099 * class.c (mono_class_metadata_init): bug fix: compute the right slot
26101 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
26103 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
26104 from Martin Weindel.
26105 * object.h: add mono_string_chars ().
26107 2001-11-07 Miguel de Icaza <miguel@ximian.com>
26109 * reflection.c (build_compressed_metadata): Eliminates warnings
26110 and uses 64-bit clean code.
26112 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
26113 (mono_type_equal): Change signature to eliminate warnings.
26115 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
26117 * icall.c, loader.c: remove the internalcall array constructors.
26118 Changes to match the new MonoArray structure.
26119 * object.h, object.c: an array object doesn't allocate an extra
26120 vector. Add mono_array_new_full () to create jagged arrays easily.
26122 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
26124 * metadata.h, metadata.c: add mono_metadata_field_info () to
26125 retreive all the info about a field from vairous tables.
26126 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
26127 * class.h, class.c: augment MonoClassField with more info.
26128 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
26129 policy and load a field's RVA if needed.
26131 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
26133 * class.c (mono_class_metadata_init): create a trampoline for all
26134 virtual functions instead of actually compiling them.
26136 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
26138 * class.h, class.c: include name in MonoClassField.
26139 * class.c: fix fundamental type of System.Object and System.String.
26140 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
26142 * icall.c: remove internalcalls for the Reflection stuff that is now
26144 * loader.c: mono_field_from_memberref () implementation.
26145 * mono-endian.c: thinko (s/struct/union/g).
26146 * object.c, object.h: make the mono_string_* prototypes actually use
26147 MonoString instead of MonoObject.
26148 * reflection.c, reflection.h: updates for changes in the reflection
26149 code in corlib: we use C structures that map to the actual C# classes.
26150 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
26151 fat method header if needed and use the info from the ILGenerator for
26152 methods. Handle fields in types. Misc fixes.
26154 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
26156 * class.c (mono_class_metadata_init): bug fix: always allocate
26157 space for static class data
26159 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
26161 * class.c (mono_compute_relative_numbering): use relative
26162 numbering to support fast runtime type checks.
26164 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
26166 * class.c (mono_class_create_from_typeref): added debugging output
26167 to print class name when MonoDummy is returned instead of real class
26169 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
26171 * class.c (mono_class_metadata_init): interface offset table now
26172 contains pointers into the vtable - this is more efficient for the jit
26174 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
26176 * class.c (mono_class_metadata_init): use a temporary vtable (the
26177 old algorithm only worked for the interpreter, but not for the jit)
26179 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
26181 * loader.c (method_from_memberref): use mono_class_get to get the
26182 class of an array instead of using System.Array directly.
26183 (mono_get_method): also add MEMBERREF methods to the method cache
26184 which usefull for arrays.
26186 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
26188 * pedump.c (arch_compile_method): added to compute vtable entry
26190 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
26191 number of interfaces.
26193 * class.h: merged MonoArrayClass into MonoClass
26195 * class.c (mono_class_create_from_typedef): compute the vtable size and
26196 allocate space to include the vtable inside MonoClass
26197 (mono_class_metadata_init): initialize the vtable
26199 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
26201 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
26202 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
26203 * image.c: endian fixes by Laurent Rioux.
26204 * object.h, object.c: rename MonoStringObject to MonoString and
26205 MonoArrayObject to MonoArray. Change some function names to conform to
26206 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
26207 guint16* as first argument, so don't use char*.
26208 Provide macros to do the interesting things on arrays in a portable way.
26209 * threads-pthread.c: updates for the API changes and #include <sched.h>
26210 (required for sched_yield()).
26211 * icall.c: updates for the API changes above.
26212 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
26213 platforms that need them.
26215 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
26217 * class.c: set the correct type for all the fundamental
26218 type when loading the class.
26220 2001-10-05 Dick Porter <dick@ximian.com>
26222 * threads-pthread.c (pthread_mutex_timedlock): Simple
26223 compatibility version for C libraries that lack this call.
26225 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
26227 * class.c: MonoTypes stored in MonoClass are stored as
26228 fundamental MonoTypes when the class represents a
26229 fundamental type (System.Int32, ...).
26230 The TypeHandle return by ldtoken is a MonoType*.
26231 * icall.c: ves_icall_get_data_chunk () write out all the
26232 PE/COFF stuff. Implement ves_icall_define_method (),
26233 ves_icall_set_method_body (), ves_icall_type_from_handle ().
26234 * image.c: properly skip unknown streams.
26235 * loader.h, loader.c: add type_class to mono_defaults.
26236 * metadata.c, metadata.h: export compute_size () as
26237 mono_metadata_compute_size () with a better interface.
26238 Typo and C&P fixes.
26239 * pedump.c: don't try to print the entry point RVA if there is no entry point.
26240 * reflection.c, reflection.h: many cleanups, fixes, output method
26241 signatures and headers, typedef and typeref info, compress the metadata
26242 tables, output all the heap streams, cli header etc.
26243 * row-indexes.h: typo fixes.
26245 2001-10-04 Dick Porter <dick@ximian.com>
26247 * object.h: Add a synchronisation mutex struct to MonoObject
26249 * object.c (mono_new_object): Initialise the object
26250 synchronisation mutexes
26252 * icall.c: System.Threading.Monitor internal calls
26254 * threads-pthread.h:
26255 * threads-pthread.c: System.Threading.Monitor internal calls
26257 * threads-types.h: New file, includes the system-specific thread
26260 * threads-pthread-types.h:
26261 * threads-pthread-types.c: New files, handle pthread-specific
26262 synchronisation types
26264 * threads-dummy-types.h:
26265 * threads-dummy-types.c: New files of dummy support for
26266 thread-specific types
26270 * pedump.c: include mono-endian.h not endian.h
26272 * Makefile.am: More threads files.
26273 Name mono-endian.h not endian.h
26275 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
26277 * Makefile.am, reflection.h, reflection.c: move here the reflection related
26278 stuff and implement a few more bits.
26279 * icall.c: a field needs to be dereferenced twice. Do not use the same
26280 name for two variables in the same scope.
26281 * image.c, image.h: cleanups.
26283 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
26285 * class.c (mono_class_metadata_init): bug fix: compute the right size
26287 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
26289 * icall.c: implemented some of the Reflection internalcalls.
26290 * image.c, image.h: start writing out the PE/COFF image.
26291 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
26292 that does the reverse than decode_blob_size ().
26293 * object.c: use mono_metadata_encode_value (). Move here
26294 temporary implementation of mono_string_to_utf8 ().
26295 * rawbuffer.c: make malloc_map static.
26297 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
26299 * metadata.c: fix type comparison for arrays.
26300 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
26301 Added a couple of new classes to monodefaults.
26302 * icall.c: added a couple of Reflection-related internalcalls.
26303 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
26304 Added a byval_arg MonoType to MonoClass.
26306 2001-09-28 Dick Porter <dick@ximian.com>
26309 * threads-pthread.h:
26310 * threads-pthread.c: Implemented internal calls for
26311 LocalDataStoreSlot operations. Applied mutexes around all shared
26312 data. Reworked the thread creation and Start() operations to
26313 avoid a race condition.
26316 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
26318 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
26320 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
26322 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
26324 * class.c, loader.c: warn and return NULL instead of erroring out.
26325 * icall.c: added System.AppDomain::getCurDomain().
26326 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
26328 2001-09-25 Dick Porter <dick@ximian.com>
26330 * threads-pthread.h:
26331 * threads-pthread.c: Implemented timed thread joining and added
26332 System.Threading.Thread::Join_internal internal call
26334 * icall.c: Added System.Threading.Thread::Join_internal internal call
26337 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
26339 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
26341 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
26342 mono_string_intern () to implement the semantics of the ldstr opcode
26343 and the interning of System.Strings.
26344 * icall.c: provide hooks to make String::IsIntern and String::Intern
26347 2001-09-23 Dick Porter <dick@ximian.com>
26350 * threads-dummy.h: New files of dummy threading routines
26352 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
26353 support code based on system specifics
26355 Rename PTHREAD_LIBS to THREAD_LIBS
26357 2001-09-23 Dick Porter <dick@ximian.com>
26359 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
26360 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
26362 (mono_thread_init): Set up a Thread object instance to return when
26363 the main thread calls Thread.CurrentThread
26364 (mono_thread_cleanup): Wait for all subthreads to exit
26366 * icall.c: New internal calls for System.Threading.Thread::Sleep
26367 (including Schedule) and CurrentThread
26369 * threads.h: New file, to insulate thread-specific stuff from the
26372 2001-09-21 Dick Porter <dick@ximian.com>
26374 * threads-pthread.h:
26375 * threads-pthread.c: New file, for handling pthreads-style
26376 threading support. Start() now starts a new thread and executes
26377 the ThreadStart delegate instance.
26379 * icall.c: Added the internalcall for
26380 System.Threading.Thread::Start_internal
26382 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
26384 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
26386 * loader.c: work around the different signatures for delegates
26387 constructors csc generates in compiled code vs the ones compiled in mscorlib.
26389 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
26391 * class.h, class.c: add mono_class_get_field_from_name ().
26392 * *: Fix C comments and other ANSI C issues.
26394 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
26396 * endian.h, assembly.c: fix some endianness issues.
26398 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
26400 * loader.h, load.c: add delegate_class to mono_defaults.
26401 Handle runtime provided methods in mono_get_method ().
26403 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
26405 * loader.c (mono_get_method): use pinvoke for internal call
26407 * icall.c: use pinvoke for internal call
26409 * loader.c (method_from_memberref): set the method name
26411 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
26413 * metadata.c: help the compiler generate better code for
26414 mono_class_from_mono_type ().
26416 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
26418 * class.c (mono_class_metadata_init): delayed computing of the
26419 class size to mono_class_metadata_init ()
26421 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
26423 * class.c, class.h: add an interfaces member to MonoClass.
26424 * image.c, image.h: add assembly_name field to MonoImage
26425 from the assembly table.
26426 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
26428 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
26430 * class.c: Handle Array in mono_class_from_mono_type ().
26431 * metadata.c, pedump.c: some endian fixes.
26433 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
26435 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
26436 * metadata.c: fix small problem introduced with the latest commit.
26438 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
26440 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
26441 We don't need a MonoMetadata pointer anymore to compare signatures in
26442 mono_metadata_signature_equal (), update callers.
26443 Reduced memory usage an number of allocations for MonoMethodHeader and
26444 MonoMethodSignature.
26446 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
26448 * metadata.c: added compare for szarray.
26450 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
26452 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
26453 and add a couple more types to it and mono_defaults. Give an hint on
26454 classes that need implementing in our corlib and are referenced
26457 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
26459 * class.h, class.c: keep track if a class is also an Enum.
26460 * loader.c: Implement a couple more types for use in libffi
26461 marshalling. Gives better diagnostics when failing to dlopen
26462 a library. Set method->klass for P/Invoke methods, too.
26464 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
26466 * class.c, class.h: add a MonoType this_arg to MonoClass that
26467 represents a pointer to an object of the class' type that
26468 can be used by the interpreter and later the type cache.
26469 Add best guess alignment info for valuetype objects.
26471 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
26473 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
26474 into MonoType: one less level of indirection and allocation and
26475 simplifies quite a bit of code. Added cache for MonoTypes that are
26476 used frequently, so that we don't need to allocate them all the time.
26478 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
26480 * class.c (mono_class_create_from_typedef): System.Enum is also a
26481 value type, although it does not derive from System.ValueType
26482 (maybe a bug in the ms compiler?)
26484 * metadata.c (mono_type_size): return the right size for value types
26486 * loader.c (mono_get_method): only initialize method header if not abstract
26488 * class.c (mono_class_from_mono_type): use mono_default values.
26490 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
26492 * *: use MonoClass pointers instead of <type_tokens>
26494 * class.h: new flag: metadata_inited.
26496 * class.c (mono_class_metadata_init): impl.
26497 (mono_class_instance_size): impl.
26498 (mono_class_data_size): impl.
26500 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
26502 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
26503 MonoClass now has the name and name_space fields.
26504 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
26505 mono_get_method () takes and optional MonoClass as argument.
26506 Removed mono_typedef_from_name() and added mono_class_token_from_name()
26507 instead that takes advantage of a map from class names to typedef
26508 tokens in MonoImage.
26510 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
26512 * metadata.c: zero is not a valid alignment boundary.
26513 Merge MONO_TYPE_VOID in default decoding code.
26515 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
26517 * image.h: merged MonoMetadata into MonoImage
26519 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
26520 identify the type of elements.
26522 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
26524 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
26525 * cil-coff.h: split MonoMSDOSHeader and add size info.
26526 * image.c: add some consistency checks.
26527 * metadata.c: fix row size computation: one programmer
26528 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
26529 add explanation for the locator routine.
26530 Fix decoding of size in method header.
26532 2001-08-20 Miguel de Icaza <miguel@ximian.com>
26534 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
26535 (g_concat_dir_and_file): Bring g_concat_dir_and_file
26536 function from gnome-libs. This uses the right path separator
26537 based on the OS, and also works around a bug in some systems where
26538 a double slash is not allowed.
26539 (default_assembly_name_resolver): Use g_concat_dir_and_file
26540 (mono_assembly_open): ditto.
26542 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
26544 * metadata.c (mono_metadata_signature_equal): impl.
26546 * *: void is now a realy MonoType (instead of using NULL)
26548 * metadata.c (do_mono_metadata_parse_type): use
26549 mono_metadata_parse_type to parse void value.
26551 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
26553 * metadata.c, metadata.h: in the signature and method header store
26554 only the space required for holding the loca vars and incoming arguments.
26556 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
26558 * metadata.c (do_mono_metadata_parse_type): treat void like any
26559 other type (instead of assigning NULL);
26561 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
26563 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
26565 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
26567 * image.c (do_mono_image_open): added a cache for arrays.
26569 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
26571 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
26572 decode a single column from a row in a metadata table and changes
26573 to take advantage of it in the typedef locator (gives a nice speed up).
26574 Store offset info for function params.
26576 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
26578 * image.h (MONO_IMAGE_IS_CORLIB): removed
26580 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
26582 * assembly.c: how could mono_assembly_close () had ever worked?
26583 * metadata.c, metadata.h: provide offset info for local vars.
26584 Implement mono_type_size () to take care of alignment as well
26585 as size (it was mono_field_type_size in cli/class.c before).
26587 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
26589 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
26591 * assembly.h (CORLIB_NAME): set to corlib.dll
26593 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
26595 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
26597 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
26598 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
26599 tokentype.h: massive namespace cleanup.
26601 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
26603 * metadata.h, metadata.c: decode exception clauses when parsing method header.
26605 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
26607 * metadata.c (mono_metadata_free_type): added check for type !=
26608 NULL (void) before calling mono_metadata_free_type()
26610 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
26612 * metadata.h, row_indexes.h: added header with enumerations to use
26613 to index in the columns from tables in metadata and to decode coded
26614 tokens: we should start using this instead of embedding magic numbers
26617 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
26619 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
26620 Move metadata_t info from cli_image_info_t to MonoImage, where
26621 it's easily accessible. Changed all the uses accordingly.
26622 Added the method and class caches to MonoImage.
26623 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
26624 and mono_metadata_decode_value () signature to be more consistent
26625 with the other parse functions (and simplify code). Taken advantage
26626 of zero-length array allocation with GCC. Removed reduntant (and
26627 wrong) MonoFieldType struct and use MonoParam instead. Changed
26628 mono_metadata_parse_field_type () to use common code for parsing.
26629 Added mono_metadata_typedef_from_field () and
26630 mono_metadata_typedef_from_method () to lookup a typedef index from a
26631 field or method token.
26632 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
26634 2001-07-23 Miguel de Icaza <miguel@ximian.com>
26636 * metadata.c (mono_metadata_parse_field_type): Implement.
26637 (do_mono_metadata_parse_type): Split engine from
26638 mono_metadata_parse_type, so that we can create smaller structures
26639 for things that just have one pointer to the MonoType (look at
26642 2001-07-20 Miguel de Icaza <miguel@ximian.com>
26644 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
26645 as Jan Gray found out, it is incorrect.
26647 2001-07-18 Miguel de Icaza <miguel@ximian.com>
26649 * assembly.c: Implement asssembly loading. This loads an image
26650 and loads all the referenced assemblies. Come to think of it, we
26651 could always do lazy loading of the assemblies.
26653 * image.c (mono_image_open): Keep loaded images in a hashtable.
26655 * image.h (MonoImage): Add reference count.
26657 2001-07-17 Miguel de Icaza <miguel@ximian.com>
26659 * assembly.c (mono_assembly_open): Keep track of the file name in
26660 case the assembly has no ASSEMBLY table.
26662 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
26665 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
26667 * metadata.c, metadata.h: decode local vars in method header
26668 parse function. Change callers accordingly.
26670 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
26672 * metadata.h, cil-coff.h: protect against multiple inclusion.
26673 Added some new structures to hold information decoded from metadata:
26674 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
26675 and relevant decoding/free functions.
26676 * metadata.c: implement decoding functions. Add warning for out of bounds
26677 index in mono_metadata_locate(). Implement mono_get_method () to retreive
26678 all the info about a method signature and invocation. Remove check on
26679 uninitialized local var in parse_mh() and fix memory leak.
26681 2001-07-12 Miguel de Icaza <miguel@ximian.com>
26683 * metadata.h: More macros.
26685 * tokentype.h: New file.
26687 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
26689 * assembly.c: added a consistency check and initialize
26690 some structures with g_new0().
26691 * metadata.c: fixed a couple more bugs in table size computation
26692 and add other checks for out-of bound access to metadata.
26694 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
26696 * metatada.c: fix bugs computing table sizes. Spew a
26697 warning when index in string heap is out of bounds.
26699 2001-07-04 Miguel de Icaza <miguel@ximian.com>
26701 * metadata.h: Add a couple of macros to manipulate tokens.
26703 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
26705 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
26706 cli_section_tables).
26708 2001-07-01 Miguel de Icaza <miguel@ximian.com>
26710 * metadata.c (mono_metadata_user_string): New function, provides
26711 access to the UserString heap.
26713 2001-06-27 Miguel de Icaza <miguel@ximian.com>
26715 * metadata.c: Add inline documentation.
26717 2001-06-26 Miguel de Icaza <miguel@ximian.com>
26719 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
26722 2001-06-22 Miguel de Icaza <miguel@ximian.com>
26724 * typeattr.h: New file, TypeAttribute flags.
26726 2001-06-21 Miguel de Icaza <miguel@ximian.com>
26728 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
26729 mono_assembly_ensure_section): Section loading code.
26730 (load_section_tables): Load the sections.
26732 * mono/metadata/metadata.c (mono_metadata_locate_token,
26733 mono_metadata_locate): Functions to locate the information
26734 definition given a token or a table and an index.
26735 (mono_metadata_compute_table_bases): New.
26736 (compute_size): New function to compute the sizes of the various
26739 * mono/metadata/metadata.h: Finish listing the different index
26742 * mono/metadata/pedump.c: Improve to dump new information.
26744 2001-06-19 Miguel de Icaza <miguel@ximian.com>
26746 * mono/metadata/metadata.c: Entered all the tables matching
26749 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2