1 2007-09-19 Martin Baulig <martin@ximian.com>
3 * mono-debug.c (mono_debug_cleanup): Don't call
4 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
6 2007-09-19 Raja R Harinath <harinath@gmail.com>
8 Fix crash on 'make run-test' in mcs/errors
9 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
10 Avoid more potential allocations in mono_class_from_mono_type.
11 (ginst_in_image): Update to changes.
12 (gclass_in_image): Rearrange slightly.
14 2007-09-18 Zoltan Varga <vargaz@gmail.com>
16 * class.c (mono_class_init): Move the code that sets up class->methods to
17 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
19 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
20 canonical instance of an inflated generic signature.
21 (mono_type_create_from_typespec): Remove an invalid free.
23 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
25 2007-09-18 Marek Habersack <mhabersack@novell.com>
27 * domain-internals.h: added a declaration of the
28 mono_assembly_load_full_nosearch internal function.
30 * assembly.c (mono_assembly_load_with_partial_name): use
31 mono_try_assembly_resolve return value properly.
32 (mono_assembly_load_full_nosearch): copied the function body from
33 mono_assembly_load_full, without the code to invoke assembly
35 (mono_assembly_load_full): calls the above new function and if the
36 assembly is not resolved, invokes the search hooks.
38 * appdomain.c (mono_runtime_init): restore the global postload
39 assembly search handlers.
41 2007-09-18 Zoltan Varga <vargaz@gmail.com>
43 * class.c (mono_class_init): Make sure class->methods and class->properties
44 are never NULL in the generics case.
46 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
48 2007-09-17 Zoltan Varga <vargaz@gmail.com>
50 * metadata.c (free_generic_class): Disable some code to fix the build.
52 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
54 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
55 from the image mempool.
57 * metadata.c (free_generic_class): Free more data from the inflated class.
59 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
61 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
63 (mono_type_create_from_typespec): Ditto.
65 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
66 MonoImage to the caller.
67 (mono_init_internal): Save the opened image in a global variable.
68 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
70 * reflection.c (resolve_object): Fix a leak.
72 * metadata.c: Fix the freeing of data in the generics caches.
74 * metadata.c (free_generic_inst): Comment this out to fix the build.
75 (free_generic_class): Ditto.
77 * metadata.c: Free cached generic methods, instantinations and classes when
78 they are removed from the caches.
79 (mono_metadata_free_type): Free the type itself.
81 * class.c: Free the result of mono_class_inflate_generic_type () in a few
84 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
86 * boehm-gc.c: restrict managed allocs to __thread supporting
89 2007-09-16 Zoltan Varga <vargaz@gmail.com>
91 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
92 (mono_generic_class_get_class): Fix a leak.
94 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
95 mono_metadata_free_type ().
96 (mono_metadata_inflate_generic_inst): Fix a leak.
98 2007-09-14 Zoltan Varga <vargaz@gmail.com>
100 * mono-debug.c (free_header_data): Fix a leak missed earlier.
102 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
105 * mono-debug.c (mono_debug_close_image): Fix call to
106 g_hash_table_remove ().
108 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
110 * icall-def.h: redirect all the string ctor to the managed
111 CreateString () methods.
112 * string-icalls.c, string-icalls.h: removed dead code for string
115 2007-09-14 Zoltan Varga <vargaz@gmail.com>
117 * mono-debug.c: Fix memory leaks.
119 2007-09-14 Jonathan Chambers <joncham@gmail.com>
121 * threads-types.h: Implement mono_hazard_pointer_set and
122 mono_hazard_pointer_clear macros using do/while(0) to fix
123 compilation with MSVC.
125 Code is contributed under MIT/X11 license.
127 2007-09-14 Zoltan Varga <vargaz@gmail.com>
129 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
130 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
132 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
134 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
137 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
139 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
140 managed-code allocated as well.
142 2007-09-13 Zoltan Varga <vargaz@gmail.com>
144 * class.c (mono_class_is_assignable_from): Add support for generic variance.
146 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
148 * boehm-gc.c: fixed the build after the AOT changes.
150 2007-09-13 Zoltan Varga <vargaz@gmail.com>
152 * wrapper-types.h: Add an ALLOC wrapper type.
154 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
155 reference managed allocator methods.
157 2007-09-12 Marek Safar <marek.safar@gmail.com>
159 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
160 of Type array and not MonoType, a fix suggested by Hari.
162 2007-09-12 Jonathan Chambers <joncham@gmail.com>
164 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
165 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
167 Code is contributed under MIT/X11 license.
169 2007-09-10 Massimiliano Mantione <massi@ximian.com>
171 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
173 2007-09-12 Marek Habersack <mhabersack@novell.com>
175 * image.c (do_mono_image_open): if assembly file fails to open and
176 MONO_IOMAP is in effect, try to find the path in a
177 case-insensitive way.
179 * appdomain.c (mono_runtime_init): do not install postload hooks -
180 tests show that MS.NET doesn't use anything of that sort to
181 trigger the AppDomain.AssemblyResolve event.
182 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
184 (mono_runtime_init): init portability helpers here.
186 * assembly.c (mono_assembly_load_with_partial_name): if other
187 attempts fail, trigger the AppDomain.AssemblyResolve event handler
188 to resolve the assembly.
190 * domain-internals.h: added mono_try_assembly_resolve and marked
193 2007-09-11 Jb Evain <jbevain@novell.com>
195 * object-internals.h (MonoReflectionDynamicMethod): add
196 a `MonoReflectionType *owner` field. The owner is used
198 (mono_reflection_create_dynamic_method): use the owner of the dynamic
199 method as the class declaring the dynamic method.
200 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
201 dynamic method to the declaring type of the methodbuilder.
203 2007-09-11 Mark Probst <mark.probst@gmail.com>
205 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
206 rules for calling methods via reflection.
208 2007-09-11 Zoltan Varga <vargaz@gmail.com>
210 * reflection.c (resolve_object): Add support for MonoGenericClass.
213 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
215 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
216 provide a managed method that does fast allocations without needing
217 a managed->unmanaged transition. Boehm GC implementation currently
218 enabled for ptrfree objects on sane architectures.
220 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
222 * marshal.c, marshal.h: exported a couple of useful functions and
223 added mono_mb_get_label () to easily handle backward branches.
225 2007-09-10 Zoltan Varga <vargaz@gmail.com>
227 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
229 2007-09-10 Massimiliano Mantione <massi@ximian.com>
231 * loader.c (find_method): Fixed the regression introduced while
234 2007-09-09 Zoltan Varga <vargaz@gmail.com>
236 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
239 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
240 icall.c reflection.c: Pass a MonoGenericContext argument to
241 mono_lookup_dynamic_token ().
243 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
246 2007-09-09 Robert Jordan <robertj@gmx.net>
248 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
251 * object.c (mono_object_get_virtual_method): Handle generic methods.
254 Code is contributed under MIT/X11 license.
256 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
258 * image.c: fix locking in mono_image_load_file_for_image ().
260 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
262 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
263 used only as a cache: added an icall to fill it.
265 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
267 * reflection.h: exposed mono_reflection_free_type_info
268 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
269 since mono_reflection_bind_generic_parameters makes a copy of it.
270 * reflection.c (free_type_info): subinfos should be freed.
271 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
273 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
274 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
275 this fixes #82695 and #81726.
278 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
280 * process.h, process.c: added support for user profile/info in
281 ProcessStartInfo. For now only Windows works.
283 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
285 * metadata.c: consider the generic arguments when comparing
286 signatures (bug #82614).
288 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
290 * cil-coff.h, image.c: updated assembly loader to cope with the
291 PE32+ 64 bit file format.
293 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
295 * assembly.c, class.c, domain.c, loader.c: remove useless
296 inclusion of cil-coff.h.
298 2007-08-29 Jonathan Chambers <joncham@gmail.com>
300 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
301 if interface is marked with CoClassAttribute.
303 Code is contributed under MIT/X11 license.
305 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
307 * sgen-gc.c: ensure no object from the to space is copied again or finalized
308 if it's seen twice in major collections.
310 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
312 * sgen-gc.c: big objects are not copied to the gray area, but they
313 need to be considered for scanning, too, if they are brought alive
314 by an object ready for finalizations or a survived one.
316 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
318 * sgen-gc.c: properly account the number of disappearing links when
321 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
323 * sgen-gc.c: share the code to scan the registered roots between the
324 different types of collections.
326 2007-08-28 Zoltan Varga <vargaz@gmail.com>
328 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
330 2007-08-28 Zoltan Varga <vargaz@gmail.com>
332 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
333 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
335 2007-08-28 Mark Probst <mark.probst@gmail.com>
337 * security-manager.c (mono_security_manager_get_methods):
338 LinkDemandSecurityException now has 2 arguments instead of 3.
340 2007-08-27 Zoltan Varga <vargaz@gmail.com>
342 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
343 platforms which need it.
345 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
347 * sgen-gc.c: unregister thread data structures with a pthread_key_t
350 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
352 * threads.c: free the thread static data on thread exit.
354 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
356 * class.c: walk the hierarchy to find the generic definition for
357 a class (fixes runtime part of bug #82498).
359 2007-08-24 Zoltan Varga <vargaz@gmail.com>
361 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
364 * image.c (mono_image_close): Here. Hopefully fixes #82510.
366 2007-08-24 Mark Probst <mark.probst@gmail.com>
368 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
370 2007-08-24 Robert Jordan <robertj@gmx.net>
372 * appdomain.c: don't perform the ':'->';' substitution on Win32.
374 2007-08-24 Jb Evain <jbevain@novell.com>
376 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
379 2007-08-24 Mark Probst <mark.probst@gmail.com>
381 * threads.c: Make sure a thread gets cleaned up only once. Fixes
384 2007-08-24 Zoltan Varga <vargaz@gmail.com>
386 * assembly.c: Fix a warning.
388 2007-08-23 Marek Habersack <mhabersack@novell.com>
390 * appdomain.c: parse the <runtime> section looking for the probing
391 element with the 'privatePath' attribute, which sets additional
392 directories in which the runtime should look for assemblies.
394 2007-08-23 Robert Jordan <robertj@gmx.net>
396 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
399 2007-08-23 Martin Baulig <martin@ximian.com>
401 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
402 _mono_debug_init_corlib() and remove it from the header file.
404 2007-08-23 Martin Baulig <martin@ximian.com>
406 * mono-debug-debugger.c
407 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
408 don't notify the debugger about it.
410 * mono-debug-debugger.h
411 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
413 2007-08-23 Robert Jordan <robertj@gmx.net>
415 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
416 Code is contributed under MIT/X11 license.
418 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
420 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
422 2007-08-22 Martin Baulig <martin@ximian.com>
424 * mono-debug.c: Store debugging info on a per-domain basis and
425 free it on domain unload. Add support for unloading symbol files.
428 (MonoDebugList): New typedef.
430 - add `data_tables and `type_table'.
431 - replace 'symbol_files' and `num_symbol_files' with a
433 (mono_debug_data_table): Removed.
434 (mono_debug_list_add): New public function.
435 (mono_debug_list_remove): New public function.
436 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
437 (mono_debug_init_2_memory): Renamed into
438 mono_debug_open_image_from_memory().
439 (mono_debug_close_image): New public function.
440 (mono_debug_domain_create): Likewise.
441 (mono_debug_domain_unload): Likewise.
442 (MONO_DEBUGGER_VERSION): Bump to 60.
444 * mono-debug-debugger.h
446 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
447 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
448 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
449 - rename `THREAD_CREATED' and `THREAD_EXITED' into
450 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
451 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
453 (mono_debugger_add_symbol_file): Removed.
454 (mono_debugger_add_type): Removed.
455 (mono_debugger_lookup_type): Removed.
456 (mono_debugger_lookup_assembly): Removed.
459 (mono_domain_create): Call mono_debug_domain_create().
460 (mono_init_internal): Call mono_debug_init_corlib().
463 (mono_assembly_close): Call mono_debug_close_image().
465 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
467 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
470 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
472 * sgen-gc.c: ensure section->pin_queue_end is initialized
473 correctly when non pinning objects in the section have been found.
475 2007-08-22 Marek Habersack <mhabersack@novell.com>
477 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
478 containing a list of directories separated by ':'. MSDN docs say
479 the directories should be separated with ';'. Part of a bugfix for
482 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
484 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
485 it should MonoType and not MonoClass.
487 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
489 * culture-info-table.h : regenerated.
491 2007-08-20 William Holmes <billholmes54@gmail.com>
493 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
494 to call ReplaceFile Kernel32 on windows or in io-layer.
495 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
496 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
499 Code is contributed under MIT/X11 license.
501 2007-08-20 Jb Evain <jbevain@novell.com>
503 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
504 and MONO_EXCEPTION_FIELD_ACCESS.
506 * debug-helpers.[c|h]: new mono_field_full_name function.
508 2007-08-20 Mark Probst <mark.probst@gmail.com>
510 * class.c: Removed class_security_level() and moved it to
513 * security-core-clr.c, security-core-clr.h: class_security_level()
514 is now public and renamed to mono_security_core_clr_class_level().
515 It also looks for security attributes in the classes a class is
518 2007-08-20 Mark Probst <mark.probst@gmail.com>
520 * security-core-clr.c, security-core-clr.h: CoreCLR security
523 * Makefile.am: Added security-core-clr.[ch].
525 * security-manager.c, security-manager.h: Functions and enum for
526 setting and getting the security mode.
528 * class.c: CoreCLR security checks.
530 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
532 * icall-def.h, process.c, process.h: implemented icall to get
533 user/system processor times.
535 2007-08-17 Mark Probst <mark.probst@gmail.com>
537 * domain.c, threads.c, class-internals.h, domain-internals.h: New
538 reader-lock-free jit_info_table.
540 2007-08-17 Zoltan Varga <vargaz@gmail.com>
542 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
544 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
546 * object-internals.h (MonoException): Add missing _data member.
548 2007-08-08 Massimiliano Mantione <massi@ximian.com>
550 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
551 checking that only methods with matching qname or fqname are picked
552 from implemented interfaces.
554 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
556 * verify.c (do_newarr):added, do type verification of
557 newarr ops, push the right value on the eval stack.
558 * verify.c (mono_method_verify): use do_newarr
561 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
563 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
564 factored the common code into get_boxable_mono_type, which
565 is now using mono_type_get_full, this fixed byref related tests.
567 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
569 * class.c: added mono_type_get_full, this function has the same
570 behavior of mono_class_get_full but the returned MonoType has
571 all metadata of the associated token in case of a typespec token.
572 * class.c: added mono_type_retrieve_from_typespec, used by
573 mono_type_get_full to retrieve the token type.
574 * class.c (mono_class_create_from_typespec): changed to use
575 mono_type_retrieve_from_typespec.
576 * class.c (mono_ldtoken): changed to use mono_type_get_full
577 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
578 * class-internals.h: exported mono_type_get_full for internal use.
580 2007-08-16 Jb Evain <jbevain@novell.com>
582 * domain.c (supported_runtimes): add entry for
583 the 'moonlight' runtime version.
585 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
587 * verify.c (mono_method_verify): small typo sliped in.
589 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
591 * verify.c (do_unbox_value): added, do type verification of
593 * verify.c (mono_method_verify): use do_unbox_value
596 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
598 * verify.c (dump_stack_value): fixed typo, was printing string
599 instead of object on stack.
600 * verify.c (do_box_value): moved the byref check up as it leads
601 to invalid code and should be done earlier.
602 * verify.c: improved error messages for and ldobj
604 2007-08-15 William Holmes <billholmes54@gmail.com>
606 * marshal.c (emit_marshal_custom): Omit the call to
607 marshal_native_to_managed when calling native to managed
608 and the argument is specified as an out argument.
610 Code is contributed under MIT/X11 license.
612 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
614 * verify.c: fixed the type checks for generics, function pointers and vectors.
615 Added type verification for ldobj and ldtoken. The verifier
616 would segfault if header or signature of a method contained references
617 to non-existant types.
619 2007-08-15 Jonathan Chambers <joncham@gmail.com>
621 * marshal.c (cominterop_get_ccw): Patch from
622 Bill Holmes to no walk up interface hierarchy.
623 All parent methods should be present in the interface for COM.
625 Code is contributed under MIT/X11 license.
627 2007-08-15 Jonathan Chambers <joncham@gmail.com>
629 * marshal.c (emit_marshal_com_interface): Patch from
630 Bill Holmes to handle COM Interfaces as return values
631 for native->managed calls.
633 Code is contributed under MIT/X11 license.
635 2007-08-14 Jonathan Chambers <joncham@gmail.com>
637 * marshal.c (cominterop_get_idispatch_for_object): Implement
638 for runtime callable wrappers.
640 Code is contributed under MIT/X11 license.
642 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
644 * pedump.c (main): changed from mono_init to mono_init_from_assembly
645 so 2.0 types are accessible
648 2007-08-13 Miguel de Icaza <miguel@novell.com>
650 * domain.c (mono_init_internal): Call mono_assembly_load_friends
651 once we load mscorlib. Due to the order in which we initialize,
652 the mono_assembly_load_full routine that loads mscorlib did not
653 load friends. We now load it once we load the
654 mono_defaults.internals_visible_class class.
656 * assembly.c: Expose the mono_load_friend_assemblies method.
658 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
660 * verify.c: improved the handling of boxing, better
661 type checking for unary ops and conversion. Fix bug
662 regarding managed pointer compatibility checking
664 2007-08-11 Zoltan Varga <vargaz@gmail.com>
666 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
668 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
670 2007-08-09 Raja R Harinath <rharinath@novell.com>
672 * reflection.c (dup_type): Remove.
673 * class.c (dup_type): Remove.
674 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
675 instead of the dodgy 'dup_type'.
676 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
677 handle the case where 'dup_type' needed the second argument.
679 2007-08-08 Zoltan Varga <vargaz@gmail.com>
681 * domain.c: Fix a warning.
683 2007-08-08 Massimiliano Mantione <massi@ximian.com>
685 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
686 checking that methods with the same fqname are not overridden
687 with a method from an ancestor.
689 2007-08-07 Zoltan Varga <vargaz@gmail.com>
691 * threads.c (free_thread_static_data_helper): Avoid a crash if
692 thread->static_data is not yet set.
694 2007-08-07 Jonathan Chambers <joncham@gmail.com>
696 * marshal.c: Use correct image when emitting
697 native wrapper for COM calls.
699 Code is contributed under MIT/X11 license.
701 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
703 * icall-def.h, security.c, security.h :
704 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
706 2007-08-07 Martin Baulig <martin@ximian.com>
708 * mono-debug-debugger.h
709 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
711 * domain.c (mono_domain_free): Call
712 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
714 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
716 * verify.c (check_underflow, check_overflow): error message now returns IL offset
717 * verify.c (in_same_block): code should test if either offset is inside the clauses
718 * verify.c (mono_method_verify): push the exception into the eval stack of exception
721 2007-08-03 Zoltan Varga <vargaz@gmail.com>
723 * image.c (mono_image_close): Fix a leak.
725 * object.c (mono_runtime_invoke_array): Avoid using alloca.
727 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
729 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
731 * domain.c, threads.c, threads-types.h: fix memory retention issue
732 with thread static variables not being cleared on domain unload.
733 Reuse thread static slots after domain unload.
735 2007-08-03 Zoltan Varga <vargaz@gmail.com>
737 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
740 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
741 now done in mono_runtime_invoke_array.
743 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
744 receiver is a nullable type.
746 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
749 2007-08-03 Jonathan Chambers <joncham@gmail.com>
751 * marshal.c: Implement COM Objects as return type for
752 managed->unmanaged calls. Added Release calls for COM Object
753 out/return values in managed->unmanaged calls.
755 Code is contributed under MIT/X11 license.
757 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
759 * threads.h, threads-type.h: move the hazard pointer declarations
760 to the private header.
762 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
764 * file-io.c, appdomain.c: memory leak fixes.
766 2007-08-02 Dick Porter <dick@ximian.com>
769 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
770 SO_REUSEADDR setting into io-layer/sockets.c.
772 2007-08-01 Zoltan Varga <vargaz@gmail.com>
774 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
775 from Object when called on a generic parameter. Fixes #82211.
777 2007-08-01 Dick Porter <dick@ximian.com>
779 * file-io.c (convert_share): Test FileShare values bit-by-bit.
780 Fixes bug 79250 yet again.
782 2007-07-30 Martin Baulig <martin@ximian.com>
784 Merged the `debugger-dublin' branch.
787 (MonoDebugDataTable): New typedef.
788 (MonoDebugMethodAddressList): New typedef.
789 (MonoDebugWrapperData): Removed.
790 (MonoDebugSymbolTable): Removed `current_data_table',
791 `current_data_table_size', `current_data_table_offset'.
792 (MonoDebugDataItemType): Moved into mono-debug.c.
793 (MonoDebugMethodJitInfo): Remove `address'.
794 (mono_debug_data_table): New global variable.
795 (mono_debug_lookup_method_addresses): New public function.
796 (mono_debug_find_method): Take a `MonoMethod *', not a
797 `MonoDebugMethodInfo *'.
799 * mono-debug.c: Drop support for the old symbol tables.
801 2007-06-28 Martin Baulig <martin@ximian.com>
803 * mono-debug.c (mono_debug_debugger_version): New public variable.
805 2007-07-31 William Holmes <billholmes54@gmail.com>
807 * metadata.c Changed mono_type_create_from_typespec to not insert
808 the type into the hash map until after
809 do_mono_metadata_parse_type has completed.
811 Code is contributed under MIT/X11 license.
813 2007-07-31 Zoltan Varga <vargaz@gmail.com>
815 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
816 generic parameter. Fixes #82211.
818 2007-07-27 Jb Evain <jbevain@novell.com>
820 * pedump.c (dump_metadata, dump_metadata_header): dump
821 versions contained in the metadata header.
823 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
825 * threads.c: register small_id_table with the GC.
827 2007-07-27 Mark Probst <mark.probst@gmail.com>
829 * threads.c, threads.h, class-internals.h, object-internals.h:
830 Hazard pointers, to be used by lock-free parallel algorithms.
832 2007-07-26 Dick Porter <dick@ximian.com>
834 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
835 routine on non-windows platforms, as I've not managed to think of
836 a non-kludgy way of doing this. Finishes off bug 78739.
838 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
840 * object.c: properly setup interface_bitmap in proxy vtables.
842 2007-07-25 Marek Habersack <mhabersack@novell.com>
844 * appdomain.c (get_shadow_assembly_location): do not use TickCount
845 to create unique shadow copy target directories, use the domain's
846 serial number instead. Each domain gets a unique target directory
849 * domain.c (mono_domain_create): added code to increment domain
850 shadow copy serial number and cache the value in the current
853 * domain-internals.h (struct _MonoDomain): added a new field -
854 shadow_serial to hold the serial number used in generation of
855 shadow-copy directories. This is to make sure that the directory
856 name is unique for each and every domain created. We avoid a race
857 condition with overriding assemblies already in use by other app
860 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
862 * class.c (mono_bounded_array_class_get): fixed memory leak when
863 binding generic parameters.
865 2007-07-24 Raja R Harinath <rharinath@novell.com>
867 * metadata.c (do_mono_metadata_parse_generic_class): Use
868 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
871 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
873 * loader.c, class-internals.h, reflection.c: removed the per-method
874 generics hashtable: we use the global one through the call of
875 mono_class_inflate_generic_method ().
877 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
879 * class.c, metadata.c, class-internals.h: introduce yet another
880 generics global cache for inflated methods (fixes 98% of the perf
881 issue in bug #81806).
883 2007-07-23 Raja R Harinath <rharinath@novell.com>
885 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
886 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
887 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
888 return a MonoGenericInst containing (a copy) of those types.
889 (mono_metadata_inflate_generic_inst): Update to changes.
890 (mono_metadata_parse_generic_inst): Likewise.
891 (mono_get_shared_generic_inst): Likewise.
892 * reflection.c (mono_class_bind_generic_parameters): Likewise.
893 (mono_reflection_bind_generic_method_parameters): Likewise.
894 * metadata-internals.h: Likewise.
895 * icall.c (free_generic_context): Kill.
896 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
898 * reflection.c (reflection_methodbuilder_to_mono_method): Use
899 mono_metadata_type_dup.
900 * marshal.c (mono_mb_create_method): Likewise.
902 * metadata.c (mono_metadata_type_dup): Rename from
903 mono_metadata_type_dup_mp. Take an optional mempool instead of a
904 MonoImage. Handle a few more cases, esp. when no mempool is given.
905 * marshal.c, metadata-internals.h: Update to changes.
907 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
909 * class.c: fixed a small leak for array classes and removed warning.
911 2007-07-22 Zoltan Varga <vargaz@gmail.com>
913 * loader.c (mono_method_get_param_token): Make this work on generic methods.
914 Return 0x8000000 for return parameters. Fixes #82161.
916 2007-07-21 Marek Habersack <grendello@gmail.com>
918 * appdomain.c (get_shadow_assembly_location): append the current
919 ticks value to the path. Avoids overwriting the same assemblies by
920 several threads at the same time.
922 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
923 and Raja R Harinath <rharinath@novell.com>
925 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
927 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
928 property for testing if a method is a generic method definition.
930 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
932 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
934 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
936 * verify.c: used function from private branch, reverted to the one in class.h
938 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
940 * verify.c: a typo slipped in and the code wont compile
942 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
944 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
945 disabled box instruction as it is doing the wrong thing
946 improved stack dump messages, now it is easier to debug type related issues
949 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
951 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
953 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
955 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
956 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
957 grouped with class and valuetype. This change will simply
958 the code as it should be handled just like unmanaged pointers.
960 2007-07-19 Mark Probst <mark.probst@gmail.com>
962 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
964 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
966 * verify.c: several stack merge issues fixed, reference comparisons now
967 check the type size. strict type check now works correctly.
968 added more uses of IS_MANAGED_POINTER macro.
969 fixed issues pointed by running the test suite against .net.
972 2007-07-19 Mark Probst <mark.probst@gmail.com>
974 * class.c, loader.c, class-internals.h: Removed the
975 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
978 * icall.c: Better error checking in some internal reflection
981 2007-07-18 William Holmes <billholmes54@gmail.com>
983 * filewatcher.c : removed unused variable 'filename' in
984 ves_icall_System_IO_FSW_SupportsFSW
986 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
988 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
991 2007-07-15 Zoltan Varga <vargaz@gmail.com>
993 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
995 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
997 2007-07-14 Zoltan Varga <vargaz@gmail.com>
999 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
1000 Implement generics support.
1001 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
1003 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
1004 type_args and method_args arguments.
1005 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
1006 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
1007 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
1009 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
1011 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
1012 It adds a rootimage parameter to mono_reflection_get_type_internal,
1013 adds new function mono_reflection_get_type_with_rootimage and use
1014 the rootimage to resolve the types instead of the current image
1016 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
1018 * culture-info-table.h: Forgot to update after r78304.
1020 2007-07-13 Raja R Harinath <rharinath@novell.com>
1022 * class.c (mono_class_is_open_constructed_type)
1023 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
1025 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
1027 * class.c (mono_bounded_array_class_get): method fails if used with
1028 an incomplete TypeBuilder enum (no basetype field), fixed it by
1029 avoiding calculating the size for such array as it cannot be instantiated.
1032 2007-07-12 Raja R Harinath <rharinath@novell.com>
1034 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
1036 * metadata.c, reflection.c: Update to changes.
1038 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
1040 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
1041 mono_class_is_valid_enum, they are used to valide a enum when loading.
1042 * reflection.c: used new functions to throw TypeLoadException when and
1043 invalid enum is build with TypeBuilder. Fixes #82018
1045 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
1047 * object.c: forgot commit of mono_class_setup_methods () to access
1049 * object-internals.h: added a few more handy fields to
1052 2007-07-11 Zoltan Varga <vargaz@gmail.com>
1054 * object.c (build_imt): Call mono_class_setup_methods () before accessing
1057 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
1059 * class-internals.h, object-internals.h, object.c: IMT-based
1060 interface invocation core from Massimiliano Mantione
1061 (massi@ximian.com) with a reworked arch-specific interface,
1062 bsearch implementation and a few bugfixes and memory savings by me.
1064 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
1066 * class.c (mono_class_create_from_typedef): mono would segfault if
1067 an enum did not have a __value field. It now throws a TypeLoadException
1068 for such cases. Fix bug #82022
1070 2007-07-10 Zoltan Varga <vargaz@gmail.com>
1072 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
1074 2007-07-09 Mark Probst <mark.probst@gmail.com>
1076 * class.c (mono_class_init): If a class is already inited but has
1077 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
1079 2007-07-09 Mark Probst <mark.probst@gmail.com>
1081 * class.c: Properly handle the case of an unimplemented interface
1082 method. Fixes: 81673.
1084 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
1086 * class-internals.h, object.c: cleanup patch from massi: use
1087 MonoVTable->interface_bitmap since the vtable interfaces offset array
1090 2007-07-10 Zoltan Varga <vargaz@gmail.com>
1092 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
1093 GetMDStreamVersion icall instead.
1095 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
1097 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
1098 not use mono_dl_build_path() with a full library name: makes
1099 fallbacks to libgaim and libfam work.
1101 2007-07-06 William Holmes <billholmes54@gmail.com>
1103 * assembly.c: Added a continue statement in probe_for_partial_name when
1104 parse_assembly_directory_name fails. Fixes : 82002
1106 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
1108 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
1109 and added a verification for TYPEDBYREF.
1110 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
1111 make native int interchangeable with int32 and some small cleanup and formating.
1112 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
1113 handle byref of byref.
1114 * verify.c (push_local): handle byref of byref.
1115 * verify.c (do_binop): invalid mix of values is unverifiable
1116 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
1117 added visibility checks
1118 * verify.c (field related method): added visibility checks
1119 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
1121 2007-07-06 Zoltan Varga <vargaz@gmail.com>
1123 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
1126 2007-07-05 Zoltan Varga <vargaz@gmail.com>
1128 * profiler.c (mono_profiler_load): Fix an off-by-one error.
1130 * marshal.c (emit_marshal_string): When returning a string from managed code,
1131 allways make a copy even for unicode strings. Fixes #81990.
1133 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
1135 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
1136 of byref generic inst types (bug #81997).
1138 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
1140 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
1141 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
1143 2007-07-02 Zoltan Varga <vargaz@gmail.com>
1145 * marshal.c (emit_marshal_string): Add support for unicode strings in
1146 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
1148 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
1150 * verify.c: field load/store are now verified, missing only access checks now
1152 2007-06-28 Martin Baulig <martin@ximian.com>
1154 * mono-debug.c (mono_debug_debugger_version): New public variable.
1156 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
1158 * locales.c: When constructing DateTimeFormat or NumberFormat for
1159 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
1160 MonoCultureInfo contructed from the current locale is always
1161 read-only and has UseUserOverride set to true. All MonoCultureInfo
1162 instances returned for GetCultures have both IsReadOnly and
1163 UseUserOverride set to true. Fixes part of bug #81930.
1165 2007-06-22 Jonathan Chambers <joncham@gmail.com>
1167 * icall-def.h: Update System.__ComObject icalls
1168 * marshal.c: Avoid managed transition (and object creation)
1169 when looking up COM interface in RCW.
1172 Code is contributed under MIT/X11 license.
1174 2007-06-22 Zoltan Varga <vargaz@gmail.com>
1176 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
1177 to avoid crashes during assembly unloading.
1179 2007-06-22 Raja R Harinath <rharinath@novell.com>
1181 Fix MethodInfo.IsGenericMethodDefinition
1182 * reflection.c (mono_reflection_bind_generic_method_parameters):
1183 Rearrange code to ensure we always uses a generic method definition.
1184 * class.c (mono_class_inflate_generic_method_full): Set
1185 'generic_container' field only for generic method definitions.
1186 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
1187 Use presense of 'generic_container' field as indication of being a
1188 generic method definition.
1190 2007-06-21 Zoltan Varga <vargaz@gmail.com>
1192 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1194 * object-internals.h: Reflect changes in the layout of the managed Delegate
1197 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
1198 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
1199 runtime memory used by the dynamic method. Fixes #77146.
1201 2007-06-21 Dick Porter <dick@ximian.com>
1204 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
1205 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
1208 2007-06-21 Raja R Harinath <rharinath@novell.com>
1210 * reflection.c (method_encode_methodspec): Add a tripwire.
1211 * class.c (inflate_generic_type): The fully open generic type is
1212 not the same as the generic type definition.
1214 2007-06-21 Martin Baulig <martin@ximian.com>
1216 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
1218 * mono-debug-debugger.h
1219 (MonoDebuggerBreakpointInfo): Removed.
1220 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
1221 (mono_debugger_remove_breakpoint): Likewise.
1222 (mono_debugger_breakpoint_callback): Likewise.
1223 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
1225 2007-06-21 Raja R Harinath <rharinath@novell.com>
1227 * metadata.c (mono_metadata_lookup_generic_class): The fully open
1228 generic type is not the same as the generic type definition.
1229 * class.c (mono_generic_class_get_class): Likewise.
1231 2007-06-20 Geoff Norton <gnorton@customerdna.com>
1233 * icall.c: The second argument to
1234 System.Reflection.MethodBase.GetMethodFromHandleInternalType
1235 is a MonoType not a MonoClass.
1237 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
1239 * verify.c: support for function pointers in the verifier
1241 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
1243 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
1245 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
1247 * assembly.c: removed Mono.Data.SqliteClient from the list of
1248 forward-compatible assemblies as it breaks the ABI (bug #81899).
1250 2007-06-19 Raja R Harinath <rharinath@novell.com>
1252 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
1253 lookup/update with the loader lock.
1254 * reflection.c (mono_class_bind_generic_parameters): No need to
1255 protect mono_metadata_lookup_* with the loader lock.
1256 * class.c (inflate_generic_type): Likewise.
1258 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
1259 on a generic instantiated type.
1261 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
1263 *verify.c: produce meanfull error messages on verification error
1264 *verify.c: fixed some cases of verification errors reported as validation errors
1265 *pedump.c: fixed the error name array, now it shows validation errors properly
1266 *verify.h: fixed the contant that should be used for verification errors
1268 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
1270 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
1271 for bug #77596, 81858 and 80743 (generics data structures on domain
1274 2007-06-15 Raja R Harinath <rharinath@novell.com>
1276 Avoid allocating 'MonoGenericContext' on the heap.
1277 * class-internals (_MonoMethodInflated::context): Make field
1278 inline, not a pointer.
1279 * loader.c (method_from_methodspec): Allocate 'new_context' on the
1280 stack. Use the context embedded within the inflated method as the
1281 hash key, rather than 'new_context'.
1282 * class.c (inflate_generic_context): Simplify. Return a struct
1283 rather than allocating on the heap.
1284 (mono_class_inflate_generic_method_full): Update to changes. Now,
1285 doesn't salt away a copy of the context -- simplifying the
1286 lifetime rules of a 'MonoGenericContext *'.
1287 (mono_method_get_context): Return pointer to embedded context.
1288 (setup_generic_array_ifaces): Allocate temporary context on stack.
1289 * reflection.c (inflate_mono_method): Likewise.
1290 (mono_reflection_bind_generic_method_parameters): Likewise.
1291 Use the context embedded within the inflated method as the hash key.
1293 Avoid a source of allocation of 'MonoGenericContext'.
1294 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
1295 and 'cached_context' fields into embedded 'MonoGenericContext' field.
1296 * class.c: Update to changes.
1297 (mono_generic_class_get_context): Simplify drastically. Now just
1298 returns a pointer to the field.
1299 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
1300 argument as a const pointer.
1301 (mono_metadata_generic_context_equal): Likewise.
1302 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
1305 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
1307 * verify.c improved the handling of brtrue/brfalse, factored out common code
1309 2007-06-14 Raja R Harinath <rharinath@novell.com>
1311 Kill MonoGenericMethod.
1312 * class-internals.h (MonoGenericContext::method_inst): Rename from
1313 'gmethod' and convert to a MonoGenericInst.
1314 (MonoGenericMethod): Remove.
1315 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
1316 * loader.c (method_from_methodspec): Update to changes. Use a
1317 MonoGenericContext as the key to the hashtable.
1318 * metadata.c (mono_metadata_generic_context_equal): Rename from
1319 'mono_metadata_generic_method_equal' and take MonoGenericContext.
1320 (mono_metadata_generic_context_hash): Likewise from
1321 'mono_metadata_generic_method_hash'. Change hash function.
1322 (mono_metadata_load_generic_params): Update to changes.
1323 (mono_get_shared_generic_method): Remove.
1324 * metadata-internals.h (mono_get_shared_generic_method): Remove.
1325 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
1326 (inflate_generic_context): Likewise.
1327 (mono_class_inflate_generic_method_full): Likewise.
1328 (setup_generic_array_ifaces): Likewise.
1329 (mono_class_create_from_typespec): Likewise.
1330 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
1331 (method_encode_methodspec): Update callsite.
1332 (reflection_methodbuilder_to_mono_method): Update to changes.
1333 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
1334 MonoGenericContext as the key to the hashtable.
1335 (inflate_mono_method): Update to changes.
1337 * class-internals.h (MonoGenericMethod::container): Remove.
1338 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
1340 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
1342 * profiler-private.h, profiler.c, profiler.h: added API to profile
1345 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
1347 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
1349 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
1351 * verify.c: method invocation is now validated, now we verify parameter types on stack.
1352 Fixed overflow and underflow not aborting the verification process.
1354 2007-06-13 Mark Probst <mark.probst@gmail.com>
1356 * class-internals.h (MonoStats): Added stats entries for dynamic
1359 2007-06-12 Zoltan Varga <vargaz@gmail.com>
1361 * loader.c (mono_free_method): Free header->locals and header->clauses.
1363 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
1366 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
1368 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
1370 2007-06-12 Raja R Harinath <rharinath@novell.com>
1372 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
1375 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
1377 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
1379 2007-06-11 Raja R Harinath <harinath@gmail.com>
1381 MonoGenericMethod on a diet
1382 * class-internals.h (_MonoMethodInflated::reflection_info): Move
1384 (_MonoGenericMethod::reflection_info): ... from here.
1385 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
1387 * reflection.c (inflate_mono_method): Likewise.
1388 (mono_reflection_bind_generic_method_parameters): Likewise.
1390 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
1392 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
1393 *verify.c: factored long ldarg forms to share code with short forms
1395 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
1397 *verify.c: fixed code formating factored some duplicate code
1400 *verify.h: fixed binary incompatibility introduced earlier
1402 *pedump.c: fixed formating
1404 2007-06-11 Raja R Harinath <harinath@gmail.com>
1406 Fix assertion when disassembling Mono.C5.dll
1407 * loader.c (method_from_methodspec): Avoid inflating a method
1408 twice with the same context. If the methodref is inflated, use
1409 the declaring method instead.
1411 * class.c (mono_class_from_generic_parameter): Fix case similar to
1412 bug #81830 handled below, but for method containers.
1414 2007-06-10 Raja R Harinath <harinath@gmail.com>
1416 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
1417 get_shared_generic_class. Directly inflate the instance.
1418 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
1419 (inflate_generic_class): Delete.
1420 (get_shared_generic_class): Delete. Move setting of
1421 'cached_class' and 'cached_context' ...
1422 * metadata.c (mono_metadata_lookup_generic_class): ... here.
1424 * metadata.c (mono_metadata_lookup_generic_class): Change
1425 signature to take the components of a MonoGenericClass rather than
1426 an allocated MonoGenericClass. Change semantics to be intern-like.
1427 * reflection.c (mono_class_bind_generic_parameters): Update to
1428 changes. Make locking region tighter.
1429 * class.c (inflate_generic_class): Update to changes.
1430 (get_shared_generic_class): Likewise.
1431 * metadata-internals.h: Likewise.
1433 * reflection.c (mono_class_bind_generic_parameters): Take and
1434 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
1435 (mono_reflection_bind_generic_parameters): Use
1436 'mono_class_bind_generic_parameters' rather than duplicate the code.
1437 * class.c (mono_bounded_array_class_get): Update to changes.
1438 * object-internals.h: Likewise.
1440 * reflection.c (mono_class_bind_generic_parameters): Only support
1441 parameterizing generic type definitions. Remove support for other
1444 2007-06-08 Zoltan Varga <vargaz@gmail.com>
1446 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
1448 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
1449 in the dynamic case.
1451 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
1453 * threads.c: When cleaning up thread, reset the Background bit.
1456 2007-06-08 Jonathan Chambers <joncham@gmail.com>
1458 * metadata.c: Move variable declarations to top of scope.
1459 * verify.c: Move variable declarations to top of scope.
1461 Code is contributed under MIT/X11 license.
1463 2007-06-08 Raja R Harinath <rharinath@novell.com>
1465 * reflection.c (mono_class_bind_generic_parameters): Replace
1466 open-coded loop with mono_metadata_inflate_generic_inst.
1468 * class.c (get_shared_generic_class): Don't call
1469 mono_get_shared_generic_inst. Use the container's own
1472 * metadata.c (mono_metadata_load_generic_params): Move
1473 initialization of 'context' field here from ...
1474 * class.c (mono_class_create_from_typedef): ... here, and ...
1475 * loader.c (mono_get_method_from_token): ... here.
1477 * class.c (get_shared_generic_class): Rename from
1478 mono_get_shared_generic_class and make static.
1479 (mono_get_shared_generic_inst): Move to metadata.c.
1480 * loader.c (mono_get_shared_generic_method): Likewise.
1481 * class-internals.h, metadata-internals.h: Update to changes.
1484 * class.c (mono_class_from_generic_parameter): Don't assume a
1485 generic container owner exists. Generic containers from monodis
1488 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
1490 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
1491 * verify.h: new typedefs to returns the non-verifiable status
1492 * verify.c: initial implementation of generics, stack merging and object compatibility check
1494 2007-06-06 Mark Probst <mark.probst@gmail.com>
1496 * class.c, image.c, class-internals.h (MonoImage): class_cache is
1497 a MonoInternalHashTable again (fixed bug in internal hash table
1500 2007-06-06 Mark Probst <mark.probst@gmail.com>
1502 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
1503 MonoInternalHashTable again (fixed bug in internal hash table
1506 2007-06-06 Mark Probst <mark.probst@gmail.com>
1508 * class.c, image.c, class-internals.h, domain.c,
1509 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
1510 changes. Have to figure out what makes them break the SWF
1513 2007-06-04 Mark Probst <mark.probst@gmail.com>
1515 * class.c, image.c, class-internals.h (MonoImage): class_cache is
1516 a MonoInternalHashTable now.
1518 2007-06-04 Mark Probst <mark.probst@gmail.com>
1520 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
1521 MonoInternalHashTable now.
1523 2007-05-31 Zoltan Varga <vargaz@gmail.com>
1525 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
1528 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
1530 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
1531 dependent trampoline.
1533 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1535 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
1537 2007-05-29 Robert Jordan <robertj@gmx.net>
1539 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
1541 2007-05-28 Zoltan Varga <vargaz@gmail.com>
1543 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
1545 2007-05-25 Jonathan Chambers <joncham@gmail.com>
1547 * marshal.c: Fix interface lookup loops for
1548 cominterop_get_com_slot_for_method and
1549 cominterop_get_method_interface. Only need to lookup
1550 if type is a class, else use interface type method is on.
1552 Code is contributed under MIT/X11 license.
1554 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
1556 * reflection.c: HasSecurity can be present even if no specially
1557 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
1558 SecurityAttribute). Fix CAS regression tests on buildbot.
1560 2007-05-24 Jonathan Chambers <joncham@gmail.com>
1562 * appdomain.c: Add configure checks for header files.
1563 * image.c: Add configure checks for header files.
1564 * file-io.c: Add configure checks for header files.
1565 * debug-mono-symfile.c: Add configure checks for header files.
1566 * threadpool.c: Add configure checks for header files.
1567 * console-io.c: Add configure checks for header files.
1568 * profiler.c: Add configure checks for header files.
1569 * rawbuffer.c: Add configure checks for header files.
1570 * icall.c: Add configure checks for header files.
1571 * rand.c: Add configure checks for header files.
1572 * socket-io.c: Add configure checks for header files.
1574 Code is contributed under MIT/X11 license.
1576 2007-05-24 Zoltan Varga <vargaz@gmail.com>
1578 * reflection.c (mono_custom_attrs_from_builders): Remove the
1579 assertion as it breaks the build.
1581 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
1583 * reflection.c (lookup_custom_attr): Make a copy here too.
1585 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
1588 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
1591 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
1594 2007-05-22 Zoltan Varga <vargaz@gmail.com>
1596 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
1597 (load_cattr_value): Ditto.
1599 2007-05-20 Zoltan Varga <vargaz@gmail.com>
1601 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
1603 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
1605 * threads.c: In "start_wrapper", set apartment_state to MTA if
1606 apartment_state is Unknown and we're running on 2.0 profile or
1608 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
1609 to main method, then set apartment_state to Unknown on 1.0 profile,
1610 and MTA on 2.0 profile.
1612 2007-05-16 Jb Evain <jb@nurv.fr>
1614 * class-internals.h (MonoDefaults): Add an attribute_class and
1615 customattribute_data_class.
1616 * domain.c (mono_init_internal): Populate them.
1617 * reflection.c: Use them to remove duplicates. Make a vew
1618 MonoClass variables `static'.
1620 2007-05-15 Massimiliano Mantione <massi@ximian.com>
1622 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
1623 step in implementing IMT, so that all isinst checks now can go
1625 This was needed because vtables for TransparentProxy need to look
1626 like the vtable of the "target" class, so they need to point to
1627 its interface bitmap directly.
1629 * object.c: inside "mono_class_create_runtime_vtable" and
1630 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
1632 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
1634 * object-internals.h
1635 culture-info.h : added territory field in MonoCulture and
1636 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
1637 * locales.c : fill territory field above too.
1638 * culture-info-table.h : regenerated.
1640 2007-05-12 Zoltan Varga <vargaz@gmail.com>
1642 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
1645 2007-05-11 Jonathan Chambers <joncham@gmail.com>
1647 * object.c: Always initialize apartment, even if
1648 there is no custom attributes on entry point.
1650 Code is contributed under MIT/X11 license.
1652 2007-05-10 Jonathan Chambers <joncham@gmail.com>
1654 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
1655 * metadata.c: If no encoding is set, check for unicode
1658 Code is contributed under MIT/X11 license.
1660 2007-05-09 Jonathan Chambers <joncham@gmail.com>
1662 * threads.c: Handle if mono_thread_current returns NULL
1664 Code is contributed under MIT/X11 license.
1666 2007-05-09 Jonathan Chambers <joncham@gmail.com>
1668 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
1669 in start_wrapper. Added mono_thread_init_apartment_state and
1670 mono_thread_cleanup_apartment_state.
1671 * object.c: Initialize thread apartment state on main thread
1672 by checking for STAThreadAttribute on entry point.
1673 * object-internals.h: Add apartment_state field to MonoThread.
1674 * threads-types.h: Add unmanaged definition of
1675 System.Threading.ApartmentState, MonoThreadApartmentState.
1677 Code is contributed under MIT/X11 license.
1679 2007-05-08 Jonathan Chambers <joncham@gmail.com>
1681 * class.c: Fix windows build.
1682 * class-internals.h: Fix windows build.
1684 Code is contributed under MIT/X11 license.
1686 2007-05-08 Robert Jordan <robertj@gmx.net>
1688 * process.c (CreateProcess_internal):
1689 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
1690 .CreateNoWindow was specified. Fixes #81496.
1692 2007-05-08 Massimiliano Mantione <massi@ximian.com>
1694 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
1695 step in implementing IMT, replaced it with two compact arrays
1696 (interfaces_packed and interface_offsets_packed) and a bitmap that
1697 is used for isinst checks (interface_bitmap).
1699 * class.c: (compare_interface_ids): compare function to pass to
1700 bsearch when looking for an interface with a given id.
1701 (mono_class_interface_offset): reimplemented using bsearch on
1702 interfaces_packed, getting the offset from interface_offsets_packed.
1703 (print_implemented_interfaces): utility debugging function.
1704 (setup_interface_offsets): reworked to initialize interfaces_packed,
1705 interface_offsets_packed and interface_bitmap.
1707 * object.c: replaced all accesses to "MonoClass.interface_offsets"
1708 with uses of interfaces_packed and interface_offsets_packed.
1710 2007-05-08 Massimiliano Mantione <massi@ximian.com>
1712 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
1713 mono_class_interface_offset prototype to wrap all accesses to
1714 "MonoClass.interface_offsets".
1716 * class.c: Implemented mono_class_interface_offset, and wrapped all
1717 accesses to "MonoClass.interface_offsets".
1719 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
1720 "MonoClass.interface_offsets".
1722 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
1724 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
1725 GetMethodFromHandle overloads (bug #78637).
1727 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
1729 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
1730 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
1732 2007-05-01 Zoltan Varga <vargaz@gmail.com>
1734 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
1737 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
1739 (mono_custom_attrs_from_index): Ditto.
1741 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
1744 2007-04-30 Zoltan Varga <vargaz@gmail.com>
1746 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
1747 is now allocated from a mempool.
1749 2007-04-28 Zoltan Varga <vargaz@gmail.com>
1751 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
1752 caller holds threads_lock, leading to deadlocks. Fixes #81476.
1754 2007-04-26 Zoltan Varga <vargaz@gmail.com>
1756 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
1757 mono_loader_clear_error () too late. Fixes #81463.
1759 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
1761 * culture-info-table.h : regenerated.
1763 2007-04-25 Zoltan Varga <vargaz@gmail.com>
1765 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
1768 2007-04-25 Dick Porter <dick@ximian.com>
1770 * Makefile.am: Put the mingw enforced-optimisation back into the
1771 PLATFORM_WIN32 section.
1773 2007-04-24 Zoltan Varga <vargaz@gmail.com>
1775 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
1778 * image.c (mono_image_load_module): New API function to load a module reference.
1780 * image.c (load_modules): Load modules lazily. Fixes #80812.
1782 * class.c (mono_class_from_typeref): Use mono_image_load_module.
1784 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
1786 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
1787 to mono_image_load_module_dynamic.
1789 2007-04-23 Jonathan Chambers <joncham@gmail.com>
1791 * marshal.c: Fix calling convention for CCW on non-windows
1792 platforms. STDCALL on windows, CDECL everywhere else to work
1793 with XPCOM and MainWin COM.
1795 Code is contributed under MIT/X11 license.
1797 2007-04-23 Martin Baulig <martin@ximian.com>
1802 (method_from_memberref): Added `gboolean *used_context' argument.
1803 (mono_get_method_from_token): Likewise.
1804 (mono_get_method_full): Don't insert the method in the cache when
1805 `used_context' is true.
1807 2007-04-23 Raja R Harinath <rharinath@novell.com>
1809 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
1811 * reflection.c (mono_reflection_bind_generic_parameters): Don't
1812 create new MonoTypes for returned types.
1813 * class.c (mono_generic_class_get_class): Export mono-internal.
1814 * class-internals.h: Update to changes.
1816 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
1818 * threadpool.c, threadpool.h, icall-def.h: patch from
1819 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
1821 2007-04-18 Zoltan Varga <vargaz@gmail.com>
1823 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
1825 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
1827 * threads.c (mono_thread_get_stack_bounds): New helper function.
1829 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
1830 Correctly compute stack bounds when attaching. Fixes #81394.
1832 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
1834 * reflection.c: fix handling of doubles in custom attributes
1835 for the arm-fpa format (bug #81368).
1837 2007-04-18 Raja R Harinath <rharinath@novell.com>
1839 * reflection.c (assembly_add_win32_resources): Mildly relax an
1840 bounds check to let the end pointer point just past the end of the
1841 allocated buffer. (may fix #81384)
1843 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
1845 * culture-info-table.h : regenerated.
1847 2007-04-07 Zoltan Varga <vargaz@gmail.com>
1849 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
1850 the thread is aborted early.
1852 2007-04-05 Dick Porter <dick@ximian.com>
1854 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
1855 FindFirstFile()/FindNextFile() to find entries. This lets the
1856 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
1859 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
1861 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
1863 2007-04-04 Martin Baulig <martin@ximian.com>
1866 (mono_method_desc_full_match): Add support for nested classes.
1868 2007-04-02 Zoltan Varga <vargaz@gmail.com>
1870 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
1872 2007-04-01 Zoltan Varga <vargaz@gmail.com>
1874 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
1875 waiting for too many threads.
1877 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
1879 * environment.c: Fix return value check on uname so we can get the
1880 executing version on Solaris operating systems.
1882 2007-03-28 Jb Evain <jbevain@gmail.com>
1884 * class.c (mono_type_get_name_recurse): Complete the
1885 fix for the creation of assembly qualified names for
1886 pointer types. Fixes #81208.
1888 2007-03-27 Dick Porter <dick@ximian.com>
1890 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
1891 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
1895 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
1896 the value of ReleaseMutex().
1898 2007-03-27 Dick Porter <dick@ximian.com>
1900 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
1901 in little-endian order, not network endian, so must be converted
1902 to host endian here. Fixes bug 80593.
1904 2007-03-22 Jb Evain <jbevain@gmail.com>
1906 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
1907 qualified names for pointer types. Fixes #81208.
1909 2007-03-21 Jonathan Chambers <joncham@gmail.com>
1911 * marshal.c: Add support for PreserveSigAttribute.
1913 Code is contributed under MIT/X11 license.
1915 2007-03-14 Zoltan Varga <vargaz@gmail.com>
1917 * process.c: Fix endianness issues. Fixes #81126.
1919 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
1920 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
1922 * image.c (mono_image_lookup_resource): Make this work on big-endian
1923 machines.Change API contract so the caller needs to free the return value.
1925 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
1928 2007-03-14 Martin Baulig <martin@ximian.com>
1930 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
1931 mono_type_get_desc() as well.
1933 2007-03-13 Jonathan Chambers <joncham@gmail.com>
1935 * icall.c: Fix environ access in VS.
1937 2007-03-13 Alp Toker <alp@atoker.com>
1939 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
1940 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
1943 2007-03-12 Zoltan Varga <vargaz@gmail.com>
1945 * reflection.c (mono_reflection_create_dynamic_method): Add support for
1946 circular references among dynamic methods. Fixes #81091.
1948 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
1950 2007-03-09 Martin Baulig <martin@ximian.com>
1952 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
1954 2007-03-09 Jonathan Chambers <joncham@gmail.com>
1956 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
1957 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
1959 Code is contributed under MIT/X11 license.
1961 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
1963 * loader.c: Reapply patch for bug #79424.
1965 2007-03-06 Zoltan Varga <vargaz@gmail.com>
1967 * metadata.c (mono_type_to_unmanaged): Only convert object to
1968 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
1970 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
1972 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
1973 (and incorrectly set) is_reference field from MonoGenericInst.
1975 2007-03-06 Zoltan Varga <vargaz@gmail.com>
1977 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
1980 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
1982 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
1984 2007-03-05 Miguel de Icaza <miguel@novell.com>
1986 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
1987 FileOptions.1 value to mean "temporary", map that to
1988 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
1992 2007-03-03 Marek Habersack <mhabersack@novell.com>
1994 * appdomain.c: implement MS .Net style shadow copying. Copies of
1995 the assemblies are made in a subdirectory of the dynamic base
1996 directory, the assembly names are preserved.
1997 Copy .mdb and .config files along with the assemblies being shadowed.
1999 2007-02-28 Zoltan Varga <vargaz@gmail.com>
2001 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
2002 (emit_marshal_handleref): Ditto.
2004 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
2005 on Visual C++. Fixes #80671.
2007 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
2009 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
2010 for clone operations.
2012 2007-02-28 Zoltan Varga <vargaz@gmail.com>
2014 * marshal.c: Fix warnings.
2016 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
2018 * loader.c: allow case-insensitive matching of the dll name
2019 in dllmap handling when prefixed with "i:".
2021 2007-02-20 Jonathan Chambers <joncham@gmail.com>
2023 * threads.c: Fix #ifdef for dummy_apc function for VS.
2025 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
2027 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
2029 2007-02-19 Massimiliano Mantione <massi@ximian.com>
2030 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
2031 giving precedence to the methods with a fully qualified name
2032 (InterfaceName.MethodName) when building the interface sections
2035 2007-02-16 Dick Porter <dick@ximian.com>
2037 * threadpool.c (append_job): Fix fast-path array handling, so it's
2038 less likely the array will grow exponentially when the load is
2041 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
2043 * metadata-internals.h, loader.c: fix dllmap lookup order
2044 for non-function maps, too, and prepare for fallback code.
2046 2007-02-12 Robert Jordan <robertj@gmx.net>
2048 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
2049 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
2050 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
2051 GlobalFree. Fixes a part of bug #77075.
2053 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
2055 * loader.c: implemented typedef parent in field memberref.
2057 2007-02-11 Jonathan Chambers <joncham@gmail.com>
2059 * marshal.c: Fix warnings and remember to call Release on
2062 Code is contributed under MIT/X11 license.
2064 2007-02-10 Miguel de Icaza <miguel@novell.com>
2066 * class-internals.h: Add MonoHandleRef definition, and
2067 handleref_class to mono_defaults.
2069 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
2070 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
2072 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
2073 (do nothing on this stage)
2074 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
2075 (emit_marshal_handleref): New method, used for argument handling
2078 2007-02-08 Jonathan Chambers <joncham@gmail.com>
2080 * class.c (mono_class_setup_parent): Lazily init com types.
2081 * domain.c (mono_init_internal, mono_init_com_types): Lazily
2083 * object.c (mono_remote_class_vtable): Lazily init com types.
2084 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
2085 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
2086 * domain-internals.h: Expose mono_init_com_types.
2087 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
2088 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
2089 Add support for COM Callable Wrapper marshalling.
2090 * marshal.h: Add icall definitions.
2091 * gc.c: Handle freeing of CCWs in finalizer code.
2093 Code is contributed under MIT/X11 license.
2095 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
2097 * reflection.c: changed all the signature encoding code to use
2098 a variable-sized buffer.
2100 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
2102 * marshal.c: locking fixes: never take the loader lock
2103 or other runtime locks when holding the marshal lock
2106 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
2108 * marshal.c: make the delegate function pointer mapping
2109 work for the moving GC.
2111 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
2113 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
2116 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
2118 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
2121 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
2123 * threadpool.c: made the code moving-GC safe.
2125 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
2127 * assembly.c, boehm-gc.c, class-internals.h, class.c,
2128 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
2129 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
2131 * reflection.c: warning cleanup, some threading and moving GC fixes.
2133 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
2135 * class.c, loader.c: create the needed Set/Get/Address array methods
2136 as well as the .ctors in mono_class_init (), fixes bug #80567.
2138 2007-01-24 Zoltan Varga <vargaz@gmail.com>
2140 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
2141 we doesn't decrease its alignment. Should fix the sparc build.
2143 2007-01-24 Dick Porter <dick@ximian.com>
2146 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
2147 Create the returned object if we need to ignore an unsupported
2148 socket option. Fixes a segfault reported by Atsushi.
2150 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
2152 * class.c, object.c: restrict GC-tracked fields to
2153 UIntPtr fields used inside corlib, so we provide better
2154 type info to the GC and also allow broken packing as in
2157 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
2159 * sgen-gc.c: removed duplicated function.
2161 2007-01-19 Miguel de Icaza <miguel@novell.com>
2163 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
2164 value that means that the value is not supported, but that we
2165 should not return a failure, but instead report this as a
2166 successful operation.
2168 2007-01-19 Raja R Harinath <rharinath@novell.com>
2170 Fix tests/bug79956.2.il
2171 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
2172 (mono_generic_class_get_class): If the generic definition in an
2173 enum, copy over other fields related to it.
2175 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
2177 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
2178 genericinst enums (bug #79215).
2180 2007-01-17 Massimiliano Mantione <massi@ximian.com>
2181 * class.c: Fix bug 80307.
2183 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
2185 * image.c: if the file table is not present, try to load
2186 all the modules, since we don't have info about them
2187 having or not metadata (bug #80517).
2188 * assembly.c: allow mono_assembly_load_references () to
2189 work for netmodules.
2191 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
2193 * image.c, metadata-internals.h, object.c: execute module
2194 cctors when running on the 2 runtime if present (bug #80487).
2196 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
2198 * icall.c: optimized InitializeArray() on bigendian.
2200 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
2202 * icall.c: fix for the broken ARM FPA double format.
2204 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
2206 * icall.c: handle endian issues for r4 and r8 types, too, in
2207 the InitializeArray() icall.
2209 2007-01-15 Miguel de Icaza <miguel@novell.com>
2211 * loader.c (mono_loader_error_prepare_exception): Clear the error
2212 once we have extracted the information from it, do this before we
2213 call into the JIT's class loading mechanisms.
2215 * object.c (mono_class_create_runtime_vtable): Do not clear the
2216 loader error before calling mono_class_get_exception_for_failure
2217 as the loader error is needed inside
2218 mono_class_get_exception_for_failure to throw the error (thinko).
2222 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
2224 * reflection.c: align fields rva data so it's faster to load at
2227 2007-01-12 Raja R Harinath <rharinath@novell.com>
2229 Prepare to simplify GenericMethod handling.
2230 * class-internals.h (mono_method_get_context): New accessor function.
2231 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
2232 rather than directly accessing '->context' field.
2234 * class-internals.h (_MonoGenericParam.method): Move ...
2235 (_MonoGenericContainer): ... here. Add into union with klass field.
2236 * class.c, icall.c, loader.c, metadata.c, reflection.c:
2239 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
2241 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
2242 the wrapper type enum and reduce relocations.
2244 2007-01-12 Raja R Harinath <rharinath@novell.com>
2246 * reflection.c (inflate_mono_method): Reuse method instantiation
2247 from the generic method, if available.
2249 2007-01-11 Jonathan Chambers <joncham@gmail.com>
2251 * marshal.c (emit_marshal_variant): Fix conv_arg
2252 type in last commit, based on whether parameter is byref.
2254 2007-01-11 Jonathan Chambers <joncham@gmail.com>
2256 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
2258 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
2259 MONO_TYPE_OBJECT back for VARIANT support.
2261 2007-01-11 Jonathan Chambers <joncham@gmail.com>
2263 * marshal.c, marshal.h, icall-def.h: Implement
2264 Marshal.ReAllocCoTaskMem.
2266 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
2268 * marshal.c: memory retention fixes: use the proper
2269 image cache for runtime_invoke method lookups.
2271 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
2273 * mempool.c: added code to help debug mempool allocations.
2275 2007-01-11 Dick Porter <dick@ximian.com>
2277 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
2278 support (experimenting with faking it with IP_MTU_DISCOVER for
2279 systems that don't have IP_DONTFRAGMENT.)
2280 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
2283 * icall-def.h: new System.Net.Sockets.Disconnect icall.
2285 * socket-io.h: Add new fields to MonoSocketAsyncResult
2286 corresponding to the new ones in Socket.cs.
2288 2007-01-11 Raja R Harinath <rharinath@novell.com>
2290 Fix IronPython regression mentioned in #80249
2291 * metadata.c (do_mono_metadata_parse_generic_class): Clear
2292 'cached_context' field, since it may have been initialized as a
2293 side-effect of metadata parsing.
2295 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
2296 (_MonoGenericClass.cached_class): Move here and rename from lone
2297 remaining field of ...
2298 (_MonoInflatedGenericClass): ... this. Remove.
2299 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
2302 Fix mcs/tests/test-128.cs regression.
2303 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
2304 2007-01-10 change below.
2305 [MONO_TYPE_OBJECT]: Recurse into array case.
2307 2007-01-11 Raja R Harinath <harinath@gmail.com>
2309 * class-internals.h (mono_get_inflated_generic_class): Remove.
2310 * class.c (mono_get_inflated_generic_class): Remove.
2311 (mono_generic_class_get_class): Rename from
2312 mono_class_create_generic.
2313 (mono_class_from_mono_type) [GENERICINST]: Use it.
2314 * reflection.c, metadata.c: Update to changes. Use
2315 'mono_class_from_mono_type'.
2317 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
2319 * reflection.c: use passed type when encoding an array element
2320 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
2322 2007-01-09 Robert Jordan <robertj@gmx.net>
2324 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
2325 result arguments (someDelegate.EndInvoke (unrelatedAres)).
2328 2007-01-09 Raja R Harinath <rharinath@novell.com>
2330 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
2332 * object.c (set_value): Avoid aliasing between type->data.klass
2333 and type->data.generic_class.
2335 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
2337 2007-01-08 Raja R Harinath <rharinath@novell.com>
2339 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
2340 between type->data.klass and type->data.generic_class.
2342 2007-01-08 Lluis Sanchez <lluis@ximian.com>
2344 * marshal.c: In MS.NET, StringBuilder objects are not copied by
2345 value in out parameters.
2347 2007-01-08 Raja R Harinath <rharinath@novell.com>
2349 Simplify invariant for MonoGenericClass::klass field.
2350 * class.c (mono_class_create_generic): Verify 'klass' is null.
2351 * metadata.c (do_mono_metadata_parse_generic_class): Don't
2352 initialize 'klass' field.
2354 2007-01-05 Raja R Harinath <rharinath@novell.com>
2356 Ongoing work to avoid redundant data and simplify invariants.
2357 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
2358 'generic_class', and change type to a GenericInst.
2359 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
2360 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
2362 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
2364 * class.c : skip io-layer under PLATFORM_WIN32.
2366 2007-01-03 Tor Lillqvist <tml@novell.com>
2368 Fix #80305: In a bundled executable, look in the bundled exe
2369 assembly to determine the runtime version. Add the possibility to
2370 bundle also the machine.config file.
2372 * assembly.c (mono_assembly_open_from_bundle): Make
2373 non-static. Allow being called even if we have no bundled
2374 assemblies, and return NULL right away in that case.
2376 * domain-internals.h: Declare mono_assembly_open_from_bundle()
2379 * domain.c (app_config_parse): Take an assembly exe file name as
2380 parameter instead of a config file name. Check for a bundled
2381 config file for that assembly by calling
2382 mono_config_string_for_assembly_file() (see below) before looking
2383 for one in the file system.
2384 (get_runtimes_from_exe): Corrsponding change to call of
2386 (get_runtimes_from_exe): Check for bundled assembly exe file first
2387 by calling mono_assembly_open_from_bundle(). If no bundled
2388 assembly exe file is found, call mono_image_open() as before to
2389 look it up in the file system.
2391 * mono-config.c: Add variable bundled_machinec_onfig.
2392 (mono_config_string_for_assembly_file): New function.
2393 (mono_config_for_assembly): Move code snippet that looks for a
2394 bundled assembly .config file into the above new function. Call
2396 (mono_register_machine_config, mono_get_machine_config): New
2397 functions to set and retrieve
2399 * assembly.h: Declare mono_register_machine_config().
2401 * mono-config.h: Declare mono_get_machine_config() and
2402 mono_config_string_for_assembly_file().
2404 * icall.c: No declaration of environ necessary on Win32. It is
2405 declared (as a macro expanding to a function call) in stdlib.h.
2406 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
2407 New internal mono function. Returns the value of
2408 mono_get_machine_config() as a Mono string.
2410 * icall-def.h: Add get_bundled_machine_config().
2412 2007-01-04 Raja R Harinath <rharinath@novell.com>
2414 Remove redundant field
2415 * class-internals.h (_MonoGenericContext.container): Remove field.
2416 * loader.c (mono_method_get_signature_full): Don't parse a
2417 "container" for a signature parse when the signature is inflated
2419 (method_from_methodspec): Likewise, for a generic_inst.
2420 * class.c, metadata.c, reflection.c: Update to changes.
2422 2006-01-04 Raja R Harinath <rharinath@novell.com>
2424 * class-internals.h (_MonoGenericClass): Rename 'context' field to
2425 'cached_context', and change semantics -- it starts off NULL, and
2426 is initialized on demand.
2427 * class.c (mono_generic_class_get_context): New accessor to
2428 replace 'context' field accesses.
2429 (mono_class_get_context): New helper.
2430 (*): Update to changes.
2431 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
2433 2007-01-03 Miguel de Icaza <miguel@novell.com>
2435 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
2436 before the memcpy. Fixes Marshal2 regression.
2438 2007-01-02 Jb Evain <jbevain@gmail.com>
2440 * blob.h: add a MONO_TYPE_ENUM definition
2441 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
2442 fix the encoding of arrays of enums in custom attributes.
2446 2007-01-01 Miguel de Icaza <miguel@novell.com>
2448 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
2449 string is null terminated, but only cut the string short if it
2450 overflows the buffer.
2452 (mono_string_to_byvalstr): Also fix this routine. The code here
2453 was not properly terminating a string (it was only terminated
2454 because of the previous catch-all memset).
2456 I left the memset, because I do not know if applications expect
2457 the runtime to clear this region.
2461 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
2462 Clear the error before returning to unmanaged code to prevent the
2463 runtime from being confused later on (fixes 80420).
2464 (ves_icall_type_from_name): Always call mono_loader_clear_error
2465 after parsing a type that could have failed.
2466 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
2468 * loader.c (mono_loader_clear_error): Fix indentation.
2470 2006-12-28 Martin Baulig <martin@ximian.com>
2472 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
2474 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
2476 * reflection.c: patch from Rolf Bjarne Kvinge to fix
2477 getting a token for an EnumBuilder.
2479 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
2481 * reflection.c: be more careful in case resource generation
2482 fails to create the data array.
2484 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
2486 * sgen-gc.c: write barrier for clone and fix unregister handles.
2488 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
2490 * reflection.c: some fixes needed in the generics code for the moving GC.
2492 2006-12-22 Robert Jordan <robertj@gmx.net>
2494 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
2495 account. Fixes bug #80299.
2497 2006-12-21 Raja R Harinath <rharinath@novell.com>
2499 Fix WaitHandle usage in delegates.
2500 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
2501 * object.c (mono_wait_handle_new): Use the property set method to
2502 initialize the handle.
2503 (mono_wait_handle_get_handle): New.
2504 * threadpool.c (mono_async_invoke): Use it.
2505 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
2507 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
2509 2006-12-21 Jonathan Chambers <joncham@gmail.com>
2511 * marshal.c (emit_marshal): Call emit_marshal_variant and
2512 emit_marshal_com_interface when applicable.
2513 (emit_marshal_variant, emit_marshal_com_interface): Add
2514 methods for this case and remove if's from emit_marshal_object.
2516 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
2518 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
2520 2006-12-19 Jonathan Chambers <joncham@gmail.com>
2522 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
2523 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
2524 and GlobalFree on Windows. Remove FIXME.
2526 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
2528 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
2529 implementation for managed objects.
2531 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
2533 * object.c: implemented code to be used for checking
2534 that no reference field overlaps with non-references.
2536 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
2538 * threadpool.c: fix queue code to be compatible with the
2541 2006-12-18 Miguel de Icaza <miguel@novell.com>
2543 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
2544 in structures by throwing ArgumentNullException.
2546 (emit_marshal_safehandle): Also when they are null parameters.
2548 (emit_marshal_safehandle): Add support for ref
2549 SafeHandles parameters
2551 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
2553 * profiler.c: updated to use the mono-dl API instead of
2556 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
2558 * profiler.c: updated to use the mono-dl dynamic loading
2559 API instead of gmodule.
2561 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
2563 * profiler.c: use readlink, older versions of glib don't have
2564 g_file_read_link ().
2566 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2568 * profiler.c: try to detect the path to mono if libc fails to provide
2569 a useful name (bug #80286).
2571 2006-12-16 Raja R Harinath <rharinath@novell.com>
2574 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
2575 instance, use the generic type definition instead.
2576 (ves_icall_Type_GetNestedTypes): Likewise.
2577 * class.c (mono_class_create_generic): Always set the
2578 nested_classes of a generic instance to NULL, even if the generic
2579 type definition has nested types.
2581 2006-12-15 Jonathan Chambers <joncham@gmail.com>
2583 * marshal.c (mono_string_from_bstr): Revert previous Windows change
2586 2006-12-15 Miguel de Icaza <miguel@novell.com>
2588 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
2589 my arguments were in the wrong order. I also fixed the Windows
2590 version which seems to have had the same issue.
2592 (mono_free_bstr): On Unix, this is g_free.
2593 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
2594 conversions (for the tests in corlib to pass).
2596 2006-12-14 Miguel de Icaza <miguel@novell.com>
2598 * marshal.c (emit_ptr_to_object_conv): For now, ignore
2599 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
2600 exception if a ref SafeHandle in a struct has changed).
2602 (emit_struct_conv): Do not perform layout checks for classes
2603 derived from SafeHandle, as those are specially handled.
2605 (emit_object_to_ptr_conv): Add support for
2606 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
2608 (emit_marshal_safehandle): Implement conversion of return values
2609 of safehandles (MARSHAL_ACTION_CONV_RESULT).
2611 * threads.c: WaitHandle now is compiled with two different handles
2612 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
2615 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
2616 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
2617 these routines to cope with both kinds of fields.
2619 2006-12-12 Miguel de Icaza <miguel@novell.com>
2621 * metadata.c (mono_type_to_unmanaged): Handle the case where
2622 type->data.klass is a SafeHandle, and in that case, return the
2623 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
2624 MONO_MARSHAL_CONV_SAFEHANDLE.
2626 2006-12-11 Miguel de Icaza <miguel@novell.com>
2628 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
2629 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
2630 calling emit_marshal_object.
2632 (emit_marshal_safehandle): Implement marshalling of
2633 SafeHandle parameters (no ref support yet).
2635 (MarshalAction): Document the defines as I implement
2636 them for SafeHandle.
2638 (emit_marshal_object): indentation police.
2640 * class-internals.h: Define MonoSafeHandle.
2641 Add safehandle_class to MonoDefaults type.
2643 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
2644 list of classes to check for fields.
2646 * domain.c (mono_init_internal): Add SafeHandle to the list of
2647 mono_defaults loaded.
2649 2006-12-15 Raja R Harinath <rharinath@novell.com>
2652 * reflection.c (mono_reflection_bind_generic_parameters): If the
2653 generic type definition is a type builder, ensure that it is fully
2654 initialized before instantiating it. Kill some dead code.
2656 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
2658 * object.c: clear the loader_error () before loading
2659 more metadata stuff (bug #80258).
2661 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
2663 * icall.c, icall-defs.h: type modifiers icalls for
2664 parameters and properties.
2666 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
2668 * object.c, icall.c: fixed warnings.
2670 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
2672 * marshal.c: fixed a couple of leaks and coding style in a few places.
2674 2006-12-08 Dick Porter <dick@ximian.com>
2676 * process.c: Cope with NULL ProcessStartInfo arguments on windows
2677 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
2680 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
2682 * process.c: ProcessStartInfo may have only filename set and
2683 arguments can be NULL.
2685 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2687 * icall.c: fix leak found by Robert Jordan.
2689 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
2691 * marshal.c, marshal.h: generate managed method to access an element
2692 of a multi-dimensional array.
2694 2006-11-30 Paolo Molaro (lupus@ximian.com)
2696 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
2698 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
2700 * icall.c: back out GetFields () fix until the serialization code is
2701 fixed to not depend on the incorrect behaviour.
2703 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
2705 * profiler.c: provide defaults if none are set.
2707 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
2709 * Makefile.am, attrdefs.h: new public header file with
2710 constants for attributes for use by embedders.
2712 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
2714 * icall.c: GetFields () fix for bug #80064.
2716 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
2718 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
2719 removed long unused icalls.
2721 2006-11-27 Jonathan Chambers <joncham@gmail.com>
2724 (mono_marshal_emit_managed_wrapper): Level of indirection for
2725 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
2726 can be generated without a delegate class.
2727 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
2729 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
2731 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2733 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
2736 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2738 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
2739 icall-def.h: added icalls needed by System.GC.
2741 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
2743 * loader.c: ensure the class in catch clauses is handled
2744 correctly for generics methods (fixes bug#79980).
2746 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
2748 * monitor.h, monitor.c: added mono_locks_dump () function
2749 to help debug deadlocks involving managed locks.
2751 2006-11-13 Dick Porter <dick@ximian.com>
2753 * file-io.c (get_file_attributes): If the file is a symlink try
2754 and get the stat data for the target, but also add the
2755 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
2756 the specs for the windows symlink support, but will probably have
2757 to be reworked when I have test data from a vista machine. Fixes
2760 2006-11-13 Dick Porter <dick@ximian.com>
2762 * gc.c (mono_domain_finalize):
2763 * marshal.c (mono_delegate_begin_invoke):
2764 * threadpool.c (socket_io_init, mono_thread_pool_init)
2765 (mono_thread_pool_finish):
2766 * monitor.c (mono_monitor_try_enter_internal):
2767 * threads.c (mono_thread_resume, mono_thread_init)
2768 (mono_thread_suspend_all_other_threads)
2769 (mono_thread_execute_interruption):
2770 * appdomain.c (mono_domain_unload): Check for NULL error returns
2771 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
2774 2006-11-11 Miguel de Icaza <miguel@novell.com>
2777 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
2778 Only close the handle if the value of the handle is not
2779 INVALID_HANDLE_VALUE. This just makes the process a bit more
2782 Improvement for #75733, so that we do not run into this problem.
2785 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
2786 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
2787 internal variables. Fixes #79462
2790 2006-11-09 Dick Porter <dick@ximian.com>
2792 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
2793 Use poll() not select(). Fixes bug 79397.
2795 2006-11-09 Raja R Harinath <rharinath@novell.com>
2798 * assembly.c (mono_assembly_load_from_full): Check that the given
2799 image has an assembly manifest.
2801 2006-11-09 Ankit Jain <jankit@novell.com>
2803 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
2804 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
2805 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
2807 2006-11-07 Dick Porter <dick@ximian.com>
2809 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
2810 Put the old resolver behaviour back for pre-2.0 profiles.
2812 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
2814 * threadpool.c: precise GC and locking fixes.
2816 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
2818 * class.c: don't load types that have an explicit unaligned
2819 managed reference. Provide better info in the TypeLoad exception.
2820 Part of the fix for bug #79744.
2821 * object.c: use the correct check for class type load issues.
2823 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
2825 * class.c: enforce alignment of fields with managed references
2826 even when Pack=1 is forced by the user (bug #77788).
2828 2006-11-03 Dick Porter <dick@ximian.com>
2830 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
2831 If the address reverse lookup fails, return it as the hostname
2832 anyway. Fixes bug 79721.
2834 2006-11-03 Dick Porter <dick@ximian.com>
2836 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
2837 Fix build on Windows.
2839 2006-11-02 Dick Porter <dick@ximian.com>
2842 * object-internals.h:
2843 * exception.c (mono_get_exception_thread_interrupted):
2844 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
2847 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
2848 Check for pending Thread.Interrupt.
2850 2006-10-27 Massimiliano Mantione <massi@ximian.com>
2851 * loader.c: Fixed bug 79684.
2853 2006-10-27 Dick Porter <dick@ximian.com>
2855 * file-io.c (get_file_attributes): Force symlinks to directories
2856 to be returned as a regular file. Fixes bug 79733.
2857 2006-10-26 Dick Porter <dick@ximian.com>
2859 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
2860 CreateFile to open a directory then we need to set the
2861 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
2863 2006-10-23 Zoltan Varga <vargaz@gmail.com>
2865 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
2868 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
2870 * sgengc.c: small cleanup of timer code.
2872 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
2874 * sgen-gc.c: fix some warnings and start adding support for
2875 complete object removal on domain unload.
2877 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
2879 * assembly.c: build_assembly_name should not consider a version
2880 number without build or revision number invalid. Fixes bug #79715.
2882 2006-10-18 Jonathan Chambers <joncham@gmail.com>
2884 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
2885 call kernel32 function OutputDebugString directly.
2887 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
2889 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
2891 * reflection.c: small cleanup, using a function to insert a MonoString
2894 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
2896 * reflection.c: moving GC fixes.
2898 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
2900 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
2901 all the objects with finalizers belonging to an unloading appdomain.
2903 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
2905 * sgen-gc.c: added ability to allocate even when the nursery is fully
2906 pinned and fixed a couple of bugs.
2908 2006-10-15 Zoltan Varga <vargaz@gmail.com>
2910 * threads.h: Revert the last change for now.
2912 * threads.h (mono_thread_get_pending_exception): Rename this to
2913 mono_thread_get_undeniable_exception ().
2915 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
2917 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
2918 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
2919 when fname does not refer to valid assembly. This result in a more
2920 meaningful error message.
2921 * exception.c: added mono_get_exception_bad_image_format2 which
2922 constructs a BadImageFormatException using the ctor taking a custom
2923 message and the file name. Passing in a NULL msg results in a default
2925 * exception.h: define mono_get_exception_bad_image_format2 function.
2926 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
2927 when file name pointed to an invalid IL image. Use
2928 mono_get_exception_file_not_found2 to construct FileNotFoundException,
2929 as this results in a more meaningful error message.
2931 2006-10-15 Zoltan Varga <vargaz@gmail.com>
2933 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
2936 2006-10-12 Zoltan Varga <vargaz@gmail.com>
2938 * metadata.c (mono_type_size): Change the align parameter to guint32 for
2939 consistency with the other _size functions.
2940 (mono_type_stack_size): Ditto.
2942 * class.c object.c icall.c: Fix warnings caused by the above change.
2944 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
2946 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
2948 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
2950 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
2952 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
2953 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
2954 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
2955 threadpool.h, threads-types.h: mark more internal functions.
2957 2006-10-11 Dick Porter <dick@ximian.com>
2959 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
2960 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
2961 reproduce the bug even before applying the fix.)
2963 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
2965 * reflection.c: allow retrieving attributes for arguments in generic
2966 methods (bug #79241).
2968 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
2970 * debug-mono-symfile.c: properly check fopen () result (found by
2973 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
2975 * reflection.c: make error message clearer and fixed two
2976 issuelets found by Coverity.
2978 2006-10-10 Zoltan Varga <vargaz@gmail.com>
2980 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
2982 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
2984 * object-internals.h, gc-internal.h, profiler-private.h:
2985 mark internal functions.
2987 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
2989 * reflection.c: put data in the text section.
2990 * icall.c: recognize more types in type_from_typename ().
2991 * process.c, marshal.c: added some GC FIXMEs.
2993 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
2995 * loader.c: check for NULL before initializing.
2997 2006-10-09 Zoltan Varga <vargaz@gmail.com>
2999 * gc.c (finalizer_thread): Use a non-alertable wait here.
3001 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
3002 until the correct solution is found.
3004 2006-10-06 Zoltan Varga <vargaz@gmail.com>
3006 * reflection.c (mono_module_get_object): Avoid an assert when operating on
3007 modules with no metadata. Fixes #79596.
3009 * image.c (load_metadata_ptrs): Put back the error message when
3010 the #- heap is encountered since the support is not complete yet.
3012 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
3014 * gc.c: do not allow the user to SuppressFinalize () a
3015 delegate because it would leak the trampoline if present.
3017 2006-10-06 Zoltan Varga <vargaz@gmail.com>
3019 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
3022 2006-10-05 Zoltan Varga <vargaz@gmail.com>
3024 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
3026 * metadata.c (mono_metadata_get_param_attrs): Ditto.
3028 * row-indexes.h: Add definitions for *Ptr tables.
3030 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
3032 * metadata.c (mono_metadata_translate_token_index): New helper function to
3033 translate table indexes used in uncompressed metadata.
3034 (mono_metadata_decode_table_row): Ditto.
3035 (mono_metadata_decode_table_row_col): Ditto.
3037 * metadata.c: Add table schema for *Ptr tables.
3039 * class.c loader.c: Use the new helper function to access the affected metadata
3042 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
3045 2006-10-04 Zoltan Varga <vargaz@gmail.com>
3047 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
3048 sequences which can be unbounded in size. Fixes #79583.
3050 2006-10-02 Zoltan Varga <vargaz@gmail.com>
3052 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
3053 static initialization.
3055 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
3057 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
3059 * domain.c (mono_domain_free): Free up type_init_exception_hash.
3061 * object.c (mono_runtime_class_init): Implement correct semantics when a static
3062 ctor fails, i.e. throw the same exception on subsequent accesses.
3064 2006-09-0 Jonathan Chambers <joncham@gmail.com>
3066 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
3067 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
3068 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
3069 Handle marshalling of interfaces and VARIANTs contained in structs.
3071 Code is contributed under MIT/X11 license.
3073 2006-09-30 Zoltan Varga <vargaz@gmail.com>
3075 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
3077 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
3080 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3082 * console-io.c: ignore previous SIGINT handler.
3084 2006-09-27 Zoltan Varga <vargaz@gmail.com>
3086 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
3087 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
3088 #79460, #79461, #79485.
3090 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
3092 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
3095 2006-09-26 Zoltan Varga <vargaz@gmail.com>
3097 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
3098 could be generated from it.
3100 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
3102 * rand.c: fix read loop to correctly handle EINTR.
3104 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
3106 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
3107 internal calls are defined to keep methods closer to the declaring
3108 type and allow a significant reduction in runtime relocations and
3111 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
3113 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
3114 exception message to have FileNotFoundException use the default
3115 assembly load error message. Fixes bug #79426.
3116 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
3118 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3120 * threadpool.c: (start_thread_or_queue) use the root domain when
3121 creating the thread instead of the async object one.
3123 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
3125 * class.c, object.c, class-internals.h, reflection.c:
3126 for arrays, store element_size inside MonoClass (speedup
3127 for array object creation).
3129 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
3131 * icall.c: fixed CodeBase to use the file name and not the module
3134 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
3136 * mono-debug.c, mono-debug.h: export find_method as
3137 mono_debug_find_method ().
3139 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
3141 * debug-helpers.c, class-internals.h: added a few functions useful
3142 when debugging under gdb.
3144 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3146 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
3147 characters that need special handling.
3149 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
3151 * mono-config.c: make the os/cpu specification more flexible,
3152 allowing lists and negation.
3154 2006-09-18 Jonathan Chambers <joncham@gmail.com>
3156 * marshal.c: COM Interop fixes. Handle case where method->klass.
3157 is interface. Handle BSTR/MonoString when null. Use CDECL as
3158 calling convention on non-windows platforms. This is for
3159 compatibility with XPCOM and MainWin COM.
3161 Code is contributed under MIT/X11 license.
3164 2006-09-18 Zoltan Varga <vargaz@gmail.com>
3166 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
3167 correctly. Fixes #79217.
3169 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
3171 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
3173 * mono-config.c: allow both an os and cpu attribute for dllmap
3174 and dllentry elemnets to enable a single config file to be used
3175 for multiple architectures.
3177 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
3179 * loader.c: MonoLoaderError was cleared too soon on load failure.
3182 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
3184 * icall.c: use the defining class vtable when accessing a
3185 static field, not a pobblibly derived class.
3187 2006-09-17 Zoltan Varga <vargaz@gmail.com>
3189 * icall.c string-icalls.c: Remove references to unicode.h.
3191 * unicode.h unicode.c Makefile.am: Remove these unused source files.
3193 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
3195 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
3196 indicating the image where custom marshaller types should be looked up.
3197 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
3198 custom marshallers, instead of corlib. Fixes #79425.
3200 2006-09-14 Zoltan Varga <vargaz@gmail.com>
3202 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
3204 2006-09-14 Jonathan Chambers <joncham@gmail.com>
3206 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
3207 Implement Environment.ProcessorCount.
3209 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
3210 Implement Environment.ProcessorCount.
3213 Add Environment.ProcessorCount icall.
3215 Patch by Jason McFall.
3217 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3219 * assembly.c: don't append .exe/.dll when the filename already contains
3220 one of those extensions.
3222 2006-09-12 Martin Baulig <martin@ximian.com>
3224 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
3225 to array interfaces.
3227 2006-09-11 Martin Baulig <martin@ximian.com>
3229 * reflection.c (mono_image_build_metadata): Create the
3230 MethodImpl's after emitting all types and methods, so we don't
3231 need another fixup pass for them.
3233 2006-09-11 Zoltan Varga <vargaz@gmail.com>
3235 * class.c (mono_class_from_name_case): Fix regression introduced by the last
3238 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
3240 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
3243 2006-09-10 Zoltan Varga <vargaz@gmail.com>
3245 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
3246 args is not set. Fixes #78926.
3248 2006-09-08 Zoltan Varga <vargaz@gmail.com>
3250 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
3252 * image.c (load_class_names): Move this to class.c, and rename it to
3253 'mono_image_init_name_cache'.
3254 (load_modules): Fix a warning.
3256 * class.c icall.c image.c: Initialize image->name_cache lazily.
3258 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
3259 on its name using information in the AOT file.
3261 * class.c (mono_class_from_name): Use the new hook function.
3263 2006-09-06 Zoltan Varga <vargaz@gmail.com>
3265 * reflection.c (mono_param_get_objects): Handle enum default parameter values
3268 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
3271 2006-09-06 Martin Baulig <martin@ximian.com>
3273 * icall.c (mono_lookup_internal_call): Small fix.
3275 2006-09-05 Raja R Harinath <rharinath@novell.com>
3277 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
3280 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
3282 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
3283 when --debug is specified.
3285 2006-09-04 Zoltan Varga <vargaz@gmail.com>
3287 * class.c (setup_generic_array_ifaces): Fix a warning.
3289 2006-09-04 Miguel de Icaza <miguel@novell.com>
3291 * Temporarily remove the patch to assemly.c that checks the
3292 assembly versions as it breaks our gacutil.
3294 2006-09-03 Zoltan Varga <vargaz@gmail.com>
3296 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
3298 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
3301 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
3302 created using the default ctor. Fixes #79152.
3303 (mono_string_builder_to_utf16): Ditto.
3305 2006-09-01 Martin Baulig <martin@ximian.com>
3307 Fix handling of the generic array interfaces.
3310 (MonoDefaults): Removed `generic_array_class' and added
3311 `generic_ilist' class.
3314 (mono_bounded_array_class_get): Add the new generic array interfaces.
3315 (setup_generic_array_ifaces): New static method; create vtable
3316 entries for each method in the generic array interfaces.
3319 (select_container): Allow "parent-less" generic methods.
3322 (mono_marshal_get_generic_array_helper): New public method.
3325 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
3326 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
3327 moved the interncall into System.Array.
3329 2006-09-01 Raja R Harinath <rharinath@novell.com>
3331 A few more cases of avoiding work on types with ->byref set.
3332 Has the real fix for #79238
3333 * icall.c (is_generic_parameter): New helper.
3334 (ves_icall_Type_GetGenericParameterPosition): Use it.
3335 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
3336 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
3337 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
3338 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
3340 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
3342 (ves_icall_Type_get_IsGenericInstance): Likewise.
3343 (ves_icall_Type_get_IsGenericType): Likewise.
3345 2006-09-01 Zoltan Varga <vargaz@gmail.com>
3347 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
3350 * mempool.h (mono_mempool_get_allocated): New helper function.
3352 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
3355 * mempool.c: Fix warnings and the calculation of stats.
3357 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
3359 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
3361 * loader.c (mono_get_method_from_token): Update method_count stat.
3363 * class-internals.h (MonoStats): Add some stats.
3365 2006-08-31 Robert Jordan <robertj@gmx.net>
3367 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
3368 with managed variants.
3369 All code is contributed under the MIT/X11 license.
3371 2006-08-31 Zoltan Varga <vargaz@gmail.com>
3373 * reflection.c (reflection_methodbuilder_to_mono_method): Set
3374 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
3376 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
3378 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
3379 with cycles in classes.
3381 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
3383 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
3384 missing a [MarshalAs] directive. Fixes #79203.
3386 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
3387 klass->marshal_info. Fixes #79217.
3389 2006-08-30 Martin Baulig <martin@ximian.com>
3391 Committing a patch from Joachim Ante <joe@otee.dk>:
3392 Add support for binary data symbol stores.
3394 * debug-mono-symfile.c
3395 (mono_debug_open_mono_symbol_file): Renamed into
3396 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
3400 (mono_debug_open_image): Added `raw_contents' and `size' args.
3401 (mono_debug_init_2_memory): New public function.
3403 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
3405 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
3407 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3409 * appdomain.c: implement support for ShadowCopyFiles.
3411 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
3413 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
3414 when value is NULL (and should remove CID #51).
3416 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3418 * image.c: moved 2 functions to ../utils.
3420 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
3422 * gc.c: cope with the target object of a GC handle being NULL
3425 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
3427 * class.c: recursively check parent's explicit implementations
3428 of interface methods (fixes bug #79125).
3430 2006-08-19 Miguel de Icaza <miguel@novell.com>
3432 * filewatcher.c: Avoid warnings when building, do not redefine
3433 constants that are defined.
3437 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3439 * image.c: don't fail when the link points to an absolute path.
3441 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
3443 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
3446 2006-08-17 Miguel de Icaza <miguel@novell.com>
3448 * image.c (full_path): A new method used to obtain the actual path
3449 of an assembly even in the presence of symbolic links.
3451 This is necessary for the case where we are running a binary that
3452 has been GACed, but we are using the "published" path name
3453 ($prefix/mono/1.0/blah.exe) which happens to point to the real
3456 This was the source of the failure for the `xsp' command with the
3457 recent AppDomain changes, as far as the runtime was concerned,
3458 there were two different assemblies: $prefix/mono/1.0/blah.exe and
3459 $prefix/mono/gac/blah/version/blah.exe.
3461 (do_mono_image_open): use full path
3463 2006-08-17 Zoltan Varga <vargaz@gmail.com>
3465 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
3467 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
3469 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
3470 domain_id is supplied. Fix CID #241 and corlib's unit tests.
3472 2006-08-17 Zoltan Varga <vargaz@gmail.com>
3474 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
3475 small structures. Fixes #78990.
3477 2006-08-17 Zoltan Varga <vargaz@gmail.com>
3479 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
3481 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
3483 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3486 * marshal.c: don't load all the assemblies from a domain into newly
3487 created ones. The new domains might have different rules and load
3488 assemblies from different locations. Fixes bug #76757.
3490 Patch by Lluis. Conflicts resolved by Brian Crowell.
3492 2006-08-16 Alp Toker <alp@atoker.com>
3494 * socket-io.c: First half of the fix for #79084.
3495 Set sa_size to the length of the content, not that of the struct.
3496 Don't add NULL suffix to the content, this should be done in
3497 managed code if needed.
3499 2006-08-14 Raja R Harinath <rharinath@novell.com>
3502 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
3503 mono_metadata_parse_type returns NULL.
3505 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
3507 * normalization-tables.h : new file for string normalization data.
3508 * locales.c, locales.h, icall.c :
3509 added load_normalization_resource() for string normalization,
3511 * Makefile.am : added normalization-tables.h to the sources.
3513 2006-08-13 Zoltan Varga <vargaz@gmail.com>
3515 * marshal.c: Add more helper functions to reduce code duplication and use them
3518 2006-08-12 Zoltan Varga <vargaz@gmail.com>
3520 * marshal.c: Fix non-x86 stdcall warnings.
3522 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
3525 2006-08-11 Jonathan Chambers <joncham@gmail.com>
3527 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
3528 type check on multi-dimensional arrays. Fixes #79000.
3530 2006-08-10 Jonathan Chambers <joncham@gmail.com>
3532 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
3533 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
3534 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
3535 * class-internals.h: add is_com_object to class structure.
3536 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
3537 null checks to COM object marshalling. Fix .ctor call on RCW.
3538 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
3540 All code is contributed under the MIT/X11 license.
3542 2006-08-09 Dick Porter <dick@ximian.com>
3544 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
3545 racing mono_monitor_allocator_lock() somewhere, so don't delete
3546 the critical section for now. Found by running and exiting
3549 2006-08-10 Zoltan Varga <vargaz@gmail.com>
3551 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
3552 (ves_icall_System_ComObject_FindInterface): Ditto.
3553 (ves_icall_System_ComObject_CacheInterface): Ditto.
3555 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
3556 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
3558 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3560 * threadpool.c: treat pipes from process asynchronous reads as sockets
3561 when reading from them, so we get select/poll or epoll to wait for
3564 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
3566 * loader.c: Fix a typo (CID #233) in the null check.
3568 2006-08-07 Zoltan Varga <vargaz@gmail.com>
3570 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
3571 Hopefully fixes #78949.
3573 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
3574 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
3575 bytes. Fixes #78972.
3577 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3579 * filewatcher.c: we need to set errno here.
3581 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3583 * filewatcher.c: let Win32Exception get the error value.
3585 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3587 * filewatcher.c: translate errno into win32 errors for Win32Exception
3588 to know what happened.
3590 2006-08-01 Zoltan Varga <vargaz@gmail.com>
3592 * threadpool.c: Fix more warnings.
3594 * assembly.c (search_loaded): Fix warnings.
3596 * threadpool.c (mono_thread_pool_finish): Fix warnings.
3597 (mono_async_invoke): Ditto.
3599 2006-07-28 Jonathan Chambers <joncham@gmail.com>
3601 * object.c (mono_remote_class_vtable): Need to create proxy vtable
3602 entries for __ComObject type in addition to ComImport types.
3603 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
3606 All code is contributed under the MIT/X11 license.
3608 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
3610 * image.c: avoid tentative loading of modulerefs that contain
3611 no metadata (P/Invoke library names).
3613 2006-07-28 Dick Porter <dick@ximian.com>
3615 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
3616 mono_loader_lock() somewhere, so don't delete the critical section
3617 for now. Found by running and exiting monodevelop.
3619 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3621 * filewatcher.c: define the inotify syscalls when we're building on
3622 linux and have sys/syscall.h. The build system might not have support
3623 for inotify but the target system might have it.
3625 2006-07-26 Miguel de Icaza <miguel@novell.com>
3627 * domain.c: Documentation updates.
3629 * loader.c (mono_free_method): Do not release the method
3630 information if we are being profiled, as profilers will use this
3631 information at shut down to present some data to the user.
3633 This is needed so that the profiler does not crash, as the
3634 profiler tends to keep MonoMethods around, and they might become
3635 invalid if we free these.
3637 (mono_get_method_constrained): Return the original CIL stream
3638 method as well, so verification can be performed against it.
3640 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3642 * filewatcher.[ch]: support for inotify file system watcher.
3643 * icall.c: add new internal calls for the inotify file system watcher.
3645 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3647 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
3650 2006-07-20 Dick Porter <dick@ximian.com>
3652 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
3655 2006-07-20 Dick Porter <dick@ximian.com>
3657 * threads.c (start_wrapper): Do the thread cleanup while we still
3658 hold a reference to its object. Fixes bug 78123.
3660 2006-07-18 Kornél Pál <kornelpal@gmail.com>
3662 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
3663 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
3664 "managed-to-managed".
3665 * icall.c: Redirect string constructors that take sbyte* to
3666 ves_icall_System_String_ctor_RedirectToCreateString.
3667 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
3668 to CreateString () methods with matching signature.
3669 * reflection.c: Use original security informations for
3670 MONO_WRAPPER_MANAGED_TO_MANAGED.
3671 * security-manager.c: Use original security informations for
3672 MONO_WRAPPER_MANAGED_TO_MANAGED.
3673 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
3674 that is a placeholder and only its address should be used.
3675 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
3676 that is a placeholder and only its address should be used.
3678 2006-07-15 Jonathan Chambers <joncham@gmail.com>
3680 Begin implementing COM Interop.
3681 * appdomain.c: Increment corlib version.
3682 * class.c: Set ComImport classes' parent to __ComObject.
3683 * loader.c: Mark cominterop methods as such.
3684 * domain.c: Add __ComObject class to MonoDefaults structure.
3685 * image.c: Add 2 hashtables to the image for COM Interop related methods
3686 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
3687 using the mempool allocator
3689 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
3690 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
3691 declaration for mono_metadata_type_dup_mp.
3693 * debug-helpers.c: Added strings for two additional wrapper types
3694 * object.c: Create proxy objects for ComImport classes
3695 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
3696 and added __ComObject class to MonoDefaults structure.
3698 * object-internals.h: Finish MonoRealProxy definition, and add definition of
3699 MonoComInteropProxy and MonoComObject.
3701 * marshal.c: Added support for COM Interop
3702 (signature_cominterop): Converts managed signature to corresponding
3703 unmanaged COM signature.
3704 (cominterop_get_function_pointer): gets unmanaged function pointer via
3706 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
3707 (cominterop_get_method_interface): returns interface type that method is defined on
3708 (mono_mb_emit_cominterop_call): emits native call to function pointer
3710 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
3711 that matches signature of unmanaged function.
3712 (cominterop_get_native_wrapper): wrapper around adjusted method call.
3713 (cominterop_get_invoke): forwards call from proxy to __ComObject
3714 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
3715 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
3716 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
3718 * marshal.h: Added Marshal icall declarations.
3719 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
3720 so we can access them in finalizer
3722 2006-07-14 Dick Porter <dick@ximian.com>
3724 * object.c (mono_type_initialization_cleanup): Fix a race
3725 condition by temporarily commenting out the critical section
3728 2006-07-14 Zoltan Varga <vargaz@gmail.com>
3730 * reflection.c (create_custom_attr): Fix some warnings.
3731 (create_custom_attr_data): Ditto.
3732 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
3733 types. Fixes #78855.
3735 2006-07-11 Zoltan Varga <vargaz@gmail.com>
3737 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
3739 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
3741 2006-07-08 Zoltan Varga <vargaz@gmail.com>
3743 * reflection.c (resolve_object): Add support for DynamicMethod.
3745 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
3746 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
3748 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
3750 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
3751 don't leak GPtrArray's pdata has we have no use (nor free) for it.
3753 2006-07-01 Zoltan Varga <vargaz@gmail.com>
3755 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
3758 2006-06-30 Raja R Harinath <rharinath@novell.com>
3760 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
3761 slightly: remove a shadow local variable.
3763 2006-06-29 Raja R Harinath <rharinath@novell.com>
3765 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
3766 definition that introduces the virtual function slot.
3767 Also fix Coverity #105.
3769 2006-06-29 Zoltan Varga <vargaz@gmail.com>
3771 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
3772 for dynamic assemblies. Fixes #78724.
3774 2006-06-28 Zoltan Varga <vargaz@gmail.com>
3776 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
3779 2006-06-21 Martin Baulig <martin@ximian.com>
3782 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
3785 2006-06-21 Zoltan Varga <vargaz@gmail.com>
3787 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
3789 2006-06-20 Raja R Harinath <rharinath@novell.com>
3791 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
3793 * class.c (mono_class_create_from_typespec): Add 'context' argument.
3794 Inflate result if necessary.
3795 (mono_class_get_full): Remove old version. Rename from
3796 'mono_class_get' and add 'context' argument. Pass it to
3797 ..._create_from_typespec.
3798 (mono_class_get): New. Simple wrapper to mono_class_get_full.
3799 (mono_ldtoken): Revert change below.
3801 2006-06-20 Martin Baulig <martin@ximian.com>
3803 * class.c (mono_ldtoken): Don't pass the generic context to
3804 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
3806 2006-06-15 Zoltan Varga <vargaz@gmail.com>
3808 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
3809 and later freeing it. Fixes #78638.
3811 2006-06-15 Miguel de Icaza <miguel@novell.com>
3813 * icall.c (mono_class_get_throw): Revert over-zealous error
3814 throwing, the caller for mono_class_get_throw will cope with
3815 errors when classes are not properly initialized already.
3817 The code still copes with loader exceptions though.
3819 Fixes the regression in reftype1 and reftype3 from the CAS tests.
3821 2006-06-14 Miguel de Icaza <miguel@novell.com>
3823 Fixes the `make run1' version of RuntimeAbort (to be commited,
3824 source is in Bugzilla).
3826 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
3827 FALSE on class loading failure instead of returning true.
3829 * class.c (mono_class_create_from_typedef): It is possible for
3830 mono_metadata_interfaces_from_typedef_full to fail if a class is
3831 not found, cope with this.
3834 2006-06-14 Dick Porter <dick@ximian.com>
3837 * process.c: Fix a bunch of signed/unsigned warnings from gcc
3840 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
3842 * culture-info-table.h : oops, forgot to make it nsync with r61548.
3844 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
3846 * icall.c: Another fix for building mono in Visual Studio.
3848 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
3850 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
3852 2006-06-09 Martin Baulig <martin@ximian.com>
3854 * debug-mono-symfile.c: Put this back and really fix it this
3855 time. Sorry for all the trouble.
3857 2006-06-08 Zoltan Varga <vargaz@gmail.com>
3859 * icall.c (mono_class_get_throw): Fix a warning.
3860 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
3861 ReflectionTypeLoadException if needed. Fixes #78606.
3863 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
3864 (mono_class_init): Ditto.
3866 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
3867 ref_only exceptions.
3868 (mono_loader_clear_error): Make this work even if there is no error.
3870 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
3872 * object-internals.h marshal.c marshal.h icall.c: Implement method
3873 Marshal.GetComSlotForMethodInfo using internal call.
3875 2006-06-07 Zoltan Varga <vargaz@gmail.com>
3877 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
3878 a function for signalling it.
3880 * class.c (mono_class_from_typeref): Use the new kind of loader error when
3881 a referenced assembly is not found.
3883 * loader.c (mono_loader_error_prepare_exception): Add support for
3884 LOADER_ERROR_ASSEMBLY. Fix formatting.
3886 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
3888 * domain.c appdomain.c class-internals.h marshal.c: Add support
3889 for VARIANT marshalling on windows and increment corlib version
3890 since Variant struct was added.
3892 2006-06-03 Miguel de Icaza <miguel@novell.com>
3894 * debug-mono-symfile.c: Revert Martin's previous patch which broke
3895 stack trace line information:
3897 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
3898 (Martin) when looking up B which is between A and C, return A not C.
3902 Thanks to Alexander Olk for tracking this down.
3904 2006-06-02 Zoltan Varga <vargaz@gmail.com>
3906 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
3908 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
3909 avoid clobbering its value.
3910 (mono_string_to_lpstr): Fix a warning on windows.
3912 2006-05-31 Zoltan Varga <vargaz@gmail.com>
3914 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
3916 * reflection.c loader.c: Removed references to 'dummy' flag.
3918 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
3920 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
3921 it gets GC tracking.
3923 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
3926 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
3928 * marshal.c threadpool.c: Update callers of mono_async_result_new.
3930 * appdomain.c: Bump corlib version.
3932 2006-05-30 Zoltan Varga <vargaz@gmail.com>
3934 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
3935 CEE_STIND_REF when working with object references.
3937 2006-05-31 Zoltan Varga <vargaz@gmail.com>
3939 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
3942 2006-05-30 Miguel de Icaza <miguel@novell.com>
3944 * loader.c (method_from_memberref): Fix argument value for
3945 mono_loader_set_error_method_load (I was passing the MonoClass
3946 instead of the class name char *).
3948 2006-05-30 Zoltan Varga <vargaz@gmail.com>
3950 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
3951 CEE_STIND_REF when working with object references.
3953 2006-05-30 Martin Baulig <martin@ximian.com>
3955 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
3956 mono_method_full_name() change and replace the ':' with a '.'
3959 2006-05-30 Martin Baulig <martin@ximian.com>
3961 * debug-mono-symfile.c
3962 (mono_debug_symfile_lookup_location): Fix the algorithm:
3963 when looking up B which is between A and C, return A not C.
3965 2006-05-29 Martin Baulig <martin@ximian.com>
3968 (MonoDebugMethodInfo): Make the typedef public.
3969 (MonoDebugSourceLocation): New public struct.
3972 (mono_debug_source_location_from_address): Removed.
3973 (mono_debug_source_location_from_il_offset): Removed.
3974 (mono_debug_il_offset_from_address): Removed.
3975 (mono_debug_address_from_il_offset): Removed.
3976 (mono_debug_lookup_method): New public function.
3977 (mono_debug_lookup_source_location): New public function; replaces
3978 the old mono_debug_source_location_from_*() functions; see the
3979 inline documentation.
3980 (mono_debug_free_source_location): New public function.
3981 (mono_debug_print_stack_frame): New public function; see the
3982 inline documentation.
3984 * debug-mono-symfile.c
3985 (mono_debug_find_source_location): Renamed into
3986 mono_debug_symfile_lookup_location(); only take a
3987 `MonoDebugMethodInfo *' and an `offset' argument; added inline
3989 (mono_debug_find_method): Renamed into
3990 mono_debug_symfile_lookup_method().
3992 2006-05-27 Zoltan Varga <vargaz@gmail.com>
3994 * assembly.c (mono_assembly_open_full): Dont overwrite the status
3995 returned by mono_image_open_full ().
3997 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
3998 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
4001 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
4004 2006-05-27 Miguel de Icaza <miguel@novell.com>
4006 * class.c (mono_class_from_typeref): handle missing images
4007 earlier, deals with bug #78418. Refactor code;
4009 Fix a warning introduced in my previous commit (some stale code
4010 from before I revisited my patch).
4012 * class.c (mono_class_create_from_typedef): On failure, remove the
4013 class from the MonoImage->class_cache as the class is not
4014 initialized; Fixes the leak pointed out by Paolo.
4016 2006-05-25 Dick Porter <dick@ximian.com>
4018 * threads.c (mono_thread_cleanup): Build fix. Comment out the
4019 DeleteCriticalSections until I figure out which one may still be
4020 sometimes locked when mono_thread_cleanup is called.
4022 2006-05-24 Dick Porter <dick@ximian.com>
4024 * threads.c (mono_thread_cleanup): Move the threading cleanup out
4025 of mono_thread_manage and back into its own function, so it can be
4026 called after the finalizer thread has finished.
4028 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
4030 2006-05-24 Zoltan Varga <vargaz@gmail.com>
4032 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
4035 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
4036 with non-blittable elements.
4037 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
4039 2006-05-24 Martin Baulig <martin@ximian.com>
4041 * mono-debug-debugger.h (MonoDebuggerEvent): Added
4042 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
4044 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
4045 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
4046 `mono_debugger_event_handler' to NULL.
4048 2006-05-24 Martin Baulig <martin@ximian.com>
4050 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
4052 2006-05-24 Martin Baulig <martin@ximian.com>
4054 * mono-debug-debugger.h
4055 (mono_debugger_create_notification_function): Added
4056 `MonoCodeManager *' argument.
4058 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
4060 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
4062 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
4064 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
4065 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
4068 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
4070 * icall.c: precise GC support: objects can't be stored in unmanaged
4071 memory anymore, even if they are kept alive by other references: since
4072 they can move the GC needs to be able to always find them.
4074 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4076 * object.c: precise GC support for static fields. Support
4077 for moving GCs: write barriers and pinned allocation for interned
4080 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
4082 * domain.c, domain-internals.h: precise GC support for the MonoDomain
4085 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
4087 * class.c, gc.c: sgen and precise GC updates.
4089 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
4091 * marshal.h, marshal.c: added write barrier wrapper and precise type
4094 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
4096 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
4099 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
4101 * reflection.c: precise and sgen GC updates.
4103 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
4105 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
4107 2006-05-22 Zoltan Varga <vargaz@gmail.com>
4109 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
4111 2006-05-20 Zoltan Varga <vargaz@gmail.com>
4113 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
4114 MONO_TYPE_OBJECT. Fixes #78462.
4116 2006-05-18 Zoltan Varga <vargaz@gmail.com>
4118 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
4119 and blittable types.
4121 2006-05-17 Miguel de Icaza <miguel@novell.com>
4123 * class.c (mono_class_get_exception_for_failure): Implement parts
4124 of a TODO: if the loader error is set (instead of the class
4125 error), we return a Loader exception that can be properly thrown
4128 This was exposed by some Winforms 2.0 code that I tried to run
4129 (Atsushi pointed me to it).
4131 2006-05-17 Zoltan Varga <vargaz@gmail.com>
4133 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
4134 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
4136 * marshal.c (emit_marshal_vtype): Add limited support for
4137 UnmanagedType.LPStruct. Fixes #78427.
4139 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
4140 Applied a patch from kangaroo to fix #77523.
4142 2006-05-17 Martin Baulig <martin@ximian.com>
4145 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
4146 (debugger_thread_created): Removed.
4147 (debugger_thread_exited): Removed.
4149 2006-05-15 Zoltan Varga <vargaz@gmail.com>
4151 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4153 * object-internals.h (MonoReflectionResource): Sync with managed version.
4155 2006-05-12 Wade Berrier <wberrier@novell.com>
4157 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
4159 2006-05-12 Zoltan Varga <vargaz@gmail.com>
4161 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
4162 functions try to allocate from the image mempool.
4164 2006-05-12 Dick Porter <dick@ximian.com>
4166 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
4168 2006-05-12 Lluis Sanchez <lluis@ximian.com>
4170 * object.c: The FieldGetter and FieldSetter methods require the full
4171 name of the class, not only the name. Fixes bug #78277.
4173 2006-05-11 Miguel de Icaza <miguel@novell.com>
4175 * loader.c (method_from_memberref): Do not pass the NULL klass to
4176 mono_loader_set_error_() methods. Pass the non-NULL value
4179 2006-05-11 Zoltan Varga <vargaz@gmail.com>
4181 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
4182 (mono_assembly_close): Null out assembly->image->references after freeing it.
4184 * image.c (mono_image_close): Free image->references.
4186 * reflection.c (mono_image_basic_init): Fix a small memory leak.
4188 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
4190 * marshal.c: In function mono_mb_add_local don't use the mb pointer
4191 before checking if it's NULL (g_assert).
4193 2006-05-10 Martin Baulig <martin@ximian.com>
4195 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
4196 I thought I already killed that two months ago, but now it somehow reappeared.
4198 2006-05-10 Martin Baulig <martin@ximian.com>
4200 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
4202 2006-05-10 Zoltan Varga <vargaz@gmail.com>
4204 * reflection.c: Allocate memory for dynamically created methods in the image
4207 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
4209 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
4210 don't use the ad pointer before checking if it's NULL (g_assert).
4212 2006-05-09 Zoltan Varga <vargaz@gmail.com>
4214 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
4215 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
4217 * marshal.c: Allocate all signatures from mempools.
4219 * marshal.c: Allocate some more signatures from mempools.
4221 2006-05-09 Miguel de Icaza <miguel@novell.com>
4223 * object.c (mono_load_remote_field): The code used to provide a
4224 temporary variable for returning results if the user did not
4225 provide a result pointer. But our temporary variable was allocted
4228 Fix calling code to always pass a result area. Coverity ID 103.
4230 2006-05-06 Zoltan Varga <vargaz@gmail.com>
4232 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
4233 value, not the old. Fixes #78312.
4234 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
4236 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
4237 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
4240 * assembly.c (mono_assembly_close): Free image->references.
4242 * assembly.c (mono_assembly_names_equal): Fix a warning.
4243 (mono_assemblies_cleanup): Cleanup more global data.
4245 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
4247 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
4248 ptr_cache and image->modules.
4250 * image.c (mono_image_init): Allocate array_cache lazily.
4252 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4254 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
4255 behavior was changed recently and has bad side effects.
4257 2006-05-05 Zoltan Varga <vargaz@gmail.com>
4259 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
4261 * assembly.c (mono_assembly_close): Remove a debug printf.
4263 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
4265 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
4266 to also allow for temporary references between mono_image_open ()/close ().
4268 * domain.c (get_runtimes_from_exe): Add a FIXME.
4270 2006-05-04 Zoltan Varga <vargaz@gmail.com>
4272 * marshal.c: Fix support for dynamic methods.
4274 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
4276 * marshal.c (mono_marshal_cleanup): New cleanup function.
4278 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
4281 * class.c (mono_class_init): Fix leaking class->nested_classes.
4283 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
4285 * image.c (mono_image_init): Initialize the new cashes.
4287 * image.c (mono_image_close): Destroy the new cashes.
4289 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
4291 * mempool.c (mono_mempool_strdup): New helper function.
4293 * class-internals.h: Add prototype for mono_loader_unlock ().
4295 * domain.c (mono_jit_info_table_find): Fix a warning.
4296 (mono_debugger_check_runtime_version): Ditto.
4298 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
4299 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
4300 functions to these modules.
4302 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
4305 * marshal.c (mono_free_bstr): Fix a warning.
4307 * assembly.c (mono_assembly_open_full): Fix another small leak.
4309 * object.c: Fix some unload leaks in the remoting code.
4311 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
4314 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
4316 * reflection.c: Fix some unload leaks in dynamic assemblies.
4318 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
4320 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
4321 * marshal.h: Add BSTR support on Win32
4322 * icall.c: Add BSTR icalls
4323 * metadata.h: Add BSTR enums
4325 2006-04-28 Miguel de Icaza <miguel@novell.com>
4327 Work to catch the crash from #76795 and turn it into an
4328 exception. As I stubbed out pieces of the VisualBasic support,
4329 I found a number of places where the code was failing and I added
4330 checks to those places.
4332 * metadata.c (do_mono_metadata_parse_generic_class): Make this
4333 function return a status code. If we fail to parse the signature
4334 from mono_metadata_parse_generic_inst, return FALSE.
4336 * loader.c (mono_get_method_from_token): If we fail to load the
4337 method (mono_class_get) return NULL.
4339 * (method_from_memberref): Return NULL if we are unable to parse
4340 the method signature
4342 (mono_loader_error_prepare_exception): Since we now use the
4343 loader_error flag internally to stop processing, and obtaining
4344 exceptions that might be thrown will walk this code path the
4345 proper way of going from a MonoLoaderError into a
4346 MonoException was convoluted. This new routine encapsulates the
4347 process of turning the error into an exception and *clearing* the
4350 2006-04-27 Miguel de Icaza <miguel@novell.com>
4352 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
4353 with missing assemblies), and to cope with:
4355 * Missing fieldref from a non-existing assembly.
4356 * Missing methodref from a non-existing assembly.
4358 The first batch of work to address *some* of the issues from 76661.
4360 * object.c (mono_class_create_runtime_vtable): If we fail to
4361 initialize the class raise the exception here.
4363 * metadata.c (mono_class_get_overrides_full): If any methods fail
4364 to load return the failure to the caller.
4366 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
4367 flagging assemblies that failed to load.
4369 Do not crash if we are unable to load the assembly.
4371 (mono_assembly_close): Do nothing with REFERENCE_MISSING
4374 * loader.c (mono_loader_set_error_type_load): Change the
4375 convention to always pass unallocated strings, so we make our own
4376 copies (I know our own code had duplicated strings before, but
4377 this keeps the normal conventions).
4378 (method_from_memberref): Call mono_loader_set_error_method_load
4379 for all possible failures of loading the class.
4380 Remove assert, turn into a loader error.
4382 (mono_loader_error_to_exception): Move this routine from mini
4383 (mini_loader_error_to_exception) there was no need to have that in
4386 * class.c (mono_class_from_typeref): If we were not able to load
4387 the assembly with mono_assembly_load_reference, call the
4388 mono_loader_set_error_type_load to register the problem.
4390 (mono_class_setup_fields): If we fail to load the type from
4391 mono_metadata_parse_type_full, call mono_class_set_failure and
4392 break from the loop.
4394 If class->exception_type is set, we do not layout the fields as
4395 that might crash the runtime, and instead return (from breaking
4396 from the previous loop).
4398 (mono_class_setup_vtable): This now returns a boolean indicating
4399 whether the table was properly setup. The decision is driven by
4400 mono_class_get_overrides_full which might run into non-existing
4403 (mono_class_init): Returns TRUE on success or FALSE if there was a
4404 problem in loading the type (incorrect assemblies, missing
4405 assemblies, methods, etc).
4407 When we call mono_class_setup_fields we also check for a potential
4408 error inside this call (either a class exception or a general
4411 (mono_class_create_from_typedef): If the parent fails to load
4412 (calling mono_class_get_full) return NULL.
4416 calls to mono_metadata_parse_type_full should be checked
4417 everywhere and set the mono_class_set_failure
4418 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
4420 The current patch checks the places where my manually constructed
4421 tests show the errors are showing up, but we should do it
4426 mono_class_init return values should be tested everywhere, like
4427 the previous case this is something that we should audit
4428 everywhere and not only on the cases exposed by the tests I
4431 2006-04-26 Miguel de Icaza <miguel@novell.com>
4433 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
4434 boolean parameter and instead pass the information on `options'
4435 parameter (FileOptions).
4437 * icall.c: Register the new signature for MonoIO.Open.
4439 * debug-helpers.c (dis_one): Trying to understand how coverity
4440 works. Fix Run 5, item 78.
4442 2006-04-26 Dick Porter <dick@ximian.com>
4444 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
4447 2006-04-25 Martin Baulig <martin@ximian.com>
4449 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
4451 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
4452 debugger_thread_created().
4453 (debugger_gc_push_all_stacks): Don't handle the main thread in any
4455 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
4456 (mono_debugger_finalize_threads): New function; undo the effects
4457 of mono_debugger_init_threads().
4458 (mono_debugger_create_all_threads): Removed.
4460 2006-04-24 Zoltan Varga <vargaz@gmail.com>
4462 * image.c (mono_image_close): Tidy up trace messages.
4464 * assembly.c (mono_assembly_close): Ditto.
4466 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
4467 no longer references an already freed assembly. Fixes #78168.
4469 2006-04-21 Dick Porter <dick@ximian.com>
4471 * threads.c (mono_thread_detach): Fix reference counting when
4474 2006-04-21 Zoltan Varga <vargaz@gmail.com>
4476 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
4479 2006-04-19 Zoltan Varga <vargaz@gmail.com>
4481 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
4482 (mono_type_to_stind): Ditto.
4484 * marshal.c: Use the new helper functions to simplify code.
4486 * image.c (mono_image_close): Add some code for help debug assembly unloading
4489 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
4492 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
4493 assembly was already loaded in another appdomain. Fixes #78083.
4495 2006-04-13 Zoltan Varga <vargaz@gmail.com>
4497 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
4498 referenced assemblies.
4499 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
4501 * domain.c (mono_domain_free): Add a trace message.
4503 * appdomain.c (add_assemblies_to_domain): Ditto.
4505 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
4508 2006-04-12 Zoltan Varga <vargaz@gmail.com>
4510 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
4512 2006-04-12 Martin Baulig <martin@ximian.com>
4514 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
4515 `USE_INCLUDED_LIBGC'.
4517 2006-04-12 Zoltan Varga <vargaz@gmail.com>
4519 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
4520 the patch contains ../ and a small directory name later. Hopefully fixes
4523 2006-04-10 Martin Baulig <martin@ximian.com>
4525 Clean up the debugger's thread-handling code.
4527 The debugger's thread-handling code has been moved from
4528 ../mini/debug-debugger.c to threads.c. We now iterate directly
4529 over the `threads' hash, keep track of exiting threads and also
4532 We can now debug XSP and XSP based applications with the debugger.
4534 * object-internals.h (MonoThread): Added `gpointer end_stack'.
4537 (MonoThreadCallbacks): Removed; this was only used by the debugger.
4538 (mono_install_thread_callbacks): Likewise.
4540 * threads.c (mono_thread_callbacks): Removed.
4541 (debugger_thread_created, debugger_thread_exited): New static functions.
4542 (start_wrapper): Call debugger_thread_created().
4543 (thread_cleanup): Call debugger_thread_exited().
4544 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
4545 (mono_debugger_init_threads): New public function.
4546 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
4547 iterate directly over the `threads' hash and also use proper locking.
4549 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
4551 * mono-debug-debugger.h
4552 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
4554 2006-04-10 Zoltan Varga <vargaz@gmail.com>
4556 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
4557 argument type=array. Fixes #78057.
4559 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
4561 * culture-info-table.h : regenerated. Fixed bug #69652.
4563 2006-04-07 Zoltan Varga <vargaz@gmail.com>
4565 * loader.c metadata.c: Reapply a variant r59116.
4567 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
4569 * class.c (mono_class_setup_interface_offsets): New internal function.
4571 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
4572 interfaces too. Fixes #77398.
4574 * reflection.c (encode_cattr_value): Add support for
4575 parameter type=object, argument type=array.
4576 (load_cattr_value): Ditto. Fixes #77916.
4578 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
4579 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
4581 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
4582 a byval char array and CharSet is Ansi.
4584 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
4586 2006-04-06 Zoltan Varga <vargaz@gmail.com>
4588 * metadata.c: Add some locking comments.
4590 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
4592 (mono_metadata_free_method_signature): Don't free the signature itself.
4594 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
4596 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
4597 reference the same MonoImage.
4598 (mono_assembly_load_from_full): Add an assert.
4600 2006-04-05 Zoltan Varga <vargaz@gmail.com>
4602 * image.c (mono_image_close): Don't put the image we are about to free into the
4603 loaded_images_guid_hash.
4605 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
4606 to reduce code duplication.
4608 * marshal.c: Register the native functions called by this module as icalls, to
4609 somewhat centralize the creation of MonoMethodSignature's.
4611 * loader.c (mono_method_signature): Add a cache for method signatures.
4613 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
4614 the parameter attributes of a method.
4615 (mono_metadata_parse_method_signature_full): Refactored the computation of
4616 parameter attributes into a separate function. Also avoid one allocation in
4619 * assembly.c (mono_assembly_close): Ditto.
4621 * image.c (mono_image_close): Log trace messages with INFO level.
4623 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
4625 * image.c reflection.c: Correct reference counting of image modules.
4627 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
4628 of this function from the image mempool.
4630 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
4631 to allow more cached types to be used.
4633 * mono-debug.c (mono_debug_add_method): Appled patch from
4634 David S. Miller <davem@sunset.davemloft.net>: Access
4635 minfo->lexical_blocks[] entry elements using read32().
4637 2006-04-04 Zoltan Varga <vargaz@gmail.com>
4639 * loader.c (mono_free_method): No longer free the method header for non-dynamic
4640 methods as it is allocated from the mempool.
4642 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
4645 * metadata-internals.h: Add comments describing the reference counting scheme
4646 used for MonoImage and MonoAssembly.
4648 * image.c assembly.c reflection.c: Rework reference counting of images and
4649 assemblies so they are freed when the runtime is shut down. Free some
4650 additional memory structures when an image is unloaded.
4652 2006-04-03 Zoltan Varga <vargaz@gmail.com>
4654 * class.c loader.c reflection.c: Allocate more data structures in
4657 2006-03-31 Miguel de Icaza <miguel@novell.com>
4660 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
4661 build on pre glib 2.4 systems.
4663 2006-03-31 Zoltan Varga <vargaz@gmail.com>
4665 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
4667 * icall.c: Fix some warnings.
4669 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
4671 * culture-info-table.h : regenerated.
4673 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
4675 * threads.c, object-internals.h, verify.c: changed the culture caching
4676 code to use a normal MonoArray for storage so the GC can keep track of
4677 them easily. Fixed bits of the cache logic, too and simplified the
4680 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
4682 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
4683 thread for non-Boehm GCs.
4685 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
4687 * domain.c, object.c, domain-internals.h: reduce the amount of memory
4688 needed to keep track of the data for static fields.
4690 2006-03-29 Raja R Harinath <rharinath@novell.com>
4693 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
4694 for interface classes. Use 'num_methods' instead.
4695 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
4696 before using '->vtable_size' field.
4698 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
4700 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
4701 doesn't contain managed pointers, so use a normal hashtable.
4703 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
4705 * reflection.c, class-internals.h, domain.c: fixed handling of types
4706 used as values for objects in custom attributes (bug #77915):
4708 2006-03-24 Martin Baulig <martin@ximian.com>
4710 * class.c (mono_class_setup_fields): Added support for generic
4711 instances; fixes #77580.
4713 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4715 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
4717 2006-03-24 Dick Porter <dick@ximian.com>
4719 * file-io.c (get_file_attributes): More stat macro breakage.
4722 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
4724 * profiler.c: added the file=filename option in the default profiler
4725 to output the profile data to filename.
4727 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4729 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
4732 2006-03-22 Martin Baulig <martin@ximian.com>
4734 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
4735 allocated `MonoClassField *' in `fb->handle'.
4737 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4739 * class.c, image.c, metadata-internals.h: implemented new mechanism to
4740 allocate interface ID to save memory and allow better ID reuse on
4741 appdomain unload. setup_generic_vtable () removal from Martin.
4743 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
4745 * object.h, appdomain.c, domain.c, exception.c, icall.c,
4746 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
4747 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
4748 write barriers for reference stores with managed objects accessed with
4749 C structures in the runtime and in embedding programs.
4751 2006-03-20 Raja R Harinath <rharinath@novell.com>
4753 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
4754 'interface_id' and 'max_interface_id' fields of MonoClasses
4755 representing open generic types.
4757 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
4759 * object.h, object.c, icall.c: added functions to deal with
4760 storing valuetypes that contain references in managed objects.
4761 * reflection.c, string-icalls.c, threads.c, marshal.c: small
4762 fixes and comments around uses of mono_array_addr ().
4764 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
4766 * object.h, icall.c, monitor.c: object.GetHashCode ()
4767 implementation that supports the moving garbage collector.
4769 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4771 * icall.c, threads-types.h, threads.c: implemented finalizer for
4774 2006-03-15 Zoltan Varga <vargaz@gmail.com>
4776 * metadata.c (mono_type_size): Add a fixme.
4777 (mono_type_stack_size): Ditto.
4779 * object-internals.h (MonoReflectionAssemblyBuilder): Added
4780 'type_forwarders' field.
4782 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
4783 attribute from net 2.0.
4785 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
4788 * class.c (mono_class_setup_fields): Fix a warning.
4790 * class.c (mono_class_from_name): Add support for assemblyref entries
4791 in the EXPORTEDTYPE table.
4793 * reflection.c: Add support for handling type forwarders under net 2.0.
4795 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4797 2006-03-14 Zoltan Varga <vargaz@gmail.com>
4799 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
4800 overwriting entries in ModuleBuild->types, also clean up the code
4801 a little. Fixes #77774.
4803 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
4805 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
4806 load friend assembly info when present.
4808 2006-03-14 Raja R Harinath <rharinath@novell.com>
4810 Fix crasher on gtest-158.cs.
4811 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
4812 the return value if the MonoClass we want is yet in an
4814 * class.c (mono_class_create_from_typedef): Add an comment
4815 explaining an order dependency between mono_class_setup_parent and
4816 mono_class_setup_mono_type.
4818 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
4820 * class.c: documentation updates and events bug fix.
4822 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
4824 * class.c: some cleanup, locking fixes.
4826 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4828 * class.c: fix the generics code to setup nested
4829 type info to the instantiated type (bug #77770).
4831 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
4833 * marshal.c: fixed a few type correctness issues.
4835 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4837 * loader.c: the Set/Get/Addrtess array methods should be public.
4839 2006-03-11 Zoltan Varga <vargaz@gmail.com>
4841 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
4843 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
4846 2006-03-10 Zoltan Varga <vargaz@gmail.com>
4848 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
4850 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
4852 * mempool.c (mono_mempool_alloc): Speed this up a bit.
4853 (mono_mempool_alloc0): Ditto.
4855 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4858 (create_object_from_sockaddr): it was allocating 4 extra bytes
4859 for the AF_UNIX data. Fixes bug #77747.
4861 2006-03-09 Zoltan Varga <vargaz@gmail.com>
4863 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
4865 2006-03-09 Dick Porter <dick@ximian.com>
4867 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
4868 Fixes bug 76966 again.
4870 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
4872 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
4874 * appdomain.c: Bumped corlib version to 48 (due to r57532)
4876 2006-03-07 Martin Baulig <martin@ximian.com>
4879 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
4881 2006-03-07 Martin Baulig <martin@ximian.com>
4884 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
4885 regression introduced in r56970; see gtest-252.cs.
4887 * loader.c (mono_get_method_constrained): Correctly handle generic
4888 methods; see gtest-253.cs.
4890 2006-03-04 Zoltan Varga <vargaz@gmail.com>
4892 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
4894 2006-03-04 Martin Baulig <martin@ximian.com>
4896 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
4897 compute the parent type at runtime, just like we're already doing
4901 (mono_reflection_bind_generic_parameters): Don't compute the
4902 parent type anymore.
4904 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
4906 2006-03-04 Martin Baulig <martin@ximian.com>
4908 * mono-debug-debugger.h
4909 (mono_debugger_create_notification_function): Allocate memory at
4910 runtime and return a pointer to it.
4912 2006-03-03 Zoltan Varga <vargaz@gmail.com>
4914 * assembly.c: Fix windows build.
4916 * assembly.c: Fix build.
4918 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
4920 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
4922 2006-03-03 Dick Porter <dick@ximian.com>
4925 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
4926 Check parameters before dereferencing them. Fixes Aaron's part of
4929 2006-03-03 Raja R Harinath <rharinath@novell.com>
4931 Fix performance regression.
4932 * loader.c (find_method_in_class): Add 'from_class' argument.
4933 Rename 'klass' argument to 'in_class'. The signature is compared
4934 against the method in 'in_class', and the corresponding method is
4935 returned from 'from_class'.
4936 (find_method): Walk both 'in_class' and 'from_class' in parallel.
4937 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
4938 type definition and generic instantiation in parallel.
4939 (mono_get_method_constrained): Update to changes.
4941 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
4943 * threads.c: make sure the domain is correct, too when doing
4944 mono_thread_attach ().
4946 2006-03-01 Zoltan Varga <vargaz@gmail.com>
4948 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
4949 windows. Fixes #77683.
4951 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
4953 * object.h, *: introduced specific way to set elements of an array
4954 of references to be used as write barrier. Still need to audit the
4955 uses of mono_array_addr.
4957 2006-03-01 Miguel de Icaza <miguel@novell.com>
4959 * object-internals.h: New field to cache the assmebly name, patch
4960 from Tambet Ingo (tambet@ximian.com)
4962 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
4964 * decimal.h, class-internals.h, metadata-internals.h,
4965 file-io.h: mark a few function declarations as internal, to
4966 reduce the number of PLT entries.
4968 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4970 * file-io.c: fix typo in warning message.
4972 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
4974 * loader.c: on unix, lookup the "*A" version of a function
4975 if charset is auto as a second option before failing.
4977 2006-02-28 Raja R Harinath <rharinath@novell.com>
4979 * class.h (mono_class_inflate_generic_method): Revert to two
4981 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
4982 (mono_class_inflate_generic_method_full): Add.
4983 * class.c (mono_class_inflate_generic_method_full): Rename from
4984 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
4985 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
4986 * loader.c, reflection.c: Update to changes.
4988 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
4990 * icall.c: const fixes and small improvements.
4992 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4994 * threadpool.c: for asynchronous connect(), enable the same workaround
4995 for BSD 6 as for the Mac. Fixes bug #77637.
4997 2006-02-24 Zoltan Varga <vargaz@gmail.com>
4999 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
5000 formatted classes. Fixes #77524.
5002 2006-02-24 Raja R Harinath <rharinath@novell.com>
5004 * class.c (inflate_generic_type): Add a couple more
5005 micro-optimizations.
5006 (inflate_generic_context): Don't use the 'gmethod' from
5008 (mono_class_inflate_generic_method): If the method has generic
5009 parameters, but the passed-in context doesn't have a 'gmethod',
5010 create one. Use the possibly simplified generic instantiation
5011 from the declaring class instead of the one passed in.
5013 2006-02-24 Raja R Harinath <harinath@gmail.com>
5015 Make generic method signature and method header handling lazy.
5016 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
5017 (inflate_generic_header): Likewise.
5018 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
5019 parameter to avoid inflating types.
5020 (mono_get_inflated_method): Empty out.
5021 * class.h (mono_class_inflate_generic_method): Update to changes.
5022 * loader.c (mono_get_method_from_token): Don't parse signature for
5023 generic methods, nor methods of generic classes.
5024 (mono_method_signature): Rename from 'mono_method_signature'.
5025 Inflate signature on demand.
5026 (mono_method_get_header): Inflate method header on demand.
5027 * reflection.c: Update to changes.
5029 2006-02-23 Raja R Harinath <rharinath@novell.com>
5031 * metadata.c (mono_metadata_inflate_generic_inst): If the
5032 instantiation is closed, don't bother expanding it in the new
5034 * class.c (inflate_generic_class): If the generic instantiation
5035 doesn't change after inflation, return the argument itself.
5036 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
5038 (inflate_generic_context): If neither the generic class nor the
5039 generic method instantiations change, return the original context.
5040 * reflection.c (mono_method_get_object): Do
5041 'mono_get_inflated_method' before accessing the ->klass field.
5042 (inflate_mono_method): Don't create a MonoGenericMethod unless
5044 (inflate_method): Don't pass a constructed type as the declaring
5045 type of a methodbuilder.
5047 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
5049 * object.c: fix memory overwrite.
5051 2006-02-22 Dick Porter <dick@ximian.com>
5053 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
5054 it doesn't work any more.
5055 (mono_threads_request_thread_dump): Fix unused variable warnings.
5057 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
5059 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
5060 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
5061 the public header file.
5063 2006-02-21 Zoltan Varga <vargaz@gmail.com>
5065 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
5067 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
5069 * class-internals.h, object.c: reduce the size of MonoVTable
5070 and store the interface_offsets array at negative offsets.
5072 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
5074 * metadata.c: tweak table descriptors data structures to reduce
5075 size and runtime relocations.
5077 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
5079 * marshal.c: fix some types and opcodes to be type-safe
5080 in marshaling wrappers.
5082 2006-02-21 Ankit Jain <jankit@novell.com>
5084 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
5086 2006-02-21 Raja R Harinath <rharinath@novell.com>
5088 * metadata.c (get_constraints): Relax debugging checks for monodis.
5090 2006-02-21 Ankit Jain <jankit@novell.com>
5092 * metadata.c (mono_metadata_load_generic_params): Move the code
5093 checking for ambiguous generic params from here to mono/dis/get.c
5094 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
5096 2006-02-21 Raja R Harinath <harinath@gmail.com>
5098 Fix assertion triggered when compiling nemerle.
5099 * class.c (mono_get_shared_generic_inst): Rename from
5100 get_shared_inst and make non-static.
5101 * loader.c (mono_get_shared_generic_method): New. Used to create
5102 the MonoGenericContext-equivalent of a MonoGenericContainer.
5103 (mono_get_method_from_token): Initialize the 'context' field of
5104 the created MonoGenericContainer.
5105 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
5106 * metadata.c (get_constraints): Add sanity check.
5107 * class-internals.h: Add new internal methods.
5109 * reflection.c (verify_safe_for_managed_space): New sanity check.
5110 Currently checks that owner-less generic parameters aren't allowed
5112 (mono_type_get_object): Use it.
5113 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
5114 that are now in mono_type_get_object.
5115 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
5117 2006-02-19 Raja R Harinath <harinath@gmail.com>
5119 * metadata.c (mono_type_create_from_typespec): Rename from
5120 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
5121 argument and caching of types in the generic container.
5122 (unwrap_arrays, find_generic_param): Remove.
5123 * metadata-internals.h: Update.
5124 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
5126 2006-02-18 Zoltan Varga <vargaz@gmail.com>
5128 * class.c (mono_class_get_exception_for_failure): Fix a warning.
5130 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
5131 return values. Fixes #77581.
5133 * class.c (mono_fnptr_class_get): Switch name and name_space.
5135 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
5136 classes and add support for [In, Out] attributes.
5137 (mono_marshal_free_asany): Ditto. Fixes #77524.
5139 2006-02-18 Raja R Harinath <harinath@gmail.com>
5141 * class.c (mono_class_from_generic_parameter): Make more robust to
5142 incomplete MonoGenericContainers from monodis.
5144 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
5146 * class-internals.h: added some more exception types.
5147 * class.c, metadata.c: added a few checks to handle missing
5150 2006-02-17 Raja R Harinath <rharinath@novell.com>
5152 Use owner-less generic-params some more.
5153 * class.c (my_mono_class_from_generic_parameter): Remove.
5154 (mono_class_from_generic_parameter): Handle null image,
5155 param->name and param->owner.
5156 (mono_class_from_mono_type): Update.
5157 (mono_class_create_from_typespec): Remove 'container' parameter.
5158 If that parameter is non-null, the result is always inflated by
5159 'mono_class_get_full' anyway.
5160 (mono_class_get): Rename from _mono_class_get. Remove 'container'
5162 (mono_class_get_full): Update.
5164 * class.c (inflate_generic_type) [GENERICINST]: If the generic
5165 instance is not open, don't bother inflating.
5166 (mono_class_setup_fields): Hoist some loop-invariants. Don't
5167 parse metadata for inflated classes.
5168 (_mono_class_get): Change GenericContext* parameter to
5170 (mono_class_create_from_typespec): Likewise. Simplify, and
5171 implement trivially. All the cases are handled in
5172 mono_class_from_mono_type. Don't inflate returned class.
5173 (mono_class_get_full): Delegate GENERICINST optimization to
5174 inflate_generic_type.
5175 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
5177 2006-02-16 Dick Porter <dick@ximian.com>
5179 * socket-io.c (create_object_from_sockaddr): Fix typo.
5180 (create_sockaddr_from_object): Check array lengths before
5181 potentially accessing items off the end.
5182 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
5183 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
5184 (ves_icall_System_Net_Sockets_Socket_Send_internal)
5185 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
5186 length checks to avoid wraparound overflows.
5187 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
5188 contents of the array of sockets
5189 (hostent_to_IPHostEntry2)
5190 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
5191 Check return value of inet_ntop ().
5192 (addrinfo_to_IPHostEntry): Fix typo
5194 2006-02-16 Raja R Harinath <rharinath@novell.com>
5196 Type metadata parsing doesn't use generic-instantiation information.
5197 * metadata.c (mono_metadata_parse_array_full): Change
5198 MonoGenericContext* parameter to MonoGenericContainer*.
5199 (mono_metadata_parse_type_full): Likewise.
5200 (mono_type_create_from_typespec_full): Likewise.
5201 (mono_metadata_parse_mh_full): Likewise.
5202 (mono_metadata_parse_generic_inst): Likewise.
5203 (do_mono_metadata_parse_generic_class): Likewise.
5204 (do_mono_metadata_parse_type): Likewise.
5205 * metadata-internals.h: Update to changes.
5206 * class.c (mono_class_find_enum_basetype): Likewise.
5207 (mono_class_setup_fields): Likewise.
5208 (mono_class_create_from_typespec): Likewise.
5209 * loader.c (method_from_methodspec): Likewise.
5210 (mono_get_method_from_token): Likewise.
5211 (mono_method_get_header): Likewise.
5213 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
5215 * marshal.c: handle additional GENERICINST case (patch from
5216 Thong Nguyen <tum@veridicus.com>).
5217 Fix a few cases where LDIND_I/STIND_I was used for references.
5219 2006-02-16 Raja R Harinath <rharinath@novell.com>
5221 * reflection.c (mono_reflection_get_token): Remove unused variable.
5223 2006-02-16 Martin Baulig <martin@ximian.com>
5225 * reflection.c (mono_reflection_get_token): Add support for fields
5226 in instantiated generic types.
5229 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
5231 2006-02-15 Martin Baulig <martin@ximian.com>
5234 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
5235 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
5236 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
5237 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
5239 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
5241 * class.c, metadata.c, metadata.h, object.c, icall.c,
5242 marshal.c: changed mono_type_get_underlying_type () to do
5243 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
5244 Fixed handling of instantiated generic valuetypes (bug #75479).
5246 2006-02-15 Raja R Harinath <rharinath@novell.com>
5248 * metadata.c (mono_metadata_decode_signed_value): Simplify.
5249 Delegate to mono_metadata_decode_value, and work on the returned value.
5251 * icall.c (ves_icall_MonoType_GetGenericArguments):
5252 Add consistency check here too.
5254 2006-02-15 Ankit Jain <jankit@novell.com>
5256 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
5259 2006-02-15 Ankit Jain <jankit@novell.com>
5261 * metadata.c (mono_metadata_decode_signed_value): New function to decode
5262 signed values, used only for representing lower bounds of arrays.
5263 (mono_metadata_parse_array_full): Use new
5264 mono_metadata_decode_signed_value to decode lower bounds.
5266 2006-02-14 Martin Baulig <martin@ximian.com>
5269 (mono_reflection_get_token): Support "MonoGenericMethod" and
5270 "MonoGenericCMethod" and allow generic instances / methods.
5272 2006-02-11 Zoltan Varga <vargaz@gmail.com>
5274 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
5275 to obtain the terminal size using an ioctl.
5277 * object.c (mono_nullable_init): Revert this as nullable reference
5278 types are not valid.
5279 (mono_nullable_box): Ditto.
5281 2006-02-09 Dick Porter <dick@ximian.com>
5283 * threads.c (mono_thread_detach): Drop a reference to the thread
5286 2006-02-09 Zoltan Varga <vargaz@gmail.com>
5288 * object.c (mono_nullable_init): Handle nullable reference types.
5289 (mono_nullable_box): Ditto. Fixes #77446.
5291 2006-02-07 Martin Baulig <martin@ximian.com>
5293 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
5295 2006-02-07 Ankit Jain <jankit@novell.com>
5297 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
5298 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
5299 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
5300 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
5301 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
5302 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
5304 2006-02-02 Zoltan Varga <vargaz@gmail.com>
5306 * class.c (mono_class_create_generic): Set type_token as well.
5308 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
5311 2006-02-02 Martin Baulig <martin@ximian.com>
5313 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
5314 has never been used so far.
5316 2006-02-02 Martin Baulig <martin@ximian.com>
5318 * mono-debug-debugger.h: Changed comment at the top of this file;
5319 the header is not installed, but it's safe to #include it from
5322 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
5323 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
5325 2006-02-02 Martin Baulig <martin@ximian.com>
5328 (MonoSymbolTable): Removed the `metadata_info' field.
5331 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
5333 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
5334 (mono_debugger_add_builtin_types): Removed.
5335 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
5336 (mono_debugger_create_notification_function): We now operate on a
5337 pre-allocated area; take a `gpointer' and return `void'.
5339 * mono-debug-debugger.c
5340 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
5341 (mono_debugger_add_builtin_types): Removed.
5343 2006-02-02 Martin Baulig <martin@ximian.com>
5345 * threads.c (mono_debugger_create_all_threads): New public method.
5347 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
5349 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
5350 breaks on several platforms.
5352 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
5354 * assembly.c: the VS.NET build doesn't supply default values for
5355 MONO_ASSEMBLIES and MONO_CFG_DIR.
5357 2006-02-01 Zoltan Varga <vargaz@gmail.com>
5359 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
5362 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
5364 * loader.c (method_from_memberref): Fix a warning.
5366 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
5368 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
5369 with explicit layout. Fixes #77433.
5371 2006-01-31 Zoltan Varga <vargaz@gmail.com>
5373 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
5374 max_interface_id is initialized before using it. Fixes #77398.
5375 (ves_icall_Type_GetInterfaces): Ditto.
5377 2006-01-30 Raja R Harinath <rharinath@novell.com>
5379 * metadata.c (mono_metadata_parse_method_signature_full): Don't
5380 allocate memory for parameter attributes when parsing memberref
5382 * loader.c (mono_loader_set_error_method_load): Don't warn.
5383 (method_from_memberref): Ensure MissingMethodException gets thrown
5384 if method is not found. Make warning more informative.
5386 2006-01-29 Raja R Harinath <harinath@gmail.com>
5389 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
5390 return true if is byref.
5391 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
5392 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
5393 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
5395 2006-01-27 Raja R Harinath <rharinath@novell.com>
5397 Fix tests/find-method.2.il
5398 * loader.c (find_method, find_method_in_class): Remove is_inflated
5399 argument. Revert 2006-01-18 change.
5400 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
5401 is generic, search for method in its generic definition.
5402 * class.c (mono_class_setup_vtable_general): Print generic
5403 arguments of generic types in debugging printf.
5405 2006-01-26 Zoltan Varga <vargaz@gmail.com>
5407 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
5409 * threads.c (mono_threads_request_thread_dump): New helper function.
5411 2006-01-25 Raja R Harinath <rharinath@novell.com>
5413 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
5415 2006-01-25 Ankit Jain <jankit@novell.com>
5417 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
5418 move definition to ..
5419 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
5421 2006-01-25 Ankit Jain <jankit@novell.com>
5422 Raja R Harinath <rharinath@novell.com>
5424 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
5425 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
5428 2006-01-25 Martin Baulig <martin@ximian.com>
5430 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
5431 `MonoDebuggerThread' into debug-debugger.c.
5433 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
5435 * profiler.c: fix printing of data.
5437 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
5439 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
5440 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
5442 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
5444 * object.c: fix deadlock related to string interning.
5446 2006-01-23 Martin Baulig <martin@ximian.com>
5448 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
5450 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
5452 2006-01-23 Martin Baulig <martin@ximian.com>
5454 * mono-debug.h: Moved the prototypes of some functions which are
5455 used by the JIT here from mono-debug-debugger.h.
5457 2006-01-21 Martin Baulig <martin@ximian.com>
5459 * Makefile.am: Don't install mono-debug-debugger.h.
5461 2006-01-21 Martin Baulig <martin@ximian.com>
5463 * mono-debug-debugger.h: Enforce the private status of this header
5464 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
5465 Moved some stuff from mono-debugger-jit-wrapper.h here.
5467 2006-01-20 Raja R Harinath <rharinath@novell.com>
5469 * class.c (mono_class_from_typeref): Add a sanity test to help
5470 catch lack of assembly load/search hooks.
5472 2006-01-19 Zoltan Varga <vargaz@gmail.com>
5474 * marshal.c (emit_struct_conv): Relax the fields with same offset
5475 check even more. Fixes #77230.
5477 2006-01-18 Martin Baulig <martin@ximian.com>
5479 * loader.c (find_method_in_class): Added `gboolean is_inflated'
5480 argument; if false, we compare the uninstantiated signatures.
5481 (method_from_memberref): Compare the uninstantiated signatures;
5484 2006-01-18 Robert Jordan <robertj@gmx.net>
5486 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
5487 Clear the weak link. Fixes bug #77170.
5489 * gc.c (mono_gchandle_free):
5490 Reflect *-gc.c changes (tiny optimization).
5492 2006-01-18 Zoltan Varga <vargaz@gmail.com>
5494 * metadata.c (mono_metadata_signature_dup): Applied patch from
5495 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
5498 2006-01-17 Zoltan Varga <vargaz@gmail.com>
5500 * marshal.c (emit_struct_conv): Allow fields with the same offset when
5501 marshalling from native to managed code. Fixes #77230.
5503 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5505 * threadpool.c: fix problem (Mac only) when more than one asynchronous
5506 connect. Fixes bug #77020.
5508 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
5510 * class.c: fixed id assignement for nested interfaces (bug #77275).
5511 Added also better info for --print-vtable debugging.
5513 2006-01-12 Martin Baulig <martin@ximian.com>
5515 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
5516 interfaces on-the-fly; fixes #76625.
5519 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
5520 don't need that anymore.
5522 2006-01-12 Miguel de Icaza <miguel@novell.com>
5525 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
5526 To avoid initing the nested_classes when not needed I turned the
5527 PeerCredData as a toplevel internal class, as it has to be shared
5530 Fixes the CASA issue.
5532 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
5534 * domain.c: Accessors for MonoJitInfo
5536 * profiler-private.h: Add jitinfo to the end jit hook
5538 * profiler.[ch]: Define new hooks, called after jitting which give
5539 the MonoJitInfo that was compiled
5541 2006-01-10 Martin Baulig <martin@ximian.com>
5543 * class.c (mono_class_setup_events): Add support for generic
5544 classes; fixes #76440.
5546 2006-01-06 Raja R Harinath <rharinath@novell.com>
5549 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
5550 on passed-in method.
5552 2006-01-03 Zoltan Varga <vargaz@gmail.com>
5554 * object.c (mono_runtime_invoke_array): Add Nullable support.
5556 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
5558 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
5560 * file-io.c: Don't consider sockets as directory and avoid an endless
5561 loop. Fix bug #76966.
5563 2006-01-03 Zoltan Varga <vargaz@gmail.com>
5565 * object.c (mono_nullable_init): New helper function.
5566 (mono_nullable_box): Ditto.
5568 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
5570 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
5572 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
5574 2006-01-02 Zoltan Varga <vargaz@gmail.com>
5576 * class.c (mono_class_is_assignable_from): Make T assignable to
5579 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
5581 * appdomain.c: Bump corlib version to 46.
5582 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
5583 serialization purpose) and changed ves_icall_System_Reflection_
5584 Assembly_get_code_base signature to accept a boolean (to escape, or
5585 not, the assembly code base).
5587 2005-12-23 Dick Porter <dick@ximian.com>
5591 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
5592 CreateEvent icall now returns "created" boolean parameter.
5594 2005-12-22 Zoltan Varga <vargaz@gmail.com>
5596 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
5599 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
5600 when attr_klass is an interface. Fixes #77045.
5602 2005-12-20 Zoltan Varga <vargaz@gmail.com>
5604 * marshal.c (emit_struct_conv): Fix previous patch.
5606 * marshal.c (emit_struct_conv): Add a check for fields with the same
5609 2005-12-20 Raja R Harinath <rharinath@novell.com>
5611 Fix regression in Mono.C5.
5612 * class.c (mono_class_create_generic): If 'klass' is an interface
5613 set up the interface offsets.
5614 (mono_class_is_assignable_from): Don't throw away generic arguments.
5616 2005-12-19 Raja R Harinath <rharinath@novell.com>
5618 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
5621 2005-12-15 Raja R Harinath <rharinath@novell.com>
5623 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
5625 (do_mono_metadata_parse_generic_class): Don't pass the current
5626 generic context when parsing the type being instantiated: it
5627 cannot use it, anyway.
5629 * loader.c (method_from_memberref): Don't inflate a signature if
5630 it doesn't contain any type parameters.
5632 2005-12-15 Zoltan Varga <vargaz@gmail.com>
5634 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
5636 2005-12-14 Martin Baulig <martin@ximian.com>
5639 (mono_type_get_name_recurse): Don't return null for type
5640 parameters and open generic classes.
5641 (mono_class_setup_methods): Don't exclude generic instances.
5642 (mono_get_unique_iid): Use different IDs for different
5643 instantiations of the same generic type.
5644 (mono_class_setup_vtable): Only use setup_generic_vtable() for
5645 open generic instances; create a normal vtable for closed generic
5647 (mono_class_setup_vtable_general): We're now also called for
5648 closed generic instances.
5651 (mono_reflection_bind_generic_parameters): Correctly use
5652 mono_metadata_lookup_generic_inst() everywhere.
5654 2005-12-14 Zoltan Varga <vargaz@gmail.com>
5656 * object.c (mono_class_create_runtime_vtable): Call
5657 mono_class_setup_vtable ().
5659 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
5661 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
5664 * loader.c (mono_loader_set_error_type_load): Print the type load
5665 warnings to the console so they are more visible to the user.
5666 (mono_loader_set_error_method_load): Ditto.
5668 * reflection.c (ensure_runtime_vtable): Revert the last change as it
5671 * reflection.c (ensure_runtime_vtable): Fix build.
5673 * reflection.c (ensure_runtime_vtable): Disable an optimization which
5674 doesn't work in all cases.
5676 2005-12-13 Zoltan Varga <vargaz@gmail.com>
5678 * object.c (mono_array_new_full): Treat a single dimensional array
5679 with 0 lower bounds as an szarray. Fixes #76973.
5681 * reflection.c (custom_attr_visible): Really fix this.
5683 2005-12-12 Zoltan Varga <vargaz@gmail.com>
5685 * reflection.c (custom_attr_visible): Allow nested public attributes
5688 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
5691 2005-12-12 Raja R Harinath <harinath@gmail.com>
5693 * class.c (set_generic_param_owner): Delete.
5694 (mono_class_create_from_typedef): Don't set ->owner field of
5695 generic parameters to "param containers" of enclosing classes.
5696 * reflection.c (mono_reflection_initialize_generic_parameter):
5699 2005-12-11 Zoltan Varga <vargaz@gmail.com>
5701 * reflection.c (custom_attr_visible): Fix build.
5703 2005-12-10 Zoltan Varga <vargaz@gmail.com>
5705 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
5708 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
5709 handling of null parameter defaults.
5711 2005-12-09 Raja R Harinath <rharinath@novell.com>
5713 * class.c (mono_class_from_generic_parameter): Don't set
5714 klass->generic_container.
5715 (my_mono_class_from_generic_parameter): Likewise.
5717 2005-12-07 Zoltan Varga <vargaz@gmail.com>
5719 * reflection.c (load_public_key): Fix a warning.
5720 (method_encode_code): Fix unaligned accesses.
5722 2005-12-07 Martin Baulig <martin@ximian.com>
5724 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
5727 (write_generic_param_entry): Encode our custom attrs.
5729 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
5731 2005-12-07 Martin Baulig <martin@ximian.com>
5733 * reflection.c (encode_new_constraint): Removed; we don't use the
5734 `NewConstraintAttribute' anymore.
5736 2005-12-06 Zoltan Varga <vargaz@gmail.com>
5738 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
5739 not fire a TypeResolve event when Assembly.GetType () is called.
5741 2005-12-05 Ben Maurer <bmaurer@ximian.com>
5743 Beginning of support for nullable types in the runtime. Parts of
5744 this patch are from Martin.
5746 * appdomain.c (MONO_CORLIB_VERSION): Bump
5748 * domain.c (mono_init_internal): get the nullable type
5750 * class.c (mono_class_is_nullable): New method
5751 (mono_class_get_nullable_param): New mehod
5752 (mono_class_create_generic): In types T? set cast_class to T
5754 * class-internals.h (MonoDefaults): new nullable default class
5755 (mono_class_get_nullable_param, mono_class_get_nullable_param):
5758 2005-12-05 Raja R Harinath <rharinath@novell.com>
5760 * metadata.c (select_container): New. Refactor code to select the
5761 appropriate GenericContainer given the type of generic parameter
5763 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
5764 not a MonoGenericContext. Use select_container. Update parameters.
5765 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
5767 (unwrap_arrays): Remove duplicate tests.
5768 (find_generic_param): Rename from 'has_same_context'. Now walks a
5769 generic instantiated class to find any arguments that are generic
5771 (mono_type_create_from_typespec_full): Use find_generic_param to
5772 avoid evicting some generic instantiations from the typespec
5775 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
5777 * reflection.c: fixed writing of doubles on ARM FPA.
5779 2005-12-02 Robert Jordan <robertj@gmx.net>
5781 * icall.c: Fixed EventInfo.ReflectedType (#76829).
5783 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5785 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
5786 least on SUSE 10 they are not the same (on debian, they are just the
5789 2005-12-01 Raja R Harinath <rharinath@novell.com>
5791 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
5792 DeclaringType for VARs and MVARs.
5793 * class.c (set_generic_param_owner): Fix initialization of owner
5796 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
5798 * icall.c: fixed Enum.ToObject() to correctly convert the values.
5800 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5802 * threadpool.c: workaround for a bug that shows up on the Mac:
5803 select()+connect() on a blocking socket is not like it should
5804 be, so we proceed to connect() in that case, wasting the I/O
5805 threadpool thread until connect succeedes. Fixes bug #75436.
5807 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5809 * threadpool.c: fix typo when setting file descriptor states.
5811 2005-11-28 Raja R Harinath <rharinath@novell.com>
5813 * class-internals.h (MonoGenericContainer.is_signature): Remove.
5814 * metadata.c (mono_metadata_parse_method_signature_full): Don't
5815 create a temporary signature container.
5816 (mono_metadata_parse_generic_param): Update to changes.
5817 (mono_type_create_from_typespec_full): Update to changes.
5818 * loader.c (method_from_memberref): Don't use a
5819 MonoGenericContainer while parsing a memberref signature.
5820 (method_from_methodspec): Remove dead-store of the 'container'
5821 variable. It's overwritten before use.
5823 * metadata.c (mono_type_create_from_typespec_full): Make debugging
5825 (mono_metadata_parse_generic_param): Likewise.
5826 * loader.c (find_method_in_class): Does not need a
5827 MonoGenericContainer. Use 'mono_method_signature' rather than
5828 'mono_method_signature_full'.
5829 (find_method, mono_get_method_constrained, method_from_memberref):
5832 * metadata.c (mono_type_create_from_typespec_full): Ensure that
5833 owner-less generic-parameters are never evicted from the typespec
5836 * loader.c (method_from_memberref): Don't use the current context
5837 when parsing signatures.
5838 (method_from_methodspec, mono_get_method_from_token): Update to changes.
5840 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
5841 side-effects in g_assert.
5842 * loader.c (mono_get_method_from_token): Resolve klass earlier so
5843 that we don't potentially lose information.
5845 2005-11-26 Dick Porter <dick@ximian.com>
5848 * threads.c: icalls to implement basic (ie, not named)
5849 System.Threading.Semaphore.
5851 2005-11-24 Dick Porter <dick@ximian.com>
5854 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
5855 Use GetProcessId() if it's available.
5857 2005-11-23 Zoltan Varga <vargaz@gmail.com>
5859 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
5861 2005-11-23 Raja R Harinath <rharinath@novell.com>
5862 Ankit Jain <jankit@novell.com>
5864 * loader.c (mono_get_method_from_token): Initialize 'method' field
5865 of all generic parameters before parsing the signature. Remove
5866 code that "fixed"-up MVAR references.
5868 2005-11-23 Ankit Jain <jankit@novell.com>
5870 * metadata.c (mono_metadata_has_generic_params):
5871 (mono_metadata_load_generic_param_constraints):
5872 (mono_metadata_load_generic_params): Move duplicate code ...
5873 (mono_metadata_get_generic_param_row): ... here. Returns the
5874 first row-id in GenericParam table for a given owner (token).
5875 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
5878 2005-11-23 Raja R Harinath <rharinath@novell.com>
5879 Ankit Jain <jankit@novell.com>
5881 * metadata.c (mono_metadata_class_equal): Pass signature_only when
5883 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
5884 type->data.generic_param only if the type is an MVAR.
5885 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
5886 leak owner-less VARs and MVARs into managed space.
5888 2005-11-21 Martin Baulig <martin@ximian.com>
5891 (MonoMethod): Moved the `generic_container' here from
5892 `MonoMethodNormal' since we now also need it for
5893 `MonoMethodPInvoke';
5894 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
5895 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
5896 an union containing both `MonoMethodNormal' and
5897 `MonoMethodPInvoke'.
5900 (mono_get_method_from_token): Allow implementing generic methods
5904 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
5907 2005-11-17 Dick Porter <dick@ximian.com>
5911 * process.c: Split the Process Start_internal icall into
5912 ShellExecuteEx_internal and CreateProcess_internal, which are
5913 called depending on whether UseShellExecute is true. Fixes bug
5916 * appdomain.c (MONO_CORLIB_VERSION): Incremented
5918 2005-11-17 Zoltan Varga <vargaz@gmail.com>
5920 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
5921 'msize' parameters, use the information in 'mspec' instead.
5922 (emit_object_to_ptr_conv): Ditto.
5924 * marshal.c (emit_struct_conv): Handle explicit layout structs with
5925 fields out of order. Fixes #76733.
5927 2005-11-17 Ankit Jain <jankit@novell.com>
5929 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
5931 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
5933 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
5936 2005-11-16 Zoltan Varga <vargaz@gmail.com>
5938 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
5939 for types with non-auto layout. Fixes #76717.
5941 2005-11-16 Ankit Jain <jankit@novell.com>
5943 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
5944 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
5945 if generic_context is null.
5946 (mono_metadata_generic_param_equal): param->owner can be null.
5947 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
5950 2005-11-16 Zoltan Varga <vargaz@gmail.com>
5952 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
5955 2005-11-15 Martin Baulig <martin@ximian.com>
5957 * object.c (set_value): Use mono_class_from_mono_type() instead of
5958 the hack for generic instances; fixes #76136.
5960 2005-11-15 Zoltan Varga <vargaz@gmail.com>
5962 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
5965 * image.c (load_metadata_ptrs): Initialize the new fields.
5967 * reflection.c (create_dynamic_mono_image): Ditto.
5969 * reflection.c (build_compressed_metadata): Use the new fields.
5971 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
5974 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
5977 2005-11-15 Ankit Jain <jankit@novell.com>
5978 Raja R Harinath <harinath@gmail.com>
5980 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
5981 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
5982 new per-generic_container cache if the cached MonoType's context matches
5983 the current context.
5984 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
5985 to the expected context.
5986 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
5988 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
5990 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
5991 we changed the signature of an icall.
5992 * icall.c: Modify to mono_double_ParseImpl return true/false
5993 depending on the success, instead of throwing the exception. This will
5994 help us in Double.TryParse methods.
5996 2005-11-14 Zoltan Varga <vargaz@gmail.com>
5998 * marshal.c (emit_marshal_object): Throw an exception when
5999 marshalling 'object' instead of crashing. Fixes #76696.
6001 2005-11-11 Zoltan Varga <vargaz@gmail.com>
6003 * class-internals.h: Add prototype for mono_type_get_full_name ().
6005 2005-11-11 Dick Porter <dick@ximian.com>
6007 * threads.c (mono_thread_manage): Make sure the main thread has
6008 abandoned all its mutexes when cleaning up. Fixes bug 74680.
6010 2005-11-11 Zoltan Varga <vargaz@gmail.com>
6012 * loader.c (mono_loader_set_error_type_load): Log a warning to the
6013 console about the missing type.
6014 (mono_loader_set_error_method_load): Ditto.
6016 2005-11-09 Miguel de Icaza <miguel@novell.com>
6018 * mono-config.c (mono_get_config_dir): Set the system defaults if
6021 * assembly.c (mono_set_dirs): New API entry point to set the
6022 assembly and the config directory in one call
6024 2005-11-09 Zoltan Varga <vargaz@gmail.com>
6026 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
6027 the ftnptr was created from a delegate in a domain other than the
6028 current domain. Fixes #75377.
6030 * exception.h exception.c: Add mono_get_exception_not_supported ().
6032 2005-11-08 Martin Baulig <martin@ximian.com>
6034 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
6036 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
6038 * security-manager.h: Added definitions to deal with strongname key
6039 pairs bigger (and smaller) than 1024 bits.
6040 * reflection.c: Remove hardcoded strongname size (128 bytes) and
6041 adjust wrt the public key length being used.
6043 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
6045 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
6046 Windows build (r51396-51397).
6048 2005-11-03 Martin Baulig <martin@ximian.com>
6050 * class.c (mono_class_setup_vtable_general): Also add generic
6051 methods to the vtable; fixes #76581.
6053 2005-11-01 Miguel de Icaza <miguel@novell.com>
6055 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
6056 sure that we lookup GetString method from the System.Text.Encoding
6057 class, not the derived class or we get an empty method.
6061 2005-10-25 Miguel de Icaza <miguel@novell.com>
6063 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
6064 if it has been previously set (embedders).
6066 Make mono_set_rootdir available also on Unix.
6068 005-10-24 Robert Jordan <robertj@gmx.net>
6070 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
6072 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
6074 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
6075 only calls which are made to native code use this flag.
6077 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
6079 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
6081 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
6082 Add support for FieldBuilders.
6084 2005-10-29 Martin Baulig <martin@ximian.com>
6087 (mono_debug_using_mono_debugger): New public method; returns
6088 whether we're running inside the debugger.
6090 2005-10-27 Zoltan Varga <vargaz@gmail.com>
6092 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
6093 for Method/Constructor/FieldBuilders.
6095 2005-10-26 Zoltan Varga <vargaz@gmail.com>
6097 * reflection.c (module_add_cattrs): Save custom attributes for global methods
6100 2005-10-26 Martin Baulig <martin@ximian.com>
6102 * mono-debug-debugger.c
6103 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
6105 2005-10-24 Raja R Harinath <harinath@gmail.com>
6107 * icall.c (base64_to_byte_array): Don't pass an out-of-range
6110 2005-10-21 Zoltan Varga <vargaz@gmail.com>
6112 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
6113 when passing valuetypes byref. Fixes #76502.
6115 2005-10-19 Jackson Harper <jackson@ximian.com>
6117 * profiler.c: Don't put a . in front of types that are not in a
6120 2005-10-18 Zoltan Varga <vargaz@gmail.com>
6122 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
6124 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
6126 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
6128 (mono_marshal_get_ldflda_wrapper): Fix a warning.
6130 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
6132 * assembly.c metadata-internals.h icall.c: Define an additional
6133 parameter for mono_assembly_name_parse_full, so we can avoid creating
6134 S.R.AssemblyName.Version when no version info wasn't passed.
6136 2005-10-09 Miguel de Icaza <miguel@novell.com>
6138 * class.c (mono_type_get_full_name): Reimplement method that was
6141 * image.c: Some docs
6143 2005-10-10 Zoltan Varga <vargaz@gmail.com>
6145 * profiler.c (output_newobj_profile): Fix printing of Total memory
6148 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
6150 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
6152 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
6154 * threads.c: remove debug output.
6156 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
6158 * threads.c (mono_thread_manage): Fix crashes if more than 64
6159 threads need to be aborted. Hopefully fixes #75899.
6161 * assembly.c (mono_stringify_assembly_name): New helper function.
6163 * class.c: Use mono_stringify_assembly_name instead of the similar
6166 * assembly.h assembly.c: Add support for calling a postload search
6167 hook if an assembly cannot be loaded.
6169 * appdomain.c: Register new search hooks which call the AssemblyResolve
6170 events in AppDomain. Fixes #75231
6172 2005-10-07 Martin Baulig <martin@ximian.com>
6174 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
6175 methods without debug info.
6177 2005-10-07 Zoltan Varga <vargaz@gmail.com>
6179 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
6182 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6184 * file-io.c: now that we return symlinks, use lstat and, when the file
6185 is a symbolic link, stat, to get the file attributes. Also avoid the
6186 conversion to/from utf16/external.
6188 2005-10-06 Zoltan Varga <vargaz@gmail.com>
6190 * class.c (mono_class_layout_fields): Compute klass->has_references
6191 correctly if an embedded valuetype is not yet initialized. Fixes
6194 2005-10-04 Martin Baulig <martin@ximian.com>
6197 (mono_metadata_load_generic_param_constraints): New public
6198 function; splitted the constraints loading out from
6199 mono_metadata_load_generic_params().
6201 * class.c (mono_class_create_from_typedef): Call
6202 mono_metadata_load_generic_param_constraints() after setting up
6203 the type and creating our parent; fixes #75329.
6205 2005-10-04 Martin Baulig <martin@ximian.com>
6207 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
6208 non-dynamic parent classes.
6210 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
6212 * file-io.c : win32 build fix (ETXTBSY seems not found).
6214 2005-10-04 Martin Baulig <martin@ximian.com>
6217 (mono_image_get_methodspec_token): Make the cache actually work;
6220 2005-10-04 Martin Baulig <martin@ximian.com>
6222 * class.c (mono_class_name_from_token): Removed the unneccessary
6223 `MonoGenericContext *' argument.
6225 2005-10-04 Martin Baulig <martin@ximian.com>
6228 (method_from_methodspec): Make the caching work again; fixes the
6229 performance regression from #76262.
6231 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6235 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
6236 GetFileSystemEntries that performs the same work but without going
6237 into io-layer, locking, etc.
6239 2005-09-30 Zoltan Varga <vargaz@gmail.com>
6241 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
6242 ThreadState_Stopped as well. Fixes #76047.
6244 2005-09-29 Martin Baulig <martin@ximian.com>
6247 (inflate_generic_context): If the new context has a `gmethod', set
6248 its `container' that that gmethod's `container'.
6251 (mono_metadata_parse_generic_param): Simplify things;
6252 `generic_container = generic_context->container;' is just fine.
6254 * loader.c (method_from_methodspec): Code cleanups.
6256 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
6258 * decimal.c: fix warning (and let gcc generate correct
6259 code on ARM with optimizations).
6261 2005-09-28 Martin Baulig <martin@ximian.com>
6264 (method_from_memberref): Added `MonoGenericContext *class_context'
6265 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
6266 (method_from_methodspec): If we're a memberref, use the enclosing
6267 context when parsing its parent. Fixes #76262; see gtest-206.cs.
6269 2005-09-28 Martin Baulig <martin@ximian.com>
6271 * object.c (mono_runtime_invoke_array): Added support for
6272 MONO_TYPE_GENERICINST; fixes #75917.
6274 2005-09-27 Martin Baulig <martin@ximian.com>
6276 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
6277 `k->byval_arg.type' to determine the actual type.
6279 * loader.c (method_from_methodspec): Removed some hacks.
6281 2005-09-27 Ben Maurer <bmaurer@ximian.com>
6283 * class-internals.h (mono_field_is_deleted): Do the test for
6284 rtspecialname before we check the actual name of the field. This
6285 prevents us from dereferencing a pointer into the string table,
6286 saving us from accessing a few pages
6288 * *.c: Replace the use of {Enter,Leave}CriticalSection with
6289 macros. This will allow a deadlock debugger to easily be plugged
6292 2005-09-27 Martin Baulig <martin@ximian.com>
6294 * loader.c (method_from_methodspec): Create a "signature"
6295 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
6297 2005-09-27 Martin Baulig <martin@ximian.com>
6300 (inflate_generic_class): Correctly set the new context's
6304 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
6305 instead of a `MonoGenericContext *'.
6306 (mono_method_signature_full): Take a `MonoGenericContainer *'
6307 instead of a `MonoGenericContext *'.
6310 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
6311 instead of a `MonoGenericContext *'.
6312 (mono_metadata_parse_method_signature_full): Likewise.
6314 2005-09-26 Martin Baulig <martin@ximian.com>
6317 (mono_class_from_generic_parameter): Set `klass->generic_container'
6318 (mono_class_from_generic_parameter): Likewise.
6319 (mono_bounded_array_class_get): We inherit the generic container
6320 from the element class.
6323 (find_method, find_method_in_class): Take a `MonoGenericContext *'
6324 argument rather than computing it here.
6325 (method_from_memberref): Correctly set the generic context before
6326 parsing the signature. Fixes #75681.
6328 2005-09-26 Zoltan Varga <vargaz@gmail.com>
6330 * object.c (mono_class_has_special_static_fields): Fix warnings.
6332 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
6334 * assembly.c: Add parse_public_key function, to
6335 par the public keys. Also added mono_assembly_name_parse_full,
6336 to define it the parsed key should be freed or not.
6337 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
6338 to parse a long format assembly name.
6339 * metadata-internals.h: Keep mono_assembly_name_parse_full as
6340 private, since calling it to preserve the key requires
6341 freeing it manually.
6343 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
6345 * locales.c : removed HAVE_ICU part.
6347 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
6349 * object.c (mono_class_create_runtime_vtable): Avoid calling
6350 field_is_special_static if the klass has no special static fields.
6352 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
6353 (MonoCachedClassInfo): Likewise.
6355 * object.c (mono_class_has_special_static_fields): New helper function.
6357 2005-09-23 Zoltan Varga <vargaz@gmail.com>
6359 * class.c (mono_class_create_from_typedef): Don't call
6360 interfaces_from_typedef_full for enums.
6361 (mono_class_create_from_typedef): Compute the base types of enums directly
6362 without calling mono_class_setup_fields ().
6363 (mono_class_find_enum_basetype): New helper function.
6365 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
6366 one place inside the string heap.
6368 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
6370 * class.c: locking fixes, code cleanups, some docs added.
6371 Allocate some data structures in the image mempool.
6373 2005-09-23 Zoltan Varga <vargaz@gmail.com>
6375 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
6378 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
6380 * class-internals.h, class.c, reflection.c: reduce memory taken by
6383 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
6385 * metadata.c, metadata.h, loader.h: documentation updates, code and
6388 2005-09-23 Zoltan Varga <vargaz@gmail.com>
6390 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
6393 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
6394 page faults caused by the runtime while reading metadata.
6396 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6398 * socket-io.c: the field names were changed 3 months ago and no one
6399 realized until bug #76077 got filed!
6401 2005-09-20 Martin Baulig <martin@ximian.com>
6403 * icall.c (assembly_icalls): Removed some unused debugger icalls.
6405 2005-09-20 Martin Baulig <martin@ximian.com>
6407 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
6408 write the rank into the class entry.
6410 2005-09-20 Martin Baulig <martin@ximian.com>
6412 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
6414 2005-09-19 Zoltan Varga <vargaz@gmail.com>
6416 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6418 * icall.c (custom_attrs_defined_internal): New icall.
6420 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
6422 (mono_custom_attrs_construct_by_type): New helper function.
6424 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
6426 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
6427 terminate the resulting string. Fixes #76123.
6429 2005-09-16 Martin Baulig <martin@ximian.com>
6432 (mono_debug_add_method): Ignore inflated methods for the moment.
6434 2005-09-14 Martin Baulig <martin@ximian.com>
6436 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
6438 2005-09-13 Zoltan Varga <vargaz@gmail.com>
6440 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
6441 return a success/failure indication.
6442 (mono_metadata_interfaces_from_typedef_full): Ditto.
6443 (get_constraints): Ditto.
6445 2005-09-12 Zoltan Varga <vargaz@gmail.com>
6447 * marshal.c (emit_marshal_array): Fix handling of null arrays.
6449 * marshal.c (emit_marshal_array): Add support for returning string
6450 arrays from delegates. Fixes #76063.
6452 * marshal.c: Use the emit_ldloc/stloc macros where possible.
6454 2005-09-11 Zoltan Varga <vargaz@gmail.com>
6456 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
6459 2005-09-09 Zoltan Varga <vargaz@gmail.com>
6461 * reflection.c icall.c: Fix after mono_get_exception_type_load
6464 * assembly.c (mono_assembly_get_assemblyref): New helper function.
6465 (mono_assembly_load_reference): Use the new helper.
6467 * class-internals.h (MonoLoaderError): New structure containing
6468 information about type loading errors.
6470 * class-internals.h loader.c: Add APIs to store per-thread loader
6473 * loader.c class.c: Set the loader error if needed.
6475 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
6477 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
6479 * decimal.c: fixed to handle the broken ARM fp format.
6481 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
6483 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
6486 2005-09-06 Martin Baulig <martin@ximian.com>
6488 * domain.c (supported_runtimes): Added v2.0.50727.
6490 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
6492 * culture-info.h: reduce the size of some structures.
6494 2005-09-05 Martin Baulig <martin@ximian.com>
6496 Reflect latest API changes in the August CTP.
6499 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
6500 ("MonoType.HasGenericArguments"): Removed.
6501 ("MonoMethod.BindGenericParameters"): Renamed to
6502 "MakeGenericMethod".
6503 ("MethodBuilder.BindGenericParameters"): Renamed to
6504 "MakeGenericMethod".
6506 2005-09-05 Martin Baulig <martin@ximian.com>
6508 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
6510 2005-09-05 Martin Baulig <martin@ximian.com>
6512 Applying a patch from Michal Moskal <malekith@nemerle.org>.
6514 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
6515 generic_container is non-NULL.
6517 2005-09-05 Martin Baulig <martin@ximian.com>
6519 Applying a patch from Michal Moskal <malekith@nemerle.org>.
6521 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
6523 2005-08-29 Michal Moskal <malekith@nemerle.org>
6525 * reflection.c (encode_locals,
6526 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
6527 for large generic types.
6529 2005-09-05 Martin Baulig <martin@ximian.com>
6531 Applying a patch from Michal Moskal <malekith@nemerle.org>.
6533 * class.c (mono_dup_array_type): New public method.
6534 (mono_metadata_signature_deep_dup): New public method.
6535 (dup_type): Correctly duplicate array and function types.
6537 2005-09-05 Martin Baulig <martin@ximian.com>
6539 Applying a patch from Michal Moskal <malekith@nemerle.org>.
6541 * reflection.c (get_default_param_value_blobs): Handle generic types
6542 and generic methods.
6544 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
6546 * class.c: Fixed error reporting (method/class were inversed) for
6547 inheritance demands.
6548 * security-manager.c|h: Added the AppDomain when calling the managed
6549 System.Security.SecurityManager.InheritanceDemand method.
6551 2005-09-01 Raja R Harinath <rharinath@novell.com>
6553 * reflection.c (encode_marshal_blob): 'marshaltype' and
6554 'marshaltyperef' are alternate sources for the custom marshaler
6557 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
6559 * class.c: fix creation of array classes with rank == 1
6560 (patch by Ankit Jain <jankit@novell.com>).
6562 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
6564 * object.c: fix check for creating the bound data for arrays vs
6567 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6569 * object.c: configuration file name is now based on the executable name,
6570 not the image name. Fixes bug #75931.
6572 2005-08-29 Zoltan Varga <vargaz@gmail.com>
6574 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
6575 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
6577 2005-08-25 Zoltan Varga <vargaz@gmail.com>
6579 * rand.c: Use wincrypt.h instead of WinCrypt.h.
6581 2005-08-24 Ankit Jain <jankit@novell.com>
6582 Raja R Harinath <rharinath@novell.com>
6584 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
6585 called by it recursively.
6586 (mono_class_init): Remove special case in pending_init handling, since it's
6587 superseded by the fix to mono_class_from_typeref.
6589 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
6591 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
6592 BROKEN_THREAD_START stuff.
6594 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
6596 * class-internals.h object.c: Add a new kind of trampoline called a delegate
6599 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
6601 * object.c (mono_delegate_ctor): Replace the original function address with
6602 a delegate trampoline.
6604 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
6606 * icall.c: add boolean argument to base64_to_byte_array and
6607 InternalFromBase64String to control whether a whitespace-only string
6608 is allowed (or should casue a FormatException to be thrown). We need
6609 this as the behavior has changed between MS.NET 1.x and 2.0, and we
6610 to match the MS behaviour in both profiles.
6611 * appdomain.c: Bump corlib version.
6613 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
6615 This patch implements a big portion of publisher policy
6616 support, used to bind assembly versions and redirect
6617 one assembly from version A to version B.
6620 New GSList loaded_assembly_bindings, for storing the cached
6622 (assembly_binding_maps_name): New static function for checking if a
6623 assembly binding information maps an assembly name.
6624 (mono_assembly_binding_info_free): New function for freeing
6625 assembly binding information resources.
6626 (get_publisher_policy_info): New static function for retrieving
6627 assembly binding information from a MonoImage.
6628 (compare_versions): New static function for comparing an assembly
6629 binding information data and the version of an assembly name.
6630 (check_policy_versions): New static function for checking if an
6631 assembly binding info mapping an assembly name is valid for it.
6632 (mono_assembly_load_publisher_policy): New static function for
6633 loading the 'policy.major.minor.MyAssembly' image for an assembly
6634 with an assembly name 'aname'.
6635 (mono_assembly_bind_version): New static function for updating
6636 assembly redirection.
6637 (mono_assembly_apply_binding): New static function for applying
6639 (search_binding_loaded): New static function for searching
6640 loaded assembly binding infos in the cache domain.
6641 (mono_assembly_load_full): Don't apply assembly binding for
6642 reflection only assemblies.
6644 * metadata-internals.h: Add MonoAssemblyBindingInfo,
6645 which contains information about assembly binding. Also
6646 declare signature for mono_config_parse_publisher_policy ()
6647 function, used to retrieve pub policy info.
6650 (publisher_policy_start): New static function used to parse publisher
6651 policy config files.
6652 (publisher_policy_parser): New static MonoParseHandler containing
6653 the functions used when parsing config files.
6654 (mono_config_parse_publisher_policy): New function for parsing
6655 publisher policy files.
6657 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
6659 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
6661 * marshal.c (mono_delegate_free_ftnptr): Ditto.
6663 * object.c (mono_get_addr_from_ftnptr): New helper function.
6665 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
6667 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6669 2005-08-19 Dick Porter <dick@ximian.com>
6671 * threads.c, threads.h, appdomain.c, appdomain.h,
6672 profiler-private.h, monitor.c, object.c, object-internals.h,
6673 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
6674 store the thread ID, so it can hold a 64 bit value if needed.
6676 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
6678 * reflection.c (mono_reflection_create_dynamic_method): Store the
6679 handle class into the method references as well so ldtoken works in
6682 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
6685 2005-08-19 Ankit Jain <jankit@novell.com>
6688 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
6689 here rather than using the method signature of a arbitrary function
6690 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
6692 Hack done with Harinath.
6694 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6696 * threadpool.c: disable printing stack traces when we get a exception
6697 in a threadpool thread. I need to do more testing to figure out which
6698 cases actually print this. Fixes bug #75828.
6700 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6702 * icall.c: there might be ignored whitespace after the last '='. This
6703 fixes length computation and bug #75840.
6705 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
6707 * assembly.c (mono_assembly_load_full): Consider .exe extension as
6710 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
6713 * reflection.c (create_custom_attr_data): Ditto.
6715 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
6717 * locales.c, culture-info.h : removed RegionLCIDMap.
6718 * culture-info-tables.h : regenerated.
6720 2005-08-16 Martin Baulig <martin@ximian.com>
6722 * class.c (mono_type_get_name_recurse): Small fix.
6724 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
6726 * locales.c : indentation fixie.
6728 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
6730 * object-internals.h,
6734 icall.c : added RegionInfo table support.
6735 * culture-info-table.h : regenerated for region support.
6737 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
6739 * reflection.c (resolve_object): handle all kinds of MonoMethod
6740 including generic ones
6742 2005-08-12 Ankit Jain <jankit@novell.com>
6744 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
6745 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
6747 2005-09-12 Lluis Sanchez <lluis@ximian.com>
6749 * process.c: Don't close a thread handle when it's NULL. This is a
6750 workaround for bug #75733.
6752 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
6754 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
6756 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
6758 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
6760 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6762 * threadpool.c: if a work item in the thread pool has a callback that
6763 catches a exception, don't propagate it after invoking the callback.
6766 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
6768 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
6770 * class-internals.h (MonoCachedClassInfo): Add some new fields.
6772 * class.c (mono_class_init): Load field info lazily in the AOT case.
6774 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
6776 2005-08-03 Ankit Jain <jankit@novell.com>
6779 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
6780 PInvoke calling convention is 0.
6782 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
6784 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
6785 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
6787 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
6789 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
6790 to handle threads not started by the GC (patch by Michael Meeks
6791 <michael.meeks@novell.com>).
6793 2005-07-31 Kamil Skalski <nazgul@omega.pl>
6795 * reflection.c: Make buffer used in emitting types larger for some
6796 big generic types (patch by Michal Moskal).
6798 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
6800 * mono-debug.c: Fix some (not all) alignment problems.
6802 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
6804 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
6805 Invoke mono_image_load_from_data_full passing the refonly
6809 (mono_assembly_open_from_bundle): Add the refonly argument,
6810 in order to pass it to other methods it calls to.
6811 (do_mono_assembly_open): Add the refonly argument, in order
6812 to pass it to other methods it calls to.
6813 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
6814 the refonly parameter to it.
6816 * image.c: Add loaded_images_refonly_hash and
6817 loaded_images_refonly_guid_hash to cache the reflection
6819 (mono_images_init): Initialize the hash tables used for
6820 caching the reflection only images.
6821 (load_modules): Invoke mono_image_open_full passing the refonly
6822 parameter to load the modules the correct way.
6823 (build_guid_table): Add the refonly argument, to re-build the
6825 (do_mono_image_open): Added the refonly argument, in order to
6826 define it for the loaded image.
6827 (mono_image_loaded_full): New function, which receives an
6828 additional parameter to look for the image in the refonly or
6829 non-refonly section.
6830 (mono_image_loaded): Updated, using mono_image_loaded_full.
6831 (mono_image_loaded_by_guid_full): The same case that happens
6832 with mono_image_loaded_full.
6833 (mono_image_loaded_by_guid): Likewise.
6834 (register_image): Use the ref_only variable inside MonoImage
6835 to decide in which hash table store the current image.
6836 (mono_image_open_from_data_full): Rename
6837 mono_image_open_from_data to mono_image_open_from_data_full,
6838 adding the refonly argument, to define the ref_only variable
6840 (mono_image_open_from_data): Return
6841 mono_image_open_from_data_full.
6842 (mono_image_open_full): Rename mono_image_open to
6843 mono_image_open_full, receiving the new refonly argument,
6844 to pass it to inner methods.
6845 (mono_pe_file_open): Update this function, to open
6846 a MonoImage as a non-refonly image.
6847 (mono_image_close): Use the refonly variable inside
6848 MonoImage to remove the image from the correct caches.
6850 * image.h: Add the signatures of mono_image_open_full,
6851 mono_image_open_from_data_full, mono_image_loaded_full,
6852 mono_image_loaded_by_guid_full.
6854 * metadata-internals.h: Add the ref_only field to
6857 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
6859 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
6860 Fix the last behavior, which used to load the assemblies and
6861 extract MonoReflectionAssemblyName information, instead of
6862 extract it from the metadata tables. Needed for Reflection
6865 2005-07-29 Martin Baulig <martin@ximian.com>
6867 * mono-debug-debugger.c
6868 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
6872 (mono_debug_address_from_il_offset): Check whether we have
6873 debugging support before attempting to take the lock.
6874 (mono_debug_source_location_from_address): Likewise.
6875 (mono_debug_source_location_from_il_offset): Likewise.
6876 (mono_debug_il_offset_from_address): Likewise.
6877 (mono_debug_address_from_il_offset): Likewise.
6879 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
6881 * class.c (mono_class_from_name_case): Add support for dynamic images.
6884 * object.c (mono_class_compute_gc_descriptor): Add a workaround
6887 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
6889 * reflection.c (mono_method_get_object): Fix warning.
6891 2005-07-28 Martin Baulig <martin@ximian.com>
6894 (mono_debug_add_wrapper): Also write the wrapper type.
6896 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
6898 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
6900 * class.c (mono_class_init): Avoid reading nested classes if the AOT
6901 data indicates the class has none.
6903 2005-07-26 Ben Maurer <bmaurer@ximian.com>
6905 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
6906 loader lock with the debugger lock. Prevents deadlocks for beagle.
6908 Beagle can now run on an smp box for a weekend without any
6911 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
6913 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
6914 in a module. Fixes #75629.
6916 2005-07-26 Martin Baulig <martin@ximian.com>
6918 * mono-debug.c (mono_debug_add_wrapper): New static method.
6919 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
6920 interncall or a wrapper.
6922 * mono-debug.h (MonoDebugWrapperData): New public typedef.
6923 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
6924 (MONO_DEBUGGER_VERSION): Bump to 51.
6926 * mono-debug-debugger.c
6927 (mono_debugger_add_type): Removed this empty function.
6928 (mono_debugger_add_method): Likewise.
6930 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
6932 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
6933 before accessing method->slot.
6935 2005-07-21 Jb Evain <jbevain@gmail.com>
6937 * reflection.c (method_encode_clauses/class): Handle filters clauses.
6940 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
6942 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
6945 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
6947 * image.h image.c: Add mono_image_get_guid () API function.
6949 2005-07-19 Ben Maurer <bmaurer@ximian.com>
6951 There were issues when multiple threads tried to load
6952 assemblies. A deadlock was created between assemblies_mutex and
6953 mono_domain_assemblies_lock. This fixes the issue by making the
6954 assembly ref counting be lock free. See bug 75586.
6956 * image.c (mono_image_close): The add ref function here was using
6957 Interlocked operations while the unref was using a mutex and a
6958 --. I don't think this was ever a bug that would be exposed in a
6959 non-pendantic way (ie, by an embedder doing a ref on one thread
6960 and an unref on another), but for the sake of correctness, this is
6963 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
6964 (mono_assembly_load_reference): Call mono_assembly_addref rather
6965 than touching the refcount ourselves.
6966 (mono_assembly_close): Use InterlockedDecrement to unref the
6967 assembly. Don't acquire the lock unless it is actually needed.
6969 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
6971 * class.c (mono_class_layout_fields): Fix calculation of has_references
6974 2005-07-12 Martin Baulig <martin@ximian.com>
6976 Applying a patch from Michal Moskal <malekith@nemerle.org>.
6979 (mono_type_hash): Provide better hashing for generic instances.
6980 (mono_generic_inst_hash): Improve hashing.
6981 (mono_generic_class_hash): Likewise.
6983 * reflection.c (mymono_metadata_type_hash): Improve hashing for
6986 2005-07-12 Martin Baulig <martin@ximian.com>
6988 * reflection.c (mono_reflection_create_runtime_class): Remove the
6989 hack for generic type definitions and non-`Run' assemblies.
6990 (mono_reflection_bind_generic_parameters): Also use
6991 `klass->wastypebuilder' to check for TypeBuilders.
6993 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
6995 * class.c (mono_class_layout_fields): Fix calculation of has_references
6998 * class.c (inflate_generic_class): Fix a leak.
6999 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
7002 2005-07-11 Martin Baulig <martin@ximian.com>
7004 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
7007 2005-07-11 Martin Baulig <martin@ximian.com>
7009 * loader.c (find_method): Also lookup in
7010 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
7012 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
7014 * appdomain.c (mono_domain_unload): Don't free the error message
7015 before passing it to mono_get_exception_...
7017 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
7019 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
7021 * threads.c: try to better guess an available RT signal (bug #75387).
7023 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
7025 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
7028 2005-07-07 Martin Baulig <martin@ximian.com>
7030 * class.c (mono_type_get_name_full): Return NULL for
7031 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
7034 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
7036 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
7037 exit the appdomain as well being aborted.
7039 * threadpool.c: Create all threadpool threads inside the root appdomain, and
7040 change back to the root domain after calling managed code. This enables
7041 appdomains using threadpools to be unloaded.
7043 2005-07-07 Martin Baulig <martin@ximian.com>
7046 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
7047 into `MonoDynamicGenericClass' since we only need it for dynamic
7050 * reflection.c (mono_class_bind_generic_parameters): We don't need
7051 to compute the `parent' here.
7053 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
7055 * culture-info-table.h : regenerated.
7057 2005-07-06 Martin Baulig <martin@ximian.com>
7060 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
7062 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
7064 2005-07-06 Martin Baulig <martin@ximian.com>
7066 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
7067 we're doing a signature-only comparision; fixes #74945.
7069 2005-07-06 Martin Baulig <martin@ximian.com>
7071 * class-internals.h (MonoGenericClass): Moved some things out into
7072 a new `MonoInflatedGenericClass' type.
7073 (MonoInflatedGenericClass): New type; the `klass' of a
7074 `MonoGenericClass' is now computed lazyly in
7075 mono_get_inflated_generic_class().
7077 * class.c (mono_get_inflated_generic_class): New public function.
7078 (mono_class_inflate_generic_method): Removed the unused
7079 `MonoClass *' argument.
7080 (setup_generic_vtable): Don't call mono_get_inflated_method() on
7082 (mono_class_create_generic): Make this static and merge it with
7083 mono_class_create_generic_2(); we're now called automatically from
7084 mono_get_inflated_generic_class().
7086 * loader.c (mono_method_signature): Call
7087 mono_get_inflated_method() here.
7089 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
7091 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
7092 type of fields with RVA.
7094 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
7095 for this pseudo class.
7096 (my_mono_class_from_generic_parameter): Likewise.
7097 (mono_class_init): Allow interfaces to have cctors.
7099 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
7101 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
7102 lazily for AOT methods.
7104 2005-07-05 Martin Baulig <martin@ximian.com>
7106 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
7107 returns FALSE for a successful match, not TRUE.
7109 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
7111 * loader.c (mono_method_get_index): Optimize this a bit.
7113 2005-07-04 Martin Baulig <martin@ximian.com>
7116 (class_compute_field_layout): Move the check for generic type
7117 definitions into mono_class_layout_fields(). Fixes #74684.
7118 (mono_class_from_generic_parameter): Correctly compute
7119 `klass->parent'; fixes #75457.
7121 * reflection.c (register_assembly, register_module): Make sure
7122 `domain->rejobject_hash' is already created.
7124 2005-07-02 Martin Baulig <martin@ximian.com>
7127 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
7128 `MonoDynamicGenericClass'.
7130 2005-07-01 Lluis Sanchez <lluis@ximian.com>
7132 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
7133 returned by a field getter is null, since null is a valid value.
7135 2005-07-01 Martin Baulig <martin@ximian.com>
7137 * reflection.c (mono_reflection_generic_class_initialize): Update
7138 the `dgclass->fields [i].parent' to the correct class.
7139 (mono_image_get_fieldref_token): Use the declaring type, not the
7142 2005-07-01 Martin Baulig <martin@ximian.com>
7144 * loader.c (find_method): Also look in the interfaces; fixes #75429.
7146 2005-06-30 Ben Maurer <bmaurer@ximian.com>
7148 * threads.c (thread_cleanup): assert that thread != NULL
7149 (wait_for_tids_or_state_change): We were using the wrong variable
7150 when accessing wait->threads. `i' was always out of the bounds of
7153 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7155 * loader.c: map user32 and kernel32 to libMonoSupportW
7157 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
7159 * appdomain.c (unload_thread_main): Mark this as WINAPI.
7161 2005-06-28 Martin Baulig <martin@ximian.com>
7163 * loader.c (method_from_methodspec): Fix #75334.
7165 2005-06-28 Martin Baulig <martin@ximian.com>
7167 Fix #74953 - Arrays now implement the generic IList<T> interface
7168 on the 2.0 platform.
7170 * class-internals.h (MonoDefaults): Added `generic_array_class'.
7172 * reflection.c (mono_class_bind_generic_parameters): New public
7173 function; similar to mono_reflection_bind_generic_parameters(),
7174 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
7176 * domain.c (mono_init_internal): Try to initialize.
7177 `mono_defaults.generic_array_class' here; this'll only succeed if
7178 we're using the 2.0 corlib.
7181 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
7182 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
7183 (mono_lookup_internal_call): Added support for nested classes.
7186 (mono_get_method_from_token): Set `result->signature->pinvoke' if
7187 we're an interncall and have generic arguments.
7190 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
7191 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
7192 instance of System.Array.InternalArray<T> for arrays, so they
7193 implement the generic IList<T> interface.
7195 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
7197 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
7198 (chastamar@yahoo.com). Fixes #75374.
7200 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
7202 * culture-info-table.h: regenerated.
7204 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7206 * icall.c: handle spaces correctly for base64 strings.
7208 2005-06-26 Ben Maurer <bmaurer@ximian.com>
7210 * *.c: Kill some warnings.
7212 2005-06-23 Duncan Mak <duncan@novell.com>
7214 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
7215 that this builds on Solaris 10 (x86).
7217 2005-06-23 Martin Baulig <martin@ximian.com>
7220 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
7221 generic type definitions.
7223 2005-06-23 Martin Baulig <martin@ximian.com>
7227 * metadata.c (mono_class_get_overrides): Renamed to
7228 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
7229 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
7230 pass it to mono_get_method_full().
7232 2005-06-22 Ben Maurer <bmaurer@ximian.com>
7234 * reflection.c (mono_reflection_create_runtime_class): take the
7235 mono_domain_lock in this method. Prevents deadlocks
7237 2005-06-22 Martin Baulig <martin@ximian.com>
7239 * loader.c (method_from_methodspec): Fix #75330.
7241 2005-06-22 Martin Baulig <martin@ximian.com>
7243 * reflection.c (type_get_qualified_name): Use
7244 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
7245 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
7246 argument; use it if we don't have an assembly name.
7248 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
7250 * object.c: In mono_message_init, set "copy out" flag for in
7251 parameters with the [Out] flag.
7253 2005-06-21 Martin Baulig <martin@ximian.com>
7256 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
7259 2005-06-21 Martin Baulig <martin@ximian.com>
7261 * class.c (mono_class_init): Don't initialize `class->fields' for
7262 generic instances since they're initialized again in
7263 compute_field_layout().
7264 (compute_field_layout): Set the field's `generic_info' here; fix
7267 2005-06-21 Martin Baulig <martin@ximian.com>
7270 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
7272 * metadata.c (mono_metadata_generic_method_equal): Also
7273 distinguish the `generic_class'; fixes #75334.
7275 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7279 * domain-internals.h:
7280 * reflection.c: 'domain_assemblies' field is now protected by its own
7281 lock. Don't call into managed code to run the AssemblyLoad event if we
7282 now there are no registered delegates for it.
7284 2005-06-20 Martin Baulig <martin@ximian.com>
7286 * class.c (mono_class_is_assignable_from): Use a custom version of
7287 mono_class_has_parent() to make things work for generic instances;
7290 2005-06-20 Martin Baulig <martin@ximian.com>
7292 * loader.c (method_from_methodspec): Apply a patch from
7293 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
7295 2005-06-20 Martin Baulig <martin@ximian.com>
7297 * class.c (mono_class_init): Reverted Zoltan's last change; it
7300 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
7302 * threads.c (wait_for_tids_or_state_change): Add missing locking.
7304 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7306 * socket-io.c: fix the index in the socket array for writable/error
7307 sockets. Fixes bug #75306.
7309 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
7311 * class.c (mono_class_init): Allow interfaces to have static ctors.
7313 2005-06-17 Martin Baulig <martin@ximian.com>
7315 * loader.c (method_from_methodspec): Use `context->container' when
7316 parsing the `gmethod->inst'.
7318 2005-06-17 Martin Baulig <martin@ximian.com>
7320 * class.c (mono_type_get_name_recurse): Don't add the assembly
7321 name for type arguments.
7323 2005-06-15 Martin Baulig <martin@ximian.com>
7325 * reflection.c (mono_image_get_inflated_method_token): Encode
7326 correct klass; fixes #75260.
7328 2005-06-13 Michal Moskal <malekith@nemerle.org>
7330 * icall.c: Make GetCorrespondingMethod/Constructor take
7331 MonoReflectionMethod method not MonoMethod. Removed
7332 MonoType.GetCorrespondingField, and make
7333 MonoGenericType.GetCorrespondingField take name not
7336 2005-06-13 Michal Moskal <malekith@nemerle.org>
7338 * reflection.c (field_encode_signature, encode_locals):
7339 Make sizes of buffers for types larger (for big generic types).
7340 (create_generic_typespec,
7341 mono_reflection_sighelper_get_signature_local,
7342 mono_reflection_sighelper_get_signature_field):
7343 Add asserts for too small buffers.
7345 2005-06-15 Martin Baulig <martin@ximian.com>
7347 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
7348 if our parent is not a dynamic type.
7350 2005-06-15 Martin Baulig <martin@ximian.com>
7352 * class-internals.h (MonoTypeNameFormat): New enum.
7355 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
7356 (mono_type_get_full_name): Removed.
7357 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
7358 argument instead of the boolean's.
7360 * icall.c (ves_icall_System_MonoType_getFullName):
7361 Added `gboolean assembly_qualified'.
7364 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
7366 * reflection.c (mono_reflection_parse_type): Parse the new type
7369 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7371 * icall.c: no need to convert from utf16 to utf8 and then back again
7372 after the call to GetLogicalDrives.
7374 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7376 * icall.c: frombase64. Fix problems exposed by new tests.
7378 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7380 * icall.c: added internal calls for converting char [] and strings in
7381 base64 into byte [].
7383 2005-06-10 Martin Baulig <martin@ximian.com>
7385 * class.c (mono_class_create_generic_2): Read the nested classes
7386 from the metadata rather than from `gklass->nested_classes' since
7387 `gklass' might not be initialized yet.
7389 2005-06-09 Duncan Mak <duncan@novell.com>
7391 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
7392 all public headers. Fixes #74919.
7394 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
7396 * domain.c: The key for proxy_vtable_hash is now a pointer
7397 array. Added new GHashFunc and GCompareFunc functions for this.
7399 * class.h: The list of interfaces in MonoRemoteClass is known in
7400 advance and can't grow (we create a new MonoRemoteClass if needed),
7401 so now the interface array can be allocated together with
7404 * object.c: Added a new method create_remote_class_key.
7405 Fixed mono_remote_class so it does not depend on
7406 mono_upgrade_remote_class.
7407 Removed extend_interface_array.
7408 Added new method clone_remote_class(), which makes a copy of a remote
7409 class and adds a new interface or class to it.
7410 mono_upgrade_remote_class() now creates a new remote class (or gets
7411 it from the cache) if an vtable upgrade is needed. In this way
7412 we make sure that other objects sharing the same remote class
7413 don't get the new vtable with unwanted interfaces.
7415 * object-internals.h:
7416 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
7418 * marshal.c: Track changes in mono_upgrade_remote_class().
7420 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
7421 * icall.c: Add runtime methods for obtaining members of inflated
7422 class, which were created from supplied non-inflated members. It
7423 is used in internal Get{Method,Constructor,Field} methods in
7426 2005-06-09 Martin Baulig <martin@ximian.com>
7429 (mono_reflection_bind_generic_method_parameters): Fix #75169.
7431 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
7432 * reflection.c (mono_image_basic_init): Define
7433 Version in MonoDynamicAssembly.
7435 2005-06-08 Martin Baulig <martin@ximian.com>
7440 (mono_method_signature_full): New public method; takes a
7441 `MonoGenericContext *'.
7442 (find_method): Use mono_method_signature_full() and pass the
7443 klass'es context to it.
7445 * class.c (mono_class_is_inflated_method): Use
7446 mono_method_signature_full() and pass the context to it.
7448 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
7450 * object.c: add proper locking in mono_remote_class_vtable(),
7451 fixes possible memory corruption.
7453 2005-06-08 Michael Meeks <michael.meeks@novell.com>
7455 * marshal.c (mono_remoting_marshal_init): set
7456 initialized after initialization.
7458 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
7462 2005-06-06 Michael Meeks <michael.meeks@novell.com>
7464 * object.c (extend_interface_array): fix really silly
7465 memory corrupting / comparison bug.
7467 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
7469 * reflection.c: Functions added to support the creation
7470 of CustomAttributeData, which includes Attribute data
7471 used by ReflectionOnly methods.
7473 * reflection.h: mono_reflection_get_custom_attrs_data and
7474 mono_custom_attrs_data_construct added (functions exposed).
7476 * icall.c: Added mono_reflection_get_custom_attrs_data
7479 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
7481 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
7484 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
7486 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
7488 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
7489 dynamic DllImportAttribute.
7491 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
7492 dynamic DllImportAttribute.
7494 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
7497 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7499 * threads.c: avoid segfault when an unstarted thread is aborted.
7501 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
7503 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
7504 Returns the name and version of the runtime for reporting.
7506 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7508 * appdomain.c: bump corlib version.
7509 * object-internals.h: new field in MonoReflectionAssembly.
7511 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7513 * object-internals.h: Carlos forgot to add this field.
7515 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
7517 * icall.c: Added create_version to create instances
7518 of Version of MonoReflectionAssemblyName. This change helps
7519 the AssemblyName tests to keep running fine.
7521 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
7523 * object.c (mono_method_return_message_restore): A somehow less
7524 intrusive fix for #75138.
7526 2005-06-03 Raja R Harinath <rharinath@novell.com>
7528 * object.c (mono_method_return_message_restore): Fix computation
7529 of expected number of out args.
7531 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
7533 * reflection.c (mono_image_get_method_info): Fix the case when the
7536 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
7538 * object.c: Added missing null check in
7539 mono_method_return_message_restore.
7541 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
7543 * reflection.c (mono_image_get_method_info): Handle the case when
7546 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
7548 * object.c: When creating the vtable for a proxy, take into account
7549 all inherited interfaces, not only the ones registered in
7550 iclass->interfaces. This fixs bug #74996.
7551 Also, in mono_method_return_message_restore, verify that the array
7552 of out args has the expected lengh.
7554 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7556 * socket-io.c: update the timeout in Poll when the call is interrupte.
7558 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7560 * socket-io.c: support abort/suspend in Select_internal after last
7563 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7565 * threadpool.c: remove warning.
7567 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7570 * socket-io.[ch]: Select_internal uses poll() now when available, thus
7571 removing the 1024 limit from select(). Runtime part of the fix for
7574 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7576 * socket-io.c: when resolving the addresses for the same
7577 host returned by gethostname(), get the local IPs from the interface
7578 list. Loopback addresses are discarded if the are interfaces up with
7579 non-loopback ones. Fixes bug #63265.
7581 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
7583 * appdomain.c, verify.c, object-internals.h, reflection.c:
7584 bumped corlib number to 36, and added new extra_flags field
7585 to ReflectionMethodBuilder and friends. Fixes #75060.
7587 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
7589 * gc.c: register a new weak link only if the object is non-null
7592 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
7594 * culture-info.h : short time pattern too.
7596 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
7598 * culture-info.h : expand long time pattern string length.
7600 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
7602 * culture-info-table.h : update (more French date format; #72788).
7604 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
7606 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
7607 the method is static. Fixes #75029.
7609 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
7611 * reflection.c: Update the table_idx field of method builders after
7612 saving the module, since it can change. This is a workaround for
7615 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
7617 * culture-info-table.h : update (additional French date format).
7619 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
7621 * icall.c (ves_icall_type_Equals): Revert last change.
7623 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
7625 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
7627 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
7629 * class-internals.h: Added executioncontext_class field to
7630 MonoDefaults structure.
7631 * domain.c: Cache System.Threading.ExecutionContext class in
7633 * object.c: Capture the ExecutionContext for asynchroneous calls in
7634 mono_async_result_new.
7635 * object-internals.h: Added execution_context and original_context
7636 fields to MonoAsyncResult. Added execution_context to MonoThread.
7637 * security-manager.c|.h: Added mono_get_context_capture_method to
7638 return the capture method (if required by the security manager or by
7639 the framework version used).
7640 * threadpool.c: Apply capture (if present) ExecutionContext in
7641 mono_async_invoke and revert to original context after it completes.
7643 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
7645 * culture-info-table.h : updated (real hacky solution for zh-CHT).
7647 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
7649 * culture-info-table.h : zh-CHT related workaround.
7651 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
7653 * marshal.c (emit_marshal_custom): Add some error checking and call the
7654 methods in the ICustomMarshaler interface. Fixes #74875.
7656 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
7657 native->managed wrappers.
7659 2005-05-12 Martin Baulig <martin@ximian.com>
7661 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
7662 here and use the loader lock.
7664 * mono-debug.c: Properly lock when the debugger is not attached.
7665 (mono_debug_init): Release the initial lock if we're not running
7668 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
7670 * marshal.c (emit_marshal_custom): Pass through NULL values without
7671 calling the custom marshalling routines.
7673 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
7674 conversion in structures. Fixes #74882.
7676 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
7678 * culture-info-table.h : zh-* cultures were missing.
7680 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
7682 * threads.c: Added a new event background_change_event which is signaled
7683 when a thread changes its background mode.
7684 Moved here several checks previously done in managed code. The checks
7685 require the thread lock, and using the thread lock in managed code
7686 can result in deadlocks.
7687 Merged Start_internal and Thread_internal into a single method. Now
7688 Thread_internal does all work of creating and starting a thread.
7689 Added icalls for setting and getting the state of the object. Moved from
7690 managed code to avoid locking there.
7691 Added wait_for_tids_or_state_change() which is called instad of
7692 wait_for_tids when waiting for non-backround threads to end. This method
7693 will return if one of the threads ends or the background_change_event
7695 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
7696 the background mode. This method signals the background_change_event
7699 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
7700 removed Start_internal.
7702 2005-05-11 Martin Baulig <martin@ximian.com>
7704 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
7705 to order of some fields to get proper alignment on 64-bit machines.
7707 2005-05-11 Martin Baulig <martin@ximian.com>
7709 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
7710 changes as they're broken and completely fuck up the debugger.
7712 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
7714 2005-05-10 Martin Baulig <martin@ximian.com>
7716 * reflection.c (mono_reflection_generic_class_initialize): Don't
7717 call mono_class_setup_parent() here.
7719 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7721 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
7722 send/receive timeout use an integer in milliseconds. We were using a
7725 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7728 (internal_get_cultures): reserve the first slot of the array for the
7729 InvariantCulture, which will be filled in managed code.
7731 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
7733 * reflection.c (mono_image_fill_module_table): Initialize the
7734 GENERATION field as well.
7736 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7738 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
7739 Monitor.Enter on the object.
7741 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
7743 * threads.c: Enable the wait for running threads when exiting.
7744 * icall.c: Suspend all threads before exiting.
7746 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
7748 * assembly.c (mono_assembly_load_reference): Fix warning.
7750 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7752 * threadpool.c: changed the default number of threads per cpu. From now
7753 on, the default will be 20 + (5 * number of cpus) instead of 50.
7755 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
7757 * loader.c (mono_method_get_signature_full): Add locking here.
7759 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
7761 * appdomain.c: Moved methods for parsing and freeing assembly
7762 names to assembly.c.
7763 * assembly.c, domain-internals.h: Created public methods for parsing
7764 assembly names. Fixed mono_assembly_load_with_partial_name:
7765 it now finds the best match, taking into account the version,
7766 token and culture specified in the partial name. Also return
7767 the latest version if no version information is specified.
7769 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
7771 * threadpool.c: replace check for SocketAsyncCall class.
7773 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7775 * threadpool-internals.h:
7776 * Makefile.am: added threadpool-internals.h
7778 * threadpool.c: call mono_unhandled_exception on exceptions not handled
7779 that happen in threadpool threads (tested on MS).
7780 (mono_thread_pool_remove_socket): new function that dispatch any pending
7781 AIO call on a socket that is closing. By now only epoll really needs it,
7782 as select/poll wake up when the socket closes.
7785 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
7787 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
7789 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
7791 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
7793 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
7795 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
7797 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
7798 has an abort request, convert it into a suspend request.
7800 2005-04-30 Ben Maurer <bmaurer@ximian.com>
7802 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
7803 warning for the usage of `UnmanagedFunctionPointerAttribute' which
7804 is not supported yet.
7806 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7808 * image.c: register assemblies loaded from data (bundles) in the loaded
7809 assemblies hash. Fixes bug #74772.
7811 2005-04-29 Martin Baulig <martin@ximian.com>
7813 * class.c (mono_type_get_name_recurse): Update to the new naming
7814 schema from the latest .NET 2.x beta2.
7815 (mono_class_setup_vtable_general): If we're a generic instance,
7816 copy the vtable from our generic type definition and inflate all
7819 * loader.c (find_method): Update to the new naming schema from the
7820 latest .NET 2.x beta2.
7822 2005-04-29 Raja R Harinath <harinath@gmail.com>
7824 * class.c (mono_class_init): Add a mono_loader_unlock to the
7827 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
7829 * icall.c (ves_icall_System_Environment_Exit): Remove the
7830 suspend_all_other_threads () call for the time being, since it can hang.
7832 * threads.c (mono_thread_manage): Similarly, disable the waiting for
7833 the background threads to exit, since it can also hang.
7835 * class.c (mono_class_init): Applied patch from Ankit Jain
7836 (radical@gmail.com). Avoid pending init errors when a field refers
7837 to a nested class using a typeref. Fixes #74734.
7839 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
7840 this for dynamic modules.
7842 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7844 * threads.c: don't wait for threads that are in the process of aborting
7845 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
7846 and waiting for background threads to finish. This makes xsp and
7847 mod-mono-server exit without random length delays and/or hangs.
7849 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7851 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
7853 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
7855 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
7856 dynamic types to prevent infinite loops. Fixes #74727.
7858 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
7859 ..._is_assignable_to.
7861 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
7863 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
7865 2005-04-25 Martin Baulig <martin@ximian.com>
7867 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
7870 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
7872 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
7874 * reflection.c (build_compressed_metadata): Set metadata header
7877 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
7879 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
7880 number into an integral and a decimal part. Fixes #70473.
7882 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
7884 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
7886 * culture-info-table.h : reflected the latest locale-builder output.
7888 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7890 * threadpool.c: check for SuspendRequested too when deciding if
7891 mono_thread_interruption_checkpoint should be called.
7893 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7895 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
7896 * threads.c: remove interruption_mutex and use Interlocked instead. When
7897 suspending all the threads, wait for all the suspended events at once.
7898 If we're shutting down and get an APC that is going to be queued,
7899 call mono_thread_execute_interruption immediately, as the thread might
7900 be sleeping on a pthread condition or mutex.
7902 * icall.c: call mono_runtime_set_shutting_down before suspending the
7905 Fixes bug #74693. And now xsp is happier when exiting.
7907 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
7909 * loader.c (mono_stack_walk): Fix #74690.
7911 2005-04-22 Martin Baulig <martin@ximian.com>
7913 * mono-debug.h (MonoDebugMethodJitInfo): Added
7914 `MonoDebugMethodJitInfo *jit'.
7916 * mono-debug.c (mono_debug_read_method): Cache the
7917 MonoDebugMethodJitInfo in `address->jit'.
7918 (mono_debug_free_method_jit_info): New public method.
7920 2005-04-22 Martin Baulig <martin@ximian.com>
7922 * class.c (mono_class_is_assignable_from): Disallow
7923 type parameter -> interface.
7925 2005-04-21 Dick Porter <dick@ximian.com>
7927 * threads.c (mono_thread_create): Turn an assertion into an error.
7929 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
7931 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
7933 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
7934 Fix some gcc 4.0 warnings.
7936 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
7938 * file-io.c: fix alt dir separator char on unix systems
7939 and cleanup (fixes bug #71214).
7941 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
7943 * marshal.c: Use CALLVIRT instead of CALL when dispatching
7944 a call to a remote domain, since the method may be an
7945 interface method in the client domain. This fixes bug #74192.
7947 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7949 * threadpool.c: recv/send are now performed before going back to managed
7950 code to save one transition.
7952 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7954 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
7956 * metadata/threadpool.c: removed hack to workaround the bug above.
7960 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
7962 * reflection.c reflection.h: Fix handling of parameter defaults in
7963 dynamic methods. Also fixes handling of parameter attributes.
7966 * mono-debug.c (mono_debug_close_image): Fix warning.
7968 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7970 * socket-io.h: replaced old unused field with new 'blocking'.
7971 * threadpool.c: restore socket blocking state on windows(tm).
7973 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
7975 * icall.c: don't return the codebase in the AssemblyName[] returned by
7976 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
7977 * object-internals.h: Removed FIXME (fields were presents) and fixed
7978 versioncompat declaration.
7980 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7982 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
7983 not closed, so don't cleanup when it happens.
7985 2005-04-13 Chris Toshok <toshok@ximian.com>
7987 * mono-debug-debugger.h: change prototype for
7988 mono_debugger_lookup_type.
7990 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
7991 this function, although it should probably be named
7992 mono_debugger_init_type.
7994 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7996 * threadpool.c: fix non-AIO case.
7998 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
8000 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
8001 the built-in profiler to measure just JIT compilation times.
8003 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8005 * threadpool.c: the epollfd might be closed by another thread at
8006 any time, so ignore EBADF at treat it as a "we're closing" sign.
8008 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8010 * threadpool.c: release the semaphores with a count equals to the number
8011 of working threads in both IO and regular pools. Fixed typo that messed
8012 up the count of IO pool threads. Don't initialize the pipe handles if
8015 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8017 * threadpool.c: some systems don't like a NULL when deleting the socket
8020 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8022 * threadpool.c: fix semaphore allocation.
8024 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8026 * threadpool.c: added epoll() based implementation for asynchronous IO
8027 that is used instead of the default poll() when available.
8028 It can be disabled by setting MONO_DISABLE_AIO.
8030 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8032 * threadpool.c: windows needs 'closesocket' and instead of returning
8033 0 when the stream is closed while in select, it returns -1. Fixes bug
8036 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
8038 * class.c (class_compute_field_layout): Fix the regression caused by
8041 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8043 * threadpool.c: separate pool for socket async. IO.
8044 * threadpool.h: mono_max_worker_threads is not a global any more.
8046 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
8048 * class.c (class_compute_field_layout): Fix #74549.
8050 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8052 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
8053 use 2 connected sockets instead.
8055 2005-04-08 Miguel de Icaza <miguel@novell.com>
8057 * mono-config.c: Add new entry point for mkbundle
8058 mono_config_parse_memory.
8060 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8062 * threadpool.c: removed another unused function.
8064 2005-04-08 Ankit Jain <radical@corewars.org>
8066 * reflection.c (get_default_param_value_blobs): Add 'types'
8067 parameter to get the types encoded in the constant table.
8068 (mono_param_get_objects): Use the type from the constant table,
8069 not the type of the parameter, when creating default values.
8070 Handle null default values correctly.
8072 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8079 * socket-io.c: removed dead code for async IO.
8081 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8083 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
8085 * threadpool.c: intercept socket async. calls and pass them to a thread
8086 that is polling and dispatching the job items to the threadpool as
8087 socket become ready. Fixes bugs #71217, #71933.
8089 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
8090 between char and short/ushort arrays.
8092 * socket-io.c: remove dead code.
8094 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
8097 icall.c : removed InternalToUpper_Comp() and
8098 InternalToLower_Comp().
8100 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
8102 * char-conversions.h : The tables were incorrectly generated. Should
8103 be generated against invariant culture.
8105 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
8107 * object.c (mono_runtime_invoke_array): Fix return value when
8108 passing pre-created valuetype objects to ctors.
8110 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
8111 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
8114 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
8116 * domain.c: removed g_assert for runtimesecurityframe_class. This is
8117 only used with --security and hides the wrong corlib version error.
8119 2005-03-30 Joshua Tauberer <tauberer@for.net>
8121 * class.c: Changed mono_class_name_from_token so that types
8122 outside of a namespace don't have an initial period. Improved
8123 the g_warning message used in _mono_class_get when loading
8125 * assembly.c: In mono_assembly_load_reference, when an assembly
8126 can't be found, "No such file or directory" is misleading and
8127 unhelpful because a few paths were checked for the presence of
8128 the assembly. When that happens (ENOENT), display a nicer
8129 message indicating the directories that were searched. In all
8130 cases, the warning is made easier to read for non-hackers.
8132 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
8134 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
8136 * appdomain.h|domain.c: Removed inline from functions.
8137 * appdomain.c: Reduced warnings when compiling on windows.
8138 * icall.c: Fixed output_debug declaration to gunichar2*.
8139 * mono-config.c: Reduced warnings when compiling on windows.
8140 * rand.c: Added missing "windows.h". Added missing return value.
8141 * rawbuffer.c: Added missing winsock2.h for windows.
8142 * sysmath.h: Added mono-compiler.h header to allow/ease
8143 compilation with non-GCC compilers.
8144 * threads.c: Fixed declarations to compile with VS.NET C compiler.
8145 Removed cast warnings.
8147 Adapted from the work of J Lothian (for VC6).
8149 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
8151 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
8154 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
8156 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
8159 2005-03-27 Raja R Harinath <harinath@gmail.com>
8161 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
8162 has to be in $(exec_prefix). $(prefix) is for arch-independent
8163 stuff, and it would probably use $(prefix)/share rather than
8166 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8168 * console-io.c: added 2 includes that might be missing.
8170 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
8172 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
8175 * reflection.c (create_custom_attr): Allocate the params array using
8176 alloca so it gets GC tracking.
8178 2005-03-23 Chris Toshok <toshok@ximian.com>
8180 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
8183 2005-03-24 Raja R Harinath <rharinath@novell.com>
8185 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
8186 changes to pick up any changes in prefix, etc.
8188 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
8190 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
8192 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
8193 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
8195 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
8197 * class-internals.h object-internals.h class.c reflection.c: Extend the
8198 mono_lookup_dynamic_token () function to return the class of the
8201 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
8204 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
8206 * security-manager.c: Skip inheritance checks for intra-corlib
8207 class inheritance and method overrides. This skips a lot of checks
8208 and (anyway) permissions cannot work until corlib is loaded.
8210 2005-03-23 Martin Baulig <martin@ximian.com>
8212 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
8213 MONO_TYPE_GENERICINST.
8215 2005-03-23 Martin Baulig <martin@ximian.com>
8217 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
8219 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
8221 * class.c: added locking comments to some functions.
8222 Cache the interface offsets arrays (saves about 20 KB
8223 of runtime memory in a typical app).
8224 Reduce the time overhead in mono_class_setup_supertypes ().
8226 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
8228 * icall.c: speedup and fix leaks in GetMethodsByName and
8229 GetPropertiesByName.
8231 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
8233 * reflection.c: some locking fixes.
8235 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
8237 * metadata.c: added missing break in case statement.
8239 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
8241 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
8242 typedbyref return values. Fixes #73941.
8244 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
8246 * security-manager.c|h: Added demandunmanaged method and
8247 suppressunmanagedcodesecurity class to MonoSecurityManager.
8248 Renamed aptc class to allowpartiallytrustedcallers.
8250 2005-03-17 Martin Baulig <martin@ximian.com>
8252 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
8254 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8256 * file-io.c: disabled file async. IO using aio_*. It uses the
8257 threadpool now. Workaround for bug #73718.
8259 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
8261 * assembly.h, mono-config.c: added code to deal with bundled configs
8262 for bundled assemblies.
8264 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
8266 * *.c, private.h: cleanup, removing old private.h header file.
8268 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
8270 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
8271 and throw_on_unmappable_char attributes.
8273 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
8275 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
8276 _ProcessName_internal.
8278 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
8280 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
8283 * icall.c threads.c threads-types.h: Remove slothash icalls as they
8286 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
8288 * object.c (compute_class_bitmap): Add support for generics. Fixes
8291 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
8293 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
8295 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8297 * filewatcher.c: commented out the code for windows watcher, as we don't
8298 use it (we use the managed implementation instead).
8300 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
8302 * object-internals.h (MonoThread): Remove 'unused1' field.
8304 * appdomain.c: Bump corlib version.
8306 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
8308 * reflection.c (mono_reflection_create_runtime_class): Remove the
8309 AssemblyBuilder.Save optimization since it causes too many problems.
8311 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
8313 * exception.c|h: Added mono_get_exception_reflection_type_load to
8314 create a ReflectionTypeLoadException object.
8315 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
8316 to return NULL is a InheritanceDemand fails during reflection. Updated
8317 ves_icall_System_Reflection_Assembly_GetTypes to throw a
8318 ReflectionTypeLoadException if an InheritanceDemand fails during
8319 reflection. Added icall mapping for GetLinkDemandSecurity.
8320 * security-manager.c|h: Added ves_icall_System_Security_
8321 SecurityManager_GetLinkDemandSecurity internal call to return the
8322 class and methods permissions set for a LinkDemand. Removed unused
8323 fields in MonoSecurityManager.
8325 2005-03-10 Martin Baulig <martin@ximian.com>
8327 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
8328 it's a generic instance.
8330 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
8332 * reflection.c (mono_get_object_from_blob): Applied patch from
8333 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
8335 * class.c (mono_class_is_assignable_from): Another try at fixing
8336 #73469 without breaking anything.
8338 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
8340 * class.c: (mono_class_is_assignable_from): Revert the last changes
8341 since they don't work with generics.
8343 * class.c (mono_class_is_assignable_from): Fix build bustage.
8345 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
8346 the managed IsAssignableFrom method. Fixes #73469.
8348 * reflection.c (mono_reflection_call_is_assignable_from): New helper
8351 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
8353 * object.c (mono_load_remote_field_new): Fix returning uninitialized
8354 memory when the remoting callback does not sets the out arguments.
8357 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
8360 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
8362 * object-internals.h (MonoStackFrame): Sync with managed object layout.
8364 * appdomain.c: Bump corlib version.
8366 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
8368 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
8371 * threads.c (mono_thread_attach): Detect threads which are not started
8372 by the GC pthread wrappers.
8374 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
8376 * icall.c: Added new icall for RNG.
8377 * rand.c|h: Added new icall to open the RNG. This allows to share a
8378 single handle on Linux to access /dev/urandom and fix #73183.
8380 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
8382 * object.c: setting the new vtable in a transparent proxy object must
8383 not change the GC descriptor.
8385 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
8387 * object.c: fixed compilation without GCJ support.
8388 * reflection.c: for runtime-created types ensure klass->has_references
8389 is correct (bug #73215).
8391 2005-03-02 Martin Baulig <martin@ximian.com>
8393 * class.c (mono_class_is_assignable_from): Make this work if
8394 `oklass' is a generic instance; fixes #72831.
8396 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
8398 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
8401 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
8403 * marshal.c: Reorganize native->managed marshalling code to also use
8404 the emit_marshal_... functions.
8406 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
8408 * object.c: typed allocs have issues with bitmap sizes > 30,
8409 so check for max_set >= 30.
8411 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
8413 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
8414 managed code. Fixes #73012.
8416 * metadata.h (MonoMarshalSpec): Add elem_mult field.
8418 * metadata.c reflection.c: Load/Emit elem_mult as well.
8420 * metadata.h (MonoMarshalSpec): Add comment.
8422 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
8424 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
8425 num_elem to -1 if not given.
8427 * object-internals.h (MonoReflectionMarshal): Add has_size field.
8429 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
8432 2005-03-01 Marek Safar <marek.safar@seznam.cz>
8434 * null-gc.c (mono_gc_free_fixed): Was not compilable.
8436 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
8438 * reflection.c (encode_marshal_blob): Encode param_num field as well.
8440 * object-internals.h (MonoReflectionMarshal): Add param_num field.
8442 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
8444 * object.c: generalized the reference bitmap creation
8445 and added hooks for the new GC.
8446 * class-internals.c: removed the gc_bitmap field from MonoClass.
8448 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
8450 * domain.c: help the compiler to produce better code
8451 in mono_jit_info_table_find ().
8453 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
8455 * object.c: make all allocations look typed.
8457 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
8459 * socket-io.c: load Mono.Posix if it's not loaded already
8462 2005-02-24 Martin Baulig <martin@ximian.com>
8464 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
8465 * reflection.c (dup_type): Likewise.
8467 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
8469 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
8470 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
8472 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
8474 * domain.c, threads.c, object-internals.h: make the critical thread
8475 local vars use the fast access mode (even when we're compiled in
8476 a lib). Provide accessors to be used by the jit during codegen.
8478 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
8480 * appdomain.c: Changed hook functios behavior to include
8481 support for the reflection only assemblies. Some icalls were changed
8482 to support the mentioned assemblies too. Signatures of static methods
8483 try_assembly_resolve and real_load now have an additional parameter:
8486 * assembly.c: General changes to mono_assembly_ methods to support
8487 reflection only api. Functions mono_assembly_open, mono_assembly_load,
8488 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
8489 suffix, to support an additional gbool parameter to specify whether
8490 the assembli is reflection only or not. Created some new hook functions
8491 to add support for reflection only assemblies. Signatures of static
8492 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
8493 have now an additional parameter: refonly.
8495 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
8496 indicating whether the assembly is reflection only or not.
8498 * exception.c: Add mono_get_exception_invalid_operation.
8500 * icall.c: Throw an InvalidOperationException when trying to invoke
8501 a property/method/event, or trying to set/get the value of a field.
8502 Also add an icall to retrieve the ref_only flag to the
8503 MonoReflectionAssembly.
8505 2005-02-23 Chris Toshok <toshok@ximian.com>
8507 Part of fix for #72827.
8508 * mono-debug.c (mono_debug_add_method): add lexical block data to
8509 the info we write. Kind of a hack at the moment - we copy the
8510 lexical block info from the MonoDebugMethodInfo to the
8511 MonoDebugMethodJitInfo here, before writing it.
8512 (mono_debug_read_method): read the lexical block info.
8514 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
8516 * debug-mono-symfile.h: add lexical block support.
8518 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
8521 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
8523 * loader.c (mono_lookup_pinvoke_call): Fix warning.
8525 * object.c (mono_runtime_free_method): Call mono_free_method () and
8526 put the TODOs there.
8528 * loader.c (mono_free_method): Free up most memory allocated for
8531 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8533 * reflection.c: properly flag a Type argument to a
8534 named custom attr value (bug #72248).
8536 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
8538 * reflection.c: reduce code duplication in named custom
8541 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
8543 * reflection.c: properly encode custom attrs of type object
8546 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
8548 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
8550 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
8552 * socket-io.c: load System.dll if it's not loaded already
8553 (bug #72850 and #70477).
8555 2005-02-21 Martin Baulig <martin@ximian.com>
8557 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
8560 2005-02-21 Martin Baulig <martin@ximian.com>
8562 * reflection.c (mono_image_build_metadata): We also need to
8563 "fixup" the MethodImpl table after we computed the final method
8564 indices. Call fixup_methodimpl() to do that.
8565 (fixup_methodimpl): New private method.
8567 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
8569 * assembly.c: special case mscorlib.dll (bug#72536),
8570 patch from Carlos Alberto Cortez.
8572 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
8574 * threads-types.h threads.c: Fix build bustage.
8576 * threads.c: Use a union for long<->double conversions.
8578 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
8579 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
8581 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
8582 containing the checkpoint call with NOT_TAKEN.
8584 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
8585 checkpoint before pushing the arguments, so they won't have to be
8588 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
8590 * domain.c, assembly.c, domain-internals.h: make some data
8591 const and relocation-free.
8593 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
8595 * object.c, appdomain.c, class-internals.h: introduce the
8596 MonoClassRuntimeInfo structure to hold the info needed to
8597 use a class at runtime. Made mono_class_vtable() lock-free
8598 for all the appdomains.
8600 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
8602 * metadata-internals.h, image.c: introduce a per-image mempool to
8603 be used for memory that has the same lifetime as the image.
8605 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
8607 * domain.c: In mono_init_internal(), instead of selecting the first
8608 runtime version supported by an executable, get a list of all
8609 supported versions and select the one for which an mscorlib exists
8610 (since even if the runtime supports a given version, it doesn't mean
8611 that the framework for that version is installed).
8612 Modified get_runtimes_from_exe to support this behavior.
8613 In supported_runtimes, added information about additional system
8616 * assembly.c: Added support for more than one system assembly version
8617 per runtime version. Updated the assembly list.
8618 In mono_assembly_remap_version, removed the initial version check,
8619 since we don't know to which version we need to compare until we
8620 get the version set on which the assembly is based.
8621 Moved the code for loading corlib into the new method
8622 mono_assembly_load_corlib(), so it can be used by the initialization
8625 * domain-internals.h: Updated data structures and added declaration
8626 for mono_assembly_load_corlib.
8628 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
8630 * reflection.c (resolve_object): Fix the creation of the signature in
8631 the SignatureHelper case.
8633 * assembly.c (mono_assembly_remap_version): Fix binary search.
8635 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
8637 * class.c: Added inheritance check when a method is overloaded (from a
8638 virtual method or when implementing an interface) and when a class is
8639 inherited. Added functions to set a failure for a class and to
8640 retreive the exception from a failure.
8641 * class-internals.h: Added fields to MonoClass to keep the exception
8642 information status for inheritance (or other exceptions) to be thrown
8643 later (i.e. not at load time).
8644 * object.c: Throw the inheritance SecurityException when a type is to
8645 be created with either class or method inheritance violations.
8646 * reflection.c|h: Fix when getting declsec from a class. Removed
8647 unrequired code for class. Improved sanity in parameter naming.
8648 * security-manager.c|h: Added functions to check for class and method
8651 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
8653 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
8654 and has_finalize in dynamic types as well.
8656 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
8658 * culture-info-table.h : fixed currency format for en-GB (and so on).
8660 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
8662 * gc.c: ensure the GC handles never have 0 as a value.
8664 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
8666 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
8667 a pointer to a struct to unmanaged code. Fixes #72625.
8669 2005-02-16 Martin Baulig <martin@ximian.com>
8671 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
8673 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
8675 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
8677 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
8679 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
8681 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
8682 UnmanagedFunctionPointerAttribute, use it for determining calling convention
8685 * reflection.c (mono_custom_attrs_get_attr): New helper function.
8687 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
8689 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
8691 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
8692 changes to make the current context a field in MonoThread.
8694 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
8696 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
8699 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
8700 extracted from mono_marshal_get_native_wrapper.
8702 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
8703 to create wrappers around native functions.
8705 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
8706 delegates for arbitrary function pointers. Fixes #71472.
8708 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
8710 * threads.c: cleaned up the code a little.
8712 2005-02-15 Martin Baulig <martin@ximian.com>
8714 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
8717 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
8718 allocate larger chunks if needed.
8720 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
8722 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
8725 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
8727 * domain.c: keep the domains in an array and ensure the domain ids
8728 are kept small, so they can be used as indexes to domain-specific data
8729 with a small memory overhead.
8731 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
8733 * icall.c: Handle byref types in Type icalls. Fixes #72544.
8735 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
8737 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
8739 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
8741 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
8743 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
8746 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
8748 2005-02-12 Ben Maurer <bmaurer@ximian.com>
8750 * domain-internals.h: add the hashtable here.
8752 * class-internals.h: Remove `info' from MonoMethod
8754 * domain.c: Add a new hashtable, jit_trampoline_hash
8756 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
8758 * object.c: don't set the value of static fields
8761 2005-02-11 Martin Baulig <martin@ximian.com>
8763 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
8764 (mono_debug_add_method): Silently ignore the method if it's too big.
8765 (mono_debug_add_type): Likewise.
8767 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
8769 * threads.c, appdomain.c: remove #ifdefs from the code.
8771 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
8773 * metadata-internals.h: Added flags to MonoAssembly to cache the most
8774 common security informations. This allows us to stay in unmanaged code
8775 when doing LinkDemand and it's special cases (except for the first
8776 time for initialization). The flags a very much used with --security.
8777 * reflection.c|h: Added code to get declarative security attributes
8778 for LinkDemand and InheritanceDemand. This required to refactor the
8779 existing code for Demand.
8780 * security-manager.c|h: Added new method fields for the special cases
8783 2005-02-10 Martin Baulig <martin@ximian.com>
8785 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
8786 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
8788 2005-02-10 Martin Baulig <martin@ximian.com>
8790 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
8791 debugging code; this is almost a complete rewrite.
8793 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
8795 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
8797 * domain.c, object.h: expose mono_string_equal () and
8798 mono_string_hash ().
8799 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
8800 it's implemented in managed code.
8802 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
8804 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
8805 lo leak objects between appdomains.
8807 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
8809 * assembly.c: old compilers compilation fix from
8810 robertj@gmx.net (Robert Jordan).
8812 2005-02-09 Ben Maurer <bmaurer@ximian.com>
8814 * class-internals.h: Little reminder for the future.
8816 * debug-helpers.c: Fix up wrapper_type_names
8818 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
8820 * image.c, metadata-internals.h: when loading an image from a file,
8821 mmap all of it and use the same codepaths as when using a
8822 in-memory image: the code is simpler and we use less memory
8823 (both writable and readonly).
8825 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
8827 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
8828 API to alloc runtime data structures that need to be tracked by the
8829 GC and contain pointers.
8830 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
8831 make the code more readable and eventually use a different GC.
8833 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
8835 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
8838 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
8840 * object.c: In release_type_locks(), don't release the cctor lock
8841 if it has already been released. This fixes a crash in the
8844 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
8846 * gc.c, marshal.c, icall.c: register a delegate for finalization
8847 only when the native function pointer has been allocated for it.
8849 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
8851 * object.c: cleaned up some code, allocate objects that are
8852 pointer free with the atomic malloc variant. Allocate memory
8853 for static data from the mempool if it's pointer-free.
8854 Allocate the bounds array at the end of the array data, when needed.
8855 * object-internals.h, object.h: move a private function in a private
8857 * class.c: handle missing case in tracking references in fields.
8859 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
8861 * class.c, class-internals.h: keep track if a type has
8862 reference fields in either the instance or static fields.
8864 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
8866 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
8867 and renamed to MonoRuntimeInfo. Added fields to store the expected
8868 framework assembly version. Changed mono_get_framework_version and
8869 mono_get_runtime_version for a single mono_get_runtime_info method.
8871 * assembly.c: Added method to remap system assembly versions to the
8872 current executing runtime version. Removed old mapping code.
8873 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
8875 * icall.c, reflection.c: Track api changes.
8877 2005-02-06 Miguel de Icaza <miguel@novell.com>
8879 * loader.c (method_from_memberref): Improve error reporting,
8880 produce the class name instead of the typeref/typedef index.
8882 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
8884 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
8886 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
8888 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
8889 stdcall and charset name mangling. Reorganize the code and add
8892 2005-02-05 Ben Maurer <bmaurer@ximian.com>
8894 * monodiet.c: More iters!
8896 * marshal.c: Iter usage.
8898 * icall.c: Iter usage.
8900 * object.c: Use iters.
8902 * debug-helpers.c: More iters
8904 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
8906 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
8909 2005-02-05 Ben Maurer <bmaurer@ximian.com>
8911 * mono-debug-debugger.c: use iters
8913 * class.c, class-internals.h: mono_class_setup_events is static
8916 * All callers: use iters
8918 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
8920 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
8921 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
8923 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
8925 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
8927 * marshal.h: Add prototypes for ldfld/stfld_remote.
8929 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
8930 this is called during startup.
8932 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
8934 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
8935 MonoThreadsSync struct private in monitor.c. Changed the way
8936 MonoThreadsSync is allocated so it's faster and there is no
8937 need to keep track of it with a finalizer and it uses less memory.
8938 This also finally allows us to allocate mono objects as ptrfree when
8939 there are no reference fields.
8941 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
8943 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
8944 disappearing link to the GC interface and use them to simplify
8947 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
8949 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
8950 stfld_remote which call mono_load/store_field_new. This allows methods
8951 calling ldfld/stfld wrappers to be AOTed.
8953 * console-io.c: Include sys/filio.h under solaris.
8955 * console-io.c: Include curses.h if needed correctly.
8957 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
8959 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
8960 method->klass as well.
8962 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
8964 * class.c (mono_class_init): Switch on lazy initialization of
8967 * class.c (mono_class_get_finalizer): Handle the case when the
8968 finalizer is inherited.
8970 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8972 * console-io.c: <curses.h> is needed by term.h on solaris.
8974 2005-02-03 Ben Maurer <bmaurer@ximian.com>
8976 * icall.c, class-internals.h, monodiet.c, class.c: Remove
8977 mono_class_setup_properties where possible. Remove this ftn from
8978 the header file, and make it static.
8980 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
8982 * loader.c: Add missing setup_... call.
8984 * class.c: Add missing setup_... calls.
8986 * class.c (mono_class_init): Switch on lazy initialization of
8989 * class.c (mono_class_init): Fix generics broken by the recent changes.
8991 * monodiet.c (handle_type): Add missing setup_... calls.
8993 * class.c: Back out garbage in previous patch.
8995 * class.c: Add missing setup_... calls.
8997 * class.c (mono_class_get_method_from_name_flags): Avoid calling
8998 mono_class_setup_methods () if possible.
9000 * class-internals.h (MonoClass): Add 'has_cctor' flag.
9002 * class-internals.h (MonoCachedClassInfo): New structure.
9004 * class.c: Initialize properties and events fields of MonoClass lazily.
9006 * class.c: Add infrastructure for lazily initializing the methods and
9007 vtable fields of MonoClass. Not yet used.
9009 * class.c (mono_class_get_finalizer): New helper function.
9011 * class.c: Add infrastructure for loading some class related data from
9014 * object.c: Add infrastructure for initializing the vtable from data
9017 * gc.c (run_finalize): Use mono_class_get_finalizer ().
9019 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
9020 appropriate initialization function before accessing parts of the
9021 MonoClass structure.
9023 * marshal.c: Fix warnings.
9025 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
9027 * mono-debug-debugger.c (get_exception_message): Use
9028 mono_class_get_method_from_name_flags ().
9030 2005-02-02 Ben Maurer <bmaurer@ximian.com>
9032 * reflection.c, appdomain.c: Replace a few manual searches that
9033 Zoltan missed. (Paolo approved this part of my initial patch).
9035 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
9037 * profiler.c: disable recording statistical events at report time.
9039 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
9041 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
9042 to byteswap arrays of enum values, too (bug #72080).
9044 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
9046 * appdomain.c (set_domain_search_path): Allow this to be called if
9047 domain->setup is not yet set.
9049 * loader.c (mono_method_get_index): New helper function.
9051 * loader.c reflection.c: Use mono_method_get_index ().
9053 * class.c (mono_class_get_method_from_name_flags): New helper method.
9055 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
9058 * class.c (mono_class_get_cctor): New helper method.
9060 * string-icalls.c object.c class.c marshal.c reflection.c: Use
9061 mono_class_get_method () to look up methods.
9063 2005-02-01 Miguel de Icaza <miguel@novell.com>
9065 * console-io.c: Fix the build, this should work on Windows.
9067 2005-01-31 Ben Maurer <bmaurer@ximian.com>
9069 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
9070 be set to null to keep things valid
9072 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9074 * icall.c: added Console 2.0 icalls.
9075 * Makefile.am: added console-io.[ch]
9076 * console-io.[ch]: internal calls for Console 2.0 API.
9078 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
9080 * class.c: make sure we consider all the interfaces
9081 when calculating max_interface_id (bug found by
9082 Jeroen Frijters running ikvm).
9084 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
9086 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
9087 valuetype fields to null.
9089 * object.c (set_value): Ditto. Fixes #71669.
9091 2005-01-31 Martin Baulig <martin@ximian.com>
9093 * metadata.c (mono_metadata_has_generic_params): New public
9094 function; checks whether something is a generic method.
9096 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
9098 * appdomain.c: fix infinite recursion when adding assemblies.
9100 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
9102 * object.c: Fix small typo to return all items for Environment.
9105 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
9107 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
9108 reflection.c: more domain and assembly-unload related fixes
9109 and memory leaks plugs.
9111 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
9113 * 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.
9115 2005-01-29 Ben Maurer <bmaurer@ximian.com>
9117 * loader.c (mono_method_signature): Make this method lazy
9118 (mono_get_method_from_token): Don't computate the signature here.
9120 Doing this saves quite a bit of memory. I got 90 kb on starting up
9121 monodoc. It should also save some disk reads on startup.
9123 * *: MonoMethod->signature might be NULL now. You *MUST* use
9124 mono_method_signature.
9126 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
9128 * object.c (mono_runtime_get_main_args): Return an array from the
9129 current domain here. Fixes #71938.
9131 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
9133 * monitor.c: formatting changes to comply with the
9134 mono coding style and remove #ifdefs from the code.
9136 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
9138 * metadata.c, private.h: remove some unneeded data
9139 and use a more compact representation for table schemas.
9141 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
9143 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
9144 to get a better distribution in hash tables.
9145 * *.c: use mono_aligned_addr_hash() where appropriate.
9146 * assembly.c: make var static.
9148 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
9150 * domain-internals.h: Put MonoJitInfo on a diet.
9152 * domain.c: Fix a warning.
9154 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
9156 * gc.c: rework the gc handles code to reuse handles
9159 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
9161 * domain.c: fixed long standing bug in mono_string_equal() which
9162 was brought to light with the ldstr changes.
9164 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
9166 * reflection.c: Remove warning by adding missing include for marshal.h
9168 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
9170 * domain.c, object.c: change the ldstr_table to hold
9171 MonoString* as keys: makes the runtime isinterned lookup
9172 faster and simplifies memory management.
9174 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
9176 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
9177 possible to add imperative security checks before calling the icall.
9178 * reflection.c: Return security attributes on the original MonoMethod
9179 (and not the wrapped one). This fix permissions on icalls.
9181 2005-01-25 Dick Porter <dick@ximian.com>
9183 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
9184 the check for mktime() support actually test the mktime() return
9185 value. "Fixes" bug 71682, though the output is still different to
9188 2005-01-25 Martin Baulig <martin@ximian.com>
9190 * class.c (mono_class_is_assignable_from): Make this work for
9193 2005-01-24 Ben Maurer <bmaurer@ximian.com>
9195 * marshal.c (mono_string_utf8_to_builder)
9196 (mono_string_builder_to_utf16): We might not have ownership of the
9197 string. In thise case, we need to create a new buffer.
9199 * object-internals.h (mono_stringbuilder_capacity): sb->str might
9200 be null, in which case, use the default capacity.
9202 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
9204 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
9205 GC events to the profiler.
9207 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
9209 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
9210 if you don't want the GC to run.
9212 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
9214 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
9215 start providing a GC API and keeping different implementations in
9217 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
9219 2005-01-22 Ben Maurer <bmaurer@ximian.com>
9221 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
9222 mmap rather than allocating a huge buffer.
9223 (mono_debug_close_mono_symbol_file): Free the buffer allocated
9226 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
9228 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
9229 and CheckExecutionRights.
9230 * reflection.c|h: Keep the index of the declarative security to be
9231 used, instead of the pointer, when AOT compiler is used. Also add
9232 class initialization when requesting demands.
9233 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
9234 CheckExecutionRights. Both properties are now FALSE by default, and
9235 unmodifiable, unless the --security option is used.
9237 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
9239 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
9240 reflection.c: properly refcount images and assemblies, many leaks fixed.
9242 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9244 * threadpool.c: increase the timeout for threads in the thread pool to
9245 10s. Fixes bug #67159.
9247 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
9249 * class-internals.h: Sun's compiler insists on explicit
9250 signed on bit fields to handle then correctly.
9252 2005-01-19 Miguel de Icaza <miguel@ximian.com>
9254 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
9255 Make the size of the array fit only the number of invalid path
9258 * class.c (_mono_class_get): Improve the error reporting when a
9259 class referenced is not found, to assist debugging.
9261 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
9263 * threads.c: fix off-by-one error.
9264 * domain.c: free data allocated in the domain.
9266 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
9268 * reflection.c (mono_method_body_get_object): Fill out exception info
9271 * object-internals.h: Add MonoReflectionExceptionHandlingClause
9274 2005-01-19 Martin Baulig <martin@ximian.com>
9276 * loader.c (mono_get_method_constrained): Make this work again.
9278 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
9280 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
9281 guint16 to match the managed side.
9283 * reflection.c (mono_reflection_body_get_object): Fill out local
9286 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
9289 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
9290 'local_var_sig_token'.
9292 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
9294 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
9297 * reflection.c (mono_method_body_get_object): Handle abstract and
9300 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
9302 * marshal.c, loader.c, class-internals.h, reflection.c:
9303 store the emthod data for a wrapper in an array instead of a list.
9305 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
9307 * marshal.c: change the code to allocate memory more
9308 conservatively for method wrappers.
9310 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
9312 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
9313 fields from MonoClass to the marshal info structure where they belong.
9315 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
9317 * class.c, object.c, class-internals.h, marshal.c: rearrange
9318 some fields and tweak some types to lower memory usage.
9320 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
9322 * threads.c (signal_thread_state_change): Handle the case when the
9323 target thread is the current thread.
9325 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
9327 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
9328 emit_ptr_to_object_conv.
9330 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
9331 marshalling. Fixes #71352.
9333 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
9335 * metadata.h, blob.h: move table enum to blob.h so it can be included
9337 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
9338 cut the size of MonoImage/MonoDynamicImage.
9340 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
9342 * profiler.c (mono_profiler_install_simple): Fix default arguments.
9344 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
9346 * reflection.c, reflection.h, icall.c: add a function to check
9347 if an attribute type is defined for a metadata object.
9349 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
9351 * object-internals.h: Added some needed fields from StringBuilder class.
9352 * marshal.c: Set the maxCapacity when creating a StringBuilder.
9354 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
9356 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
9357 threads before shutting down the runtime.
9359 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
9361 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
9363 * object-internal.h, threads.c: implement stacksize and
9364 parameterized thread start functionality (requires
9365 matching corlib). Marked broken code for later removal.
9367 2005-01-12 Martin Baulig <martin@ximian.com>
9369 * class-internals.h (MonoGenericClass): Moved the `initialized'
9370 flag to MonoDynamicGenericClass, removed `init_pending'.
9371 (MonoGenericInst): Added `is_reference' flag.
9373 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
9375 * reflection.c (mono_image_create_pefile): Only set the pe_offset
9376 inside the MSDOS header. Fixes #71201.
9378 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
9380 (mono_domain_finalize): Ditto.
9382 2005-01-12 Martin Baulig <martin@ximian.com>
9384 * class.c (mono_get_shared_generic_class): Use the cache for
9385 non-dynamic generic classes.
9387 * class-internals.h (mono_class_create_generic_2): Removed
9388 function prototype, this function is now static inside class.c.
9390 * class.c (mono_class_create_generic_2): Made this static, only
9391 call it from mono_class_init() and mono_class_setup_parent().
9392 (collect_implemented_interfaces_aux): Call mono_class_init() on
9393 the interfaces we collect.
9394 (mono_class_setup_vtable): Call mono_class_init (class->parent).
9396 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
9398 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
9399 it a real thread handle.
9401 * domain-internals.h: Move exvar_offset from MonoJitInfo to
9402 MonoJitExceptionInfo, since each catch clause needs its own variable.
9404 2005-01-11 Dick Porter <dick@ximian.com>
9406 * image.c (mono_pe_file_open): New variant on mono_image_open()
9407 that does not set up the CLI metadata; used for FileVersionInfo so
9408 it can get the data for windows binaries too.
9410 * process.c (process_read_string_block): Don't read off the end of
9411 the StringTable block.
9413 These both fix bug 70766.
9415 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
9417 * gc.c: set some fields to NULL at GC cleanup time.
9418 * threads.c: if we quit the main thread, call exit ().
9420 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
9422 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
9424 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
9426 * threads.h, threads.c, object.c: added accessor and settor for
9427 main_thread. Handle it specially when exiting from it: wait
9428 for other foreground threads to exit.
9430 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
9432 * process.c, verify.c: remove some bloat.
9434 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
9436 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
9437 the calling convention to cdecl under win32.
9439 2005-01-08 Ben Maurer <bmaurer@ximian.com>
9441 * object.c (mono_object_get_size): New function to get the size of
9444 * profiler.c (simple_allocation): Use above.
9446 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
9448 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
9449 ves_icall_System_AppDomain_getRootDomain (as it's not required to
9450 get an appdomain by it's id and we can't assume the root's id is 0).
9451 * domain-internals.h: Change the function prototype to match.
9452 * icall.c: Change the icall table for AppDomain.
9454 2005-01-08 Miguel de Icaza <miguel@ximian.com>
9456 * locales.c (string_invariant_compare_char): Only compute
9457 GUnicodeTypes in the case where we need them. Test for ordinality
9458 first and return if so.
9463 * FIXME: here we must use the information from c1type and c2type
9464 * to find out the proper collation, even on the InvariantCulture, the
9465 * sorting is not done by computing the unicode values, but their
9466 * actual sort order.
9469 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
9471 * loader.c: for P/Invoke methods, allow the "Internal" shared
9472 library name to refer to the calling process symbol namespace.
9474 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
9476 * Makefile.am: Add the security manager to the build.
9477 * security-manager.c|h: New. Initialization of the security manager.
9479 2005-01-07 Dick Porter <dick@ximian.com>
9482 * monitor.c: Update thread state during Monitor and WaitHandle
9483 waits. Fixes bug 71031.
9485 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
9487 * reflection.c (property_encode_signature): Correctly handle when the
9488 property has no methods.
9490 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
9492 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
9494 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
9495 fields from mb, not rmb. Fixes #71017.
9497 * marshal.c (emit_ptr_to_str_conv): Add support for
9498 ByValTStr -> string conversion. Fixes #71015.
9500 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
9502 * mempool.c (mono_mempool_contains_addr): New helper function.
9504 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
9506 * metadata.c (mono_metadata_compute_size): Fix size calculation of
9507 HasSematics encoded fields.
9509 * metadata.c (mono_type_to_unmanaged): Improve error message for
9510 invalid string marshalling.
9512 * metadata.c: Fix warnings.
9514 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
9516 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
9519 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
9521 * domain.c object.c domain-internals.h: Revert part of r38077 since the
9522 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
9525 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
9527 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
9528 so methods containing these can be AOTed.
9530 2005-01-03 Martin Baulig <martin@ximian.com>
9532 * loader.c (find_method): Removed the hack for generic instances.
9533 (method_from_memberref): If our parent is a generic instance, pass
9534 its generic type definition to find_method() and then inflate the
9536 (mono_get_method_constrained): Pass the generic type definition to
9537 find_method() and inflate the method later.
9539 * class-internals.h (MonoStats): Added `generic_class_count'.
9541 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
9542 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
9544 * reflection.c (mono_custom_attrs_from_params): Don't ignore
9545 generic type definitions.
9547 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
9549 * loader.c icall.c: Fix warnings.
9551 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
9553 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
9554 blittable types. Fixes #70864.
9556 2004-12-29 Martin Baulig <martin@ximian.com>
9559 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
9561 * reflection.c (mono_method_get_object): Create a
9562 "System.Reflection.MonoGenericMethod" for inflated methods; don't
9563 call mono_get_inflated_method().
9565 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
9567 2004-12-27 Martin Baulig <martin@ximian.com>
9569 * class-internals.h (MonoMethod): Added `is_inflated' flag.
9570 (MonoMethodInflated): Added `inflated' field.
9572 * class.c (mono_class_inflate_generic_method): Don't really
9573 inflate the method here; just set the `is_inflated' flag in the
9575 (mono_class_get_inflated_method): Actually inflate the method here
9576 if it's not already inflated; we use the MonoMethodInflated's new
9577 `inflated' field as a cache.
9579 2004-12-26 Martin Baulig <martin@ximian.com>
9582 (inflate_generic_class): Moved some code out of inflate_generic_type().
9583 (mono_class_inflate_generic_method): If we're already inflated,
9584 inflate the context and use the declaring method; ie. make sure
9585 the declaring method of an inflated method is always the generic
9587 (mono_class_create_from_typedef): Create
9588 `class->generic_container->context->gclass'.
9590 2004-12-24 Ben Maurer <bmaurer@ximian.com>
9592 * metadata-internals.h, marshal.c, reflection.c: More
9593 MonoGHashTable->GHashTable.
9595 * domain-internals.h, class.c: Change MonoGHashTable's into
9596 GHashTables for some cases where no gc stuff is used
9598 All users: update apis
9600 2004-12-23 Ben Maurer <bmaurer@ximian.com>
9602 * metadata.c (builtin_types): Make this `const'. Makes this get
9603 put into the shareable section.
9604 (mono_metadata_init): Casts to make gcc happy.
9606 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
9608 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
9610 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
9612 * icall.c: Added an internal call to retrieve the position and length
9613 of assembly-level declarative security attributes (RequestMinimum,
9614 RequestOptional and RequestRefuse). This is used by the Assembly class
9615 to re-create the corresponding permission sets.
9617 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
9619 * marshal.c: fix the stelemref wrapper to be type correct
9622 2004-12-20 Ben Maurer <bmaurer@ximian.com>
9624 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
9625 to do key & 0x7fffffff. Hashtable already does this. It just
9626 results in longer code.
9628 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
9630 * appdomain.c: Bump corlib version.
9631 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
9632 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
9633 * reflection.c|h: Add functions to get declarative security infos
9634 (blob position and length) for assemblies, classes and methods.
9636 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
9638 * reflection.c: sort the constant table (bug #70693).
9640 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
9642 * object-internals.h, threads.c, domain.c: add accessors for
9643 the MonoThread and MonoDomain tls keys.
9645 2004-12-18 Martin Baulig <martin@ximian.com>
9647 * class.c (inflate_generic_type): If we're inflating a generic
9648 instance, set `ngclass->context->container = context->container';
9649 ie. the container we inflated into.
9651 * metadata.c (mono_metadata_parse_generic_param): Reflect above
9652 inflate_generic_type() changes.
9654 2004-12-17 Martin Baulig <martin@ximian.com>
9657 (MonoGenericClass): Replaced `MonoType *generic_type' with
9658 `MonoClass *generic_class'. Removed `dynamic_info'; if
9659 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
9660 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
9662 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
9664 * exception.c (mono_exception_from_token): New helper function.
9666 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
9668 * assembly.c (mono_assembly_load_with_partial_name): Call
9669 mono_assembly_loaded before invoking the preload hooks. Fixes
9672 * object-internals.h (MonoThread): Change culture_info and
9673 ui_culture_info into an array.
9675 * threads.c: Cache culture info objects from more than one appdomain.
9677 * threads.c threads-types.h icall.c: Add icalls for manipulating the
9680 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
9682 * threads.h threads.c appdomain.c: Clear the culture_info field of
9683 all threads during unloading if they point to an object in the dying
9686 2004-12-13 Ben Maurer <bmaurer@ximian.com>
9688 * culture-info.h (TextInfoEntry): New struct
9689 * object-internals.h: sync with managed
9690 * locales.c: fill the `text_info_data' field
9691 * culture-info-tables.h: update
9693 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
9695 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
9698 2004-12-12 Ben Maurer <bmaurer@ximian.com>
9700 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
9701 (ves_icall_ModuleBuilder_getMethodToken): Ditto
9703 2004-12-12 Martin Baulig <martin@ximian.com>
9705 * mono-debug-debugger.c (write_type): If we're an enum and the
9706 builtin types have already been initialized, call mono_class_init().
9708 2004-12-11 Martin Baulig <martin@ximian.com>
9710 * metadata.c (mono_metadata_load_generic_params): Added
9711 `MonoGenericContainer *parent_container' argument; automatically
9712 compute `container->is_method'; pass the correct owner to
9715 * reflection.c (compare_genericparam): Sort the GenericParam table
9716 according to increasing owners.
9718 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
9720 * profiler.c: allow disabling the default profiler.
9722 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
9724 * decimal.c, icall.c: allow disabling System.Decimal support.
9726 2004-12-09 Marek Safar <marek.safar@seznam.cz>
9728 * reflection.c: Add support for null attribute arguments.
9730 2004-12-09 Martin Baulig <martin@ximian.com>
9732 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
9733 names to get rid of compiler warnings.
9735 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
9737 * marshal.c (mono_marshal_get_struct_to_ptr): Call
9738 mono_marshal_load_type_info (). Fixes #69625.
9739 (mono_marshal_get_ptr_to_struct): Likewise.
9741 2004-12-08 Martin Baulig <martin@ximian.com>
9743 * mono-debug.h: Bumped version number to 47.
9745 * mono-debug-debugger.c
9746 (mono_debugger_event_handler, mono_debugger_event): Take two
9747 guint64 arguments insteed of a gpointer and a guint32.
9749 2004-12-08 Martin Baulig <martin@ximian.com>
9751 * debug-mono-symfile.h
9752 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
9753 `address' to `native_offset'.
9755 2004-12-08 Martin Baulig <martin@ximian.com>
9757 * class.c (mono_class_create_from_typespec): Only inflate if we
9758 either have `context->gclass' or `context->gmethod'.
9760 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
9762 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
9764 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
9766 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
9768 * reflection.c (mono_assembly_get_object): Remove the workaround put
9771 * appdomain.c: Use the corlib_internal field from MonoAssembly.
9773 * appdomain.c: Bump corlib version.
9775 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
9776 be visible in other appdomains.
9778 2004-12-07 Ben Maurer <bmaurer@ximian.com>
9780 * threads.c: Interlocked inc and dec for longs were messed up,
9781 use a KISS based impl for this. Fixes 70234
9783 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
9785 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
9787 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
9789 * icall.c: fix to follow policy not to allow struct
9790 arguments in icalls.
9792 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9794 * process.c: make the patch that handles spaces in file paths work
9795 on mono/windows too.
9797 2004-12-06 Martin Baulig <martin@ximian.com>
9799 * class.c (mono_class_create_generic): Call
9800 mono_class_setup_supertypes() if we're dynamic.
9801 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
9803 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
9805 * object-internals.h: Add new fields to MonoThread.
9807 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9809 * icall.c threads-types.h threads.c: Add new icalls.
9811 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
9813 * object-internals.h (MonoReflectionAssembly): Sync object layout with
9816 * appdomain.c: Bump corlib version.
9818 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
9819 internal assemblies. Fixes #69181.
9821 2004-12-05 Martin Baulig <martin@ximian.com>
9823 * class.c (mono_class_inflate_generic_signature): Make this a
9824 no-op if `context' is NULL or we don't have any type parameters;
9825 also copy `sentinelpos'.
9827 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
9829 * image.c: Add unbox_wrapper_cache.
9831 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
9833 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
9836 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
9839 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
9841 2004-12-04 Martin Baulig <martin@ximian.com>
9843 * loader.c (mono_method_get_signature_full): New public function;
9844 like mono_method_get_signature(), but with an additional
9845 `MonoGenericContext *' argument.
9847 * class.c (mono_class_inflate_generic_signature): Formerly known
9848 as inflate_generic_signature(); make this public.
9850 2004-12-04 Martin Baulig <martin@ximian.com>
9853 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
9854 instead of a `MonoGenericContainer *'.
9855 (mono_metadata_parse_array_full): Likewise.
9856 (mono_metadata_parse_signature_full): Likewise.
9857 (mono_metadata_parse_method_signature_full): Likewise.
9858 (mono_metadata_parse_generic_inst): Likewise.
9859 (mono_metadata_parse_generic_param): Likewise.
9860 (mono_metadata_parse_mh_full): Likewise.
9861 (mono_type_create_from_typespec_full): Likewise.
9863 2004-12-03 Martin Baulig <martin@ximian.com>
9865 * class-internals.h (MonoGenericContainer): Replaced the
9866 `MonoGenericContext * pointer with a `MonoGenericContext'
9867 structure and made it the first element.
9869 2004-12-03 Martin Baulig <martin@ximian.com>
9872 (inflate_generic_type): Set the `context->container' when creating
9873 a new MonoGenericContext.
9874 (mono_class_inflate_generic_method): Likewise.
9875 (mono_class_create_from_typespec): Just use `context->container'
9876 to get the container.
9878 * loader.c (method_from_methodspec): Set `context->parent' from
9879 `context->container' - and if that's a method container, use its
9880 parent. Also set the `context->container' when creating a new
9882 (mono_get_method_from_token): Use just `context->container' to get
9885 * metadata.c (do_mono_metadata_parse_generic_class): Also set
9886 `gclass->context->container'.
9888 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
9889 the `context->container' when creating a new MonoGenericContext.
9891 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
9893 * reflection.c (compare_genericparam): Sort params with identical
9894 owner by their number. Fixes gen-111 on sparc.
9896 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
9898 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
9899 around the domain changes.
9901 * appdomain.c (mono_domain_unload): Handle the case when the thread
9902 calling Unload is itself being aborted during unloading. Fixes #70022.
9904 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
9906 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
9907 checkpoint_func as an icall so it gets a wrapper.
9908 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
9909 in the cross-appdomain wrappers too.
9911 * threads.c (mono_thread_has_appdomain_ref): Make this public.
9913 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
9915 * reflection.c: Fix some memory leaks.
9917 2004-12-02 Martin Baulig <martin@ximian.com>
9919 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
9921 * metadata.c (generic_class_cache): New static hashtable.
9922 (mono_metadata_lookup_generic_class): New public method.
9924 2004-12-02 Martin Baulig <martin@ximian.com>
9926 * class.c (mono_class_create_from_typedef): Call
9927 mono_class_setup_parent() and mono_class_create_mono_type() before
9928 parsing the interfaces.
9930 2004-12-02 Martin Baulig <martin@ximian.com>
9932 * metadata.c (generic_inst_cache): New static hashtable.
9933 (mono_metadata_lookup_generic_inst): New public function.
9934 (mono_metadata_inflate_generic_inst): New public function.
9935 (mono_metadata_parse_generic_inst): New public function.
9936 (do_mono_metadata_parse_generic_class): Use the new
9937 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
9938 since this'll also use the cache.
9940 * reflection.c (mono_reflection_bind_generic_method_parameters):
9941 Use mono_metadata_lookup_generic_inst() to use the new cache.
9943 * class.c (inflate_mono_type): Use
9944 mono_metadata_inflate_generic_inst() to inflate a generic
9945 instance; this'll also use the new cache.
9947 * loader.c (method_from_methodspec): Use
9948 mono_metadata_parse_generic_inst() and
9949 mono_metadata_inflate_generic_inst() rather than parsing it
9950 manually, so we can use the new cache.
9952 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
9954 * threads.c (wait_for_tids): Do not incorrectly free threads when
9957 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9959 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
9960 iter->args based on whether parameters are passed in registers (i.e.
9961 MONO_ARCH_REGPARMS is defined)
9963 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
9965 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
9966 the exception message. Fixes #70070.
9967 (method_from_methodspec): Fix warnings.
9969 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9971 * process.c: (complete_path) return the path quoted
9973 2004-12-01 Martin Baulig <martin@ximian.com>
9975 * class-internals.h (MonoGenericInst): New structure.
9976 (MonoGenericClass): Replaced `type_argc', `type_argv' and
9977 `is_open' with `MonoGenericInst *inst'.
9978 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
9979 `is_open' with `MonoGenericInst *inst'.
9981 2004-11-30 Martin Baulig <martin@ximian.com>
9983 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
9985 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
9986 to `generic_class_cache'.
9989 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
9990 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
9991 (mono_generic_inst_is_valuetype): Renamed to
9992 mono_generic_class_is_valuetype().
9995 (MonoGenericInst): Renamed to MonoGenericClass.
9996 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
9997 (MonoClass): Renamed `generic_inst' to `generic_class'.
9998 (MonoGenericContext): Renamed `ginst' to `gclass'.
10000 * object-internals.h
10001 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
10003 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
10004 mono_reflection_generic_class_initialize().
10006 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
10007 now known as "System.Reflection.MonoGenericClass".
10008 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
10010 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
10012 * class-internals.h: Added a flag field to MonoClass to cache the
10013 declarative security attributes actions associated with the class.
10014 * domain-internals.h: Added booleans to MonoJitInfo to cache the
10015 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
10016 applicable to the JITted method.
10017 * reflection.c|h: Added functions to extract (as flags) which security
10018 actions are available (declaratively) for a method, class or assembly.
10019 * metadata.c|h: Added functions to search the declarative security
10020 table in the metadata.
10022 2004-11-29 Ben Maurer <bmaurer@ximian.com>
10024 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
10025 EXPORTEDTYPES are already in the class name cache, so there is no
10026 need to add extra code here to look at them. Just removes a bit of
10029 (ves_icall_System_Environment_get_TickCount): No need for #if
10030 WINDOWS. We already have the code in io-layer.
10032 2004-11-28 Martin Baulig <martin@ximian.com>
10035 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
10038 2004-11-27 Miguel de Icaza <miguel@ximian.com>
10040 * assembly.c (do_mono_assembly_open): Instead of having a
10041 conditional WITH_BUNDLE, incorporate support for bundles here, by
10042 having a global `bundles' variable holding a pointer to the actual
10045 (mono_register_bundled_assemblies): New API call used by the
10048 See mkbundle.1 for details.
10050 2004-11-27 Martin Baulig <martin@ximian.com>
10052 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
10053 the vtable for generic methods.
10055 2004-11-26 Martin Baulig <martin@ximian.com>
10058 (mono_metadata_generic_method_hash): New public function.
10059 (mono_metadata_generic_method_equal): Likewise.
10061 * class-internals.h
10062 (MonoGenericContainer): Added `GHashTable *method_hash'.
10064 * reflection.c (ReflectionMethodBuilder): Added
10065 `MonoGenericContainer *generic_container'.
10066 (reflection_methodbuilder_to_mono_method): Don't create a new
10067 MonoGenericContainer each time we're called.
10068 (mono_reflection_bind_generic_method_parameters): Use
10069 `container->method_hash' to cache the results so we don't create a
10070 different method if we're called several times with the same
10073 * loader.c (method_from_methodspec): Use the new
10074 `container->method_hash' here, too.
10076 2004-11-26 Martin Baulig <martin@ximian.com>
10078 * class.c (inflate_generic_signature): Correctly compute
10079 `res->has_type_parameters'.
10080 (mono_class_vtable): Use the `has_type_parameters' flag to
10081 determine whether we're a generic method.
10083 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
10085 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
10087 * object.c (mono_runtime_run_main): Fix a small memory leak.
10089 2004-11-25 Martin Baulig <martin@ximian.com>
10091 * class.c (set_generic_param_owner): Fixed the loop.
10093 2004-11-25 Martin Baulig <martin@ximian.com>
10095 * object.c (mono_class_vtable): Don't create any JIT wrappers for
10098 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
10100 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
10101 names. Fixes #69787.
10103 2004-11-24 Martin Baulig <martin@ximian.com>
10105 * class.c (mono_class_create_generic_2): If we don't have a
10106 `ginst->parent', inflate `gklass->parent' to get our parent.
10108 2004-11-24 Martin Baulig <martin@ximian.com>
10110 * reflection.c (compare_genericparam): Correctly sort the
10111 GenericParam table; fixes #69779.
10113 2004-11-23 Ben Maurer <bmaurer@ximian.com>
10115 * reflection.c: When writing a PE file, don't create a huge
10116 buffer in memory. Just write the arrays we have to the file.
10117 This reduces memory usage.
10119 * metadata-internals.h: MonoDynamicStream pefile is no longer used
10122 2004-11-17 Martin Baulig <martin@ximian.com>
10124 * class.c (mono_class_init): Don't setup `class->parent' for
10125 dynamic instances; moved this to mono_class_generic_2().
10126 (mono_class_create_generic): Also set `klass->inited' for dynamic
10128 (mono_class_create_generic_2): Don't do anything for dynamic
10129 generic instances. Set `klass->parent' here and also call
10130 mono_class_setup_parent() here.
10132 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
10133 `MonoType *parent' argument; set `ginst->parent' before calling
10134 mono_class_create_generic_2(), so we set the correct parent.
10136 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
10138 * reflection.c: allow getting attributes from ModuleBuilder
10141 2004-11-17 Martin Baulig <martin@ximian.com>
10143 * class.c (mono_class_create_from_typedef): If a type parameter is
10144 inherited from an outer class, set its owner to that class.
10146 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
10148 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
10149 for (int*) written size. This fixes bug #69592.
10151 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
10153 * icall.c: Added IsAuthenticodePresnet internal call.
10154 * image.c|h: New function that check a MonoImage for an Authenticode
10155 signature in the certificate PE data directory.
10156 * security.c|h: New internal call to ask the runtime if an
10157 Authenticode signature seems referenced in the PE header.
10159 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
10161 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
10163 * reflection.c (mono_image_create_pefile): Free the assembly streams
10164 after writing out the assembly file.
10166 * object.c (mono_runtime_run_main): Fix small memory leak.
10168 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
10169 property access modifiers. Fixes #69389.
10171 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
10173 * domain.c, object.c, object-internals.h, domain-internals.h,
10174 object.h, marshal.c: keep dynamic code info per domain.
10176 2004-11-15 Martin Baulig <martin@ximian.com>
10178 * class.c (mono_type_get_name_recurse): Put type arguments in
10179 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
10182 2004-11-15 Martin Baulig <martin@ximian.com>
10184 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
10185 (mono_class_setup_vtable): When computing `the_cname' for a
10186 generic instance, don't include the namespace since we'd otherwise
10189 2004-11-15 Martin Baulig <martin@ximian.com>
10191 * class.c (mono_class_create_generic): Changed return type to void.
10192 (mono_class_create_generic_2): New public function; setup
10193 `class->method', `class->field' and `class->interfaces' here
10194 instead of in mono_class_init().
10196 * class.h (mono_class_create_generic): Moved to class-internals.h.
10198 2004-11-14 Ben Maurer <bmaurer@ximian.com>
10200 * reflection.c (mono_image_create_pefile): take a file HANDLE.
10201 rather than writing to memory, write to this file. Right now,
10202 we are just writting into a buffer, and copying that. However
10203 we can avoid the buffer later.
10205 (mono_dynamic_stream_reset): new function
10207 * icall.c, object-internals.h: update for the above.
10209 2004-11-13 Ben Maurer <bmaurer@ximian.com>
10211 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
10212 have been using gc'd memory. First it is slower, unlikely
10213 the comment in the source code said, secondly, it increases
10214 our footprint to do it in the gc.
10216 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
10217 the method so that it does not have to copy to managed code.
10219 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
10221 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
10223 2004-11-12 Martin Baulig <martin@localhost>
10225 * reflection.c (mono_image_create_token): Allow generic method
10226 definitions here, since they may appear in an `.override'; see
10227 gen-98/gen-99 for an example.
10229 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
10231 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
10234 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
10237 2004-11-11 Martin Baulig <martin@ximian.com>
10239 * class.c (mono_class_setup_vtable): In an explicit interface
10240 implementation, the method name now includes the arity.
10242 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
10244 * object.c (mono_array_full_copy): Fix warning.
10246 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
10248 * appdomain.c: Removed look_for_method_by_name(). Use the new method
10249 mono_class_get_method_from_name() instead.
10251 * class-internals.h: Added two new types of wrappers.
10252 Added MonoRemotingTarget enum. Added new trampoline function type, which
10253 takes an additional MonoRemotingTarget value as parameter, so it is
10254 possible to request a trampoline for a specific target.
10256 * class.c: Added new mono_class_get_method_from_name() method.
10258 * class.h: In MonoRemoteClass, we can have now to vtables, one for
10259 general remoting sinks and one specific for cross domain calls.
10261 * debug-helpers.c: Added new wrapper names.
10263 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
10266 * image.c: Porperly delete value objects form the remoting invoke hashtable.
10268 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
10269 with several other methods (mono_marshal_get_xappdomain_dispatch,
10270 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
10271 and others) can generate a fast remoting wrapper for cross domain calls.
10272 More information can be found in docs/remoting.
10273 Other changes: Removed mono_find_method_by_name, and used
10274 mono_class_get_method_from_name instead.
10275 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
10276 is stored in the remoting invoke hashtable.
10278 * marshal.h: published the new method for getting the xdomain wrapper,
10279 and also added a method for getting the adequate wrapper for a given
10282 * object-internals.h, object.c: Added a couple of methods for capying and
10284 Modified mono_install_remoting_trampoline, which takes the new remoting
10285 trampoline that has a remoting target as parameter.
10286 mono_class_proxy_vtable now also takes a remoting target as parameter, and
10287 will return the most suitable vtable for the target.
10288 Added mono_remote_class_vtable, which returns the vtable of a remote class
10289 (which can be the normal remoting vtable or the xdomain vtable).
10291 * threads.c: the xdomain invoke and dispatch wrappers must also be
10292 protected against interruptions.
10294 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10296 * icall.c: use memmove in BlockCopyInternal when the source and
10297 destination arrays are the same.
10299 2004-11-09 Martin Baulig <martin@ximian.com>
10301 * class-internals.h (MonoGenericContainer): Removed `method' and
10302 `signature', replaced them with `is_method' and `is_signature'
10303 flags. Added `context'.
10305 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
10306 instead of a `MonoGenericContainer *'.
10308 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
10309 for dynamic type parameters.
10310 (mono_metadata_load_generic_params): Setup `container->context'.
10312 * reflection.c (mono_reflection_setup_generic_class): Setup
10313 `tb->generic_container->context'.
10314 (do_mono_reflection_bind_generic_parameters): Use
10315 mono_class_inflate_generic_type() to correctly inflate types,
10316 rather than using our own hack just for MONO_TYPE_VAR.
10318 2004-11-09 Martin Baulig <martin@ximian.com>
10320 * class.c (mono_class_inflate_generic_method): Small fix; don't
10324 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
10325 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
10326 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
10327 (ves_icall_Type_BindGenericParameters): Likewise.
10328 (ves_icall_Type_get_IsGenericInstance): Likewise.
10329 (ves_icall_Type_GetGenericParameterPosition): Likewise.
10330 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
10331 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
10332 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
10334 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
10336 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
10337 assembly versions and public key tokens. Fixes #69113.
10339 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
10341 * metadata.c: fix bug introduced with the type cache changes
10344 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
10346 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
10347 the MonoClass pointer instead of the token in exception clauses.
10348 * reflection.c: updates for the above and make the code not depend
10349 on the structure of MonoExceptionClause.
10351 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
10353 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
10354 Add support for dynamic assemblies. Fixes #69114.
10356 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
10358 2004-11-07 Ben Maurer <bmaurer@ximian.com>
10360 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
10361 since most only those methods use it. the code member of
10362 MonoMethodPInvoke was dead, so that can be removed too. Also,
10363 remove inline_count (again, not used), and move slot so that it
10364 can share bits with some other flags. This saves 8 bytes in the
10365 structure and gives us about 50 kb back for mcs helloworld.cs
10367 * *.[ch]: Do naming changes for the above.
10369 * loader.c (mono_method_get_header): Lazily init the header
10371 (mono_get_method_from_token): don't init the header here
10372 (mono_free_method): the header may never be allocated
10374 Overall, this saves 150 kb of unmanaged allocations
10375 for mcs helloworld.cs. That accounts for 10% of the unmanaged
10378 * loader.c, loader.h (mono_method_get_header): new accessor.
10380 * *.[ch]: use the above method. Prepares us to lazily load
10383 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
10384 three warnings, which are actual bugs (see 69206).
10386 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
10387 unused. Saves a cool 4 bytes / method.
10389 2004-11-06 Ben Maurer <bmaurer@ximian.com>
10391 * metadata.c (builtin_types): Add types for System.Object here.
10392 (mono_metadata_parse_type_full): Cache MonoType*'s that are
10393 for a class or valuetype from klass->this_arg or klass->byval_arg.
10395 On mcs for a hello world, this gets us down from 21836 MonoType's
10398 (mono_metadata_free_type): Account for the above change.
10400 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
10402 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
10403 exception instead of asserting if name is null.
10404 (ves_icall_System_AppDomain_GetData): Ditto.
10406 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
10408 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
10411 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
10412 Return NULL when the domain does not have entry_assembly set.
10414 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
10415 Add a 'resource_modules' argument.
10416 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
10418 * reflection.c (mono_reflection_create_runtime_class): Move setting
10419 of wastypebuilder here, so mono_get_type_object () returns a MonoType
10422 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
10423 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
10424 Throw an ArgumentNullException if 'ptr' is null.
10426 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
10427 assemblies here. Fixes #69020.
10429 2004-11-05 Geoff Norton <gnorton@customerdna.com>
10431 * reflection.c (build_compressed_metadata): Fix the previous patch for
10432 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
10435 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
10437 * assembly.c (mono_assembly_names_equal): Allow a match if one of
10438 the cultures is false. Fixes #69090.
10440 * reflection.c (build_compressed_metadata): Fix invalid memory read
10441 detected by valgrind.
10443 * reflection.c (mono_reflection_get_type): Avoid triggering a
10444 TypeResolve multiple times for the same type. Fixes #65577.
10446 2004-11-04 Ben Maurer <bmaurer@ximian.com>
10448 * marshal.c: Avoid using ldftn to call managed functions. It is
10449 much slower than just a call.
10451 * reflection.c (mono_module_get_object): free the basename we
10452 allocate here from glib.
10454 * reflection.c (ensure_runtime_vtable): make sure to free
10455 overrides. Also, we were allocating an array of MonoMethod not an
10456 array of MonoMethod*.
10458 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
10460 * image.c (mono_image_close): free image->guid here.
10462 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
10464 * reflection.c: Fix some spec conformance issues with the PE file
10465 structures so mcs compiled apps run on the Net 2.0 beta.
10467 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
10469 * string-icalls.c (ves_icall_System_String_ctor_encoding):
10470 Implement this. Fixes #67264.
10472 * debug-helpers.h debug-helpers.c marshal.c: Move
10473 mono_find_method_by_name to debug-helpers.c.
10475 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
10477 * object.c (mono_release_type_locks): type_initialization_hash is
10480 * reflection.c object.c object-internals.h: Fix warnings.
10482 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
10483 without accessors. Fixes #61561.
10485 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
10486 application base from the root domain if not set. Fixes #65641.
10487 (mono_runtime_init): Fix warning.
10489 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10491 * appdomain.c: call mono_thread_pool_init.
10492 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
10493 of worker threads based on the number of CPUs and the environment
10494 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
10495 for non-windows (windows) systems.
10497 2004-10-27 Chris Toshok <toshok@ximian.com>
10499 * mono-debug-debugger.c (write_class): don't call mono_class_init
10500 here, as even with the check for (!klass->init_pending), we get
10501 into a situation where we're hitting cycles in class
10502 initialization. Fixes #68816.
10504 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
10506 * image.c: Avoid overwriting values in the loaded_images_hash when an
10507 assembly is loaded multiple times. Fixes #61152.
10509 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
10510 so multiple satellite assemblies for the same name can be loaded.
10513 * mono_domain_assembly_preload: Actually return the loaded assembly,
10516 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
10517 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
10519 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
10520 pending finalizers are not invoked after the appdomain has been
10521 unloaded. Fixes #67862.
10523 2004-10-22 Martin Baulig <martin@ximian.com>
10525 * mono-debug-debugger.c
10526 (mono_debugger_runtime_invoke): Don't box valuetypes.
10528 2004-10-22 Chris Toshok <toshok@ximian.com>
10530 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
10531 don't hide private methods.
10533 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
10535 * icall.c: Allows the runtime to "share" (when known) the public key
10536 token of an assembly. This avoid the need to recalculate the token
10537 (from the public key) in managed code.
10539 2004-10-21 Chris Toshok <toshok@ximian.com>
10541 * debug-helpers.c (append_class_name): argh, revert last patch.
10543 2004-10-21 Chris Toshok <toshok@ximian.com>
10545 * debug-helpers.c (append_class_name): use '+' as the delimiter,
10546 not '/', so that it matches what the debugger uses to look up
10549 2004-10-21 Martin Baulig <martin@ximian.com>
10551 * mono-debug-debugger.c (mono_debugger_throw_exception): New
10552 public method; this is called each time an exception is thrown and
10553 allows the debugger to use exception catch points.
10555 2004-10-21 Martin Baulig <martin@ximian.com>
10557 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
10558 the stack pointer and the exception object in some struct and pass
10559 that to the debugger.
10561 2004-10-21 Chris Toshok <toshok@ximian.com>
10563 * mono-debug-debugger.c (do_write_class): add instance/static
10564 event support. We don't expose "raise" or "other" yet.
10565 (event_is_static): new method.
10567 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
10569 * mono-debug-debugger.c
10570 (mono_debugger_handle_exception): Remove
10571 bogus return value for fussy compilers.
10573 2004-10-20 Martin Baulig <martin@ximian.com>
10575 * mono-debug-debugger.c
10576 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
10577 (mono_debugger_handled_exception): Likewise.
10579 2004-10-20 Martin Baulig <martin@ximian.com>
10581 * mono-debug-debugger.h (MonoDebuggerEvent): Added
10582 MONO_DEBUGGER_EVENT_EXCEPTION.
10584 * mono-debug-debugger.c (mono_debugger_handle_exception): New
10585 public function to send the debugger a notification for an
10586 exception and inform it about a catch/finally clause.
10588 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
10590 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
10591 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
10594 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
10596 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
10598 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
10599 marshalled as [In,Out]. Fixes #58325.
10601 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
10603 * reflection.c (mono_method_body_get_object): Implement some fields.
10605 2004-10-12 Martin Baulig <martin@ximian.com>
10607 * reflection.c (mono_reflection_bind_generic_parameters): Small
10608 fix, correctly retrieve our parent from a generic instance.
10610 2004-10-12 Martin Baulig <martin@ximian.com>
10612 * metadata.c (mono_metadata_generic_param_equal): We always have
10616 (mono_class_from_generic_parameter): We need to have an owner.
10617 (my_mono_class_from_generic_parameter): Likewise.
10619 * reflection.c (mono_reflection_setup_generic_class): Renamed to
10620 mono_reflection_create_generic_class() and added a new
10621 mono_reflection_setup_generic_class().
10622 (mono_reflection_initialize_generic_param): If we're a nested
10623 generic type and inherited from the containing class, set our
10624 owner to the outer class.
10626 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
10628 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
10630 * reflection.c (mono_method_body_get_object): New function to create
10631 a MethodBody object.
10633 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
10635 2004-10-11 Martin Baulig <martin@ximian.com>
10637 * metadata.c (_mono_metadata_type_equal): Renamed to
10638 do_mono_metadata_type_equal() and made static.
10640 2004-10-11 Martin Baulig <martin@ximian.com>
10642 * appdomain.c: Bump corlib version number to 28.
10644 2004-10-10 Martin Baulig <martin@ximian.com>
10646 * class-internals.h
10647 (MonoGenericInst): Added `MonoGenericContainer *container'.
10648 (MonoGenericMethod): Likewise.
10649 (MonoGenericContext): Likewise.
10650 (MonoGenericParam): Added `MonoGenericContainer *owner'.
10653 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
10654 (do_mono_metadata_parse_generic_inst): Likewise.
10655 (mono_metadata_parse_type_full): New public method. This is the actual
10656 mono_metadata_parse_type() implementation - with an additional
10657 `MonoGenericContainer *' argument.
10658 (mono_metadata_parse_array_full): Likewise.
10659 (mono_metadata_parse_signature_full): Likewise.
10660 (mono_metadata_parse_method_signature_full): Likewise.
10661 (mono_metadata_parse_mh_full): Likewise.
10662 (mono_type_create_from_typespec): Likewise.
10663 (mono_metadata_interfaces_from_typedef_full): New public method;
10664 this is similar to the other _full() methods, but we take a
10665 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
10666 (mono_metadata_parse_generic_param): Take an additional
10667 `MonoGenericContainer *' argument and lookup the MonoGenericParam
10668 from that container.
10669 (mono_metadata_generic_param_equal): New static method to compare
10670 two type parameters.
10671 (_mono_metadata_type_equal): New static method; takes an
10672 additional `gboolean signature_only' argument - if true, we don't
10673 compare the owners of generic parameters.
10674 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
10675 with a TRUE argument - do a signature-only comparision.
10677 * loader.c: Use the new _full() methods and pass the
10678 MonoGenericContainer to them.
10680 * object-internals.h (MonoReflectionTypeBuilder): Added
10681 `MonoGenericContainer *generic_container' field.
10682 (MonoReflectionMethodBuilder): Likewise.
10684 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
10686 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
10687 case initial images of dynamic assemblies.
10689 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
10691 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
10693 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
10694 length of event->other array.
10695 (typebuilder_setup_events): Ditto.
10697 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
10698 'assembly_by_name' and add an 'assemblies' list.
10700 * assembly.h assembly.c: Add a new search hook for determining whenever
10701 an assembly is already loaded. Use this instead of searching in the
10702 loaded_assemblies list.
10704 * domain.c appdomain.c: Implement the new search hook so loaded
10705 assemblies are now scoped by appdomain. Fixes #67727.
10707 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
10709 * threads.c (mono_thread_attach): Initialize synch_lock field so
10710 mono_thread_detach works again.
10712 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
10713 'lib' too. Fixes #63130.
10715 2004-10-06 Jackson Harper <jackson@ximian.com>
10717 * culture-info-tables.h: regenerated.
10719 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
10721 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
10722 implemented by other interfaces in the result. Fixes #65764.
10724 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
10725 Handle unloadable modules without crashing.
10727 * image.c (load_modules): Revert the previous patch since modules must
10728 have a fixed index inside the array.
10730 * image.c (load_modules): Don't include native modules in the modules
10733 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
10735 * reflection.h: Add param_defaults field.
10737 * reflection.c: Add support for parameter defaults in dynamic methods.
10740 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
10741 an empty string when a type has no namespace. Fixes #64230.
10743 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
10745 * tabledefs.h: Added "internal" security actions to support non-CAS
10746 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
10747 Note: they do not seems to be used anymore in 2.0 (new metadata format)
10749 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
10751 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
10752 constructor of abstract class. Fixes #61689.
10754 2004-10-04 Martin Baulig <martin@ximian.com>
10756 * class-internals.h (MonoGenericContainer): New type.
10757 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
10758 `MonoGenericContainer *generic_container'.
10759 (MonoClass): Replaced `gen_params' and `num_gen_params' with
10760 `MonoGenericContainer *generic_container'.
10762 * metadata.c (mono_metadata_load_generic_params): Return a
10763 `MonoGenericContainer *' instead of a `MonoGenericParam *';
10764 removed the `num' argument.
10766 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
10768 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
10769 for dynamic images.
10771 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
10774 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
10776 * reflection.c: Save pe_kind and machine values into the generated
10779 * appdomain.c: Bump corlib version number.
10781 * object-internals.h: Reorganize layout of LocalBuilder.
10783 * class-internals.h class.c (mono_class_get_implemented_interfaces):
10784 New helper function.
10786 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
10787 created MonoType for dynamic types. Fixes #66180.
10789 2004-10-02 Ben Maurer <bmaurer@ximian.com>
10791 * threadpool.c: the ares hashtable needs a critical section around it.
10792 this prevents some nasty segfaults
10794 2004-10-02 Massimiliano Mantione <massi@ximian.com>
10796 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
10797 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
10800 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
10802 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
10804 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
10806 * image.c: Always canonicalize image file names, to avoid loading
10807 the same assembly twice when referenced using a relative path.
10809 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
10811 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
10813 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
10815 * marshal.c: Fix warnings.
10817 2004-09-29 Geoff Norton <gnorton@customerdna.com>
10819 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
10820 attempting to marshal the delegate_trampoline as the method_addr.
10821 This patch has a static hashtable of marshalled delegates so that
10822 we can map delegate_trampoline addresses back to delegates. This
10823 allows a delegate passed to managed code to be passed back into native
10826 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
10828 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
10830 * reflection.c (method_encode_code): Align method headers properly.
10833 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
10835 * marshal.c: In the runtime invoke wrapper, reset the abort
10836 exception if it is cached. This avoids the automatic rethrowal of
10837 the exception after the catch of the wrapper. Also check for pending
10838 interruptions before calling the managed method. This is done using
10839 the new method emit_thread_force_interrupt_checkpoint, since the
10840 normal checkpoint method is ignored when running the invoke wrapper.
10841 * object.c: If the abort exception is rethrown, set the abort_exc
10842 field of the thread, so it will be rethrown aftere every catch.
10843 * threadpool.c: Only run an interruption checkpoint if what has been
10844 requested is a stop of the thread (aborts will be ignored).
10845 * threads.c: By default, a thread will now never be interrumped while
10846 running the runtime invoke wrapper (this ensures that runtime_invoke
10847 will always return to the caller if an exception pointer is provided).
10848 There is a new special method mono_thread_force_interruption_checkpoint()
10849 to force an interruption checkpoint even if running a protected
10850 wrapper, which is used by the same runtime invoke wrapper to do a check
10853 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
10855 * object.c, object-internals.h: Implemented mono_release_type_locks,
10856 which releases the cctor locks held by a thread.
10857 * threads.c, threads.h: In thread_cleanup, release cctor locks held
10858 by a thread. Added mono_thread_exit() method to be used to safely stop
10861 2004-09-28 Raja R Harinath <rharinath@novell.com>
10863 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
10864 Move null check before dereference. Avoid indexing beyond the end
10865 of the 'modules' array.
10867 2004-09-28 Raja R Harinath <rharinath@novell.com>
10869 * metadata-internals.h (MonoImage): Add module_count field.
10870 * image.c (load_modules): Set image->module_count.
10871 (mono_image_load_file_for_image): Use image->module_count.
10872 * reflection.c (mono_image_load_module): Append to image->modules array
10873 of dynamic assembly.
10874 (mono_module_get_object): Fix loop to actually increment index.
10875 Use image->module_count.
10876 * assembly.c (mono_assembly_load_references): Use image->module_count.
10877 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
10880 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
10882 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
10883 Avoid assert on generic types.
10885 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
10887 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
10889 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
10891 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
10892 function to convert a MarshalSpec structure to its managed counterpart.
10894 * reflection.c: Fix warnings.
10896 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
10899 * icall.c (mono_create_icall_signature): Fix build.
10901 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
10903 * icall.c: Add MakePointType icall.
10905 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
10908 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10910 * threadpool.c: reuse allocated slots in the queue.
10912 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
10914 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
10916 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
10918 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
10921 * tabledefs.h: Add constants for pinvoke attributes BestFit and
10922 ThrowOnUnmappableChar.
10924 * icall.c (ves_icall_Type_GetPacking): New icall.
10926 2004-09-24 Martin Baulig <martin@ximian.com>
10928 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
10930 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10933 (mono_domain_set): allow setting a domain that is being unloaded.
10934 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
10937 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
10939 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
10940 the GetCustomAttributes icall.
10942 2004-09-23 Martin Baulig <martin@ximian.com>
10944 * object-internals.h (MonoReflectionGenericParam): Replaced
10945 'has_ctor_constraint', `has_reference_type' and `has_value_type'
10946 with `guint32 attrs'.
10948 2004-09-23 Martin Baulig <martin@ximian.com>
10950 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
10952 2004-09-23 Martin Baulig <martin@ximian.com>
10954 * object-internals.h (GenericParameterAttributes): New enum.
10956 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
10958 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
10960 * class.c (init_events): Fill out event->other field.
10962 * class.c: Fix warnings.
10964 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
10966 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
10968 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
10969 walk which doesn't supply the IL offset.
10971 2004-09-22 Martin Baulig <martin@ximian.com>
10973 * reflection.c (mono_reflection_setup_internal_class): If we're
10974 System.ValueType, System.Object or System.Enum, set
10975 `klass->instance_size' and create the vtable.
10976 (mono_reflection_create_internal_class): If we're an enum type,
10977 get the base class from our current corlib.
10979 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
10981 * reflection.h (MonoResolveTokenError): New type.
10983 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
10986 * icall.c: Add an 'error' argument to the ResolveToken icalls.
10988 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
10990 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
10991 Support also calling constructors, but only for already allocated objects.
10993 2004-09-17 Geoff Norton <gnorton@customerdna.com>
10995 * reflection.c (type_get_qualified_name): If the klass is null
10996 return the typename to avoid a NullRefEx.
10997 (encode_cattr_value): Get the qualified name of the boxed type,
10998 not the underlying enumtype. Fixes #62984.
11000 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
11002 * marshal.c: Fix problems with previous checkin.
11004 2004-09-21 <vargaz@freemail.hu>
11006 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
11007 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
11009 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
11011 2004-09-21 Geoff Norton <gnorton@customerdna.com>
11013 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
11014 should only return a type for pointers, arrays, and passbyref types.
11017 2004-09-21 Martin Baulig <martin@ximian.com>
11019 * domain.c (mono_debugger_check_runtime_version): New public
11022 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
11024 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
11026 * reflection.c: Added missing sort to the declarative security
11027 attributes table. MS implementation stops seeing the attributes if the
11028 token number regress in the table (as shown by ildasm and permview).
11030 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
11032 * object-internals.h (MonoReflectionModule): Add 'token' field.
11034 * reflection.c (mono_reflection_get_token): Add support for Module
11036 (mono_module_get_object): Set 'token' field.
11037 (mono_module_file_get_object): Set 'token' field.
11039 * icall.c: Add new Assembly and Module icalls.
11041 * appdomain.c: Bump corlib version.
11043 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
11045 * loader.h loader.c class.h class.c: Add helper functions for obtaining
11046 tokens of metadata objects.
11048 * reflection.h reflection.c (mono_reflection_get_token): New function
11049 to obtain the token of a metadata object.
11051 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
11053 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
11055 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
11057 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
11059 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
11061 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
11062 * object-internals.h: Added 3 MonoArray* members to MonoReflection
11063 AssemblyBuilder to access the permissions set in the class lib.
11064 * reflection.c: Added security attributes encoding step in
11065 mono_image_build_metadata.
11066 * tabledefs.h: Added new security actions defined in 2.0:
11067 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
11069 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
11071 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
11074 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
11076 * locales.c: nullify the ICU_collator member of CompareInfo when it is
11077 finalized. There where random SIGSEVs at program termination, when
11078 an object being finalized was trying to do a string comparison and
11079 the current culture was already finalized.
11081 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11083 * threads.c: call thread_cleanup before finishing the thread if we get
11086 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
11088 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
11089 assemblies from the parent. Fixes #65665.
11091 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
11093 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
11096 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
11098 * reflection.h: add prototype for mono_get_dbnull_object
11099 * reflection.c: add prototypes for get_default_param_value_blobs
11100 and mono_get_object_from_blob for fussier compilers
11102 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
11104 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
11105 false deadlock checks in class initialization.
11107 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
11109 * image.c (mono_image_addref): Fix comment.
11111 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
11114 2004-09-12 Jambunathan K <kjambunathan@novell.com>
11116 * reflection.c (mono_param_get_objects): Modified to return
11117 ParameterInfo.DefaultValue object.
11119 (get_default_param_value_blobs):
11120 (mono_get_object_from_blob):
11121 (mono_get_dbnull_object): New helper routines.
11123 * object.c (mono_get_constant_value_from_blob): New helper routine
11124 carved out from get_default_field_value ()
11126 * object-internals.h (mono_get_constant_value_from_blob): Added
11127 function declaration.
11129 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
11131 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
11132 referenced assemblies. Fixes #62135.
11134 * exception.h exception.c (mono_get_exception_file_not_found2): New
11137 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
11139 * class.h class.c: Add mono_type_get_underlying_type ().
11141 2004-09-09 Geoff Norton <gnorton@customerndna.com>
11143 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
11144 Fix GetTypes() to support dynamically created assemblies.
11146 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
11148 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
11150 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
11153 * reflection.h reflection.c loader.c: Allow dynamic construction of
11154 pinvoke methods. Fixes #65571.
11156 * reflection.c (mono_reflection_get_type): Revert previous change since
11157 it causes regressions.
11159 2004-09-08 Martin Baulig <martin@ximian.com>
11161 * class.c (class_compute_field_layout): Don't call
11162 mono_class_layout_fields() for open generic instances.
11164 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
11165 * threads.c appdomain.c: fix typo in GC macro
11167 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11169 * threads.c: don't call mono_thread_detach() in start_wrapper(),
11170 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
11172 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
11174 * image.c (mono_image_close): Applied patch from
11175 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
11176 assembly is loaded multiple times from data.
11178 * image.c (mono_image_open): Fix warning.
11180 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
11182 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
11183 once. Fixes #58334.
11185 * reflection.c (mono_reflection_create_runtime_class): Initialize
11186 klass->nested_classes. Fixes #61224.
11188 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
11190 * threads.c: sched_yield() on exit, to allow threads to quit.
11192 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
11194 * object.c (mono_unhandled_exception): Remove leftover debug code.
11196 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
11198 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
11200 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
11202 * marshal.c (emit_marshal_array): Really null terminate string arrays.
11204 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
11206 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
11208 * marshal.c (emit_marshal_array): Null terminate string arrays.
11210 * marshal.c (raise_auto_layout_exception): Fix warning.
11212 * reflection.c (mono_param_get_objects): Initialize the default value
11213 with DBNull.Value, not null. Fixes #62123.
11215 2004-09-01 Miguel de Icaza <miguel@ximian.com>
11217 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
11218 throw an exception with a cute explanation.
11220 2004-09-06 Dick Porter <dick@ximian.com>
11222 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
11223 Close the new process's thread handle, as we don't use it. The
11224 handle stays around forever otherwise.
11226 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
11228 * object.c (arith_overflow): Fix warning.
11230 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
11231 calling conventions in method refs. Fixes #65352.
11233 * reflection.c: Fix warnings.
11235 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
11237 * icall.c: Add a new icall for Array.Clear
11239 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
11241 * object.c: When allocating an array, we have to throw
11242 an overflow exception if any of the lengths are < 0.
11244 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
11246 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
11247 properly. Also move implementation of string array marshalling to
11248 managed code. Fixes #42316.
11250 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11252 * assembly.c: provide more information when loading an assembly fails.
11254 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11256 * filewatcher.c: don't expect the development fam package to be
11259 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
11261 * marshal.c: Make a copy of the signature cookie since it will be
11262 freed by the caller.
11264 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
11266 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
11268 * metadata.c (mono_metadata_free_marshal_spec): New function to free
11271 * marshal.c: More refactoring.
11273 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
11276 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
11278 * object.c: In mono_message_invoke, fill the output parameter array after
11279 calling the managed method (it was done before the call). This fixes
11282 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
11284 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
11287 2004-09-02 Martin Baulig <martin@ximian.com>
11289 * class.c (mono_class_instance_size): Don't allow generic type
11290 definitions or open generic instances.
11291 (mono_class_array_element_size): If we're a value type, call
11292 mono_class_instance_size() on the original class.
11294 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
11295 handle generic instances.
11297 * mono-debug-debugger.c (write_type): Handle generic instances
11300 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
11302 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
11303 the allocation request fails. Fixes #65089.
11305 * object.c (mono_runtime_free_method): Do not call mono_free_method.
11307 * object.c (mono_runtime_free_method): New function to free a dynamic
11310 * marshal.c (mono_delegate_free_ftnptr): New function to free the
11311 delegate trampoline.
11313 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
11314 with hasthis as dynamic,
11316 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
11318 * domain.c (mono_jit_info_table_remove): New function to remove an
11319 entry from the jit info table.
11321 * class-internals.h (MonoMethod): Add 'dynamic' field.
11323 * loader.c: Fix warnings.
11325 2004-09-01 Martin Baulig <martin@ximian.com>
11327 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
11328 instead of mono_debugger_lock() because the latter one is a no-op
11329 unless running in the debugger.
11331 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
11333 * class.c (class_compute_field_layout): Classes with auto-layout or
11334 reference fields are not blittable.
11336 2004-09-01 Dick Porter <dick@ximian.com>
11338 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
11339 mono_image_get_filename() to get the assembly location.
11342 * metadata.h: Fix compile warnings
11344 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
11346 * class.c (class_compute_field_layout): System.Object is blittable.
11348 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
11349 as in/out. Fixes #59909.
11351 2004-09-01 Martin Baulig <martin@ximian.com>
11353 * metadata.h (MONO_TYPE_ISREFERENCE): Call
11354 mono_metadata_generic_inst_is_valuetype() if we're a generic
11355 instance to check whether our underlying type is a reference type.
11357 2004-09-01 Martin Baulig <martin@ximian.com>
11359 * metadata.c (mono_type_size): If we're a generic instance, call
11360 mono_class_value_size() for value types.
11362 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
11364 * marshal.c: Implement more custom marshalling functionality. Fixes
11367 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
11369 * mono-debug.c, debug-mono-symfile.c: add some locking love.
11371 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
11373 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
11375 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
11377 * icall.c: Fix some warnings.
11379 * threads.c (abort_appdomain_thread): Fix unref errors.
11380 (mono_thread_current): Fix THREAD_DEBUG define.
11382 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
11384 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
11386 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
11388 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
11390 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
11393 2004-08-28 Martin Baulig <martin@ximian.com>
11396 (mono_metadata_generic_inst_is_valuetype): New public function.
11398 * metadata.h (MONO_TYPE_ISSTRUCT): Call
11399 mono_metadata_generic_inst_is_valuetype() if we're a generic
11400 instance to check whether our underlying type is a valuetype.
11402 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
11404 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
11407 2004-08-25 Martin Baulig <martin@ximian.com>
11409 * loader.c (mono_get_method_from_token): Abstract methods can also
11410 be generic and thus have type parameters.
11412 * metadata-internals.h
11413 (MonoDynamicImage): Added `GPtrArray *gen_params'.
11415 * reflection.c (mono_image_get_generic_param_info): Don't create a
11416 metadata row, just add an entry to the `gen_params' array.
11417 (build_compressed_metadata): Sort the `gen_params' array and then
11418 actually create the metadata.
11420 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11422 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
11424 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
11426 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
11428 2004-08-24 Martin Baulig <martin@ximian.com>
11430 * class.cs (mono_class_is_subclass_of): Like an interface, a
11431 generic instance also derives from System.Object.
11433 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
11435 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
11436 custom modifiers to be in any order. Fixes #61990.
11438 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
11440 * object.c: Register mono_object_new_fast icall.
11442 * object.c (mono_class_get_allocation_ftn): Return to calling
11443 mono_object_new_fast, since it seems faster to compute the object
11444 size in unmanaged code than passing it as a parameter.
11446 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
11448 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
11449 this function with Boehm as the oom handler, so we don't have to check
11450 the result of GC_malloc.
11452 * object.c: Remove checks for oom.
11454 * object.h object.c (mono_class_get_allocation_ftn): New function to
11455 return the icall which can be used to allocate an instance of a given
11458 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
11460 * class-internals.h: Add 'enabled' field.
11462 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
11464 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
11466 2004-08-18 Jambunathan K <kjambunathan@novell.com>
11467 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
11470 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
11472 * appdomain.c: use the Tls function for appdomain too,
11473 at Zoltan's request. Actually return in mono_context_get
11475 * appdomain.c, profiler.c, threads.c: use __thread
11477 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
11479 * appdomain.c threads.c: Call GC_CreateThread on windows.
11481 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
11482 multiple libraries since this don't work on windows.
11484 2004-08-18 Martin Baulig <martin@ximian.com>
11486 * class-internals.h
11487 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
11490 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
11491 MonoMethodNormal since we also need it for abstract and interface
11495 (build_compressed_metadata): Sort the GenericParam table.
11496 (mono_image_create_token): Added `gboolean create_methodspec'
11497 argument; this is false when generating a MethodImpl token.
11498 (reflection_methodbuilder_to_mono_method): Abstract and interface
11499 methods may also have generic parameters.
11501 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
11503 * appdomain.c: thread local alloc
11505 2004-08-17 Martin Baulig <martin@ximian.com>
11507 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
11510 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
11513 * class.c (mono_type_get_full_name): New public function.
11514 (mono_type_get_name): Don't include the type arguments.
11516 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
11518 * Makefile.am: Build static versions of libmetadata and libmonoruntime
11519 for inclusion into the mono executable.
11521 2004-08-16 Martin Baulig <martin@ximian.com>
11523 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
11524 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
11526 2004-08-14 Martin Baulig <martin@ximian.com>
11528 * class.c (dup_type): Also copy the `byref' field.
11530 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
11532 * reflection.c (create_dynamic_mono_image): Revert the last change
11533 since it breaks bootstrap.
11535 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
11537 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
11539 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
11540 not free them with g_free.
11542 2004-08-11 Martin Baulig <martin@ximian.com>
11544 * reflection.c (mono_reflection_setup_internal_class): Also call
11545 mono_class_setup_mono_type() if we already have a `tb->type.type'.
11547 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
11549 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
11550 called during default (first) AppDomain creation. Keep track of
11551 Evidence when loading assemblies.
11553 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
11555 * opcodes.c, opcodes.h: reduce runtime relocations.
11557 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
11559 * culture-info.h, locales.c: fixes and chages to sue the new
11560 optimized format of the locale data.
11561 * culture-info-tables.h: regenerated.
11563 2004-08-06 Geoff Norton <gnorton@customerdna.com>
11565 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
11567 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
11569 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
11570 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
11571 * domain-internals.h: icall declaration.
11572 * icall.c: icall registration.
11573 * object-internals.h: New fields in MonoAssembly for CAS.
11575 2004-08-05 Duncan Mak <duncan@ximian.com>
11577 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
11580 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
11582 * reflection.c: fix to deal with object[] arrays in custom ctors
11585 2004-08-05 Martin Baulig <martin@ximian.com>
11587 * class.c (mono_class_array_element_size): Added support for
11588 generic instances and correctly handle "recursive" types.
11590 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
11592 * assembly.c: Fix warnings.
11594 2004-08-04 Martin Baulig <martin@ximian.com>
11597 (mono_type_get_name_recurse): Added `gboolean include_arity'
11598 argument specifying whether or not we should include the generic
11599 arity in the type name.
11600 (_mono_type_get_name): New static function.
11601 (mono_class_setup_vtable): If we're a generic instance, don't
11602 include the generic arity in the names of explicit method
11605 2004-08-03 Martin Baulig <martin@ximian.com>
11607 * class.c (mono_type_get_name_recurse): Enclose the generic type
11608 arguments in `<', '>'.
11610 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
11612 * gc.c: make GC warning messages use the trace API, they are just
11613 noise to most of the users.
11615 2004-08-03 Martin Baulig <martin@ximian.com>
11617 * debug-mono-symfile.c (read_string): Correctly read the string.
11619 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
11621 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
11623 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
11625 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
11627 2004-07-30 Martin Baulig <martin@ximian.com>
11629 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
11630 Reflect latest symbol writer changes.
11632 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
11634 * object.c: always create an object if null is passed
11635 to Invoke() where a valuetype is expected.
11637 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
11639 * marshal.c (mono_marshal_init): make managed
11640 signatures match native ones better for 64bits.
11642 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11644 * appdomain.c: hack to build correctly the private bin path on windows.
11647 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
11649 * assembly.c: Load mscorlib from the correct framework directory
11650 (mono/<version>/mscorlib.dll).
11651 * appdomain.h: Added prototypes for new functions.
11652 * internals.h: Added some prototypes.
11653 * domain.c: When initializing the runtime, get from the executable and
11654 the configuration files the runtime version that the app supports.
11655 Added support methods for reading app.exe.config. Added list of versions
11656 supported by the JIT. Added two new methods: mono_init_from_assembly,
11657 which initializes the runtime and determines the required version from
11658 the provided exe file, and mono_init_version, which initializes
11659 the runtime using the provided version.
11660 * icall.c: Get machine.config from version-specific directory.
11661 * reflection.c: When generating an image, embed the version number
11662 of the current runtime.
11664 2004-07-28 Dick Porter <dick@ximian.com>
11667 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
11668 returned sockaddr size before creating the remote address object.
11669 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
11672 2004-07-28 Dick Porter <dick@ximian.com>
11674 * locales.c (string_invariant_compare_char): Fix invariant char
11675 compares between upper and lower cases. Fixes bug 61458.
11677 2004-07-27 Ben Maurer <bmaurer@ximain.com>
11679 * marshal.c: actually cache stelem.ref wrappers.
11681 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11683 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
11684 sections and remove the mono_cli_rva_map () function.
11686 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
11688 * debug-mono-symfile.c: fix one more endianess issue, from a patch
11689 by Geoff Norton (<gnorton@customerdna.com>).
11691 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
11693 * class.c: fix class loads for pointer types (typeof(int) !=
11696 2004-07-27 Martin Baulig <martin@ximian.com>
11698 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
11699 reading the debugging information from an external ".mdb" file.
11701 2004-07-24 Martin Baulig <martin@ximian.com>
11703 * reflection.c (mono_image_get_type_info): Only write a class
11704 layout entry if we actually have a size or a packing size.
11706 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
11708 * reflection.c (type_get_fully_qualified_name):
11709 insert cast to get type checking of ?: with non-gcc compilers
11711 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
11713 * rand.c: use g_getenv for both lookups of
11716 2004-07-17 Martin Baulig <martin@ximian.com>
11718 * reflection.c (mono_reflection_bind_generic_method_parameters):
11719 Set `gmethod->reflection_info'.
11721 2004-07-17 Martin Baulig <martin@ximian.com>
11723 * class.c (mono_class_create_from_typedef): Insert the newly
11724 created class into the hash table before computing the interfaces
11725 since we could be called recursively.
11727 2004-07-16 Ben Maurer <bmaurer@ximain.com>
11729 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
11730 function to implement stelem.ref in managed code
11731 * class-internals.h, debug-helpers.c: a new wrapper type
11734 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
11736 * gc.c: allow GC handles to work even when no GC is compiled in.
11737 Fix part of bug #61134 (GetAddrOfPinnedObject).
11739 2004-07-13 Peter Williams <peter@newton.cx>
11741 * process.c (complete_path): Make sure we don't attempt to execute
11744 2004-07-12 Geoff Norton <gnorton@customerdna.com>
11746 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
11747 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
11748 and will add/subtract the hour if needed
11750 2004-07-12 Martin Baulig <martin@ximian.com>
11752 * reflection.c (mono_field_get_object): If we have
11753 `field->generic_info', take the attributes from
11754 `field->generic_info->generic_type'.
11756 2004-07-12 Martin Baulig <martin@ximian.com>
11758 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
11759 This function must be called before initializing the runtime.
11760 (mono_debug_init_1): New function; call this after initializing
11761 the runtime, but before loading the assembly. It tells the
11762 debugger to load corlib and the builtin types.
11764 * mono-debug-debugger.c: Did some larger changes in the debugging
11765 code; support recursive class declarations, make sure we actually
11768 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11770 * debug-helpers.c: undo my previous patch and fixed the real issue in
11771 ../mini/exceptions-x86.c
11773 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11775 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
11776 when no HOME env. variable was set and a NullRef was thrown in a .cctor
11777 called from other .cctors.
11779 2004-07-09 Miguel de Icaza <miguel@ximian.com>
11781 * loader.c: Removed the mono_loader_wine_init hack now that we are
11782 doing a managed version of Windows.Forms.
11784 2004-07-09 Ben Maurer <bmaurer@ximian.com>
11786 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
11787 threadpool.c, threads.c: remove static data from rootset.
11789 2004-07-09 Dick Porter <dick@ximian.com>
11791 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
11792 Don't do any more processing if the matched length was 0. It was
11793 increasing the size of the string before. Fixes bug 61167.
11795 2004-07-09 Dick Porter <dick@ximian.com>
11799 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
11800 Add support for SO_PEERCRED if its available.
11802 2004-07-09 Peter Bartok <pbartok@novell.com>
11803 * loader.c: winelib.exe.so error message is now only displayed if
11804 MONO_DEBUG is set. To help us avoid questions when people are trying
11805 out the new Managed.Windows.Forms.
11807 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
11809 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
11810 for isinst and castclass wrappers.
11812 * class-internals.h icall.c: Move registration and lookup of JIT icalls
11813 to libmetadata from the JIT, so they could be used by the marshalling
11814 code and the interpreter.
11816 * marshal.c: Register marshalling related JIT icalls here instead of
11817 in mini.c. Use CEE_MONO_ICALL instead of the family of
11818 CEE_MONO_PROC<x> opcodes to call marshalling functions.
11820 * metadata.h: Remove unneeded marshalling conversions.
11822 * opcodes.c: Update for new opcodes.
11824 2004-07-08 Martin Baulig <martin@ximian.com>
11826 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
11827 (mono_debug_get_domain_data): Make this function static.
11829 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
11831 * gc.c, object.h: add nice GC handle API for embedders.
11833 2004-07-06 Ben Maurer <bmaurer@ximian.com>
11835 * reflection.c: more changes for the new api
11837 * object.c: When we reflect on a field w/ a constant value, it
11838 will not have a memory location, so we must access metadata. Also,
11839 allow easier reading of strings so that we can read them from
11842 * class.c (mono_class_layout_fields): no need for literal fields here.
11844 * class-internals.h: api changes for const fields
11846 * icall.c (ves_icall_get_enum_info): use new apis for const fields
11848 2004-07-06 Martin Baulig <martin@ximian.com>
11850 * mono-debug.h: Increment version number to 44.
11852 * mono-debug.c (mono_debug_add_wrapper): The second argument is
11853 now a gpointer, rewrote this whole method.
11855 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
11856 function. Add information about the wrapper in a new "misc table".
11858 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
11859 for the new misc table.
11861 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
11863 * metadata-internals.h image.c: Add a cache for helper signatures.
11865 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
11867 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
11869 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
11870 delegates from a delegate. Fixes #61033.
11872 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
11873 marshalling of stringbuilder arrays. Fixes #59900.
11875 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
11877 * icall.c: Add EnumBuilder:setup_enum_type icall.
11879 2004-06-30 Ben Maurer <bmaurer@ximian.com>
11881 * icall.c: Added a new icall for the property version of
11882 OffsetOfStringData.
11884 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
11886 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
11887 it has a constant size across platforms.
11889 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
11892 2004-06-29 Martin Baulig <martin@ximian.com>
11894 * mono-debug.c (mono_debug_add_method): Protect the whole function
11895 in mono_debugger_lock(), not just parts of it.
11897 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
11899 * reflection.c: make sure padding bytes in heaps are zeroed.
11901 2004-06-24 David Waite <mass@akuma.org>
11903 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
11904 image.c, loader.c, locales.c, marshal.c, metadata.c,
11905 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
11906 string-icalls.c, threads.c: change to C90-style comments from C99 /
11909 2004-06-24 Dick Porter <dick@ximian.com>
11912 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
11913 return createdNew. Fixes bug 60412.
11916 * icall.c: Add createdNew parameter to CreateMutex icall
11918 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
11920 * reflection.c, object-internals.h: save default value in params.
11922 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11924 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
11925 no need to build a new path combining that with the application base.
11928 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
11930 * reflection.c: fixed minor standard compliance issues.
11932 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
11934 * reflection.c: fixed issue with encoding some custom attributes
11935 (arrays in properties and fields, bug #60411).
11937 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11939 * reflection.c: fix start address when copying the public key token.
11941 2004-06-23 Martin Baulig <martin@ximian.com>
11943 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
11944 the `exc' object in a static object to put it into the GC's root set.
11946 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
11948 * reflection.c: make mono_reflection_setup_internal_class ()
11949 callable a second time to setup a new parent class.
11951 2004-06-23 Dick Porter <dick@ximian.com>
11953 * threads.c: Check for WAIT_IO_COMPLETION return values.
11955 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
11957 * appdomain.c: Removed the g_free on the public key token. Now copy
11958 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
11959 * assembly.c: Added public key token string value when loading
11960 assemblies. Fix bug #60439.
11961 * icall.c: Added missing informations (like public key) in
11962 GetReferencedAssemblies. Fix #60519.
11963 * image.h: Changed definition for public key token from const char*
11964 public_tok_value to guchar public_key_token [17];
11965 * reflection.c: Updated for changes to public key token.
11967 2004-06-22 Lluis Sanchez Gual
11969 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
11970 for the field in base classes.
11972 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
11974 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
11975 mark headers as not supported, they are installed only for use by the
11978 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
11980 * *.c, *.h: avoid namespace pollution in public headers.
11982 2004-06-21 Martin Baulig <martin@ximian.com>
11984 * exception.c (mono_get_exception_security): It's in
11985 "System.Security", not in "System".
11987 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
11988 the exception classes.
11990 2004-06-21 Martin Baulig <martin@ximian.com>
11992 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
11993 Protect the exception object from being finalized.
11995 2004-06-21 Martin Baulig <martin@ximian.com>
11997 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
12000 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
12002 * reflection.c: Load the assembly in mono_reflection_type_from_name,
12003 if it was not loaded before. Fix parts of #60439.
12005 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
12007 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
12008 code that was broken since Ben's change: wrappers are now
12009 dependent on the method signature only again.
12011 2004-06-21 Martin Baulig <martin@ximian.com>
12013 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
12014 added interface support.
12016 2004-06-21 Martin Baulig <martin@ximian.com>
12018 * class.c (mono_vtable_get_static_field_data): New public method.
12020 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
12022 * filewatcher.c : Windows build fix to be compliant with API changes.
12024 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12026 * class.h, class.c: more accessors.
12027 * metadata.h, metadata.c: prepare for hiding MonoType and
12028 MonoMethodSignature: people should use the accessors from now on
12029 outside of the tree.
12031 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12033 * *.c, *.h: more API cleanups.
12035 2004-06-18 Jackson Harper <jackson@ximian.com>
12037 * assembly.c: Trace loading assemblies.
12038 * loader.c: Trace loading native libraries.
12039 * mono-config.c: Trace loading config files.
12041 2004-06-18 Dick Porter <dick@ximian.com>
12043 * locales.c: Tell ICU the lengths of strings, it can cope with
12044 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
12046 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
12048 * image.c: swapped name/filename;
12050 2004-06-18 Martin Baulig <martin@ximian.com>
12052 * mono-debug-debugger.c (write_class): Write the parent class at
12053 the end of the header.
12055 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
12057 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
12059 2004-06-17 Raja R Harinath <rharinath@novell.com>
12061 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
12062 (bundle_obj): New conditional define.
12063 (BUILT_SOURCES): Remove.
12064 ($(bundle_srcs)): Make parallel-make safe.
12065 (libmonoruntime_la_LIBADD): Make unconditional.
12066 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
12067 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
12069 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
12071 * culture-info-tables.h: It was inconsistent with the latest
12074 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
12076 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
12079 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
12082 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
12084 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
12085 cleaned up public header threads.h.
12087 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12089 * Makefile.am, *.c, *.h: more API cleanups.
12091 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12093 * Makefile.am: removed monosn from compilation.
12094 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
12095 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
12096 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
12097 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
12098 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
12099 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
12101 2004-06-15 Jackson Harper <jackson@ximian.com>
12103 * assembly.c: Make locales lower case when searching the GAC for
12104 assemblies. gacutil will always make locales lowercase when
12105 installing so this effectively makes them case insensitive.
12107 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
12109 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
12110 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
12111 parameter which allows to choose whether the wait can be interrupted or
12112 not. Also added the method mono_monitor_enter(), which locks the monitor
12113 using an infinite wait and without allowing interruption.
12114 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
12116 * object.h: Added new fields in MonoThread. suspend_event holds the event
12117 used to susped/resume the thread. synch_lock is the lock object to use for
12118 modifying the thread state.
12119 * threads.c: Use the new synch_lock object for locking, instead of "this",
12120 which can generate deadlocks.
12121 Moved thread state change in Thread.Sleep and Thread.Join from managed
12122 to unmanaged code. This avoids a deadlock when the thread was suspended
12123 just after acquiring the thread lock.
12124 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
12125 Implemented Thread.Suspend using an event instead of ThreadSuspend,
12126 which is not fully implemented in the io-layer.
12127 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
12129 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
12131 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
12132 threads-types.h: more API cleanups.
12134 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
12136 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
12137 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
12138 threadpool.c, threads.c: first pass at the exported API cleanup.
12140 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12142 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
12144 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12146 * icall.c: added internalGetHome.
12148 2004-06-14 Dick Porter <dick@ximian.com>
12150 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
12151 possible to return successfully when '.' or '..' were the only
12152 entries in a directory, but were skipped. The MonoIOStat was not
12153 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
12156 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12158 * reflection.c: make binaries run on .Net 1.1 by default.
12160 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
12162 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
12164 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
12166 * marshal.c: keep track of struct size with explicit layout
12169 2004-06-12 Martin Baulig <martin@ximian.com>
12171 * mono-debug-debugger.c: Comment out a debugging g_message().
12173 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
12175 * reflection.c, reflection.h: do not free custom attrs that are cached.
12176 * icall.c: use braces to make code clearer.
12178 2004-06-11 Martin Baulig <martin@ximian.com>
12180 * class.h (MonoInflatedField): New type.
12181 (MonoClassField): Replaced `MonoType *generic_type' with
12182 `MonoInflatedField *generic_info'.
12185 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
12187 2004-06-11 Martin Baulig <martin@ximian.com>
12189 * reflection.c (mono_image_create_method_token): Correctly encode
12192 2004-06-11 Martin Baulig <martin@ximian.com>
12194 * metadata.c (mono_metadata_parse_method_signature): When parsing
12195 a MethodDef which has VarArgs, also set sentinelpos if we don't
12196 have any parameters.
12198 2004-06-11 Martin Baulig <martin@ximian.com>
12200 * verify.c (mono_method_verify): In CEE_CALL, use
12201 mono_method_get_signature() to get the method's signature, unless
12202 we're a PInvoke method.
12204 2004-06-10 Jackson Harper <jackson@ximian.com>
12206 * assembly.c: Use <path>/lib/mono/gac for the extra paths
12207 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
12208 logical name as the supplied path is just a prefix to the gac not
12209 the direct path to it.
12211 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
12213 * reflection.c: make the token for a created method match
12214 the token of the MethodBuilder it was created from
12215 (IKVM requires this behaviour now).
12217 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
12219 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
12220 reflection.c, socket-io.c: leak fixes.
12222 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
12224 * icall.c: handle sentinel pos in vararg methods in position different
12227 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12229 * culture-info-tables.h: freshly generated.
12231 2004-06-09 Martin Baulig <martin@ximian.com>
12233 * loader.c (mono_get_method_constrained): Call `mono_class_init
12234 (constrained_class)'.
12236 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
12238 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
12239 any methods. Fixes #59629.
12241 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
12243 * culture-info-tables.h: reflecting locale-builder updates.
12245 2004-06-08 Dick Porter <dick@ximian.com>
12248 * locales.c: Fixed compile warnings, including a real bug in
12249 CompareInfo_internal_compare.
12251 2004-06-08 Dick Porter <dick@ximian.com>
12254 (ves_icall_System_Globalization_CompareInfo_internal_index):
12255 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
12256 Double-check the resuls of usearches, because ICU currently
12257 ignores most of the collator settings here. Fixes bug 59720.
12259 2004-06-08 Dick Porter <dick@ximian.com>
12262 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
12263 Fix memory leak and segfault-causing typo. No idea how this one
12264 lasted so long without being noticed.
12266 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
12268 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
12269 any methods. Fixes #59629.
12271 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12274 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
12275 own the critical section before). Removed dead code (that's done
12276 in the preload hook).
12278 (mono_assembly_load_with_partial_name): call the preload hook.
12280 2004-06-08 Martin Baulig <martin@ximian.com>
12282 * metadata.c (mono_metadata_signature_alloc): Default
12283 `sentinelpos' to -1.
12285 * reflection.c (mono_image_get_array_token): Likewise.
12287 2004-06-08 Martin Baulig <martin@ximian.com>
12289 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
12291 * metadata.c (mono_metadata_parse_method_signature): When parsing
12292 a MethodDef which has VarArgs, set sentinelpos.
12294 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
12295 `gint16' since we're using -1 for non-varargs methods.
12298 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
12299 (method_encode_signature): Added varargs support.
12300 (method_builder_encode_signature): Likewise.
12301 (mono_image_get_varargs_method_token): New static method.
12302 (mono_image_create_method_token): New public method; this is
12303 called via an icall instead of mono_image_create_token() when
12304 calling a varargs method.
12306 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
12308 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
12310 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
12312 * culture-info-tables.h : Reflecting the latest locale-builder that
12313 fixed empty array representation ({} to {0}).
12315 2004-06-07 Jackson Harper <jackson@ximian.com>
12317 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
12318 looking up extra gac paths. This allows MONO_GAC_PATH to act
12319 exactly like a prefix.
12321 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
12323 * reflection.c (mono_reflection_type_from_name): Make a copy of the
12324 type name before modifying it. Fixes #59405.
12326 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
12328 * culture-info.h: added fields for "all datetime patterns".
12329 * locales.c: ( ves_icall_System_Globalization_CultureInfo
12330 _construct_datetime_format ()): fill xxx_patterns fields.
12331 * object.h: added fields for "all datetime patterns" to
12332 MonoDateTimeFormatInfo.
12333 * culture-info-tables.h: reflecting locale-builder updates.
12335 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
12337 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
12338 the event has no add and remove methods. Fixes #59629.
12340 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
12342 * object.c: Fixed possible integer overflow when allocating large
12345 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
12347 * culture-info-tables.h: reflecting locale-builder updates.
12349 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
12351 * culture-info-tables.h: reflecting locale-builder updates.
12353 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
12355 * culture-info-tables.h: reflecting locale-builder updates.
12357 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
12359 * threads.c: Made Thread.Sleep abortable.
12361 2004-06-02 Martin Baulig <martin@ximian.com>
12363 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
12365 * debug-mono-symfile.h: Bumped symbol file version number to 37.
12367 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
12369 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
12371 2004-05-30 Jackson Harper <jackson@ximian.com>
12373 * reflection.c: Do not hardcode assembly versions or public key
12374 tokens anymore. All of this except the corlib section was dead
12377 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
12379 * object.c (mono_runtime_invoke_array): Automatically create boxed
12380 objects for byref valuetypes if needed. Fixes #59300.
12382 * object.c (mono_method_return_message_restore): Handle
12383 MONO_TYPE_OBJECT as well.
12385 2004-05-28 Jackson Harper <jackson@ximian.com>
12387 * reflection.c: The modified type encoding was causing build
12388 problems. Reverted for now.
12390 2004-05-28 Jackson Harper <jackson@ximian.com>
12392 * reflection.c/h: Take an assembly ref so that we dont create
12393 fully qualified names when encoding types in the same assembly as
12394 the custom attribute being emitted.
12395 * appdomain.c: Increment version number.
12397 2004-05-26 Duncan Mak <duncan@ximian.com>
12400 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
12401 Set the full version number (major, minor, build, revision).
12403 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
12405 * marshal.c (emit_struct_conv): increment src/dst after blit
12406 (mono_marshal_get_managed_wrapper,
12407 mono_marshal_get_native_wrapper): make sure we have marshalling
12408 info before marshalling params (info computation affects
12411 * class.c (class_compute_field_layout): correctly deal with
12413 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
12414 value types (as per what windows dows by default)
12415 (mono_class_setup_mono_type): System.ValueType is blittable
12416 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
12419 * marshal.c (mono_marshal_load_type_info): flag types as
12420 non-blittable if the native layout doesn't match the managed
12423 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12425 * appdomain.c: don't add stuff in the private search path that is
12426 above the application base. If application base is not set, there's
12427 no private search path.
12429 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
12431 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
12432 byref struct arguments in native->managed marshalling.
12434 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
12436 * marshal.c (mono_marshal_get_runtime_invoke): correctly
12437 cache methods using signature (special case for methods
12438 that are value type or string class)
12440 * image.c (mono_image_close): clean up allocated GSList's
12441 in runtime_invoke_cache.
12443 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12445 * mono-config.c: set the correct path for mono_cfg_dir on windows when
12446 there's no MONO_CFG_DIR environment variable defined.
12448 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12450 * threads.c: windows version must be >= 0x0500 to include OpenThread.
12452 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
12454 * threadpool.c: Really wait for 500ms after the async call, even if the wait
12456 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
12457 before waiting for it, and call CloseHandle after the wait to unref it.
12458 This will make sure that handles are not disposed too early.
12460 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12465 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
12468 * object.c: se the application_base only for the domain that runs
12469 Main. Fixes bug #59216,
12471 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12474 * object.c: only the domain in which Main is run have
12475 SetupInformation.ConfigurationFile set, so moved a few lines from
12476 appdomain.c to object.c.
12478 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12480 * appdomain.c: we tried to load [name].(dll|exe), but according
12481 to bug #57710, we must also try [culture]/[name].(dll|exe) and
12482 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
12483 There's a test case attached to bug #58922.
12485 2004-05-27 Dick Porter <dick@ximian.com>
12488 * file-io.c: Implemented icalls for locking and unlocking regions
12490 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
12491 FALSE on error (fixes both compiler warning and real bug.)
12493 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
12495 * culture-info-tables.h: reflecting locale-builder updates.
12497 (Added missing ChangeLog entry for 05/26)
12499 2004-05-27 Jackson Harper <jackson@ximian.com>
12501 * locales.c: Fix some cut and paste errors.
12503 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12505 * mono-config.c: set the correct path for config. directory on windows.
12507 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
12509 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
12512 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
12514 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
12515 from pinvoke functions.
12517 * marshal.c (mono_ftnptr_to_delegate): Implement this.
12519 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
12521 * culture-info-tables.h: reflecting locale-builder updates.
12523 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
12525 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
12528 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
12530 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
12531 * icall.c: Modified icalls for RNG.
12532 * rand.c|h: Changed RNG interface to allow thread-safe usage under
12533 Windows (CryptoAPI).
12535 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
12537 * locales.c: Fix build.
12539 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
12541 * culture-info-tables.h: reflecting locale-builder updates.
12543 2004-05-25 Jackson Harper <jackson@ximian.com>
12545 * locales.c: When creating the current culture use the $LANGs
12546 specific culture. So DateTimeFormat and NumberFormat entries are created.
12548 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
12550 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
12551 a char array as parameter.
12553 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
12555 * image.c: In mono_image_open(), always use an absolute path name to
12556 look for already loaded images.
12558 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
12560 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
12561 missing in the windows build (like older cygwin include files).
12563 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
12565 * icall.c: Fixed check for possible integer overflow in Buffer_
12566 BlockCopy icall. Replaced comments style // by /* */.
12568 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
12570 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
12572 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
12573 check after MONO_VTADDR. Fixes pinvoke2.exe.
12575 * marshal.h marshal.c metadata.h: Add beginnings of support for
12576 ftnptr -> delegate marshalling.
12578 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
12580 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
12581 * threads.c: Fix warnings.
12583 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
12585 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
12586 * icall.c: Registered icalls for Suspend and Resume.
12587 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
12589 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
12590 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
12591 * process.c: Use WaitForSingleObjectEx.
12592 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
12594 * threads.c, threads.h: Make use of new Ex wait methods. Improved
12595 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
12596 for Suspend and Resume. Added new mono_thread_stop, used for stoping
12597 background threads. Added basic support for Abort in Windows.
12598 Start new threads using a managed delegate invoke wrapper. This wrapper
12599 has an interruption checkpoint that is needed since an interruption
12600 can be requested before the thread leaves the unmanaged code that starts
12602 * marshal.c: Added interruption checkpoint after every native call, and
12603 also before managed calls for wrappers called from unmanaged code to
12604 go into managed code.
12605 * object.h: Added new field in MonoThread to keep track of interruption
12608 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
12610 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
12613 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12620 * rand.c: getenv -> g_getenv (windows!)
12622 * process.c: complete_path is also used on non-windows platforms.
12624 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12626 * icall.c: new signature for Process_Start.
12628 * process.[ch]: new signature for Process_Start. If we're on windows
12629 and UseShellExecute is false, we have to search for the program by
12630 ourselves if we don't get a full path.
12632 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
12634 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
12635 marshalling and call CleanUpNativeData if needed. Fixes #58646.
12637 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12639 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
12642 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12644 * process.c: use double quotes to quote program name and arguments on
12645 windows. Fixes bug #58575.
12647 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12649 * file-io.c: don't return "." and ".." when using windows Find*File.
12651 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
12653 * marshal.c: Don't pass wrappers to message init because method
12654 addressed used to lookup metadata. part of remoting[2|3] fix.
12656 2004-05-15 Jackson Harper <jackson@ximian.com>
12658 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
12659 path is essentially the same as MONO_PATH except that it points to
12660 GACs instead of lib directories.
12661 * loader.h: The user gac is gone so we dont need function to
12663 * mono-config.c: user gac option is now gone.
12665 2004-05-15 Jackson Harper <jackson@ximian.com>
12667 * culture-info.h: Make defines more consistent, add calendar data
12668 to the culture info table.
12669 * culture-info-tables.h: Add basic calendar data. Basically
12670 everyone gets default gregorian until all the data is
12672 * locales.c: Use the new consistent defines. Set calendar data for
12673 culture info objects.
12674 * object.h: add a field for calendar data to CultureInfo
12676 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
12678 * image.c: image->runtime_invoke_cache is keyed on signatures now.
12679 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
12681 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
12682 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
12683 an extra param that is the pointer of the method to invoke. The IL for
12684 the invoke method is no longer specific to the method, but to the
12685 signature of the method. Thus, we can share the same code for multiple
12686 methods. This reduces the number of methods that have to be compiled.
12688 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
12690 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
12692 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12694 * icall.c: Optimize Buffer.BlockCopy.
12696 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12698 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
12699 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
12700 quote). Changed them to "MMMM yyyy".
12702 2004-05-12 Miguel de Icaza <miguel@ximian.com>
12705 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
12707 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
12709 * reflection.h: Updated after changes to managed structures.
12711 * appdomain.c: Bump corlib version.
12713 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12715 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
12718 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12720 * Makefile.am: link to ../os/libmonoos.la on windows.
12723 -If MONO_DEBUG, warn about non-existing directories in
12725 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
12726 compile time variable.
12727 -Removed init_default_path and call mono_set_rootdir from
12728 libmonoos.a instead (windows only).
12730 * assembly.h: declare mono_assembly_getrootdir().
12733 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
12735 * loader.c: s/getenv/g_getenv/
12737 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
12739 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
12741 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
12743 * metadata.h: Add new marshalling conversions.
12745 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
12748 * reflection.c (mono_reflection_get_type): Lookup the type in all
12749 modules of a multi-module assembly. Fixes #58291.
12751 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
12753 * threads.c: Before aborting a background, set the StopRequested
12754 state. This avoids throwing the Abort exception.
12755 In mono_thread_manage, don't continue with the shutdown until all
12756 aborted threads have actually stopped.
12758 2004-05-10 Jackson Harper <jackson@ximian.com>
12760 * locales.c: Remove the modifier from culture names.
12762 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12764 * Makefile.am: monosn is not installed any more. It has been deprecated
12767 2004-05-07 Jackson Harper <jackson@ximian.com>
12770 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
12771 Fix array construction, add bailout if the length is 0.
12773 2004-05-07 Dick Porter <dick@ximian.com>
12775 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
12776 machine doesn't have a DNS entry. Patch by Urs Muff
12777 (umuff@quark.com), fixes bug 57928.
12779 2004-05-06 Jackson Harper <jackson@ximian.com>
12781 * reflection.c: Handle null PublicTokens properly. alloc mem for
12782 assembly names culture so we dont crash when freeing it.
12784 2004-05-06 Jackson Harper <jackson@ximian.com>
12786 * assembly.c: Check the usergac when loading with partial names.
12788 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
12790 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
12791 does nothing for now (not required for Linux/Windows) but the class
12792 library can call it (and a newer or modified runtime could need it).
12793 * icall.c: Registred icall.
12795 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12797 * loader.c: prints a message on module loading error we set MONO_DEBUG
12798 environment variable.
12800 2004-05-05 Jackson Harper <jackson@ximian.com>
12802 * appdomain.c: Handle PublicKeyToken=null properly.
12804 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
12806 * environment.c|h: Added icall ves_icall_System_Environment_
12807 GetOSVersionString to get the current OS version as a string.
12808 * icall.c: Registred icall.
12810 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
12812 * object.c: in mono_object_get_virtual_method(), take into account that
12813 non-virtual methods don't have a slot in the vtable. Check needed when
12814 the object is a proxy.
12816 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
12818 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
12819 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
12821 * object.c (mono_class_compute_gc_descriptor): Fix warning.
12823 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
12824 passed when a valuetype is expected.
12826 * object.c (mono_unhandled_exception): Only set the exit code if the
12827 exception happens in the main thread. Fixes thread5.exe.
12829 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
12830 invalid names. Fixes #58047.
12832 2004-05-03 Jackson Harper <jackson@ximian.com>
12834 * assembly.c: This line was committed accidently and is unneeded.
12836 2004-05-03 Jackson Harper <jackson@ximian.com>
12838 * icall.c: Add new icall for Assembly::LoadWithPartialName
12839 * assembly.c/.h: new function that probes the GAC to load partial
12840 assembly names by Paolo Molaro.
12842 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12844 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
12845 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
12846 (type_get_fully_qualified_name): Added PublicKeyToken when building a
12849 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12851 * appdomain.c: fixed check for 'neutral' culture and removed warning.
12852 * reflection.c: fix bug when parsing a full type name and Version is not
12853 the last thing in the string.
12855 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
12857 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
12858 crashes when it is freed.
12860 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12862 * assembly.c: print the compat warning to stderr.
12864 2004-05-01 Miguel de Icaza <miguel@ximian.com>
12866 * assembly.c (mono_assembly_load_references): Add a compatibility
12867 hack to run old applications that might be still referencing the
12868 3300-based assemblies, only do this for System.xxx.
12870 2004-05-01 Jackson Harper <jackson@ximian.com>
12872 * appdomain.c: If the culture is neutral we set it to "".
12874 2004-04-29 Jackson Harper <jackson@ximian.com>
12876 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
12878 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
12880 * string-icalls.c: added low overhead function for copying chars
12881 * icall.c: added needed icall for the above function
12883 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12885 * icall.c: fix return value of get_global_assembly_cache. Implemented
12886 Environment.GetLogicalDrives.
12888 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
12890 * rand.c: try and talk to egd or prngd
12891 for random bytes if opening devices fail.
12893 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
12895 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
12896 alignment for the type using the native alignment of its members
12897 instead of using klass->min_align.
12899 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
12901 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12904 * socket-io.c: added check for sys/aio.h.
12906 2004-04-28 Dick Porter <dick@ximian.com>
12908 * threads.c: Don't abort a thread thats already aborting, when
12909 terminating everything.
12911 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12913 * icall.c: added 2 new async calls for Socket.
12915 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
12916 IO on *nix systems.
12918 * threadpool.c: removed unused variable.
12920 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
12922 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
12924 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
12926 * locales.c: put back string_invariant_tolower () and
12927 string_invariant_toupper ().
12929 2004-04-26 David Waite <mass@akuma.org>
12934 * unicode.h: remove comma from end of enumeration declarations
12936 2004-04-26 David Waite <mass@akuma.org>
12938 * debug-mono-symfile.h:
12941 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
12944 2004-04-26 Jackson Harper <jackson@ximian.com>
12946 * appdomain.c: Increment version number.
12948 2004-04-26 Jackson Harper <jackson@ximian.com>
12950 * appdomain.c: Set assembly references public token value when
12951 PublicKeyToken is specified, not the hash_value. Free public token
12952 values when free assembly name data. Previously the public key
12953 token was hex decoded, however we are using hex encoded public key
12954 tokens, so this is not neccasary.
12955 * assembly.c: Lookup assemblies in the gac if their public token
12956 value is set. Add function to allow enabling user gac
12957 lookups. Specify whether or not the assembly was loaded from the
12958 GAC. Compare full assembly names when checking the cache for
12959 assemblies (Temporarily disabled see comment in code). Remove
12960 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
12961 specifies trace-loader they get extra info to stdout on the
12962 loading of assemblies.
12963 * image.h: Add a field for an assembly references public token
12964 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
12965 whether an assembly has been loaded from the GAC.
12966 * image.c: Remove a corlib -> mscorlib name mapping.
12967 * loader.h: Add function to enable/disable the user gac.
12968 * mono-config.c: Check if the usergac is enabled in the config
12970 * icall.c: New icall to determine whether or not an assembly has
12971 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
12972 * tabldefs.h: Add constant for assemblyref flag that specifies a
12973 full public key is used instead of a public token.
12974 * reflection.c: Remove mscorlib -> corlib mappings. Set
12975 PublicTokenValue instead of hash value. This value is a hex
12976 string so it does not need to be expanded.
12978 2004-04-26 Martin Baulig <martin@ximian.com>
12980 * mono-debug-debugger.c (mono_debugger_initialize): Set
12981 `mono_debugger_initialized' before calling mono_debug_lock().
12983 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
12985 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
12986 InternalToUpper/InternalToLower.
12987 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
12988 removed invariant culture shortcut. This is now done in managed code.
12989 * locales.c: (string_invariant_toupper/tolower) removed.
12991 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12993 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
12994 Added Poll internal call.
12996 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
12997 call for Poll. Select was too heavy for polling a single socket.
12999 * threadpool.[ch]: added mono_threadpool_cleanup.
13000 * threads.c: use it. Don't use Thread_Abort on windows.
13002 2004-04-23 Martin Baulig <martin@ximian.com>
13004 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
13006 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
13008 * icall.c: Registred new icalls for key pair protection and added an
13009 icall for Environment.GetFolderPath on Windows.
13010 * security.c|h: Added new icalls for key pair protection.
13012 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13014 * socket-io.c: don't display the non-supported family warning for known
13015 families. Now this is not displayed on windows when checking support
13018 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13020 * class.c: don't display the layout warning for static fields.
13022 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
13024 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
13025 * locales.c, locales.h: Added new icalls for culture-specific
13026 Char.ToLower and Char.ToUpper.
13028 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13030 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
13033 2004-04-20 Martin Baulig <martin@ximian.com>
13035 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
13036 of the type name before passing it to mono_reflection_type_from_name().
13038 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
13040 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
13041 encodings here. Fixes #56965.
13043 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
13045 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
13046 fix test on strstr result not that I can see anything that
13047 relies on the result.
13049 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
13051 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
13054 * marshal.c (mono_marshal_get_string_encoding): New helper function.
13056 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
13057 function to determine which marshalling to use for strings. Fixes
13060 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
13062 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
13064 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
13066 * icall.c: #include mono-config.h
13068 2004-04-15 Jackson Harper <jackson@ximian.com>
13070 * culture-info-tables.h: Fix date formats for en-US culture.
13072 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
13074 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
13075 ThreadPool.SetMinThreads.
13076 * threadpool.c: Implemented ThreadPool.GetMinThreads and
13077 ThreadPool.SetMinThreads.
13079 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13081 * mono-config.c: also load the .config file in the directory
13082 where the assembly was found.
13084 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
13086 * assembly.c: load per-assembly config files.
13087 * icall.c: decrapified code to get the config dir and moved to
13089 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
13090 per-assembly config files. When doing a dll map lookup give precedence
13091 to the per-assembly data.
13093 2004-04-14 Martin Baulig <martin@ximian.com>
13095 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
13096 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
13097 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
13099 * mono-debugger-debugger.c: While the debugger is locked, remember
13100 whether the symbol tables have changes and send one single
13101 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
13103 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
13105 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
13107 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
13110 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
13111 account when marshalling string arrays. Fixes #56965.
13113 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
13115 * icall.c: Add new icalls mapping for security.
13116 * security.c|h: Add internal calls for WindowsIdentity,
13117 WindowsImpersonationContext and WindowsPrincipal.
13119 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
13121 * class.c: Added comment to ensure the System.MonoDummy class
13122 is removed when no longer necessary
13124 2004-04-13 Miguel de Icaza <miguel@ximian.com>
13126 * appdomain.c: Pass arguments to the bootstraping exceptions to
13127 minimize JITed methods at boot
13129 * metadata.c (mono_exception_from_name_two_strings): Allow for the
13130 second string to be null.
13132 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
13133 Change the protocol to minimize the JIT methods at startup. Now
13134 it Returns the internal codepage, if the value of "int_code_page"
13135 is 1 at entry, and we can not compute a suitable code page
13136 number, returns the code page as a string.
13138 2004-04-13 Jackson Harper <jackson@ximian.com>
13140 * culture-info-tables.h: Fix number of decimal digits for all
13143 2004-04-13 Jackson Harper <jackson@ximian.com>
13145 * icall.c: Clairfy out of sync error message. It is not always
13146 your corlib that is out of sync.
13148 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
13150 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
13151 properties when only the set accessor is overriden. Fixes #55874.
13153 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
13155 * assembly.c (mono_assembly_load_references): Make this thread safe.
13158 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
13160 * monosn.c: Add missing initialization calls.
13162 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
13165 ves_icall_System_Globalization_CultureInfo_construct_number_format
13166 Fix g_assert so it compiles on fussier compilers re int/ptr
13169 2004-04-08 Dick Porter <dick@ximian.com>
13172 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
13173 53992. Also rearrange the code so that the internal calls return
13174 an error value and exceptions are thrown from managed code.
13176 * icall.c: Add type info to the socket icalls.
13178 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13180 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
13183 2004-04-07 Martin Baulig <martin@ximian.com>
13185 * class.c (mono_class_from_generic_parameter): Don't default
13186 `klass->parent' to `mono_defaults.object_type'.
13188 2004-04-07 Martin Baulig <martin@ximian.com>
13190 * reflection.c (mono_reflection_initialize_generic_parameter): Set
13191 `param->pklass->reflection_info'.
13193 2004-04-07 Jackson Harper <jackson@ximian.com>
13195 * culture-info-tables.h: Fix date separator symbol.
13197 2004-04-07 Martin Baulig <martin@ximian.com>
13199 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
13200 from System.Type to System.MonoType.
13202 2004-04-07 Martin Baulig <martin@ximian.com>
13205 (MonoReflectionGenericParam): Added `has_reference_type' and
13206 `has_value_type' fields.
13208 * reflection.c (mono_image_get_generic_param_info): Encode the
13209 correct flags if we have the `class' or `struct' constraint.
13211 2004-04-07 Martin Baulig <martin@ximian.com>
13214 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
13216 2004-04-07 Jackson Harper <jackson@ximian.com>
13218 * appdomain.c: Revert extra patches, just wanted to bump the
13221 2004-04-07 Jackson Harper <jackson@ximian.com>
13223 * Makefile.am: Add culture-info private headers.
13224 * icall.c: Add new icalls for contructing locales.
13225 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
13226 * locales.h: Declare new culture info construction methods.
13227 * object.h: Add new fields used to avoid the CultureMap to
13229 * culture-info.h: Definition of structs used in the culture info
13231 * culture-info-tables.h: Autogenerated tables that contain culture
13232 info data. This file was generated with the locale-builder tool.
13233 * appdomain.c: Incement corlib version number.
13235 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
13237 * appdomain.c: (mono_runtime_init) move mono_thread_init
13238 to before mono_object_new calls so critical sections
13239 are initialized before use.
13241 2004-04-07 Martin Baulig <martin@ximian.com>
13244 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
13245 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
13246 (ves_icall_MonoGenericParam_initialize): Removed.
13247 (monogenericparam_icalls): Removed.
13248 (generictypeparambuilder_icalls): Added new table for
13249 System.Reflection.Emit.GenericTypeParameterBuilder.
13252 (mono_reflection_define_generic_parameter): Removed.
13253 (mono_reflection_initialize_generic_parameter): This is now called
13254 from GenericTypeParameterBuilder's .ctor.
13256 2004-04-06 Martin Baulig <martin@ximian.com>
13258 * class.c (mono_class_init): Don't inflate nested classes in a
13260 (mono_type_get_name_recurse): Include the generic arguments for
13261 generic instances and generic type declarations.
13262 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
13263 (_mono_class_get_instantiation_name): Removed.
13264 (mono_class_create_generic): Always use `gklass->name' as our name.
13266 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
13268 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
13269 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
13270 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
13271 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
13272 closed generic methods here.
13275 (mono_reflection_generic_inst_get_nested_types): Removed.
13276 (inflate_mono_method): Copy the generic parameters from the
13277 MonoMethodHeader into out MonoGenericMethod.
13279 2004-04-06 Martin Baulig <martin@ximian.com>
13282 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
13284 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
13286 * reflection.c (build_compressed_metadata): If we have any entries
13287 in the GenericParam, MethodSpec or GenericParamConstraint tables,
13288 set the header version to 1.1.
13290 2004-04-06 Martin Baulig <martin@ximian.com>
13292 * class.c (mono_class_init): If we're a generic instance,
13293 initialize our nested classes, too.
13294 (_mono_class_get_instantiation_name): Deal with the new `!%d'
13297 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13299 * process.c: quote the argument passed to the shell on windows.
13301 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
13303 * threads.c (mono_alloc_special_static_data): Allow this to be
13304 called during startup.
13306 2004-04-02 Martin Baulig <martin@ximian.com>
13309 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
13311 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
13313 * icall.c: Fix build.
13315 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
13317 * Makefile.am: Added security.c|h.
13318 * icall.c: Added icall for get_UserName;
13319 * security.c: New file for security related icalls. Added function
13320 get_UserName for System.Environment (fix #56144).
13321 * security.h: New. Header file for security.c
13323 2004-04-02 Dick Porter <dick@ximian.com>
13325 * icall.c: Deleted the icalls that were obsoleted some time ago
13326 by the ICU string code, and which were mixed into the icall
13327 rearranging. Fixes bug 55969.
13330 * string-icalls.c: Deleted the code that those icalls reference.
13332 2004-04-01 Martin Baulig <martin@ximian.com>
13334 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
13336 * class.c (mono_class_from_generic_parameter): Don't set
13337 TYPE_ATTRIBUTE_INTERFACE.
13338 (my_mono_class_from_generic_parameter): Likewise.
13340 2004-04-01 Martin Baulig <martin@ximian.com>
13342 * loader.c (find_method): Added an optional `MonoClass *ic'
13343 argument to search in a specific interface.
13344 (mono_get_method_constrained): New public function.
13346 2004-04-01 Martin Baulig <martin@ximian.com>
13348 * reflection.c (mono_image_get_generic_field_token): Use the
13349 `handleref' cache here.
13351 2004-04-01 Martin Baulig <martin@ximian.com>
13353 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
13355 * reflection.c (create_generic_typespec): Use the `typespec' hash
13356 here, not the `typeref' one.
13358 2004-04-01 Martin Baulig <martin@ximian.com>
13360 * class.c (mono_class_inflate_generic_type): Moved the
13361 functionality into a new static inflate_generic_type() which
13362 returns NULL if it didn't do anything. Only increment the
13363 `mono_stats.inflated_type_count' if we actually inflated
13365 (mono_class_get_full): Check the classes type to see whether we
13366 need to inflate it; also inflate MONO_TYPE_(M)VAR.
13368 2004-04-01 Jackson Harper <jackson@ximian.com>
13370 * reflection.c: Set culture for assembly references.
13372 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
13374 * reflection.[ch], icall.[ch], Fix support for pinning variables.
13376 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13379 (do_mono_assembly_open): the critical section also covers
13380 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
13382 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13385 (mono_manage_threads): abort the background threads when finishing.
13388 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13390 * gc.c: only close the done_event handle if there was no timeout.
13393 2004-03-30 Martin Baulig <martin@ximian.com>
13395 * icall.c (icall_entries): It's called "System.Activator", not
13396 "System.Activation".
13398 2004-03-30 Martin Baulig <martin@ximian.com>
13400 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
13401 (mono_class_create_from_typespec): Likewise.
13403 2004-03-30 Martin Baulig <martin@ximian.com>
13405 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
13406 `has_ctor_constraint' and `initialized'.
13408 2004-03-30 Martin Baulig <martin@ximian.com>
13410 * reflection.c (encode_new_constraint): New static function to add
13411 the constructor constraint attribute to a type parameter.
13412 (encode_constraints): Call encode_new_constraint() if necessary.
13415 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
13417 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
13419 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
13421 * reflection.c, icall.c: add support for pinning variables.
13423 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
13425 * marshal.c (mono_marshal_get_managed_wrapper):
13426 init bool local with zero rather than null.
13428 2004-03-29 Martin Baulig <martin@ximian.com>
13430 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
13431 the "official" behavior here.
13432 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
13434 2004-03-29 Martin Baulig <martin@ximian.com>
13436 * icall.c: Reflect latest API changes.
13438 2004-03-29 Martin Baulig <martin@ximian.com>
13440 * loader.c (mono_get_method_from_token): Also call
13441 mono_metadata_load_generic_params () for abstract and interface
13442 methods; replace the type arguments in the method signature with
13443 the ones which are loaded from the metadata.
13445 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
13447 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
13448 of the lock is not the current thread. MS.NET don't do it, in spite of
13449 what the documentation says. See bug #56157.
13451 2004-03-28 Martin Baulig <martin@ximian.com>
13453 * class.c (mono_class_init): Don't call init_properties() and
13454 init_events() for generic instances; set `prop->parent' when
13455 inflating properties.
13457 * reflection.c (mono_generic_inst_get_object): Call
13458 `mono_class_init (ginst->klass)'.
13459 (mono_type_get_object): Only create a MonoGenericInst if your
13460 generic type is a TypeBuilder.
13461 (do_mono_reflection_bind_generic_parameters): Only set
13462 `ginst->is_dynamic' if our generic type is a TypeBuilder.
13464 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
13466 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
13469 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13471 * icall.c: added Kill_internal icall.
13472 * process.[ch]: added Kill_internal icall.
13474 2004-03-25 Martin Baulig <martin@ximian.com>
13476 * class.h (MonoStats): Added `generic_instance_count',
13477 `inflated_method_count', `inflated_type_count' and
13478 `generics_metadata_size'.
13480 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13482 * reflection.c: no warnings now.
13484 2004-03-25 Martin Baulig <martin@ximian.com>
13486 * class.c (mono_class_get_full): New public function; does a
13487 mono_class_get(), but also takes a `MonoGenericContext *'.
13489 * loader.c (mono_field_from_memberref): Renamed to
13490 `field_from_memberref', made static and added `MonoGenericContext *'
13492 (mono_field_from_token): Added `MonoGenericInst *' argument.
13493 (method_from_memberef): Likewise.
13494 (mono_get_method_from_token): Likewise.
13495 (mono_get_method_full): New public function; does a
13496 mono_get_method(), but also takes a `MonoGenericContext *'.
13498 * verify.c (mono_method_verify): Get the method's generic context
13499 and pass it to mono_field_from_token(), mono_get_method_full() and
13500 mono_class_get_full().
13502 2004-03-25 Martin Baulig <martin@ximian.com>
13504 * class.c (mono_class_inflate_generic_type): Take a
13505 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
13506 `MonoGenericMethod *'.
13508 2004-03-25 Martin Baulig <martin@ximian.com>
13510 * loader.h (MonoMethodInflated): Store the MonoGenericContext
13511 instead of the MonoGenericMethod here.
13513 2004-03-25 Martin Baulig <martin@ximian.com>
13515 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
13516 each time we create a new MonoGenericInst, we also create a new
13517 context which points back to us.
13519 * class.c (inflate_method): Use `ginst->context' instead of
13520 creating a new context.
13522 * loader.c (method_from_memberref): Use
13523 `klass->generic_inst->context' instead of creating a new context.
13525 2004-03-25 Martin Baulig <martin@ximian.com>
13527 * class.h (MonoGenericContext): New struct.
13528 (MonoGenericMethod): Removed `generic_inst'.
13530 * class.c (mono_class_inflate_generic_method): Take a
13531 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
13533 2004-03-25 Martin Baulig <martin@ximian.com>
13535 * loader.h (MonoMethodInflated): New typedef.
13537 * metadata.h (MonoMethodSignature): Removed `gen_method', make
13538 `generic_param_count' consume just 30 bits, added `is_inflated'
13539 and `has_type_parameters' flags (one bit each).
13541 * class.c (mono_class_inflate_generic_method): Create a
13542 MonoMethodInflated instead of a MonoMethodNormal and set
13543 `is_inflated' in the method signature.
13545 * class.h (MonoGenericMethod): Removed `generic_method'.
13547 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
13549 * image.c: Make sure the name of a MonoImage is always an absolute path.
13550 This fixes bug #54415.
13552 2004-03-24 Martin Baulig <martin@ximian.com>
13554 * class.c (mono_class_setup_vtable): If we're a generic instance,
13555 use our generic type's vtable size.
13557 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
13559 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
13560 MONO_NO_UNLOAD env var as a temporary workaround for unloading
13563 2004-03-23 Martin Baulig <martin@ximian.com>
13565 * class.h (MonoDynamicGenericInst): Added `int count_events' and
13566 `MonoEvent *events'.
13568 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
13569 (typebuilder_icalls): Added "get_event_info"; calls
13570 mono_reflection_event_builder_get_event_info().
13572 * reflection.c (mono_reflection_generic_inst_initialize): Added
13573 `MonoArray *events'.
13574 (mono_reflection_event_builder_get_event_info): New function.
13576 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
13578 * object.h: add mono_type_initialization_init
13580 * object.c (mono_runtime_class_init):
13581 implement class constructor synchronization rules
13582 to cope with threading issues.
13583 add mono_type_initialization_init
13585 * appdomain.c (mono_runtime_init): call
13586 mono_type_initialization_init
13588 * class.h: removing initializing field from MonoVTable
13590 2004-03-23 Martin Baulig <martin@ximian.com>
13592 * class.c (my_mono_class_from_generic_parameter): Use
13593 `param->name' if it's not NULL.
13595 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
13597 * class.c: do not insert non-virtual methods in the vtable.
13598 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
13599 that means the method is non-virtual. This never would have
13602 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
13604 * profiler.c: Added lock for accessing coverage_hash.
13606 2004-03-22 Martin Baulig <martin@ximian.com>
13608 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
13609 `method->method->signature->generic_param_count != 0' to make it
13610 work for interface methods.
13612 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13614 * process.c: quote the string passed to the shell using g_shell_quote.
13616 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13619 (mono_threads_manage): don't remove the finalizer thread and self
13620 from the threads hash table so that mono_thread_manage can be called
13623 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13625 * process.c: quote the arguments when UseShellExecute is true. Fixes
13628 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13630 * threads.c: set mono_thread_detach as a cleanup routine for every
13631 thread. This way it's always executed upon thread termination, either
13632 aborted or finished normally. No more xsp hangs!
13634 2004-03-17 Martin Baulig <martin@ximian.com>
13636 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
13637 `int count_nested' and a `MonoType **nested'.
13639 * reflection.c (mono_reflection_bind_generic_parameters): Moved
13640 most of the functionality into a new static
13641 do_mono_reflection_bind_generic_parameters() and don't take a
13642 `MonoType *nested_in' argument any more. Don't compute nested
13644 (mono_reflection_generic_inst_get_nested_types): New public method
13645 to get nested types.
13647 * class.c (mono_class_create_generic): Set `klass->nested_in' if
13648 we're a nested class.
13650 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
13651 mono_reflection_generic_inst_get_nested_types() to compute the
13654 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
13656 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
13657 descriptive error message under windows.
13659 2004-03-17 Martin Baulig <martin@ximian.com>
13661 * class.c (dup_type): Added `const MonoType *original' argument;
13662 copy the attrs from the original type.
13664 2004-03-17 Martin Baulig <martin@ximian.com>
13666 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
13667 `m->generic_inst_cache' here.
13669 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
13671 * exception.h exception.c: Add stack_overflow_exception.
13673 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13676 (overlapped_callback): call SetEvent *after* invoking the callback.
13677 No need to call CloseHandle.
13679 2004-03-16 Martin Baulig <martin@ximian.com>
13681 * reflection.c (mono_image_get_fieldref_token): Take a
13682 `MonoReflectionField *' instead of a `MonoClassField *' and a
13683 `MonoClass *'; store the `MonoReflectionField *' in the hash.
13685 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13687 * appdomain.c: don't add the culture to the filename we're looking for
13688 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
13690 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13692 * locales.c: don't ignore symbols when doing case insensitive compares.
13693 Thanks Dick! Fixes bug #54046.
13695 * threads.c: surround 'threads' usage with enter/leave in
13696 mono_thread_manage.
13698 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
13700 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
13701 implicitly marshalled as [Out]. Fixes #55450.
13703 (mono_marshal_get_runtime_invoke): Zero out the result if there is
13706 2004-03-16 Martin Baulig <martin@ximian.com>
13708 * class.c (mono_class_from_generic_parameter): Use the actual
13711 2004-03-16 Martin Baulig <martin@ximian.com>
13713 * reflection.c (type_get_signature_size): New static function.
13714 Compues the size of the type in a method signature.
13715 (method_get_signature_size): New static function; calls
13716 type_get_signature_size() to compute the actual size of the
13717 method's signature.
13718 (method_encode_signature): Use method_get_signature_size() to get
13719 the signature's size rather than using `nparams * 10'.
13721 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13723 * file-io.h: define here WapiOverlapped on windows. I don't want the
13724 regular OVERLAPPED one.
13727 * threadpool.c: somehow, BindIoCompletionCallback is not found.
13728 Disabling AIO on windows.
13730 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13732 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
13735 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13737 * appdomain.c: upgraded corlib version.
13739 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
13740 and BeginWrite. Allow opening files for asynchrnous operations.
13742 * file-io.h: new struct that maps FileStreamAsyncResult.
13743 * icall.c: added new icalls.
13744 * process.[ch]: support setting child process environment variables
13745 and use the SHELL or COMSPEC when UseShellExecute is true.
13747 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
13748 callback for async. IO is here and also BindHandle.
13750 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
13753 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
13755 * reflection.c (create_custom_attr): Allow len == 0.
13757 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
13758 computation on big-endian machines.
13760 2004-03-13 Martin Baulig <martin@ximian.com>
13762 * class.h (MonoGenericInst): Added `int count_ifaces'.
13764 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
13765 `ginst->count_ifaces' instead `klass->interface_count' since we
13766 may get called before the vtable is created.
13768 * loader.c (mono_method_get_param_names): If we're a generic
13769 instance, return and don't initialize the class.
13771 * reflection.c (mono_reflection_setup_generic_class): Don't call
13772 ensure_runtime_vtable().
13773 (mono_reflection_bind_generic_parameters): Set
13774 `ginst->count_ifaces'.
13776 2004-03-11 Jackson Harper <jackson@ximian.com>
13780 * unicode.h: Remove unused System.Char icalls.
13782 2004-03-11 Miguel de Icaza <miguel@ximian.com>
13784 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
13785 code when we P/Invoke the first library in Windows.Forms, instead
13786 of when we first open the assembly.
13788 * assembly.c: Drop the lookup from here.
13790 2004-03-10 Martin Baulig <martin@ximian.com>
13792 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
13793 class for properties, fields and events. Finally fixes #54945.
13795 2004-03-10 Martin Baulig <martin@ximian.com>
13797 * metadata.c (mono_metadata_class_equal): New static function;
13798 checks whether two generic instances or two generic parameters are
13800 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
13803 2004-03-10 Martin Baulig <martin@ximian.com>
13805 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
13807 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
13808 argument and write it into the `reflection_info' field.
13811 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
13812 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
13814 2004-03-09 Jackson Harper <jackson@ximian.com>
13816 * char-conversions.h: use 8 bits for numeric data its all we need
13817 * icall.c: numeric data is only 8 bits now.
13819 2004-03-09 Martin Baulig <martin@ximian.com>
13821 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
13823 * class.c (init_properties, init_events): Initialize the new
13826 * reflection.c (typebuilder_setup_properties): Likewise.
13827 (typebuilder_setup_events): Likewise.
13829 * reflection.h (MonoEventInfo): Replaced `parent with
13830 `declaring_type' and `reflected_type'.
13832 * icall.c (ves_icall_get_property_info): Distinguish between
13833 declaring and reflected type.
13834 (ves_icall_get_event_info): Likewise.
13836 2004-03-09 Martin Baulig <martin@ximian.com>
13838 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
13839 (ves_icall_Type_GetField): Correctly set field->klass.
13841 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
13843 * loader.h: Fix warning.
13845 2004-03-08 Miguel de Icaza <miguel@ximian.com>
13847 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
13848 library routine if present. Notice that it will still continue
13849 executing even if its missing, for those working on the Gtk#
13850 edition of Windows.Forms.
13852 * assembly.c (do_mono_assembly_open): If loading the
13853 System.Windows.Forms call mono_loader_wini_init.
13855 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
13857 * class.h: Added MonoRemoteClass struct.
13858 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
13859 function for MonoStrings.
13860 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
13861 Added internal call for getting the proxy type.
13862 * marshal.c: Get the type of transparent proxies from its remote_class.
13863 Added methods that generate the IL for type checks and casts:
13864 mono_marshal_get_isinst, mono_marshal_get_castclass,
13865 mono_marshal_get_proxy_cancast.
13866 * marshal.h: Declaration of the previous new methods.
13867 * object.c: Added new moethods for creating and updating MonoRemoteClass
13868 instances: mono_remote_class, mono_upgrade_remote_class,
13869 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
13870 * verify.c: FIx transparent_proxy_fields layout.
13871 * appdomain.c: Bump corlib version.
13873 2004-03-04 Jackson Harper <jackson@ximian.com>
13875 * icall.c: Add icall to access char conversion tables.
13876 * char-conversions.h: Character conversion tables.
13877 * Makefile.am: Add char-conversions.h private header file.
13879 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
13881 * appdomain.c (unload_thread_main): Increase unloading timeout to
13882 10 sec as a temporary workaround for Nant problems.
13884 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
13886 * gc.c: Add checks for GC_enable and GC_disable.
13888 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
13889 (jaak@zd.com.pl). Fix memory corruption in String.Replace
13892 2004-02-27 Martin Baulig <martin@ximian.com>
13894 * reflection.c (mono_reflection_bind_generic_parameters): Take a
13895 `MonoReflectionType *' instead of a `MonoType *'.
13897 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
13899 * gc.c (run_finalize): Avoid finalizing the object representing the
13901 (finalizer_thread): Fix warning.
13903 2004-02-25 Martin Baulig <martin@ximian.com>
13905 * class.c (_mono_class_get_instantiation_name): Added `int offset'
13906 argument for nested types.
13907 (mono_class_create_generic): Added support for nested generictypes.
13909 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
13912 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
13914 * reflection.c (method_encode_signature): Increase the minimum
13915 value of `size' from 10 to 11.
13916 (mono_reflection_bind_generic_parameters): Take `int type_argc'
13917 and `MonoType **types' arguments instead of the `MonoArray
13918 *types'; added `MonoType *nested_in'. Recursively instantiate
13921 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
13923 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
13924 stack_overflow_ex members which are used by exception handling.
13926 * appdomain.c (mono_runtime_init): Initialize the new members.
13928 * gc.c (mono_gc_enable): New helper function.
13929 * gc.c (mono_gc_disable): New helper function.
13931 2004-02-23 Martin Baulig <martin@ximian.com>
13933 * icall.c: I must have been really stupid - make it actually work
13936 2004-02-23 Martin Baulig <martin@ximian.com>
13938 * loader.c (method_from_memberref): Only inflate the method if
13939 it's in another klass.
13941 2004-02-23 Martin Baulig <martin@ximian.com>
13943 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
13944 (mono_class_init): If we're a generic instance and an interface,
13945 compute `class->interface_id'; also create `class->interfaces'
13946 here and inflate them.
13948 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
13950 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
13952 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
13954 2004-02-15 Miguel de Icaza <miguel@ximian.com>
13956 * reflection.c (method_encode_code): Improved the error message
13957 generated by the exception.
13959 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13961 * icall.c: Martin did not do what he said in the ChangeLog for
13962 2004-02-18, but put back the changes for properties and events.
13963 Commenting those changes out again and adding comment to bug #54518.
13965 * process.c: removed warning.
13967 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
13969 * marshal.c (emit_struct_conv): Print an error message instead of
13970 asserting when a type does not have the StructLayout attribute.
13972 2004-02-20 Martin Baulig <martin@ximian.com>
13974 * reflection.c (mono_type_get_object): Also use the cache for
13976 (mono_reflection_bind_generic_parameters): Always compute
13979 2004-02-20 Martin Baulig <martin@ximian.com>
13981 * class.h (MonoGenericMethod): Removed `klass'.
13983 * class.c (mono_class_inflate_generic_method): Added `MonoClass
13986 2004-02-20 Martin Baulig <martin@ximian.com>
13988 * reflection.c (method_encode_methodspec): Actually use the
13989 uninflated signature for the memberref.
13991 2004-02-20 Martin Baulig <martin@ximian.com>
13993 * class.h (MonoGenericMethod): Removed `declaring'.
13995 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
13996 is NULL, compute it here.
13998 2004-02-20 Martin Baulig <martin@ximian.com>
14000 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
14002 * metadata.c (mono_metadata_generic_inst_hash): New method.
14003 (mono_metadata_generic_inst_equal): New method.
14005 * reflection.c (mono_reflection_bind_generic_parameters): Use the
14006 `klass->image->generic_inst_cache' cache to avoid creating
14007 duplicate MonoGenericInst's.
14009 * class.c (mono_class_inflate_generic_type): Use the cache.
14011 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
14013 * object.c: fixed gc descriptor calculation for embedded valuetypes.
14015 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14017 * icall.c: added Socket.WSAIoctl icall.
14019 * socket-io.[ch]: implemented
14020 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
14022 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
14024 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
14026 2004-02-18 Urs C Muff <umuff@quark.com>
14028 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
14029 this work on PPC and other big-endian architectures.
14031 * debug-mono-symfile.h: Prepended the names of all the `guint32'
14032 fields with an underscore to make sure they're only accessed by
14033 the read32() macro.
14035 2004-02-18 Martin Baulig <martin@ximian.com>
14037 * icall.c: Put the klass->refclass changes back for methods and
14038 fields, but not for properties and events. We're currently not
14039 distinguishing between DeclaringType and ReflectedType for
14040 properties and events, that's what caused the regressions.
14042 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14045 (mono_async_result_new): the handle can be NULL.
14047 * threadpool.c: Use an event instead of a semaphore, don't initialize
14048 it until needed. This saves quite a few semaphores from being created
14049 when using the threadpool.
14051 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
14053 * object.c (mono_string_is_interned_lookup): Fix interning of long
14054 strings. Fixes #54473.
14056 * domain.c (ldstr_equal): Optimize if the two strings are equal.
14058 * icall.c: Revert the klass->refclass changes since they introduce
14059 regressions (bug #54518).
14061 2004-02-18 Martin Baulig <martin@ximian.com>
14063 * class.c (mono_class_init): If we're a generic instance and don't
14064 come from a TypeBuilder, inflate our members here.
14065 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
14066 (mono_class_create_generic): New public method.
14067 (mono_class_initialize_generic): Removed.
14068 (get_instantiation_name): Renamed to
14069 _mono_class_get_instantiation_name() and made it public.
14071 2004-02-18 Martin Baulig <martin@ximian.com>
14073 * class.c (mono_class_inflate_generic_type): Clear the new
14074 instance's `nginst->klass' when inflating a generic instance.
14075 (mono_class_is_subclass_of): Added (basic) support for generic
14078 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
14080 * appdomain.h, domain.c: use a MonoCodeManager instead of a
14081 MonoMempool to hold compiled native code.
14083 2004-02-17 Martin Baulig <martin@ximian.com>
14085 * class.h (MonoDynamicGenericInst): Added `count_properties' and
14088 * reflection.c (mono_reflection_generic_inst_initialize): Added
14089 `MonoArray *properties' argument.
14091 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
14093 2004-02-17 Martin Baulig <martin@ximian.com>
14095 * icall.c (ves_icall_Type_GetFields): Renamed to
14096 ves_icall_Type_GetFields_internal() and added a
14097 `MonoReflectionType *rtype' argument; pass it to
14098 mono_field_get_object() to set the field's "reflected" type.
14099 (ves_icall_Type_GetConstructors): Likewise.
14100 (ves_icall_Type_GetEvents): Likewise.
14101 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
14102 argument; pass it to mono_method_get_object() to set the method's
14105 2004-02-17 Martin Baulig <martin@ximian.com>
14107 * class.h (MonoDynamicGenericInst): New type.
14108 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
14110 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
14111 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
14112 (ves_icall_MonoGenericInst_GetFields): New interncall.
14114 * class.c (mono_class_from_generic): Don't call
14115 mono_class_initialize_generic() if this is a dynamic instance;
14116 ie. it's being created from a TypeBuilder.
14117 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
14118 `class->byval_arg.type'.
14120 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
14121 to `inflate_method' and made static.
14122 (mono_reflection_inflate_field): Removed.
14123 (mono_reflection_generic_inst_initialize): New public method.
14125 * reflection.h (MonoReflectionGenericInst): Removed `methods',
14126 `ctors' and `fields'; added `initialized'.
14128 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
14130 * debug-helpers.c (mono_method_full_name): Fix output for empty
14133 2004-02-12 Martin Baulig <martin@ximian.com>
14135 * class.h (MonoClassField): Added `MonoType *generic_type'.
14137 * reflection.c (mono_image_get_fieldref_token): Added support for
14138 instantiated generic types.
14139 (field_encode_inflated_field): Removed.
14140 (mono_image_get_inflated_field_token): Removed.
14141 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
14143 * reflection.h (MonoReflectionInflatedField): Removed.
14145 2004-02-12 Martin Baulig <martin@ximian.com>
14147 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
14148 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
14150 * reflection.c (mono_image_get_methodspec_token): Take a
14151 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
14152 (mono_image_create_token): Check whether we have a
14153 `method->signature->gen_method' and call
14154 mono_image_get_methodspec_token() if appropriate.
14155 (inflated_method_get_object): Removed.
14156 (mono_reflection_bind_generic_method_parameters): Return a
14157 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
14158 (mono_reflection_inflate_method_or_ctor): Likewise.
14160 * reflection.h (MonoReflectionInflatedMethod): Removed.
14162 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
14164 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
14165 for custom valuetype marshalling.
14167 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
14169 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14171 * icall.c: fixed WSAGetLastError_internal name.
14173 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
14175 * threads.c (mono_thread_attach): Allow this to be called multiple
14176 times for a thread.
14178 * threads.c (build_wait_tids): Do not wait for ourselves.
14180 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
14181 appdomain list is empty.
14183 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
14184 memory returned by mono_string_builder_to_utf16, since it points into
14185 managed memory. Thanks to Bernie Solomon for noticing this.
14187 * icall.c: Add AppDomainSetup icalls.
14189 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
14191 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
14194 * reflection.c (reflection_methodbuilder_to_mono_method): Save
14195 custom attributes to the method_aux struct. Also fix array indexes etc.
14197 * loader.c (mono_method_get_param_names): Make dynamic case work again.
14199 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
14201 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
14202 (both static and runtime) and reduce startup time.
14204 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
14206 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
14207 AsAny marshalling conversion instead of crashing.
14209 * marshal.c: Fix warnings.
14211 2004-02-09 Martin Baulig <martin@ximian.com>
14213 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
14215 * reflection.h (MonoReflectionInflatedMethod): Removed the
14216 `declaring' field, it's now in the unmanaged MonoGenericMethod.
14218 * reflection.c (method_encode_methodspec): Removed the `method'
14219 argument; we get it from `gmethod->declaring'.
14220 (inflated_method_get_object): Removed the `declaring' argument.
14222 2004-02-09 Martin Baulig <martin@ximian.com>
14224 * class.h (MonoGenericMethod): New type.
14225 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
14228 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
14229 a `MonoGenericMethod *gen_method' one.
14231 * class.c (mono_class_inflate_generic_type): Take an additional
14232 `MonoGenericMethod * argument. This is only non-NULL if we're
14233 inflating types for a generic method.
14234 (mono_class_inflate_generic_signature): Renamed to
14235 inflate_generic_signature() and made static; take a
14236 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
14237 (inflate_generic_header): Take a `MonoGenericMethod *' argument
14238 instead of a `MonoGenericInst *' one.
14239 (mono_class_inflate_generic_method): Likewise.
14241 * reflection.c (encode_generic_method_sig): Take a
14242 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
14243 (method_encode_methodspec): Likewise.
14244 (inflated_method_get_object): Likewise.
14246 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
14247 field with a `MonoGenericMethod *gmethod' one.
14249 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
14251 * class.h (mono_class_has_parent): add parens to expansion
14254 2004-02-08 Martin Baulig <martin@ximian.com>
14256 * image.h (MonoImage): Removed `generics_cache'.
14258 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
14259 instead of a `MonoType *' argument; removed the `inflate_methods'
14260 argument. Don't inflate methods here.
14262 * loader.c (find_method): If it's a generic instance, call
14263 mono_class_init() on the `sclass->generic_inst->generic_type'.
14265 * metadata.c (mono_type_size): Make this work on uninitialized
14266 generic instances; call it on the `ginst->generic_type's class.
14268 * reflection.c (mono_reflection_bind_generic_parameters): Call
14269 mono_class_from_generic() to create the `ginst->klass'.
14271 2004-02-08 Martin Baulig <martin@ximian.com>
14273 * class.h (MonoClass): Changed type of `generic_inst' from
14274 `MonoType *' to `MonoGenericInst *'.
14276 2004-02-08 Martin Baulig <martin@ximian.com>
14278 * icall.c (ves_icall_Type_BindGenericParameters): Just call
14279 mono_type_get_object(), this is now creating a `MonoGenericInst'
14280 for MONO_TYPE_GENERICINST.
14281 (ves_icall_MonoGenericInst_GetParentType): Likewise.
14282 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
14284 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
14285 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
14286 (inflated_method_get_object): Added `MonoClass *refclass' argument.
14287 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
14288 and reflected type.
14290 * reflection.h (MonoReflectionInflatedMethod): Removed
14291 `declaring_type' and `reflected_type'.
14293 2004-02-08 Martin Baulig <martin@ximian.com>
14295 * class.h (MonoGenericInst): Added `MonoType *parent' and
14296 `MonoType **ifaces'.
14298 * reflection.h (MonoReflectionGenericInst): Removed `klass',
14299 `parent' and `interfaces'.
14301 * reflection.c (mono_reflection_bind_generic_parameters): Take a
14302 `MonoType *' argument and return a `MonoType *'.
14305 (ves_icall_MonoGenericInst_GetParentType): New interncall.
14306 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
14308 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
14310 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
14311 valuetype marshalling.
14313 2004-02-06 Martin Baulig <martin@ximian.com>
14316 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
14317 (my_mono_class_from_generic_parameter): Likewise.
14319 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
14321 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
14322 contents of the symbol files lazily.
14324 * object.h (MonoThread): Add 'name' and 'name_len' fields.
14326 * threads.h threads.c icall.c: New icalls for getting and setting the
14329 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
14331 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
14332 Raise an exception when the domain is not found.
14334 2004-02-03 Martin Baulig <martin@ximian.com>
14336 * reflection.c (mono_image_get_methodspec_token): Use the
14337 uninflated signature; fixes gen-33.
14339 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
14341 * gc.c threads.c: Make the finalizer thread a normal managed thread so
14342 the finalizer code can use thread functionality.
14344 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
14345 the finalizer thread.
14347 * threads.c: Make some functions more robust.
14349 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
14351 * metadata.h: Add new marshalling conventions.
14353 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
14354 stringbuilder marshalling. Fixes #53700.
14356 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
14358 * reflection.c (mono_image_get_type_info): Save declarative security
14361 * reflection.c (mono_image_get_field_info): Handle uninitialized
14362 unmanaged fields as well.
14364 * appdomain.c: Bump corlib version.
14366 2004-02-01 Martin Baulig <martin@ximian.com>
14368 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
14369 method type arguments.
14371 2004-01-30 Duncan Mak <duncan@ximian.com>
14373 * marshal.h: Add prototype for
14374 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
14376 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
14379 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
14381 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
14382 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
14384 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
14386 * marshal.c (mono_marshal_get_native_wrapper): Add support for
14387 custom marshalling of valuetypes.
14389 * marshal.c: Fix some warnings.
14391 2004-01-29 Martin Baulig <martin@ximian.com>
14393 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
14394 for generic method parameters.
14396 * reflection.c (method_encode_methodspec): Write the uninflated
14397 signature into the methodspec table.
14398 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
14399 is always the uninflated method.
14400 (reflection_methodbuilder_to_mono_method): Copy the generic
14401 parameters from the MethodBuilder into `header->gen_params'.
14403 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
14405 * class.c (mono_class_from_generic_parameter): Fix warning.
14407 2004-01-27 Martin Baulig <martin@ximian.com>
14409 * class.c (mono_class_from_generic_parameter): Don't create
14410 `klass->methods' here.
14412 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
14414 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
14415 extension since it does not work with libraries named lib<FOO>.dll.so.
14417 2004-01-25 Martin Baulig <martin@ximian.com>
14419 * class.c (mono_class_inflate_generic_type): Added support for
14420 MONO_TYPE_GENERICINST.
14422 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
14423 inflate methods on open constructed types.
14425 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14427 * object.c: fire ProcessExit event in the root AppDomain after running
14428 Main. Fixes bug #53299.
14430 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
14432 * socket-io.c: include the new socket-wrappers.h header.
14433 Use the wrappers instead of the unix socket functions to make the code
14436 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
14438 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
14440 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
14443 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
14445 * reflection.c (mono_image_create_pefile): Handle the case when the
14446 entry point is not a MethodBuilder.
14448 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
14449 field to ReflectionMethod since it is not allways a builder.
14451 * reflection.c (type_get_fully_qualified_name): New helper function to
14452 return the fully qualified name of a type.
14454 * reflection.c (encode_marshal_blob): Always emit the fully qualified
14455 type name for custom marshallers.
14457 * reflection.c (mono_marshal_spec_from_builder): Ditto.
14459 * class.c (mono_class_setup_vtable): If a parent class already
14460 implements an interface, use the implementing methods from that class.
14463 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14465 * threadpool.c: just return instead of ExitThread to allow for thread
14468 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
14470 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
14471 when closing resource modules.
14473 * reflection.c (mono_image_create_pefile): Handle the case when the
14474 entry point is not a MethodBuilder.
14476 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
14477 field to ReflectionMethod since it is not allways a builder.
14479 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
14481 * marshal.c (mono_marshal_get_managed_wrapper):
14482 mono_marshal_alloc takes native int so CONV_I
14483 the arg for 64bits.
14485 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
14487 * reflection.c (fixup_cattrs): New function to fixup the methoddef
14488 tokens in the cattr table. Fixes #53108.
14490 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14492 * loader.c: don't trim ".dll" before looking up in the config file.
14493 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
14495 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
14497 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
14498 Return the module which contains the resource as well.
14499 (ves_icall_System_Reflection_Module_Close): New icall.
14501 * appdomain.c: Bump corlib version number.
14503 * image.c (mono_image_addref): New public function.
14505 * assembly.c: Call mono_image_addref.
14507 * reflection.c (mono_module_get_object): Increase reference count of
14510 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
14513 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
14514 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
14515 proper exceptions on DllImport problems.
14517 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
14519 * class.c, metadata.c: eliminate CSIZE macro.
14521 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
14523 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
14524 * object.h: Added async_callback field in MonoAsyncResult.
14525 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
14526 * verify.c: Added async_callback in MonoAsyncResult layout.
14528 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
14530 * reflection.c (mono_reflection_get_custom_attrs): Add support
14533 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
14535 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
14537 (mono_marshal_method_from_wrapper): Add null pointer check.
14539 2004-01-16 Martin Baulig <martin@ximian.com>
14541 * debug-mono-symfile.h: Set version number to 36 and reflect
14542 latest symbol writer changes.
14544 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
14546 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
14547 multi-dimensional arrays.
14548 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
14549 (mono_class_from_mono_type): Use bounded_array_class_get.
14551 * class.c (mono_bounded_array_class_get): New function which takes
14552 a 'bounded' bool argument to distinguish vectors from one dimensional
14555 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
14556 bounded_array_class_get if the array has bounds.
14558 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
14559 Search modules loaded using AssemblyBuilder:AddModule as well.
14561 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14563 * appdomain.c: increased corlib version.
14564 * filewatcher.c: removed g_print.
14566 (get_property_info): only allocate what is actually requested.
14567 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
14569 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14571 * Makefile.am: added filewatcher.[ch]
14572 * filewatcher.[ch]: FileSystemWatcher runtime support.
14573 * icall.c: added new FSW icalls.
14575 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
14577 * string-icalls.c: fix stringbuilder regression as suggested by
14578 Iain McCoy <iain@mccoy.id.au>.
14580 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
14582 * process.c (process_read_stringtable_block): Recognize '007f' as
14583 a language neutral stringtable block.
14585 2004-01-12 Patrik Torstensson
14587 * object.h (MonoStringBuilder) : Changed layout to support our
14588 new stringbuilder class.
14589 * marshal.c: Change marshalling to support the new layout of
14591 * appdomain.c: increased version number because new layout of
14594 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
14596 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
14597 assembly name as an string instead of an AssemblyName, since it is
14598 easier to extract info from it.
14600 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
14601 the culture subdirectories too. Fixes #52231.
14603 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14605 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
14606 It takes 2 new parameters with an optional name for the method to look
14607 for and case ignoring info.
14609 * threadpool.c: removed unused variable.
14611 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14613 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
14614 It takes 2 new parameters with an optional name for the property to look
14615 for and case ignoring info.
14618 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
14620 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
14623 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14626 * assembly.c: escape the uri before passing it to g_filename_from_uri.
14629 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
14631 * reflection.c: Add support for more than one unmanaged resource.
14633 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
14634 in field->def_value, as done in all other cases.
14636 * reflection.c (mono_reflection_get_custom_attrs): Add support for
14639 * reflection.c (mono_reflection_create_runtime_class): Remove
14640 errorneous assignment to klass->element_class, since it is already
14641 done in mono_reflection_setup_internal_class.
14643 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14645 * gc.c: added missing LeaveCriticalSection.
14646 * icall.c: indented a couple of lines.
14647 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
14648 if we call EndInvoke inside a callback. Fixes bug #52601.
14650 2004-01-07 Martin Baulig <martin@ximian.com>
14652 * mono-debug-debugger.h
14653 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
14655 2004-01-06 Miguel de Icaza <miguel@ximian.com>
14657 * appdomain.c: Use messages in NotImplementedException.
14659 * exception.c (mono_get_exception_not_implemented): Now this takes
14660 a message argument.
14662 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
14663 exception instead of g_asserting an aborting when something is not
14666 Add some inline docs.
14668 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
14670 * reflection.h: Update after changes to object layout.
14672 * reflection.c: Implement saving of unmanaged aka win32 resources.
14674 * appdomain.c: Bump version number.
14676 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
14677 Handle missing domains gracefully.
14679 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
14681 * file-io.c : On Windows, there are much more invalid_path_chars.
14683 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
14685 * class.h, object.c: prepare for GetType () speedup.
14687 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
14689 * profiler.c: workaround for --profile null reference exception on
14690 cygwin. Patch by Patrik Torstensson.
14692 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
14694 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
14695 make work for unaligned access.
14697 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
14699 * class.c: small cleanup (class->fields [i] -> field).
14700 * image.c: check address of metadata is valid.
14702 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
14704 * assembly.h assembly.c (mono_assembly_loaded): New public function to
14705 search the list of loaded assemblies.
14707 * reflection.c (mono_reflection_type_from_name): Use
14708 mono_assembly_loaded instead of mono_image_loaded.
14710 * reflection.c: Fix warnings.
14712 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
14714 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
14715 is dynamic. This is needed since an assembly can contain both dynamic and
14716 non-dynamic images.
14718 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
14721 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
14723 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
14724 to store modules loaded using AddModule.
14726 * reflection.c (mono_image_fill_file_table): Generalize this so it works
14729 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
14731 * reflection.c (mono_image_fill_export_table_from_module): New function to
14732 fill out the EXPORTEDTYPES table from a module.
14734 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
14735 into a separate function. Also handle loaded non-dynamic modules.
14737 * reflection.c (mono_image_basic_init): Fix memory allocation.
14739 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14741 * assembly.c (mono_assembly_load_references): Make this public.
14743 2003-12-19 Martin Baulig <martin@ximian.com>
14745 * class.c (mono_class_initialize_generic): Made this static, take
14746 a `MonoGenericInst *' instead of a `MonoClass *'.
14747 (mono_class_from_generic): Call mono_class_initialize_generic()
14748 unless we're already initialized or being called from
14749 do_mono_metadata_parse_generic_inst().
14751 * class.h (MonoGenericInst): Added `initialized' and
14752 `init_pending' flags.
14754 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
14755 `mono_class_init (gklass)' or mono_class_initialize_generic()
14756 here; set `generic_inst->init_pending' while parsing the
14759 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
14761 * locales.c: include string.h for memxxx prototypes
14763 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
14765 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
14766 constructor when accessing literal fields.
14768 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
14770 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14772 * reflection.c (assembly_add_resource_manifest): New function to fill
14773 the MANIFESTRESOURCE table.
14775 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
14777 * reflection.h: Update to changes in class layout.
14779 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
14780 Reenable call to mono_runtime_is_shutting_down ().
14782 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
14783 determine if the runtime is shutting down.
14785 2003-12-16 Jackson Harper <jackson@ximian.com>
14787 * icall.c: comment out call to mono_runtime_is_shutting_down to
14790 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
14792 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
14793 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
14795 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
14797 * reflection.c: move definition of swap_with_size
14798 to before its first call
14800 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
14802 * appdomain.c (mono_runtime_is_shutting_down): New public function.
14804 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
14807 * object.c: Fix warnings.
14809 * icall.c (ves_icall_Type_Get...): Only consider inherited static
14810 members if FlattenHierarchy is set.
14812 * reflection.c (mono_image_add_decl_security): New function to emit
14813 declarative security.
14815 * reflection.h reflection.c: Add support for declarative security.
14817 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
14819 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
14821 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
14823 * appdomain.c verify.c: Moved corlib version checking into its own
14824 function in appdomain.c since it needs to create vtables etc.
14826 2003-12-13 Patrik Torstensson <p@rxc.se>
14828 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
14829 instead of unwrapped server.
14831 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
14833 * verify.c (check_corlib): Fix field index.
14835 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
14837 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
14840 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
14842 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
14843 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
14844 cope with sizeof(size_t) != sizeof(guint32).
14846 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14848 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
14849 in case of failure.
14851 2003-12-10 Mark Crichton <crichton@gimp.org>
14853 * icall.c: removed the GetNonZeroBytes. We now handle this case
14856 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
14858 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
14860 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
14863 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
14865 * verify.c (check_corlib): Handle the case when the version field is
14866 initialized by a static constructor.
14868 2003-12-08 Patrik Torstensson <p@rxc.se>
14870 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
14872 2003-12-08 Martin Baulig <martin@ximian.com>
14874 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
14875 a MonoReflectionGenericParameter, also take the parameter index
14876 and name as arguments.
14877 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
14878 (ves_icall_MonoGenericParam_initialize): New interncall.
14879 (ves_icall_Type_make_byref_type): New interncall.
14881 * reflection.h (MonoReflectionGenericParam): Derive from
14882 MonoReflectionType, not just from MonoObject. Added `refobj' and
14885 * reflection.c (mono_reflection_define_generic_parameter): Create
14886 and return a new MonoReflectionGenericParam; don't initialize the
14888 (mono_reflection_initialize_generic_parameter): New public method;
14889 initializes the constraints and creates the `param->pklass'.
14891 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
14893 * reflection.h reflection.c: Use the new fields 'num_types',
14894 'num_fields' and 'num_methods' to track the number of types etc.
14896 * verify.c (check_corlib): Check corlib version number.
14898 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
14900 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
14901 function works on all methods.
14903 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
14905 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
14906 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
14907 the custom_type_info flag of the transparent proxy.
14908 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
14909 objects that supports IRemotingTypeInfo.
14910 * object.h: Added custom_type_info field in transparent proxy.
14912 2003-12-06 Martin Baulig <martin@ximian.com>
14914 * class.c (mono_class_create_from_generic): Removed.
14915 (mono_class_from_generic): Check `ginst->klass' before doing
14916 anything else. This is important to fully support "recursive"
14919 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
14920 empty `generic_inst->klass' before doing anything else.
14922 2003-12-06 Dick Porter <dick@ximian.com>
14927 * locales.c: Use C structs to access class fields. Don't do a
14928 conversion between MonoString and UChar because both are
14929 platform-endian UTF-16. Compare now takes startindex and count
14930 parameters. Add a char overload for IndexOf. Speed up the
14931 invariant string IndexOf.
14933 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
14935 * Makefile.am (monosn_LDADD): Fix parallel build.
14937 2003-12-04 Martin Baulig <martin@ximian.com>
14940 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
14941 (ves_icall_Type_make_array_type): New interncall.
14943 2003-12-04 Martin Baulig <martin@ximian.com>
14945 * locales.c: also change it in the !HAVE_ICU case.
14947 2003-12-04 Dick Porter <dick@ximian.com>
14950 * locales.c: construct_compareinfo is now in CompareInfo, not
14953 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
14955 * image.c (mono_image_load_file_for_image): Cache loaded images in the
14956 image->files array.
14958 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
14961 * assembly.c (mono_assembly_load_references): Only load references
14964 * class.c (mono_class_from_name): Avoid linear search of the
14965 EXPORTEDTYPE table.
14967 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
14969 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
14971 * image.h (MonoImage): Add 'field_cache' field.
14973 * loader.c (mono_field_from_token): Cache field lookups.
14975 * reflection.c (mono_module_get_object): Fix name property.
14977 * icall.c (ves_icall_get_enum_info): Update after changes to
14978 mono_metadata_get_constant_index ().
14980 * icall.c: Get rid of get_type_info icall, use a separate icall for
14981 each type property to avoid needless memory allocations. Fixes #51514.
14983 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
14984 to avoid needless binary searches.
14986 * class.c (class_compute_field_layout): Move the initialization of
14987 field->def_value to mono_class_vtable ().
14989 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
14992 * object.c (mono_object_allocate): Make it inline.
14994 * object.c (mono_object_allocate_spec): Make it inline.
14996 2003-12-02 Dick Porter <dick@ximian.com>
14998 * locales.c (create_NumberFormat): NumberFormatInfo construction.
14999 Patch by Mohammad DAMT (mdamt@cdl2000.com).
15001 2003-12-01 Dick Porter <dick@ximian.com>
15003 * threads.c: Fix signature and call in CreateMutex and
15006 2003-12-01 Dick Porter <dick@ximian.com>
15009 * locales.c: Implement string compares and searching
15011 * object.h: Add extra Thread field
15013 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
15015 * reflection.c (fixup_method): Add support for MonoCMethod.
15017 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
15019 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
15021 * reflection.c (assembly_name_to_aname): Allow extra characters in
15022 assembly names. Fixes #51468.
15024 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
15026 * exception.c (mono_exception_from_name_domain): New helper function.
15028 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
15029 exception object in the correct domain.
15031 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
15032 formatting + make a copy a the input data.
15034 * loader.c (mono_get_method_from_token): Methods which contain
15035 native code do not have entries in the ImplMap.
15037 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
15038 Thanks to Gonzalo for spotting this.
15040 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
15041 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
15043 * assembly.h (mono_assembly_load_from): Split the second part of
15044 assembly loading into a new public function.
15046 * exception.h (mono_get_exception_bad_image_format): New function.
15048 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
15050 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
15051 Enumerate all modules inside a dynamic assembly. Fixes #51293.
15053 * icall.c: Add new icall for creating dynamic methods.
15055 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
15057 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
15059 * reflection.c (mono_reflection_create_dynamic_method): New icall to
15060 create a dynamic method.
15062 * reflection.c (resolve_object): New helper function.
15064 * reflection.c: Generalize ReflectionMethodBuilder and the functions
15065 which manipulate it so they can also work on dynamic methods.
15067 * reflection.c (reflection_method_builder_to_mono_method): Avoid
15068 creating the MonoReflectionMethodAux structure if it is not needed.
15070 * reflection.h verify.c: Update after changes to object layout.
15072 * reflection.c (method_builder_encode_signature): Fix compilation on
15075 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
15077 * appdomain.h: Added support for context static fields. Added static_data
15078 field to MonoAppContext and renamed thread_static_fields to a more
15079 generic special_static_fields in MonoAppDomain, since it can now contain
15080 context static fields.
15081 * domain.c: Updated hashtable name.
15082 * object.c: Replaced field_is_thread_static() for a more generic
15083 field_is_special_static() which also checks for context static attribute.
15084 In mono_class_vtable(), added support for static context fields.
15085 * threads.c: Changed methods that manage thread static fields to more
15086 generic methods so they can be reused both for thread and context static
15088 * threads.h: Declared some new methods.
15090 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
15092 * reflection.h: Update after changes to the managed types.
15094 * reflection.c (encode_custom_modifiers): New helper function.
15096 * reflection.c (method_encode_signature): Emit custom modifiers.
15098 * reflection.c (field_encode_signature): Emit custom modifiers.
15100 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
15102 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
15104 * icall.c (ves_icall_System_ValueType_Equals): New optimized
15107 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
15110 * object.c (mono_field_get_value_object): New function.
15112 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
15115 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
15117 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
15118 return a preallocated out-of-memory exception instance.
15120 * object.c (out_of_memory): Use the new function.
15122 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
15123 flag is before the custom modifiers. Fixes #49802.
15125 2003-11-16 Martin Baulig <martin@ximian.com>
15127 * class.c (mono_class_is_open_constructed_type): Implemented the
15128 MONO_TYPE_GENERICINST case.
15130 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
15132 * assembly.c (mono_assembly_fill_assembly_name): New function to
15133 fill out the MonoAssemblyName structure.
15134 (mono_assembly_open): Use the new function.
15136 * icall.c (fill_reflection_assembly_name): New helper function.
15138 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
15141 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
15143 2003-11-15 Martin Baulig <martin@ximian.com>
15145 * class.c (mono_class_is_open_constructed_type): New public
15146 function; checks whether a type is an open constructed type,
15147 ie. whether it still contains type parameters.
15148 (mono_class_inflate_generic_type): If we're a type parameter and
15149 the inflated type is also a MONO_TYPE_(M)VAR, return the original
15152 * class.h (MonoGenericInst): Added `guint32 is_open'.
15154 * loader.c (method_from_methodspec): Check whether we're an open
15155 or closed constructed type and set `ginst->is_open'.
15157 * reflection.c (mono_reflection_bind_generic_parameters): Check
15158 whether we're an open or closed constructed type and set
15160 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
15161 from open constructed types.
15163 2003-11-15 Martin Baulig <martin@ximian.com>
15165 * reflection.c (mono_reflection_bind_generic_parameters): If we're
15166 a generic instance (instead of a generic type declaration) with
15167 unbound generic parameters, bind them to our actual types.
15169 2003-11-14 Martin Baulig <martin@ximian.com>
15171 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
15173 * reflection.c (mono_reflection_bind_generic_parameters): If we're
15174 an interface type, populate `res->interfaces' with instantiated
15175 versions of all the interfaces we inherit.
15177 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
15179 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
15180 when MONO_PATH is set but doesn't contain the install dir.
15182 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15185 (ves_icall_Type_GetInterfaces): don't return an interface twice when
15186 it's also implemented in base classes. Fixes bug #50927.
15188 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
15190 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
15191 if this method is called from a finalizer. Fixes #50913.
15193 2003-11-12 Miguel de Icaza <miguel@ximian.com>
15195 * threads.c: Implement VolatileRead/VolatileWrite
15197 * icall.c: Add new icalls for VolatileRead/VolatileWrite
15199 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
15201 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
15202 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
15205 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
15206 from Peter Ross (pro@missioncriticalit.com).
15208 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
15210 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
15212 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
15214 * assembly.c (mono_assembly_load_references): Disable check because it
15215 triggers on older corlibs which lots of people have.
15217 2003-11-12 Jackson Harper <jackson@ximian.com>
15219 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
15220 load corlib.dll if mscorlib.dll is not found.
15221 * assembly.h: Remove corlib name define.
15224 * image.c: Change corlib name to mscorlib.
15226 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
15228 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
15230 2003-11-11 Miguel de Icaza <miguel@ximian.com>
15232 * appdomain.h: Added loader_optimization here to sync with the C#
15233 code, and add disallow_binding_redirects field.
15235 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
15237 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
15239 * reflection.c (mono_image_build_metadata): Fix crash on modules
15242 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
15244 * icall.c (ves_icall_get_method_info): Return callingConvention as
15247 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
15248 namespaces from the EXPORTEDTYPE table as well.
15250 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
15251 from all modules inside the assembly.
15253 2003-11-11 Martin Baulig <martin@ximian.com>
15255 * reflection.c (mono_reflection_bind_generic_parameters): Make
15256 this work for interfaces.
15258 2003-11-11 Martin Baulig <martin@ximian.com>
15260 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
15262 2003-11-11 Martin Baulig <martin@ximian.com>
15264 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
15265 "MonoInflatedMethod" and "MonoInflatedCtor".
15267 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
15269 * reflection.c (resolution_scope_from_image): Use the assembly table
15270 from the manifest module, since other modules don't have it.
15272 * debug-helpers.c (mono_type_full_name): New helper function.
15274 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
15276 * image.c (mono_image_load_file_for_image): New public function which
15277 is a replacement for the load_file_for_image in class.c.
15279 * assembly.c (mono_assembly_load_module): A wrapper for the function
15280 above which does assembly association and reference loading too.
15282 * class.c (mono_class_from_name): Call mono_assembly_load_module.
15284 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15286 * appdomain.c: not all of the attributes for the full assembly name
15287 are required and the order doesn't matter. Fixes bug #50787.
15289 2003-11-10 Dick Porter <dick@ximian.com>
15291 * locales.c: Use platform-endian UTF16
15293 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
15295 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
15297 2003-11-10 Martin Baulig <martin@ximian.com>
15300 (mono_metadata_load_generic_params): Make this actually work.
15302 * reflection.c (mono_reflection_bind_generic_parameters): If our
15303 parent is a generic instance, pass all the `types' to it, no
15304 matter whether it has the same number of type parameters or not.
15306 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
15308 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
15310 * assembly.c (mono_assembly_load_references): Move the image<->assembly
15311 assignment code to this function so it gets called recursively for all
15314 * image.c (load_modules): Remove the assembly assignment since it is
15315 now done by mono_assembly_load_references.
15317 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
15318 Add 'module' argument.
15319 (mono_module_get_types): New helper function.
15320 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
15322 2003-11-08 Martin Baulig <martin@ximian.com>
15324 * class.c (mono_class_inflate_generic_method): Interface method
15325 don't have a header.
15327 * reflection.c (mono_image_get_methodspec_token): Take an
15328 additional `MonoGenericInst *' argument instead of reading it from
15329 the header; this is necessary to support interfaces.
15330 (mono_image_create_token): Pass the `MonoGenericInst *' from the
15331 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
15332 (inflated_method_get_object): Take an additional `MonoGenericInst *'
15335 * reflection.h (MonoReflectionInflatedMethod): Added
15336 `MonoGenericInst *ginst'.
15338 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
15340 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
15342 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
15344 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
15346 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
15349 (reflection_methodbuilder_from_method_builder):
15350 (reflection_methodbuilder_from_ctor_builder): New helper functions to
15351 initialize a ReflectionMethodBuilder structure.
15352 (mono_image_get_methodbuilder_token):
15353 (mono_image_get_ctorbuilder_token): New functions to emit memberref
15354 tokens which point to types in another module inside the same assembly.
15356 * reflection.c: Use the new helper functions.
15358 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
15360 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
15361 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
15363 * reflection.c (resolution_scope_from_image): Emit a moduleref if
15366 * reflection.c (mono_image_build_metadata): Emit metadata only for the
15367 current module. Emit the manifest only for the main module.
15369 * reflection.c (mono_image_create_token): Add assertion when a
15370 memberref needs to be created.
15372 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
15374 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
15375 larger buffer for the custom attribute blob. Fixes #50637.
15377 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15379 * threadpool.c: notify listener on async processing handles after
15380 invoking the async callback. Thanks to Zoltan.
15382 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
15384 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
15385 avoid code duplication.
15387 * reflection.h (MonoDynamicImage): New type which is currently unused,
15388 but will be used through the ref.emit code in place of
15389 MonoDynamicAssembly.
15391 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
15394 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
15395 a MonoDynamicImage instead of just a MonoImage.
15397 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
15398 icalls to ModuleBuilder but keep their semantics, so they will work
15399 with moduleb->assemblyb. This will change later.
15401 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
15403 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
15406 * reflection.c (mono_image_build_metadata): Avoid creation of a default
15407 main module, since it is now done by the managed code.
15409 2003-11-03 Martin Baulig <martin@ximian.com>
15411 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
15412 `ginst->klass' here.
15413 (method_encode_methodspec): Don't use the `ginst->generic_method's
15414 klass if it's a generic instance, use `ginst->klass' in this case.
15416 2003-11-03 Martin Baulig <martin@ximian.com>
15418 * reflection.c (mono_image_get_generic_method_param_info):
15419 Removed, use mono_image_get_generic_param_info() instead.
15420 (mono_image_get_type_info): Write the GenericParam table before
15421 the Method table. This is neccessary because in the GenericParam
15422 table, type parameters of the class (ie. '!0' etc.) must come
15423 before the ones from its generic methods (ie. '!!0' etc).
15425 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
15427 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
15429 2003-11-02 Martin Baulig <martin@ximian.com>
15431 * reflection.c (create_generic_typespec): Take a
15432 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
15433 the generic parameters from it.
15435 2003-11-02 Martin Baulig <martin@ximian.com>
15437 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
15438 instead of a `MonoClassField *' since we just need the type.
15439 (create_generic_typespec): New static function. Creates a
15440 TypeSpec token for a generic type declaration.
15441 (mono_image_get_generic_field_token): New static function.
15442 (mono_image_create_token): If we're a FieldBuilder in a generic
15443 type declaration, call mono_image_get_generic_field_token() to get
15446 2003-11-02 Martin Baulig <martin@ximian.com>
15449 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
15450 `MonoReflectionGenericInst *declaring_type' and
15451 `MonoReflectionGenericInst *reflected_type' fields.
15453 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
15454 `MonoReflectionGenericInst *declaring_type' and a
15455 `MonoReflectionGenericInst *reflected_type' argument instead of a
15456 single `MonoReflectionGenericInst *type' one. Set
15457 `res->declaring_type' and `res->reflected_type' from them.
15458 (mono_reflection_inflate_field): Likewise.
15460 2003-11-02 Martin Baulig <martin@ximian.com>
15462 * class.c (mono_class_setup_vtable): Don't store generic methods
15465 2003-11-02 Martin Baulig <martin@ximian.com>
15467 * reflection.h (MonoReflectionGenericInst): Added
15468 `MonoReflectionType *declaring_type'.
15470 * reflection.c (mono_reflection_bind_generic_parameters): Use
15471 `if (tb->parent)' instead of `klass->parent'.
15473 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
15475 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
15476 with an empty ASSEMBLY table.
15478 * reflection.c (mono_image_build_metadata): Avoid using the same loop
15479 variable in the inner and outer loops.
15481 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
15483 * metadata.h (mono_metadata_make_token): Put parentheses around macro
15486 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
15488 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
15489 icalls. Instead, do everything in managed code. This is needed since
15490 it is hard to restore the original domain etc. in unmanaged code in the
15491 presence of undeniable exceptions.
15493 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
15494 New icalls to push and pop appdomain refs.
15496 2003-10-31 Martin Baulig <martin@ximian.com>
15498 * class.c (inflate_generic_type): Renamed to
15499 mono_class_inflate_generic_type() and made it public.
15501 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
15504 * loader.c (mono_field_from_memberref): Also set the retklass for
15507 * fielder.c (mono_image_get_inflated_field_token): New static
15508 method; creates a metadata token for an inflated field.
15509 (mono_image_create_token, fixup_method): Added support for
15510 "MonoInflatedField".
15511 (fieldbuilder_to_mono_class_field): New static function.
15512 (mono_reflection_inflate_field): New public function.
15515 (MonoReflectionGenericInst): Added `MonoArray *fields'.
15516 (MonoReflectionInflatedField): New typedef.
15518 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
15520 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
15521 for Solaris and other platforms without s6_addr16
15523 2003-10-30 Martin Baulig <martin@ximian.com>
15525 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
15526 argument instead of two.
15527 (mono_class_inflate_generic_signature): Likewise.
15528 (inflate_generic_header): Likewise.
15529 (mono_class_inflate_generic_method): Likewise. In addition, if
15530 `ginst->klass' is set, it becomes the new `method->klass'.
15532 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
15535 * reflection.c (encode_generic_method_sig): Write a 0xa as the
15536 first byte. [FIXME]
15537 (method_encode_methodspec): If we have generic parameters, create
15538 a MethodSpec instead of a MethodRef.
15539 (fixup_method): Added support for "MonoInflatedMethod" and
15540 "MonoInflatedCtor".
15541 (mono_image_create_token): Added support for "MonoInflatedMethod"
15542 and "MonoInflatedCtor".
15543 (inflated_method_get_object): New static function; returns a
15544 managed "System.Reflection.MonoInflatedMethod" object.
15545 (mono_reflection_bind_generic_method_parameters): Return a
15546 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
15547 (mono_reflection_inflate_method_or_ctor): Likewise.
15548 (mono_image_get_generic_method_param_info): Initialize unused
15550 (mono_image_get_generic_param_info): Likewise.
15552 * reflection.h (MonoReflectionInflatedMethod): New public
15553 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
15554 "S.R.MonoInflatedCtor" classes.
15556 * loader.c (method_from_memberref): If we're a TypeSpec and it
15557 resolves to a generic instance, inflate the method.
15559 2003-10-28 Dick Porter <dick@ximian.com>
15561 * object.c (mono_runtime_run_main): Convert command-line arguments
15562 into utf8, falling back to the user's locale encoding to do so.
15564 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
15566 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
15569 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
15571 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
15572 up icalls at method definition time. Partially fixes #33569.
15574 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
15576 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
15577 marshalling of arrays. Fixes #50116.
15579 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
15581 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
15582 points to a vtable in the dying appdomain.
15584 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
15585 listeners into unmanaged code inside the lock.
15587 * object.c (mono_class_vtable): Turn off typed allocation in non-root
15588 domains and add some comments.
15590 2003-10-25 Martin Baulig <martin@ximian.com>
15592 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
15594 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
15596 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
15597 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
15598 currently parsing. Create the generic class and store it in
15599 `generic_inst->klass' before parsing the type arguments. This is
15600 required to support "recursive" definitions; see mcs/tests/gen-23.cs
15602 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
15603 to support recursive typespec entries.
15605 * class.c (mono_class_setup_parent): If our parent is a generic
15606 instance, we may get called before it has its name set.
15607 (mono_class_from_generic): Splitted into
15608 mono_class_create_from_generic() and mono_class_initialize_generic().
15610 2003-10-25 Martin Baulig <martin@ximian.com>
15612 * icall.c (ves_icall_Type_BindGenericParameters): Return a
15613 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
15614 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
15615 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
15617 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
15618 (create_typespec): Likewise.
15619 (mono_reflection_bind_generic_parameters): Return a
15620 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
15621 (mono_reflection_inflate_method_or_ctor): New public function.
15623 * reflection.h (MonoReflectionGenericInst): New typedef.
15625 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
15627 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
15628 inside the domain lock. Fixes #49993.
15630 * object.c (mono_class_vtable): When typed allocation is used,
15631 allocate vtables in the GC heap instead of in the mempool, since the
15632 vtables contain GC descriptors which are used by the collector even
15633 after the domain owning the mempool is unloaded.
15635 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
15637 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
15638 reflect what it does. Also invalidate mempools instead of freeing
15639 them if a define is set.
15641 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
15644 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
15645 hold the finalizable objects in this domain.
15647 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
15650 * appdomain.c (mono_domain_set): New function to set the current
15651 appdomain, but only if it is not being unloaded.
15653 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
15654 appdomain which is being unloaded.
15656 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
15657 unloading of the root appdomain.
15659 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
15660 icall to execute a method in another appdomain. Intended as a
15661 replacement for InternalSetDomain, which can confuse the code
15662 generation in the JIT.
15664 * appdomain.c (mono_domain_is_unloading): New function to determine
15665 whenever an appdomain is unloading.
15667 * appdomain.c (mono_domain_unload): New function to correctly unload
15670 * assembly.c (mono_assembly_load_references): Check that an assembly
15671 does not references itself.
15673 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
15674 domain manually, it asks the finalizer thread to do it, then waits for
15675 the result. Also added a timeout.
15677 * icall.c: Register the new icalls.
15679 * threads.h threads.c: Export the mono_gc_stop_world and
15680 mono_gc_start_world functions.
15682 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
15683 function to fill out the mempool with 0x2a.
15685 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
15687 * reflection.h (MonoReflectionMethodAux): New structure to store
15688 information which is rarely used, thus is not in the MonoMethod
15691 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
15692 store the aux info.
15694 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
15695 and marshalling info into the aux structure.
15697 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
15698 from the aux structure.
15700 * loader.c (mono_method_get_param_names): Retrieve the param names from
15703 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
15705 * exception.h exception.c: Add AppDomainUnloadedException && fix
15708 2003-10-21 Dick Porter <dick@ximian.com>
15711 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
15712 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
15714 2003-10-21 Martin Baulig <martin@ximian.com>
15716 * reflection.c (mono_reflection_bind_generic_parameters):
15717 `klass->parent' is NULL for interfaces.
15719 2003-10-21 Martin Baulig <martin@ximian.com>
15721 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
15723 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
15725 * exception.c (mono_exception_from_name_msg): New helper function for
15726 creating exceptions and initializing their message field.
15728 * exception.c: Simplify functions using the new helper.
15730 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
15733 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
15734 mono_raise_exception, since otherwise gcc doesn't generate the function
15735 epilog for raise_exception, confusing the stack unwinding in the JIT.
15738 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
15739 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
15742 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15744 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
15747 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
15749 * icall.c: Removed GetUninitializedObject method because
15750 AllocateUninitializedClassInstance does the same.
15752 2003-10-18 Martin Baulig <martin@ximian.com>
15754 * class.c (inflate_generic_signature): Renamed to
15755 mono_class_inflate_generic_signature() and made it public.
15756 (my_mono_class_from_generic_parameter): New static function; if we
15757 don't already have the generic parameter's MonoClass, create a
15758 very simple one which is just used internally in the runtime and
15759 not passed back to managed code.
15761 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
15763 * metadata.h (MonoMethodSignature): Moved the
15764 `MonoGenericParam *gen_params' to the MonoMethodHeader.
15765 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
15767 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
15768 ves_icall_MonoMethod_GetGenericArguments(); this is now an
15769 interncall on the MonoMethod class, not on MethodInfo.
15770 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
15771 calling mono_reflection_bind_generic_method_parameters() directly.
15773 * loader.c (mono_method_get_signature): If this is a MethodSpec;
15774 return the already computed `method->signature'.
15775 (method_from_methodspec): New static function to load a method
15776 from a MethodSpec entry.
15777 (mono_get_method_from_token): Call the new method_from_methodspec()
15778 for MethodSpec tokens.
15779 (mono_get_method_from_token): If we're a generic method, load the
15782 * reflection.c (mono_image_get_memberref_token): Allow
15783 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
15785 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
15786 (mono_image_create_token): First check whether it's a generic
15787 method (so we'd need to create a MethodSpec), then do the other
15789 (mono_reflection_bind_generic_method_parameters): Return a
15790 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
15791 called directly from the interncall.
15793 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
15795 * reflection.c (load_public_key): Move loading of the public key
15798 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
15800 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
15803 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
15804 culture, hash_alg and public_key. Fixes #49555.
15806 2003-10-17 Martin Baulig <martin@ximian.com>
15808 * class.h (MonoGenericInst): Moved this declaration here and added
15809 `MonoMethod *generic_method'.
15812 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
15813 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
15815 * metadata.c (mono_metadata_type_equal): Two types of
15816 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
15817 index; ie. don't compare the address of the `MonoGenericParam'
15819 (mono_metadata_load_generic_params): Removed the `MonoMethod
15822 * metadata.h (MonoGenericInst): Moved declaration to class.h.
15823 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
15825 * reflection.c (method_encode_signature): Encode the number of
15826 generic parameters.
15827 (encode_generic_method_sig): New static function.
15828 (method_encode_methodspec): New static function; creates an entry
15829 in the MethodSpec table for a generic method.
15830 (mono_image_get_methodspec_token): New static function.
15831 (mono_image_create_token): Call mono_image_get_methodspec_token()
15832 for generic methods.
15833 (mono_reflection_bind_generic_method_parameters): New public
15834 function. Instantiates a generic method.
15836 2003-10-16 Martin Baulig <martin@ximian.com>
15838 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
15839 *gen_params' here from MonoMethodHeader.
15841 * metadata.c (mono_metadata_parse_method_signature): If we have
15842 generic parameters, initialize `method->gen_params' and then set
15843 the correct `type->data.generic_param' in all the parameters.
15845 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
15847 * threads.c (mono_threads_get_default_stacksize): New function to
15848 return the default stacksize.
15850 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
15851 termination of the finalizer thread, since the previous method had
15852 race conditions. Fixes #49628.
15854 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
15855 as for the other managed threads.
15857 2003-10-16 Martin Baulig <martin@ximian.com>
15859 * class.c (inflate_generic_signature): Copy `generic_param_count'
15862 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
15865 * metadata.c (mono_metadata_parse_method_signature): Actually set
15866 the `method->generic_param_count' here.
15867 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
15869 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
15871 * object.h: Add a new field to TypedRef to simplify the implementation
15872 of the REFANY opcodes in the JIT.
15874 * icall.c: Make use of the new field.
15876 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
15879 2003-10-15 Martin Baulig <martin@ximian.com>
15881 * class.c (mono_class_from_gen_param): Renamed to
15882 mono_class_from_generic_parameter() and moved most of the
15883 functionality from mono_reflection_define_generic_parameter()
15884 here; ie. we create a "real" class here.
15885 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
15886 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
15887 previously been called.
15889 * class.h (MonoGenericParam): Moved the declaration of this struct
15890 here from metadata.h and added `MonoMethod *method'.
15892 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
15895 * loader.c (mono_get_method_from_token): If we have any generic
15896 parameters, call mono_metadata_load_generic_params() to read them
15897 from the MONO_TABLE_GENERICPAR.
15899 * metadata.c (mono_metadata_load_generic_params): Added
15900 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
15902 * metadata.h (MonoMethodSignature): Replaced
15903 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
15904 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
15906 * reflection.c (mono_reflection_define_generic_parameter): Moved
15907 most of the functionality into the new
15908 mono_class_from_generic_parameter(); set the `method' field if
15909 we're a method parameter.
15911 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
15913 * marshal.c (emit_struct_conv): if native size is 0
15916 2003-10-14 Martin Baulig <martin@ximian.com>
15918 * icall.c: The generics API has changed in the spec since it was
15919 added to System.Type; these modifications make it match the spec
15921 (ves_icall_Type_GetGenericParameters): Renamed to
15922 `ves_icall_Type_GetGenericArguments'.
15923 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
15924 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
15925 `ves_icall_MonoType_get_HasGenericArguments'.
15926 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
15927 `ves_icall_MonoType_get_IsGenericParameter'.
15928 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
15929 this is no interncall anymore.
15930 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
15931 `ves_icall_TypeBuilder_get_IsGenericParameter'.
15933 2003-10-14 Martin Baulig <martin@ximian.com>
15935 * reflection.c (mono_reflection_bind_generic_parameters): Also
15936 inflate generic methods if we're reading the class from IL.
15938 2003-10-13 Martin Baulig <martin@ximian.com>
15940 * reflection.c (mono_reflection_define_generic_parameter): This
15941 method isn't called directly from the icall anymore; take a
15942 `MonoReflectionAssemblyBuilder *' so we can use this for type and
15943 method generic parameters.
15944 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
15945 (method_builder_encode_signature): Encode generic parameters.
15946 (mono_image_get_method_info): Write generic params to the
15947 MONO_TABLE_GENERICPARAM table.
15949 * reflection.h (MonoReflectionMethodBuilder): Added
15950 `MonoArray *generic_params'.
15952 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
15954 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
15955 wrapper for mono_reflection_define_generic_parameter().
15956 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
15958 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
15960 * marshal.h: Add missing function to fix build.
15962 * marshal.c (mono_marshal_get_native_wrapper): Add support for
15963 the SetLastError pinvoke attribute.
15965 * marshal.c (mono_marshal_set_last_error): New helper function called
15966 by the generated code.
15968 * marshal.c (mono_mb_emit_branch): New helper function.
15970 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
15972 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
15973 classes as parameters and return values of delegates. Fixes #29256.
15975 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
15977 * locales.c: use gint32 in non HAVE_ICU case
15979 2003-10-11 Martin Baulig <martin@ximian.com>
15981 * mono-debug.c (mono_debug_add_method): Added a workaround for
15984 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
15986 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
15987 delegates passed to native code must use the STDCALL calling
15988 convention. Fixes #35987.
15990 2003-10-10 Martin Baulig <martin@ximian.com>
15992 * class.c (inflate_generic_type): If we're inflating for a generic
15993 type instance (and not for a generic method), return
15994 MONO_TYPE_MVAR unchanged.
15996 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15998 * string-icalls.c: Join ignores null strings in the source array.
15999 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
16000 * threads.c: GetAvailableTheads is slightly more accurate.
16002 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
16004 * threads.h threads.c : add mono_threads_set_default_stacksize
16005 and pass default to CreateThread calls.
16007 2003-10-09 Dick Porter <dick@ximian.com>
16011 * locales.c: Internal calls for constructing CultureInfo and
16012 related objects from libicu (if its available.)
16014 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
16016 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
16018 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16020 * threadpool.c: added an argument to async_invoke_thread that is the
16021 item to process, pass the MonoAsyncResult to the thread start function
16022 when creating a new thread. This way we don't need to acquire any lock
16023 when we're creating a new thread. Readded a semaphore for faster
16024 response times (instead of that Sleep i added).
16026 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
16028 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
16029 get daylight change dates better on Windows, fix handling
16030 of platforms without tm_gmtoff.
16032 2003-10-06 Martin Baulig <martin@ximian.com>
16034 * class.c (inflate_generic_method): Renamed to
16035 mono_class_inflate_generic_method() and made public.
16036 (mono_class_init): Don't inflate the generic methods here.
16037 (mono_class_from_generic): Added `gboolean inflate_methods'
16038 argument. Inflate the methods here.
16040 * loader.c (mono_method_get_param_names): Ignore instances of
16041 generic types for the moment.
16043 * reflection.c (fixup_method): Added support for inflated methods.
16044 (mono_image_create_token): Use mono_image_get_methodref_token()
16045 for inflated methods.
16046 (mono_custom_attrs_from_param): Ignore instances of generic types
16048 (mono_reflection_bind_generic_parameters): New public function.
16049 Moved all the functionality from
16050 ves_icall_Type_BindGenericParameters() here and added support for
16052 (mono_reflection_define_generic_parameter): Initialize
16053 `klass->methods' here.
16055 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
16056 functionality into mono_reflection_define_generic_parameter().
16057 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
16058 TypeBuilder, return that TypeBuilder.
16060 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16062 * appdomain.c: removed mono_delegate_semaphore.
16065 (mono_thread_pool_add): moved hash table creation inside and the thread
16066 creation outside of the critical region.
16067 (mono_thread_pool_finish): removed obsolete code.
16068 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
16069 continue or exit the thread depending on the queue.
16071 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
16073 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
16074 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
16075 handle more bool marshalling options
16077 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
16079 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
16080 arrays of structs. Also add a more descriptive error message when
16081 a structure member is marshalled as LPArray.
16083 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
16085 * marshal.c (mono_marshal_get_native_wrapper): Add support for
16086 marshalling arrays of complex types. Fixes #29098. Also remove an
16087 usused and incomplete function.
16089 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
16091 * gc.c: report heap_size - free_bytes as total memory allocated
16094 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
16096 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
16097 fix timezone handling problems on Windows.
16099 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
16100 asserts when the year is outside the range handled by ms the functions.
16102 * class.c (setup_interface_offsets): If the class is an interface,
16103 fill out its interface_offsets slot.
16105 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16107 * threadpool.c: mark threadpool threads as background.
16109 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
16111 * decimal.c - define DECINLINE to nothing if not using GCC
16113 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
16115 * assembly.c: More refcount fixes.
16117 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16119 * string-icalls.c: if we're not trimming, return the same string.
16120 When not splitting, don't create a new string.
16122 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16125 (mono_image_open): increment the ref_count inside the critical section.
16127 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
16129 * image.c (mono_image_open): Fix reference counting bug.
16131 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
16133 * marshal.c (mono_marshal_type_size) struct alignment changed for
16134 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
16135 64bits. Avoid leak in mono_marshal_get_native_wrapper when
16136 mono_lookup_pinvoke_call throws.
16138 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
16140 * reflection.c (mono_reflection_parse_type): Fix #49114.
16142 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
16143 temporary workaround for cygwin header problem.
16145 * object.c (mono_object_isinst): Synchronize this with the code
16146 generated by the JIT for casts.
16148 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
16150 * reflection.c (encode_type): Fix #38332.
16152 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
16154 * marshal.c (mono_marshal_method_from_wrapper): New function to return
16155 the original method from the wrapper method.
16157 2003-09-25 Martin Baulig <martin@ximian.com>
16159 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
16160 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
16161 (ves_icall_Type_get_IsGenericInstance): New interncall.
16163 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
16165 * object.c: fix cast warning in big endian code.
16167 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
16169 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
16171 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16173 * assembly.c: don't call check_env from mono_assembly_load. It's
16174 already done once in mono_assemblies_init and may cause headaches when
16175 multiple threads are loading assemblies.
16177 2003-09-19 Martin Baulig <martin@ximian.com>
16179 * reflection.c (mono_reflection_define_generic_parameter): Don't
16180 allocate `klass->methods', set `klass->flags' to
16181 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
16183 2003-09-18 Martin Baulig <martin@ximian.com>
16185 * class.c (mono_class_init): Don't create `class->methods' if it's
16186 already initialized.
16188 * metadata.c (mono_metadata_load_generic_params): Make this
16191 * reflection.c (mono_reflection_define_generic_parameter): Set
16192 parent class and interfaces from the constraints.
16194 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
16195 to keep this struct in sync with the declaration in TypeBuilder.cs.
16197 2003-09-17 Martin Baulig <martin@ximian.com>
16199 * metadata.h (MonoType): Replaced the data's `int type_param'
16200 field with `MonoGenericParam *generic_param'.
16201 (MonoGenericParam): Added `MonoClass *klass'.
16203 * class.c (mono_class_from_gen_param): Removed the
16204 `MonoImage *image' and `int type_num' arguments.
16206 * metadata.c (mono_metadata_parse_generic_param): New static
16207 method; creates a MonoGenericParam which just contains the index.
16208 (do_mono_metadata_parse_type): Call
16209 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
16212 * reflection.c (mono_image_typedef_or_ref): Generic type
16213 parameters may be in the same assembly, but never use a typedef
16215 (mono_reflection_define_generic_parameter): We're now creating a
16216 "real" class for the type parameter; it's now safe to call
16217 mono_class_from_mono_type() on the class'es type, it'll do the
16220 2003-09-16 Martin Baulig <martin@ximian.com>
16222 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
16223 `symfile->range_entry_size' and `symfile->class_entry_size' here;
16224 the `symfile' data structure must be fully initialized before it
16225 gets added to the table.
16227 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
16229 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
16231 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
16232 class init trampolines.
16234 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
16236 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
16237 to the built-in profiler to turn off time and allocation profiling
16240 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
16242 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
16245 * debug-helpers.c (mono_method_full_name): Print the wrapper type
16246 in human readable form.
16248 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
16250 * reflection.c icall.c: Fixed warnings.
16252 * image.c (load_class_names): Use a temporary hash table to hold the
16253 namespaces in order to avoid doing many string comparisons.
16255 * image.h: Fix typo.
16257 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
16258 Pass NULL instead of g_direct_equal to the GHashTable constructor
16259 since the NULL case is short-circuited inside g_hash_table_lookup,
16260 leading to better performance.
16262 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
16263 obtain the first custom attribute for a given index. Depends on the
16264 CustomAttribute table being sorted by the parent field.
16266 * reflection.c (mono_custom_attrs_from_index): Use the new function
16267 for better performance.
16269 2003-09-07 Martin Baulig <martin@ximian.com>
16271 * class.c (mono_class_init): If we're a generic instance, inflate
16272 all our methods instead of loading them from the image.
16273 (mono_class_from_generic): Set `class->methods = gklass->methods'.
16275 2003-09-07 Martin Baulig <martin@ximian.com>
16277 * mono-debug-debugger.c: Added support for constructors.
16279 2003-09-06 Martin Baulig <martin@ximian.com>
16281 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
16284 * reflection.c (mono_reflection_setup_generic_class): Call
16285 ensure_runtime_vtable() to create the vtable.
16287 2003-09-05 Martin Baulig <martin@ximian.com>
16289 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
16292 2003-09-04 Martin Baulig <martin@ximian.com>
16294 * reflection.c (mono_reflection_define_generic_parameter): Generic
16295 parameters start with zero.
16297 2003-09-04 Martin Baulig <martin@ximian.com>
16299 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
16301 * reflection.h (MonoReflectionGenericParam): New typedef.
16302 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
16303 the generic parameters from the managed TypeBuilder.
16305 * reflection.c (mono_reflection_define_generic_parameter): New function.
16306 (mono_reflection_create_runtime_class): Encode generic parameters.
16307 (mono_reflection_setup_generic_class): New function; this is
16308 called after adding adding all generic params to the TypeBuilder.
16309 (encode_type): Added MONO_TYPE_VAR.
16311 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
16313 * class.h class.c (mono_class_needs_cctor_run): Moved this method
16316 * assembly.h assembly.c: Moved the AOT loading code into an assembly
16319 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
16321 * reflection.h reflection.c class.h class.c: Delete duplicate
16322 definition of mono_type_get_name () from reflection.c and export the
16325 * class.c: Class loading fixes from Bernie Solomon
16326 (bernard@ugsolutions.com).
16328 * reflection.c: Endianness fixes from Bernie Solomon
16329 (bernard@ugsolutions.com).
16331 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
16333 * assembly.h assembly.c: Define a file format version for AOT
16336 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
16338 * appdomain.h (MonoJitInfo): New field to determine whenever the
16339 code is domain neutral.
16341 2003-08-31 Miguel de Icaza <miguel@ximian.com>
16343 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
16345 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
16347 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
16348 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
16349 Avoid caching the result since strings must be domain specific. Fixes
16352 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
16354 * marshal.c (mono_marshal_init): Make this callable multiple times
16355 since it is hard to find a correct place to call it.
16357 * object.c (mono_runtime_class_init): Execute static constructors in
16358 the correct appdomain.
16360 * image.c (build_guid_table): Handle the case when multiple images have
16363 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16365 * icall.c: added a couple of icalls for System.Web.
16367 2003-08-28 Martin Baulig <martin@ximian.com>
16369 * icall.c (ves_icall_Type_BindGenericParameters): Use
16370 `klass->generic_inst' instead of `&klass->byval_arg' in the
16371 mono_type_get_object() call. The returned type must be
16372 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
16374 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
16378 * object.c (mono_class_proxy_vtable): Make it thread safe.
16380 * pedump.c: Fix warning.
16382 * object.c appdomain.h: Get rid of metadata_section.
16383 It is no longer needed and it was causing deadlocks with domain->lock.
16385 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
16387 2003-08-26 Martin Baulig <martin@ximian.com>
16389 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
16391 2003-08-26 Martin Baulig <martin@ximian.com>
16393 * pedump.c (main): Call mono_metadata_init(),
16394 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
16395 and mono_loader_init().
16397 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
16399 * loader.h: Add missing include to fix build.
16401 * image.h: mono_image_load_references is no more.
16403 * assembly.c: Reworked assembly loading to make it really thread safe.
16404 After these changes, the assembly returned by mono_assembly_open is
16405 fully initialized, i.e. all its references assemblies are loaded.
16407 * assembly.c (mono_image_load_references): Renamed to
16408 mono_assembly_load_references, and made private, since clients no
16409 longer need to call it.
16411 * class.c: Removed calls to mono_assembly_load_references, since it was
16412 a source of deadlocks.
16414 * loader.h loader.c class.h class.c: Protect data structures using a
16415 new lock, the loader lock.
16417 * class.c (mono_class_setup_vtable): Create temporary hash tables and
16418 GPtrArrays only when needed.
16420 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
16421 into empty structures by mcs. Fixes pinvoke7.cs.
16423 * domain.c (mono_init): Call a new initialization function.
16425 * appdomain.c (mono_runtime_init): Call the new initializer function
16426 of the marshal module.
16428 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
16429 inserted into empty structures by mcs. Fixes pinvoke7.cs.
16431 * marshal.h marshal.c: Added locks around the wrapper caches to make
16432 this module thread safe.
16434 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
16435 this argument. Fixes pinvoke1.exe.
16437 2003-08-25 Lluis Sanchez <lluis@ximian.com>
16439 * object.h: Added call_type field to MonoMethodMessage and the corresponding
16440 enumeration of values. Removed fields to store remote call output values in
16441 MonoAsyncResult. Not needed any more.
16442 * object.c: Initialize call_type and async_result fields in mono_message_init.
16443 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
16444 dispatching the message.
16445 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
16446 async call to finish. To do it use a message with EndInvoke call type.
16448 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
16450 * loader.h loader.c (mono_method_hash_marhal_info): New function which
16451 determines whenever a method has marshalling info.
16453 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16455 * assembly.c: fix the build on windows.
16457 2003-08-22 Lluis Sanchez <lluis@ximian.com>
16459 * object.cs: Fixed bug #47785.
16461 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
16463 * string-icalls.c (StringReplace): If their are no occurances of
16464 the old string found return a reference to the supplied
16465 string. This saves some memory and matches MS behavoir.
16467 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16469 * socket-io.c: fixed compilation for systems that define AF_INET6
16470 and don't define SOL_IP/SOL_IPV6.
16472 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
16474 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
16475 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
16477 * rawbuffer.c rawbuffer.h: Make this module thread safe.
16479 * domain.c: Make this module thread safe.
16481 * domain.c (mono_init): Call new initialization function.
16483 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
16484 reference types too. Fixes #38812.
16486 * image.c (mono_image_init): Fixed warnings.
16488 * class.c (mono_class_from_typeref): Handle assembly load failure
16491 * appdomain.c (add_assemblies_to_domain): Handle the case when
16492 the references of an assembly are not yet loaded.
16494 * metadata.c image.c assembly.c: Moved initialization of global
16495 variables to a separate function called at startup since lazy
16496 initialization of these variables is not thread safe.
16498 * image.c assembly.c: Made this module thread safe by adding locks in
16499 the appropriate places.
16501 * domain.c (mono_init): Call the new initialization functions of the
16504 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
16506 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
16507 make a direct call. It is proxy's work to make the call asynchronous.
16508 mono_delegate_end_invoke(): If the targe is a proxy, just collect
16510 * object.cs: mono_method_call_message_new(): read AsyncResult and
16511 state object from parameters list, if this info is requested.
16512 * object.h: Added fields to store remote call output values in
16513 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
16515 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16517 * object.h: add needed fields to MonoThread.
16518 * threads.c, threads.h: allow registering a function to cleanup data
16519 allocated per thread by the JIT.
16521 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16523 * loader.h: portability fix by Bernie Solomon
16524 * <bernard@ugsolutions.com>.
16526 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
16528 * reflection.h reflection.c (mono_param_get_objects): Changed this to
16529 return a MonoArray. This simplifies the code and also ensures that
16530 the cache allways contains an object reference as a value.
16532 * icall.c (ves_icall_get_parameter_info): Simplified using the new
16535 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16537 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
16538 fixes a problem with byte ordering when getting the address family for
16541 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
16543 * .cvsignore: Added monosn.
16545 * reflection.h reflection.c loader.c: Added support for parameter
16546 marshalling to dynamically created types. Fixes #47295.
16548 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
16550 * rand.c: remove useless warnings.
16552 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16554 * class.c: implemented ldtoken for methods and fieldrefs.
16556 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16558 * threadpool.c: when mono_async_invoke was called, no one took care of
16559 monitoring the queue. So if the method invoked took some time and we
16560 got new async invoke requests after 500 ms (the thread created waited
16561 that long in WaitForSingleObject), the new async invoke was not called
16562 until the previous one finished.
16564 This is fixed now. Thanks to Totte for helping with it.
16566 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16568 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
16570 2003-08-11 Martin Baulig <martin@ximian.com>
16572 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
16574 2003-08-06 Martin Baulig <martin@ximian.com>
16576 * mono-debug-debugger.c: Added support for static fields,
16577 properties and methods.
16579 2003-08-06 Martin Baulig <martin@ximian.com>
16581 * mono-debug-debugger.c: Don't store the MonoString's vtable to
16582 make this work for applications with multiple application domains.
16584 2003-08-04 Martin Baulig <martin@ximian.com>
16586 * mono-debug-debugger.c: Completely reworked the type support; the
16587 most important thing is that we're now just using one single
16588 `MonoType' instance per type.
16590 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
16592 * mono-endian.h, mono-endian.c, icall.c: Added icall
16593 ves_icall_System_Double_AssertEndianity to assert double word endianity
16594 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
16596 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
16598 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
16599 support, icalls and fixes.
16601 2003-07-31 Miguel de Icaza <miguel@ximian.com>
16603 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
16604 classes that are a punctuation character in .NET is not the same a
16607 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16609 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
16611 2003-07-29 Miguel de Icaza <miguel@ximian.com>
16613 * icall.c: Add new MemCopy internalcall.
16614 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
16615 Simplified code; It is not necessary to handle all the cases here,
16616 as the C# code takes care of it. Only handle the case of the name
16617 resource embedded into the assembly.
16619 Changed signature to return the data pointer and the size of the
16622 2003-07-26 Miguel de Icaza <miguel@ximian.com>
16624 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
16625 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
16627 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
16629 * socket-io.c: ignore EINTR error in select.
16631 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
16633 * class.h, class.c: removed unused subclasses field in MonoClass.
16635 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
16637 * icall.c: improve fix of get_base_definition(). If the parent class
16638 doesn't have the mehod, look at the parent of the parent.
16639 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
16640 to check if a parameter is an in or out parameter
16641 (PARAM_ATTRIBUTE_IN is not set by default).
16642 mono_method_return_message_restore(): Use mono_class_value_size to
16643 get the size of a value type. mono_type_stack_size (parameterType)
16644 does not return the correct value if parameterType is byRef.
16645 mono_load_remote_field(), mono_load_remote_field_new(),
16646 mono_store_remote_field(), mono_store_remote_field_new():
16647 raise exception if the remote call returns an exception.
16649 2003-07-28 Martin Baulig <martin@ximian.com>
16651 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
16652 method. This is a wrapper around mono_runtime_invoke() which
16653 boxes the instance object if neccessary.
16655 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
16657 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
16658 metadata.h, row-indexes.h, verify.c: first cut of generics support.
16660 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
16662 * icall.c: disable mcs bug workaround.
16664 2003-07-21 Miguel de Icaza <miguel@ximian.com>
16666 * object.c (mono_runtime_class_init): Take the metadata_section
16667 mutex before obtaining the domain mutex.
16669 * appdomain.h: Added definition of metadata_section mutex here.
16671 * object.c: define metadata_mutex here.
16673 2003-07-24 Ravi Pratap <ravi@ximian.com>
16675 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
16678 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
16680 * reflection.c: Fix bug #46669
16682 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16687 * object.h: fill in the type name for TypeLoadException.
16689 2003-07-23 Ravi Pratap <ravi@ximian.com>
16691 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
16692 relationship between TypeBuilders while compiling corlib) and bug
16693 45993 (Array types returned from the runtime while compiling
16694 corlib were from the loaded corlib).
16696 2003-07-22 Martin Baulig <martin@ximian.com>
16698 * mono-debug-debugger.c: Reworked the type support a bit more;
16699 distinguish between types and classes.
16701 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
16703 * icall.c: add IsArrayImpl icall.
16705 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
16707 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
16708 initializing real_size only once. Also fix bug #46602.
16710 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
16712 * object.c: Renamed mono_metadata_section to metadata_section.
16714 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
16716 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
16717 empty array if the type is an array. Fixed.
16718 ves_icall_MonoMethod_get_base_definition: if the base method
16719 is abstract, get the MethodInfo from the list of methods of
16721 * reflection.c: ParameterInfo.PositionImpl should be zero-based
16722 and it was 1-based. Fixed in mono_param_get_objects.
16724 2003-07-20 Martin Baulig <martin@ximian.com>
16726 * mono-debug.h: Set version number to 31.
16727 (mono_debug_init): Added `MonoDomain *' argument.
16729 * mono-debug-debugger.c: Reworked the type support; explicitly
16730 tell the debugger about builtin types; pass the `klass' address to
16733 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
16735 * image.c: Allow new metadata tables to be loaded without a
16736 warning. Also update the warning message to give the new constant value.
16738 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16740 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
16741 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
16742 array type representation changes.
16744 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
16746 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
16747 on Environment.Exit () call.
16749 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16751 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
16752 requires a matching corlib.
16754 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
16756 * Changelog: My editor decided to add a CR to each line. Sorry about that.
16757 Committed again without the CRs.
16759 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
16761 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
16762 getting it from the "this" socket instance. Did not work
16763 if the socket is a subclass of Socket.
16764 Also fixed bug #35371.
16766 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16768 * metadata.c: fixed size for TypedByRef.
16769 * loader.c: when searching for a method, consider the vararg amrker.
16770 * unicode.c, decimal.c: constify some arrays.
16772 2003-07-15 Dick Porter <dick@ximian.com>
16774 * socket-io.c: Fixed compilation for gcc < 3.2.
16776 Fixed compilation for machines that don't have AF_INET6 (thanks to
16777 Bernie Solomon <bernard@ugsolutions.com> for that part.)
16779 Fixed compile warnings.
16781 Fixed formatting and line endings.
16783 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
16786 * socket-io.c: Added IPv6 support.
16788 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
16790 * class.c (mono_class_is_assignable_from): New function to implement
16791 the is_assignable_from logic. Used by mono_object_isinst,
16792 Type::IsAssignableFrom () and the interpreter.
16794 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
16795 Object, even interfaces.
16797 * object.c (mono_object_isinst): Implement in terms of
16798 is_assignable_from.
16800 * icall.c (ves_icall_type_is_assignable_from): New icall.
16802 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
16804 * domain.c (foreach_domain): fix compiler warning.
16806 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
16808 * image.c (load_metadata_ptrs): use g_strndup because strndup is
16809 not available on all plattforms
16811 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
16813 * image.h image.c: Store the metadata version string in MonoImage.
16814 * icall.c: New icall to retrieve the image version.
16815 * reflection.c (create_dynamic_image): Fill in the image version field
16816 * reflection.c (build_compressed_metadata): Use the image version
16817 from the image structure.
16819 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16821 * appdomain.c: modified comment.
16822 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
16823 That will be its last iteration when mono_gc_cleanup is called from
16824 mono_runtime_cleanup and before the domain is unloaded.
16828 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
16830 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
16833 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
16835 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
16836 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
16837 Bernie Solomon <bernard@ugsolutions.com>.
16839 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16841 * object.c, object.h: provide mono_object_new_fast() for faster
16842 allocation in some special cases.
16844 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16846 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
16847 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
16849 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16851 * threadpool.c: fix leaks.
16853 2003-07-01 Dick Porter <dick@ximian.com>
16855 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
16856 using MonoGHashTables. Fixes threadpool bug posted to list.
16858 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
16860 * image.h, image.c: added support to load an assembly from a byte array.
16861 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
16862 assembly bundle support.
16864 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
16866 * threadpool.c (mono_thread_pool_add): keep a reference to the
16867 AsyncResult to prevent GC
16869 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16871 * class.c: leak fix.
16873 2003-06-25 Dick Porter <dick@ximian.com>
16875 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
16876 for the async object, the WaitHandle object will close the handle.
16879 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16881 * class.c: in mono_array_class_get (), lookup from the hash with the
16882 same type we insert: this works around a bug in
16883 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
16884 lluis. The real fix will have to wait for after the release.
16886 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16888 * icall.c: fix memory leak when getting type members.
16890 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
16892 * reflection.c: added more pubtoken special cases.
16894 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16896 * class.c: handle field offset correctly when class size
16897 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
16899 2003-06-20 Martin Baulig <martin@ximian.com>
16901 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
16904 2003-06-20 Martin Baulig <martin@ximian.com>
16906 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
16908 2003-06-20 Martin Baulig <martin@ximian.com>
16910 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
16911 just distinguish between variables in registers and variables at
16912 an offset relative to a register.
16914 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16916 * icall.c: #ifdef out latest changes until mcs is fixed.
16918 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16920 * icall.c: return members in metadata order.
16922 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
16924 * icall.c: avoid infinite loop in GetTimeZoneData.
16926 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
16928 * icall.c: added Marshal.Prelink/All icalls.
16930 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
16932 * object.c, object.h: fix warnings and do some overflow checking
16933 when creating arrays.
16935 2003-06-17 Dick Porter <dick@ximian.com>
16938 * file-io.c: File attributes need to be tweaked slightly when
16939 passed from the managed to the w32 world.
16941 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
16942 * profiler.h profiler-private.h profiler.c: Rework last patch
16943 based on suggestion by Paolo.
16945 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
16947 * profiler.h profiler-private.h profiler.c: Added infrastructure for
16948 instruction level coverage data collection.
16949 * profiler.h profiler.c (: Added new callback function which can be
16950 used by the profiler to limit which functions should have coverage
16952 * profiler.c (mono_profiler_load): Call g_module_build_path to
16953 generate the file name of the profiler library.
16955 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
16957 * profiler.c, profiler.h, profiler-private.h: added basic block
16958 coverage profiling API.
16960 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
16962 * reflection.c (mono_reflection_create_runtime_class): Add support
16963 for events in dynamically generated code.
16965 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
16968 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16970 * icall.c: when getting timezone info, return reasonable values if we
16971 can't get the actual data.
16973 2003-06-14 Dick Porter <dick@ximian.com>
16975 * threads.c (start_wrapper): Remove the reference to the thread
16976 object in the TLS data, so the thread object can be finalized.
16977 This won't be reached if the thread threw an uncaught exception,
16978 so those thread handles will stay referenced :-( (This is due to
16979 missing support for scanning thread-specific data in the Boehm GC
16980 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
16982 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
16984 * reflection.c: ensure streams and tables are first allocated with
16985 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
16987 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
16989 * icall.c: fixed GetElementType for byrefs (bug# 44792).
16991 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
16993 * reflection.c (mono_reflection_create_runtime_class): Add support for
16994 properties to dynamically created classes.
16995 * reflection.c: Fix a few places where non-MonoObjects were inserted
16996 into the tokens hashtable.
16998 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
17000 * object.c: some support to handle out of memory exceptions.
17002 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
17004 * marshal.c (mono_marshal_get_native_wrapper): support reference
17007 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
17009 * object.h, object.c: more portability stuff from Bernie Solomon.
17010 Unexport mono_object_allocate(). Added mono_object_unbox ().
17011 Set exitcode when an unhandled exception is thrown.
17013 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
17015 * marshal.c (mono_marshal_get_native_wrapper): use custom
17016 marshaler for return types.
17018 2003-06-10 Dick Porter <dick@ximian.com>
17020 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
17021 ip_mreq is available
17023 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
17025 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
17026 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
17027 by Bernie Solomon <bernard@ugsolutions.com>.
17029 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
17031 * gc.c (mono_gc_init): Avoid error message on shutdown when
17032 GC_DONT_GC=1 is used.
17034 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
17035 New icall to return the GUID of a module.
17037 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
17039 * class.c: ensure instance size always includes the parent's size
17040 even whem class size is set explicitly (fixes bug#44294).
17042 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17044 * profiler.h, profiler.c: made the simple profiler thread-safe,
17045 get more accurate timing info. Allow the loading of an
17046 externally-developed profiler module.
17048 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
17050 * marshal.c (mono_marshal_get_native_wrapper): improved
17051 class/byref arguments.
17052 (mono_marshal_get_native_wrapper): better string marshaling support.
17054 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
17056 * class.c: ensure .pack and .size are handled correctly and
17057 simplified layout of static fields.
17059 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
17062 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
17064 * loader.c (mono_lookup_pinvoke_call): look for modules in the
17065 current directory (fix bug 44008)
17067 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
17069 * marshal.c (mono_marshal_get_native_wrapper): started support for
17071 (mono_delegate_to_ftnptr): consider marshalling specifications
17073 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17075 * reflection.c, reflection.h: emit custom marshal info.
17077 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17079 * object.c: free the GError.
17080 * icall.c: added CloseEvent_internal.
17082 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
17085 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
17087 * loader.c (mono_method_get_signature): Add support for dynamic
17090 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17092 * reflection.c: fixed bug #43905.
17094 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
17096 * class.c, domain.c, icall.c, metadata.h, object.h: support for
17097 handling TypedReference and ArgIterator.
17098 * loader.c, loader.h: added function to get signature at call site.
17100 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
17102 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
17103 data readonly. Buglets and warning fixes. Some MethodSpec support.
17105 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
17107 * class.h, class.c, object.c: remove relative numbering support.
17109 2003-05-26 Miguel de Icaza <miguel@ximian.com>
17111 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
17112 free the string, until we get a chance to fix Gtk#
17114 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17116 * marshal.c: revert last patch.
17118 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
17120 * icall.c: updates for new mono_class_vtable() not calling
17121 the type constructor anymore.
17123 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
17125 * object.h, object.c: separate vtable creation from type
17126 initialization. Make running the .cctor thread safe.
17128 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
17130 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
17132 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
17134 * loader.c (mono_get_method): consider calling convention
17136 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
17138 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
17139 to return the invisible global type for a module.
17141 * reflection.c (mono_image_build_metadata): Emit global fields too.
17143 2003-05-20 Peter Williams <peterw@ximian.com>
17145 * loader.c (mono_lookup_internal_call): Add a few newlines.
17147 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
17149 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
17152 * appdomain.c (set_domain_search_path): Recalculate search path when
17153 AppDomainSetup.PrivateBinPath changes.
17155 * object.c (mono_class_compute_gc_descriptor): It turns out some
17156 parts of the class libs (like System.Thread) holds pointers to
17157 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
17158 to treat native int a pointer type here.
17160 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
17162 * appdomain.h, domain.c: add hashtable for jump target resolution.
17164 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
17166 * reflection.h reflection.c icall.c: Added new icalls
17167 GetManifestResourceInfoInternal, GetModulesInternal and support
17170 2003-05-16 Dick Porter <dick@ximian.com>
17174 * file-io.c: Implement System.IO.MonoIO::GetTempPath
17176 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
17178 * object.c: mono_store_remote_field: little fix to previous patch.
17180 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
17182 * class.c: add constructors to array classes.
17183 * icall.c: special case array construction for InternalInvoke (),
17185 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
17187 * class.h class.c reflection.c object.c: Added support for field
17188 defaults in dynamically generated classes.
17190 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17192 * reflection.c: properly encode charset for ddlimport.
17194 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
17196 * threads.c: allow compiling without GC.
17198 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17200 * appdomain.h, object.c, object.h, threads.c, threads.h: added
17201 handling of thread static data.
17203 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17205 * reflection.h, reflection.c: added mono_custom_attrs_free ().
17207 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
17209 * class.c (mono_array_class_get): always set the serializable flags
17210 (mono_array_class_get): always set the SEALED attribute for array types
17212 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
17214 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
17215 attributes (fix for bug 42021).
17217 2003-05-12 Dick Porter <dick@ximian.com>
17219 * gc.c: Don't run finalizers when the finalizer thread is
17220 finishing up, because the default domain has already been
17223 2003-05-11 Miguel de Icaza <miguel@ximian.com>
17225 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
17226 value is null, we should throw an exception. This is slightly
17227 different than the other conventions used for the constructor.
17229 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17231 * socket-io.c: fixed windows build.
17233 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17235 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
17237 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
17239 * object.c (mono_string_new_wrapper): Compatibility fix for MS
17242 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
17244 * class.c (mono_class_layout_fields): Add experimental GC aware
17245 auto layout facility. Requires class library changes to work correctly.
17247 (mono_class_setup_vtable): Avoid overriding explicit interface
17248 method implementations. Fixes iface3.exe test.
17250 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
17252 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
17253 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
17255 * metadata.h: Add new type classification macro which determines
17256 whenever the type holds an object reference.
17258 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
17260 * marshal.c (mono_marshal_get_native_wrapper): cleanups
17262 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
17264 * gc.c (finalizer_thread): Work around a GC bug.
17266 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
17268 * marshal.c (emit_struct_conv): allow unions
17270 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
17272 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
17274 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
17276 2003-05-06 Martin Baulig <martin@ximian.com>
17278 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
17280 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17283 (Select_internal): allow NULLs, don't create arrays if not needed.
17284 Coupled with Socket.cs changes.
17287 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
17288 register a finalizer for it that will close the semaphore handle. This
17289 fixes the leak and make Lupus' test run with > 4080 loops.
17291 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
17293 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
17294 Jerome Laban (bug #42287)
17296 2003-05-02 Martin Baulig <martin@ximian.com>
17298 * debug-mono-symfile.h
17299 (MonoSymbolFile): Moved declaration into mono-debug.h.
17300 (MonoDebugMethodJitInfo): Likewise.
17301 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
17303 (_mono_debug_address_from_il_offset): Take a
17304 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
17307 (MonoDebugDomainData): New struct.
17308 (mono_debug_get_domain_data): New function.
17309 (mono_debug_add_method): Take an additional `MonoDomain *'
17311 (mono_debug_source_location_from_address): Likewise.
17312 (mono_debug_il_offset_from_address): Likewise.
17313 (mono_debug_address_from_il_offset): Likewise.
17315 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
17317 * reflection.c: one more check for null type in custom attrs.
17319 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17321 * reflection.c: avoid warning (comparison is always false due to limited
17322 range of data type).
17324 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17326 * icall.c: throw an exception in Type.GetField if the argument 'name'
17329 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
17331 * reflection.c: fixed handling of enums in named arguments to custom
17332 attributes (bug #42123).
17334 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
17336 * reflection.c: use the right array element type and handle
17337 a null for a Type argument, too.
17339 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
17341 * reflection.c: handle arrays as arguments to custom attributes.
17343 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
17345 * reflection.c: handle a string value in a custom attr
17346 ctor that takes an object.
17348 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
17350 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
17353 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
17355 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
17357 2003-04-27 Martin Baulig <martin@ximian.com>
17359 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
17360 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
17361 MONO_DEBUGGER_EVENT_BREAKPOINT.
17362 (mono_breakpoint_trampoline_code): Removed.
17363 (mono_debugger_event_handler): The last argument is now a
17365 (mono_debugger_insert_breakpoint_full): Removed the
17366 `use_trampoline' argument.
17367 (mono_debugger_method_has_breakpoint): Likewise.
17368 (mono_debugger_trampoline_breakpoint_callback): Renamed to
17369 mono_debugger_breakpoint_callback(); take the method and
17370 breakpoint number as arguments.
17372 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
17374 * metadata.c: fix off by one when loading parameters attributes.
17376 2003-04-24 Martin Baulig <martin@ximian.com>
17378 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
17380 2003-04-24 Martin Baulig <martin@ximian.com>
17382 * mono-debug-debugger.c: Moved all code which interacts with the
17383 Mono Debugger here.
17385 * debug-mono-symfile.c: This code now just deals with the symbol
17386 file itself, the debugger code is now in mono-debug-debugger.c.
17388 2003-04-23 Martin Baulig <martin@ximian.com>
17390 * mono-debug.c (mono_debug_source_location_from_il_offset):
17391 New method; like mono_debug_source_location_from_address(), but
17392 takes an IL offset instead of a machine address.
17394 2003-04-23 Martin Baulig <martin@ximian.com>
17396 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
17397 `line' field; this is now computed by the debugger.
17399 2003-04-23 Martin Baulig <martin@ximian.com>
17401 * mono-debug.[ch]: New files. This is the new debugging interface.
17403 * mono-debug-debugger.[ch]: New files. Moved all code which
17404 interacts with the Mono Debugger here.
17406 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
17408 * domain.c (mono_init): initialize mono_defaults.monitor_class
17410 2003-04-21 Miguel de Icaza <miguel@ximian.com>
17412 * reflection.c (method_encode_code): Add a spicy exception to help
17413 future compiler authors.
17415 2003-04-21 Martin Baulig <martin@ximian.com>
17418 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
17419 Make this work with relative pathnames; g_filename_to_uri() needs
17420 an absolute filename.
17422 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
17424 * icall.c: Track name changes in Object and ValueType.
17426 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
17428 * metadata.c (mono_type_stack_size): size should be a multiple of
17431 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17434 (internal_domain_finalize): moved into mono_domain_finalize. No need
17435 to create another thread because the finalizers will be run in the
17438 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
17439 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
17440 to be run (MS does this too).
17442 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
17444 * object.c (mono_class_compute_gc_descriptor): Update comment.
17446 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
17448 * image.h: Add synchronized wrapper cache.
17450 * image.c (do_mono_image_open): Initialize cache.
17452 * reflection.c (create_dynamic_mono_image): Initialize cache.
17454 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17456 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
17457 ves_icall_System_Buffer_ByteLengthInternal.
17459 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
17461 * reflection.c: setup klass->nested_in earlier. Allow
17462 a dash in the assembly name.
17464 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
17466 * metadata.c (mono_type_to_unmanaged): dont access
17467 type->data.klass for MONO_TYPE_OBJECT
17468 (mono_type_to_unmanaged): consider System.Delegate class
17470 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
17472 * class.c: just setup supertypes in the proper place instead of
17473 initializing the full element class for arrays.
17475 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
17477 * class.c: ensure the element class of arrays is initialized.
17478 Setup the supertype info for array classes, too.
17480 2003-04-14 Miguel de Icaza <miguel@ximian.com>
17482 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
17484 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17486 * Makefile.am: re-added -m option when running cygpath. This way,
17487 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
17489 * mono-config.c: same codepath for locating mono config file for WIN32
17491 * assembly.c: if mono_assembly_setrootdir is called, don't override
17494 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17496 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
17497 MONO_ASSEMBLIES variable.
17499 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
17501 * icall.c: added Assembly::GetNamespaces() icall.
17503 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17505 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
17507 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
17509 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
17510 * object.c: fixed bug in the construction of vtable for proxies
17512 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
17514 * object.c (mono_array_new): Mark mono_array_new as an icall.
17516 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17518 * class.c: fixed test for public method when overriding interfaces.
17521 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17523 * appdomain.h, domain.c: added mono_domain_foreach() to
17524 be able to access the currently loaded appdomains.
17525 * object.c: make string interning work across sppdomains.
17526 Mark some functions for use as icalls.
17528 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
17530 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
17532 * reflection.h reflection.c: Allocate long living data using
17533 GC_MALLOC_ATOMIC so the collector does not need to scan it.
17535 * reflection.c: Double the allocation size in streams instead of
17536 increasing it, to prevent unneccesary copying on large assemblies.
17538 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
17539 creation if the assembly does not have the Run flag set.
17541 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17543 * class.h: avoid the C++ keywords in header files (Jerome Laban
17544 spotted and fixed this).
17546 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17549 (mono_unhandled_exception): fill in the arguments for the
17550 UnhandledException event. Only trigger that event for the default
17551 domain (as MS does).
17553 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
17555 * object.c: Improve typed allocation stuff based on suggestions from
17556 Paolo. Also turn it on if the GC library supports it.
17558 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
17560 * object.c object.h class.h: Added experimental typed allocation
17561 facility using the interfaces in gc_gcj.h.
17563 * os/gc_wrapper.h: Added new include files.
17565 2003-04-03 Martin Baulig <martin@ximian.com>
17567 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
17568 which is not yet enabled by default.
17570 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
17572 (mono_gc_lock, mono_gc_unlock): New static functions.
17574 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
17575 functions; stop/start the world for the garbage collector. This
17576 is using the windows API; we need to complete the SuspendThread()/
17577 ResumeThread() implementation in the io-layer to make this work on Unix.
17578 (mono_gc_push_all_stacks): New public function; tells the garbage
17579 collector about the stack pointers from all managed threads.
17581 2003-04-03 Martin Baulig <martin@ximian.com>
17583 * object.h (MonoThread): Added `gpointer stack_ptr'.
17585 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
17587 2003-04-03 Martin Baulig <martin@ximian.com>
17589 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
17591 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
17593 * reflection.c (typebuilder_setup_fields): Initialize field.first and
17596 2003-04-02 Miguel de Icaza <miguel@ximian.com>
17598 * loader.c (mono_lookup_internal_call): Report the corlib that is
17601 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
17603 * icall.c (ves_icall_type_GetTypeCode): fixed check for
17604 System.DBNull (it's class not valuetype).
17606 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
17608 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
17609 if the array method was already assigned a token (fixes bug#40646).
17611 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
17613 * reflection.c (mono_reflection_get_type): Attempt type resolve even
17614 if no assembly is given.
17616 2003-04-01 Miguel de Icaza <miguel@ximian.com>
17618 * metadata.h: Added the new tables.
17620 * row-indexes.h: Added definitions for new tables.
17622 * metadata.c: Add schemas for new tables, and add support for
17623 computing the sizes of them.
17625 * class.c: Update for handling the new type cases.
17627 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
17629 * metadata.h (MONO_TYPE_IS_VOID): new macro
17631 2003-03-31 Martin Baulig <martin@ximian.com>
17633 * threads.h (MonoThreadCallbacks): Added `thread_created'.
17635 * threads.c (mono_thread_new_init): Call `thread_created' in the
17636 mono_thread_callbacks.
17638 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
17640 * loader.h: added marshalbyrefobject_class to mono_defaults
17641 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
17642 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
17643 generation of output parameters.
17644 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
17645 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
17646 contextbound and the target object belongs to the context of the caller.
17647 * object.h: added context and unwrapped_server variables in MonoRealProxy.
17648 * object.c: Implemented support for interfaces and abstract classes
17649 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
17650 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
17652 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
17654 * class.h class.c (mono_class_is_subclass_of): New function.
17656 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
17657 routines for most common case (calls from ArrayList::ToArray).
17659 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
17660 routine so programs which call Environment::Exit() can be profiled.
17662 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
17663 Added MONO_ARCH_SAVE_REGS.
17665 * icall.c (ves_icall_type_is_subtype_of): Use new function.
17667 2003-03-29 Miguel de Icaza <miguel@ximian.com>
17669 * blob.h: Add a couple of new MonoType types definitions.
17671 * tabledefs.h: Add a couple of new call convs.
17673 2003-03-27 Zoltan Varga <vargaz@freemail.h>
17675 * reflection.h (MonoReflectionDynamicAssembly): track changes in
17676 the layout of the class.
17678 * reflection.c (alloc_table): double the size on overflow to avoid
17679 unnecessary copying.
17681 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
17682 avoid filling out metadata tables and blobs. Also set mb->ilgen to
17683 null so it can be garbage collected.
17685 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
17687 * reflection.c (mono_reflection_get_type): Return the resolved type
17688 only if it is in the assembly we searched.
17690 * reflection.c (ensure_runtime_vtable): Initialize method slots.
17692 * class.c (mono_class_setup_vtable): Set the slot of the overriding
17695 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17698 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
17699 the right one is 'file:///blah', but MS allows it.
17701 (mono_assembly_open): allow 'file://blah'
17703 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
17705 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
17707 * socket-io.c: fixes bug #40310.
17709 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
17711 * reflection.c (mono_reflection_parse_type): handle deeply nested
17714 * reflection.c (mono_image_create_token): Use unique token values
17715 since they will be put into a hash table.
17717 * class.c (mono_class_setup_vtable): If a method occurs in more than
17718 one place in the vtable, and it gets overriden, then change the
17719 other occurances too.
17721 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
17722 object as return type.
17724 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
17726 * icall.c: Deleted "ToString" implementation for double and float
17727 because they are full implemented in managed code.
17729 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
17731 * reflection.c, reflection.h: implemented and exported functions
17732 to retrieve info about custom attributes.
17734 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17736 * appdomain.c: moved Uri handling to assembly.c
17737 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
17738 work when using a file Uri in *nix and windows.
17740 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
17741 GetReferencedAssemblies.
17743 2003-03-18 Dick Porter <dick@ximian.com>
17745 * icall.c: Rename a couple of internal calls
17747 * threads.c: Set the thread state to Stopped when a thread exits.
17750 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
17752 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
17755 * object.c (mono_class_vtable): fix warning.
17757 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
17759 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
17761 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
17763 (method_encode_clauses): Create exception info structures in the right
17765 (mono_reflection_setup_internal_class): Initialize supertypes field.
17767 * class.c object.c: Handle interfaces which implement other interfaces
17770 * class.h class.c: Move the supertypes array initialization code into
17771 a separate function so it can be used for dynamic types too. Also call
17772 it earlier, in mono_class_init(), since it can be used before the
17773 type is initialized.
17775 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17779 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
17784 * object.c: remove warnings.
17786 2003-03-13 Martin Baulig <martin@ximian.com>
17788 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
17789 (MonoDebugLexicalBlockEntry): New types.
17791 * debug-mono-symfile.c
17792 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
17794 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17796 * process.c: ret can be any non-zero value accroding to MS doc.
17798 2003-03-07 Miguel de Icaza <miguel@ximian.com>
17800 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
17801 fixing a warning for a miss-used prototype, would have cause
17802 random memory corruption.
17804 2003-03-07 Martin Baulig <martin@ximian.com>
17806 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
17807 getting really annoying ....
17809 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
17811 * reflection.c (fixup_method): added support for array methods.
17813 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17815 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
17816 (pointed out by Michael Adams).
17818 2003-03-04 Dick Porter <dick@ximian.com>
17820 * icall.c: Temporarily reverted the Double and Single ToString()
17821 change, because it broke nunit.
17823 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
17825 * object.h, threads.h: make include files compatible with C++
17826 (patch by Jerome Laban <jlaban@wanadoo.fr>).
17828 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
17830 * icall.c: Erased ToString helper functions for Double and Single.
17831 Now, that implementations ar all in managed code (Double and Single
17834 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
17836 * appdomain.c: Added method for initializing the default context of
17837 a domain. Added internal call for getting the default context.
17838 * appdomain.h: Added context variable in MonoDomain struct.
17839 * domain.c: mono_domain_set also sets the default context of the domain
17840 * icall.c: Mapped internal method InternalGetDefaultContext.
17841 * object.c: mono_object_get_virtual_method returns always a remoting
17842 wrapper if the object is a transparent proxy.
17843 mono_runtime_invoke_array: when creating an object by calling the
17844 constructor, if the created object is a proxy, then the constructor should
17845 be called using the a remoting wrapper.
17847 2003-03-03 Dick Porter <dick@ximian.com>
17849 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
17850 variable so it compiles on solaris. Problem spotted by
17851 Christopher Taylor <ct@cs.clemson.edu>
17853 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17856 (get_info_from_assembly_name): don't leak value.
17859 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
17862 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
17864 * assembly.c: export mono_image_load_references ().
17865 * class.c: handle function pointers. mono_class_from_name() now
17866 supports nested type names directly.
17868 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
17870 * reflection.h reflection.c: Encode already created dynamic methods
17871 and fields correctly as a DEF instead of a REF.
17873 * reflection.c: Get rid of the force_ref argument to
17874 mono_image_typedef_or_ref since it was wrong in the first place.
17876 * string-icalls.c: add error checking to string constructors according
17879 * reflection.c: Emit types in the order their TypeBuilders were
17880 created. Previously, a new table index was assigned to each type before
17881 the tables were emitted. This was wrong because the signature blob
17882 might already refer to a type by its original table index.
17884 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
17886 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
17889 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17891 * Makefile.am: make assemblies dir have \ instead of / on windows.
17893 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
17895 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
17896 iterate over the NESTEDCLASS table using a linear search since the
17897 table is not guaranteed to be sorted by the secondary key.
17899 * class.c (mono_class_create_from_typedef): fixed up call to
17900 mono_metadata_nesting_typedef.
17902 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
17904 * marshal.c (mono_string_to_byvalstr): clear the memory as
17905 suggested by Jerome Laban <jlaban@wanadoo.fr>
17907 2003-02-26 Dick Porter <dick@ximian.com>
17909 * process.c: Cope with padding in .rsrc blocks
17911 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
17913 * metadata.h: reverted the filter_len change, it breaks reflection
17915 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
17917 * metadata.h: added a new field to store the filter_len
17920 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17922 * reflection.c: handle custom attributes for types and members
17923 created with Reflection.Emit (bug#38422).
17925 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
17927 * reflection.c: define RTSpecialName automatically for constructors for
17928 compatibility with MS.NET.
17930 * reflection.c (mono_reflection_create_runtime_class): initialize
17931 nested_in field of dynamically created classes.
17933 2003-02-22 Martin Baulig <martin@ximian.com>
17935 * debug-mono-symfile.h: Incremented version number.
17937 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
17939 * object.h icall.c process.c: fix warnings.
17941 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
17943 * appdomain.h appdomain.c:
17944 (mono_domain_try_type_resolve): split the
17945 name_or_tb argument into a name and a tb argument.
17946 (mono_domain_has_type_resolve): new function to check whenever the
17947 application has registered a TypeResolve event handler.
17949 * icall.c reflection.h reflection.c: move the type resolve logic into
17950 mono_reflection_get_type () so it will be invoked when
17951 Assembly::GetType () is called.
17954 (mono_reflection_get_type): renamed to get_type_internal.
17955 (mono_reflection_get_type): fixed type name generation so it works
17956 for nested types too.
17957 (mono_reflection_get_type): call has_type_resolve () to avoid the
17958 costly type name generation if there is no resolve event handler.
17960 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
17962 * class.c, image.c: load exported types from file references.
17964 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
17966 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
17967 used to cache the managed methods used to create proxies and make
17968 remote invocation of methods.
17969 * class.h: Added in MonoVTable a flag to indicate that a class needs
17970 to be remotely created.
17971 * object.c: Modified the method mono_class_vtable(). It now initializes
17972 the remote flag of the vtable. Modified mono_object_new_specific(),
17973 so now it checks the remote flag.
17974 * icall.c: Added a couple of internal methods, one for enabling instance
17975 creation interception for a type, and one for creating objects bypassing
17978 2003-02-18 Martin Baulig <martin@ximian.com>
17980 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
17981 New interncall to get a method's metadata token.
17983 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
17984 New interncall for the debugger.
17986 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
17988 * class.c (mono_class_setup_vtable): allocate supertype array
17990 2003-02-18 Martin Baulig <martin@ximian.com>
17992 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
17994 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17997 (assembly_name_to_aname): jump over unknown properties (i've found
17998 something like: 'type, assembly, version=xxx, custom=null, public...',
17999 so now will ignore custom=null and still get the rest of the values).
18001 2003-02-17 Dick Porter <dick@ximian.com>
18003 * threads.c: Have Thread.Start() wait for a semaphore to signal
18004 that the thread has set up all its local data. This fixes bug
18005 34323, where Abort() raced the new thread's TLS data.
18007 Also removes the handle_store() call from start_wrapper, because
18008 threads are now always created suspended and there is no longer a
18009 race between the parent and child threads to store the info.
18011 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
18013 * image.c: explain the #- heap issue in a message, hopefully
18014 avoiding FAQs on mono-list.
18016 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18019 (GetEntryAssembly): if the domain has not invoked
18020 AppDomain.ExecuteAssembly yet, return the assembly of the default
18023 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
18025 * class.c (mono_ldtoken): make it work in dynamic assemblies.
18027 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
18029 * metadata.c, reflection.c: simple speedup to type hash
18032 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
18034 * image.c, image.h, class.c, assembly.c: move module loading
18035 to MonoImage. When loading metadata, consider alignemnet from
18036 the start of metadata, not from the metadata address in memory.
18038 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
18040 * reflection.c (mono_reflection_get_custom_attrs): Added support for
18041 AssemblyBuilder objects. Factored out custom attribute creation into
18042 a separate function.
18043 (create_custom_attr): new function to create custom attributes.
18045 2003-02-12 Miguel de Icaza <miguel@ximian.com>
18047 * Makefile.am: Got tired of typing the full pathname to pedump.
18048 Until there is another option, am installing this.
18050 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
18052 * class.c (class_compute_field_layout): always set field->parent
18053 (mono_ldtoken): use mono_defaults.fieldhandle_class;
18055 2003-02-11 Dick Porter <dick@ximian.com>
18058 * monitor.c: Rewrote Monitor, making lock much faster and
18059 Pulse/Wait work as specified. Also uses much fewer handles, and only
18060 creates them as needed.
18062 * exception.c: Added SynchronizationLockException
18064 * threads.c: Deleted old Monitor implementation. The new one is
18067 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
18069 * class.c: handled TypedReference type code. Set the correct size for
18070 class data. Setup interface_offsets for interface classes, too.
18072 2003-02-09 Martin Baulig <martin@ximian.com>
18074 * debug-mono-symfile.h: Reflect latest symbol writer changes.
18076 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
18078 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
18079 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
18080 * object.c: fixed mono_object_get_virtual_method () for interfaces.
18081 * verify.c: check for code that runs after the end of the method.
18083 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
18085 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
18086 "System.Math::Round2".
18087 * sysmath.h: Added Floor, Round and Round2 definitions.
18088 * sysmath.c: Modified certain functions that were not 100% compliant
18089 with MS.NET (math precision) and added the implementation of Floor,
18092 2003-02-07 Martin Baulig <martin@ximian.com>
18094 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
18096 2003-02-07 Martin Baulig <martin@ximian.com>
18098 * debug-mono-symfile.c: Reflected latest symwriter changes.
18099 (mono_debug_create_mono_symbol_file): Removed.
18100 (mono_debug_open_mono_symbol_file): Take an argument which
18101 specifies whether to create a dynamic symbol file.
18103 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
18105 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
18107 2003-02-05 Martin Baulig <martin@ximian.com>
18109 * reflection.c (mono_image_build_metadata): Make this public,
18110 protect it against being called multiple times, don't create
18111 resources and don't build the compressed metadata here.
18112 (mono_image_create_pefile): Do this here.
18115 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
18117 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18119 * socket-io.c: fixed bug #36322.
18121 2003-02-06 Piers Haken <piersh@friskit.com>
18125 * debug-mono-symfile.c:
18131 * socket-io.c: warning cleanups
18133 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
18135 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
18136 function. works like remoting invoke, but does a check for the Proxy first.
18138 2003-02-05 Miguel de Icaza <miguel@ximian.com>
18140 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
18142 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
18144 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
18146 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
18147 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
18149 * object.c (mono_store_remote_field_new): used by the new jit
18150 instead of mono_store_remote_field
18151 (mono_load_remote_field_new): used by the new jit
18152 instead of mono_load_remote_field
18154 2003-02-05 Patrik Torstensson
18156 * appdomain.c: changed unload to take the domain id instead
18159 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
18162 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18164 * appdomain.c: don't look for assemblies in ApplicationBase if
18165 PrivateBinPathProbe is set.
18167 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18169 * object.c: make the first argument in main_args contain the absolute
18170 path to the assembly. Fixes bug #37511.
18172 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18174 * icall.c: get correct UTC offset for countries not using daylight
18175 time saving. Fixes bug #30030.
18177 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18179 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
18180 and 1 are the family).
18182 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
18184 * icall.c (ves_icall_InternalExecute): removed wrong assertion
18186 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
18188 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
18190 * reflection.c: added support for SignatureHelper tokens, which is
18191 needed by the Calli opcode.
18193 * reflection.h: track changes to SignatureHelper class.
18195 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
18197 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18199 * appdomain.c: fixed loading assemblies from PrivateBinPath.
18201 2003-02-03 Patrik Torstensson
18202 * appdomain.[c|h], domain.c :
18203 - Added support for getting a domain via domain id
18204 - Support for setting and getting domain from System.AppDomain
18205 (used in cross appdomain channel)
18206 - Added support for get/set for a MonoAppContext on a thread
18207 (Context class in System.Runtime.Remoting.Contexts),
18208 - Removed hack in Get/SetData and ExecuteAssembly.
18210 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
18211 the managed world to get control when a proxy is created.
18213 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
18215 2003-02-03 Miguel de Icaza <miguel@ximian.com>
18218 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
18219 Populate the codebase field as well.
18221 2003-02-02 Martin Baulig <martin@ximian.com>
18223 * debug-mono-symfile.c
18224 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
18225 (mono_debug_symfile_add_method): Allow interncalls.
18227 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18229 * icall.c: throw parse exception if strtod fails or the string is empty.
18231 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
18233 * marshal.c: handle object type separately from defined
18236 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
18238 * marshal.c: handle NATIVE_LPSTR for strings when it's
18239 explicitly specified.
18241 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
18243 * reflection.c, reflection.h, icall.c: setup the reflection
18244 handle cache for ModuleBuilders and AssemblyBuilders.
18246 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
18248 * reflection.c (reflection_methodbuilder_to_mono_method): set
18251 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18253 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
18255 2003-01-29 Dick Porter <dick@ximian.com>
18257 * threads.c: No need for the fake_thread kludge now that Thread
18258 doesn't run a class constructor
18260 2003-01-29 Dick Porter <dick@ximian.com>
18262 * threads.c: Use g_direct_hash instead of the rather bogus
18265 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
18267 * marshal.c (mono_marshal_get_native_wrapper): add check for null
18268 (fix pinvoke12.exe)
18269 (mono_marshal_get_struct_to_ptr): generate valid IL code
18270 (mono_marshal_get_ptr_to_struct): generate valid IL code
18271 (*): correctly set sig->pinvoke, we need to memdup the signature
18274 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
18276 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
18277 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
18279 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
18281 * profiler.c: provide more callers information.
18283 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
18285 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
18287 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
18289 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
18291 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
18293 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
18294 exception instead of going into an infinite loop on dates which it
18297 * string-icalls.c (ves_icall_System_String_get_Chars): raise
18298 out-of-range exception if needed.
18300 * class.c (mono_class_setup_vtable): allow a virtual method to provide
18301 an implementation for an interface method and to override an inherited
18302 method at the same time.
18303 Imagine a scenario when a virtual method is used to override a
18304 virtual abstract method in a parent class, and this same method
18305 provides an implementation for an method inherited from an interface.
18306 In this case, the interface resolution code will set im->slot, which
18307 means that the virtual method override pass will skip this method
18308 which means a pointer to the abstract method inherited from the parent
18309 will remain in the vtable of this non-abstract class.
18311 * class.c: (mono_class_setup_vtable): continue search for a real
18312 method if only an abstract method is found.
18314 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
18316 * reflection.c: add size to encoding for ByValStr and ByValArray
18317 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
18319 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
18321 * class.c (mono_class_setup_vtable): pass the override info as an
18324 * class.c (mono_class_setup_vtable): set the slot of overriding methods
18327 * reflection.c (ensure_runtime_vtable); add support for method
18330 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
18332 * reflection.c (resolution_scope_from_image): Hack to work to work with
18333 dynamic assemblies.
18335 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
18336 added a 'force_ref' argument to force this function to allways return
18337 a TypeRef. This is needed by mono_image_get_memberref_token ().
18339 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
18341 * reflection.c (mono_image_get_type_info): interfaces really don't have
18344 * reflection.c (mono_image_basic_init): fill out missing fields of
18347 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
18348 dynamic assemblies. This is required so dynamic assemblies show up in
18349 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
18350 Type::GetType() etc. This is consistent with MS behaviour.
18352 * image.c image.h reflection.c: add newly created classes to the name
18353 cache so mono_class_get () will find them.
18355 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
18357 First part of changes to get IKVM.NET running under mono.
18359 * appdomain.h, appdomain.c: added new function
18360 mono_domain_try_type_resolve() which will emit TypeResolve events.
18361 This function will call AppDomain::DoTypeResolve to do the actual work.
18363 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
18364 moved existing code dealing with dynamic tokens to a new function
18365 called mono_reflection_lookup_dynamic_token (). This function will
18366 raise TypeResolve events when appropriate. Since reflection.c is not
18367 part of libmetadata, a new hook function called
18368 mono_lookup_dynamic_token() is added to class.c which will call this.
18370 * assembly.h assembly.c: make the invoke_load_hook function public,
18371 so it can be called for dynamic assemblies.
18373 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
18375 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
18378 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
18379 MonoGHashTable, since it contains pointers to objects which the GC
18382 * assembly.c (search_loaded): remove unused variable.
18384 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
18386 * object.c: fixed issue exposed by gcc-generated IL programs
18387 that use RVA data for pointers.
18389 2003-01-25 Martin Baulig <martin@ximian.com>
18391 * threads.c (start_wrapper): Moved the initialization of
18392 `start_func' above the mono_new_thread_init() call to which we
18393 pass it as argument.
18395 2003-01-24 Martin Baulig <martin@ximian.com>
18397 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
18398 the MonoThread pointer.
18400 2003-01-21 Miguel de Icaza <miguel@ximian.com>
18402 * icall.c: Rename `PowImpl' to Pow.
18404 2003-01-23 Dick Porter <dick@ximian.com>
18406 * threads.c (start_wrapper): Create a Thread object if needed, so
18407 the Main() thread can do the class initialisation in a subthread
18408 that has been set up to allow managed code execution.
18410 Pass the thread ID instead of the MonoThread pointer to the thread
18411 start and attach callbacks. This change is required, because the
18412 jit thread start callback must be called _before_ the Thread
18413 object can be created.
18415 (mono_thread_init): Removed much object creation code that is no
18416 longer needed. No managed code is called from here now.
18418 * object.c (mono_runtime_exec_managed_code): Create a subthread
18419 for Main, and call back to the runtime to use it.
18420 Set the exit code when Main exits.
18422 * gc.c: Make sure domain finalisation happens in a subthread.
18423 Re-enable threaded GC, fixing bug 31333 (again).
18425 * environment.c: System.Environment internall calls (so far just
18426 ExitCode is here, the others are still in icall.c)
18428 * appdomain.c (mono_runtime_cleanup): All threads running managed
18429 code should have finished before mono_runtime_cleanup() is
18430 reached, so no need to clean up threads.
18432 2003-01-22 Martin Baulig <martin@ximian.com>
18434 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
18435 `gpointer func' arguments.
18436 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
18437 but added `MonoThread *thread' argument.
18438 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
18440 * threads.c (mono_new_thread_init): Added `gpointer func' argument
18441 and pass it to the mono_thread_start_cb callback.
18442 (mono_install_thread_callbacks): New public function to install a
18443 set of callbacks which are set by the debugger.
18444 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
18446 2003-01-22 Martin Baulig <martin@ximian.com>
18448 * Makefile.am: Install debug-mono-symfile.h.
18450 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
18452 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
18454 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
18456 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
18457 * class.c (mono_ptr_class_get): correctly set access levels of pointers
18458 (mono_array_class_get): correctly set access levels of arrays
18460 2003-01-20 Patrik Torstensson
18461 * image.h (MonoAssemblyName): changed major, minor, build, revision
18462 from signed to unsigned.
18464 2003-01-20 sean kasun <skasun@azstarnet.com>
18466 * reflection.c (load_cattr_value): Now this handles
18467 MONO_TYPE_SZARRAY. Fixes bug #35629
18469 2003-01-20 Miguel de Icaza <miguel@ximian.com>
18471 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
18474 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18476 * decimal.c: fixed bug #26056.
18478 2003-01-17 Martin Baulig <martin@ximian.com>
18480 * gc.c: Raise an ExecutionEngineException instead of using g_error().
18482 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18485 (mono_get_exception_type_initialization): new function.
18487 * object.c: throw a TypeInitializationException when an exception is
18488 thrown invoking the class constructor.
18490 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18492 * reflection.c: fixed attribute reading.
18494 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18497 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
18498 provided, look for the type in the calling assembly and then in
18499 mscorlib; if the assembly name is provided, only try that one.
18501 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
18503 * object.c: register the vtable before there is a chance it's
18504 queried again recursively.
18506 2003-01-13 Duncan Mak <duncan@ximian.com>
18508 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
18511 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
18513 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
18515 2003-01-11 Martin Baulig <martin@ximian.com>
18517 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
18518 this to 20 for the release.
18520 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
18522 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
18524 * loader.c (mono_method_get_marshal_info): bug fix
18526 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
18527 structures with explicit layout
18529 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
18531 * profiler.c: made the output more readable (and sorted).
18532 Added caller information for the allocation profiler.
18534 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
18536 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
18538 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18540 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
18541 to get value types.
18543 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
18545 * object.c, profiler.h, profiler.c, profiler-private.h:
18546 Added object allocation profiler.
18548 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
18550 * reflection.h, reflection.c: handle global methods.
18551 Compress blob entries.
18553 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
18555 * marshal.c: fix compilation.
18557 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
18559 * loader.c (mono_method_get_marshal_info): impl.
18561 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
18563 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18565 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
18566 for reference types.
18568 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
18570 * loader.c: fixed off by one error in loaded parameter names.
18572 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
18574 * marshal.c (mono_marshal_get_icall_wrapper): like
18575 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
18576 instead of a MonoMethod.
18578 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18580 * decimal.c: fixed bug #36537.
18582 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
18584 * marshal.c: throw a missing method exception if a
18585 P/Invoke method is not found.
18587 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
18589 * icall.c: allow a null this for constructors.
18591 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
18593 * icall.c: raise the proper exceptions if the arguments to the
18594 internal Invoke are incorrect.
18596 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
18598 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
18600 2003-01-03 Martin Baulig <martin@ximian.com>
18602 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
18604 2002-12-31 Martin Baulig <martin@ximian.com>
18606 * debug-mono-symfile.c: Completely rewrote the type section.
18607 Instead of using individual malloc()ed fields, we use one big
18608 continuous memory area and offsets into this area.
18609 See the comments in the source code for details.
18611 2002-12-30 Martin Baulig <martin@ximian.com>
18613 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
18615 2002-12-30 Martin Baulig <martin@ximian.com>
18617 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
18618 line number table in this data blob instead of using an external
18621 2002-12-28 Martin Baulig <martin@ximian.com>
18623 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
18625 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
18627 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
18628 as a boxed return type.
18630 2002-12-21 Miguel de Icaza <miguel@ximian.com>
18633 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
18634 g_build_filename to properly get separators on the filename created.
18636 * object.h: Small change, introduce MonoMarshalByRefObject to
18637 track the layout of that structure in the C# universe as we make
18640 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
18642 * object.c: removed assert to allow static fields on interfaces.
18643 * loader.c: a TypeSpec may be used for any type, not just arrays.
18645 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18647 * class.c, class.h: added mono_class_array_element_size ().
18648 Ignore static methods in interfaces.
18650 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18652 * threads.c: fixed the build under cygwin.
18654 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
18656 * reflection.c: handle nullref constants. Allocate keys for
18657 reflection handles with the GC.
18659 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
18661 * threads.c, threads.h: added mono_thread_get_abort_signal()
18662 to get a suitable signal for thread abort.
18664 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
18666 * metadata.c: fix handling of ExportedType table.
18668 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18670 * icall.c: added WriteWindowsDebugString internal call.
18672 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18674 * reflection.h: added fields to match C# implementation.
18676 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18678 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
18680 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
18682 * gc.h, gc-internal.h: Rename header for GC internal calls to
18683 gc-internal.h from gc.h as to not clash with Boehm GC having its
18684 header installed as <gc.h> in outside include paths.
18685 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
18686 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
18688 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18690 * icall.c: assign minor, build and revision in FillName.
18692 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
18694 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
18695 Added support for running code generated by Reflection.Emit.
18697 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18699 * appdomain.c: check for NULL argument in LoadFrom.
18701 2002-12-10 Dick Porter <dick@ximian.com>
18703 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
18705 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18707 * appdomain.c: fix buglet when building exe file name. Handle full
18708 assembly name (needed after latest changes to AssemblyName).
18710 (mono_image_close): free some hashtables.
18712 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
18714 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
18715 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
18716 on some systems (redhat 7.3)
18718 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
18720 * threads.c: delete the critical section of a sync block,
18721 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
18723 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
18725 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
18727 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18729 * appdomain.[ch]: handle the assembly preload event to try loading the
18730 assemblies using the paths we have in the current domain.
18732 * assembly.[ch]: created an assembly preload hook that is called to try
18733 loading the assembly by other means that the ones provided here.
18735 * domain.c: initialize the domain search path.
18737 From now on, assemblies (TODO: except corlib and System) are loaded
18738 according to these rules when using mono_assembly_load ():
18740 1. It tries to load the assembly from the ApplicationBase
18741 of the current domain appending .dll and .exe (TODO: have to
18742 try loading from name/name.dll and name/name.exe).
18744 2. It tries the search path specified in PrivateBinPath for the
18745 current domain (if any).
18747 3. Previous behavior.
18749 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
18751 * icall.c: implemented GetInterfaceMap() related icall.
18752 * domain.c, loader.h: load MethodInfo in mono_defaults.
18754 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18756 * gc.c: disable the finalizer thread for now, untill all the issues
18757 with it are resolved.
18759 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18761 * string-icalls.c: handle embedded nulls in string ctor when the
18762 length is specified.
18764 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18766 * class.c: look for explicit interface implementation in parent
18769 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
18771 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
18773 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
18775 * gc.c: protect handles with a critical section.
18777 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18780 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
18781 parameters. If no assembly specified, try getting the type from all
18782 the assemblies in the current domain, else, load the assembly and get
18785 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18787 * marshal.c: applied patch from Aleksey Demakov that fixes
18788 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
18790 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18792 * icall.c: fixed get_location.
18794 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
18796 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
18797 declarations to make it work with older gcc.
18799 * loader.c (mono_get_method): set signature->pinvoke for native calls
18801 2002-11-20 Dick Porter <dick@ximian.com>
18803 * threads.c (mono_thread_init): Set the main thread's handle
18805 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
18807 * gc.c: allow compilation without GC support. Changed to match the
18810 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18812 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
18814 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
18816 * reflection.c: set a public key token on the core assemblies.
18818 2002-11-18 Dick Porter <dick@ximian.com>
18820 * threads.c: Split out some thread initialisation so that other
18821 files can set the start callback function.
18823 * gc.c: Run finalisers in a separate thread, to avoid stack
18824 overflow. Fixes bug 31333.
18826 * appdomain.c: Set up GC finalisation thread.
18830 * domain.c: Use gc.h macros for GC_malloc
18832 2002-11-15 Dick Porter <dick@ximian.com>
18836 * appdomain.c: Removed mono_runtime_init_with_attach(),
18837 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
18838 merging the extra parameter with the existing function. Removed
18839 unneeded code in mono_thread_attach().
18841 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
18843 * image.c (mono_image_loaded_by_guid): a method to get loaded
18845 (load_metadata_ptrs): we store the guid as string.
18847 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
18849 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
18851 * metadata.c (mono_guid_to_string): imported method form Zoltan
18852 Varga (slightly modified)
18854 * assembly.c (mono_assembly_open): load precompiled code
18856 * loader.h (MonoMethod): we store the method token for use in the
18859 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18861 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
18862 the hook function called when an assembly is loaded.
18864 * domain.c: Modified file.
18865 (mono_domain_assembly_load): removed hash table insertion of assemblies.
18869 2002-11-07 Miguel de Icaza <miguel@ximian.com>
18871 * reflection.c: Map PEFileKind to the value expected by the WinNT
18874 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18876 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
18877 Read until the buffer is filled completely.
18879 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18881 * icall.c: implemented MonoType.InternalGetEvent ().
18883 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18885 * appdomain.c: implemented InitAppDomainSetup. Delayed
18886 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
18887 the entry_assembly.
18889 * assembly.c: base_dir is now an absolute path ending with
18892 * icall.c: modified get_location according to the above changes.
18894 * object.c: init AppDomain.SetupInformation for the default domain after
18895 we have the entry assembly.
18897 * domain.c: when unloading a domain, setup = NULL.
18899 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
18901 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
18903 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
18905 * object.h, object.c: introduced mono_object_get_virtual_method ()
18906 to lookup the method invoked on an object when a callvirt is done on
18908 * icall.c: make MethodInfo::Invoke() always do a virtual call.
18910 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18912 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
18913 current domain when loaded an assembly and failed to load it.
18915 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
18917 2002-10-31 Dick Porter <dick@ximian.com>
18921 * file-io.c: Return the error status in a parameter, as the
18922 GetLastError() value has long since been blown away if we try and
18923 look it up in a subsequent internal call invocation. Delete the
18924 GetLastError() internal call, because it's useless.
18926 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
18928 * class.[ch]: added cast_class to fix bug 29517
18930 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
18932 * marshal.c: create valid IL code in the filter clause:
18933 the new JIT is less forgiving:-)
18935 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18937 * icall.c: removed get_property internal call.
18939 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
18941 * appdomain.h domain.c: Added an ID to appdomains.
18943 * threads.c threads.h icall.c: Implement icall
18944 Thread:GetDomainID(), and remove unused icall
18945 CurrentThreadDomain_internal.
18947 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18949 * icall.c: Don't recurse through the base types in GetConstructor.
18952 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
18954 * mempool.h, mempool.c: added mono_mempool_empty() and
18955 mono_mempool_stats().
18957 2002-10-23 Dick Porter <dick@ximian.com>
18961 * icall.c: Added MonoIO.GetFileType internal call
18963 2002-10-17 Dick Porter <dick@ximian.com>
18965 * appdomain.c (mono_runtime_cleanup): Don't signal the async
18966 delegate semaphore before waiting for all threads to finish,
18967 because new threads can also call async delegates. Fixes bug
18970 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
18971 of 3 seconds, in case another async job is queued. (This part is
18972 needed because the bug fix reintroduced the 3s exit lag.) This
18973 makes the mono_runtime_shutdown flag superfluous.
18975 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
18977 * reflection.c: include ehader size in method section headers.
18978 Really check for suplicated modules entries.
18980 2002-10-17 Martin Baulig <martin@gnome.org>
18982 * debug-mono-symfile.c: Added back support for locals.
18984 2002-10-14 Martin Baulig <martin@gnome.org>
18986 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
18989 2002-10-14 Martin Baulig <martin@gnome.org>
18991 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
18992 mono_class_get() instead of looking in the class cache.
18994 2002-10-13 Martin Baulig <martin@gnome.org>
18996 * debug-mono-symfile.c: Set version number to 28, include the
18997 signature in method names.
18999 2002-10-13 Martin Baulig <martin@gnome.org>
19001 * debug-mono-symfile.h: Set version number to 27.
19003 2002-10-11 Martin Baulig <martin@gnome.org>
19005 * gc.c: Don't register/unregister NULL pointers as disappearing links.
19007 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
19009 * metadata.c, metadata.h: added helper function to allocate signatures.
19011 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19013 * icall.c: added internal call to get the location of machine.config.
19015 2002-10-08 Martin Baulig <martin@gnome.org>
19017 * debug-mono-symfile.c: Ignore classes with a pending init for the
19020 2002-10-03 Dick Porter <dick@ximian.com>
19022 * threads.c: Freebsd pthread_t is a pointer
19024 2002-10-03 Dick Porter <dick@ximian.com>
19026 * socket-io.c: Implemented GetHostName_internal
19028 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19031 (mono_config_parse_file): don't leak the text.
19033 2002-10-02 Martin Baulig <martin@gnome.org>
19035 * debug-mono-symfile.c: Added support for methods.
19037 2002-10-01 Martin Baulig <martin@gnome.org>
19039 * debug-mono-symfile.c: Don't emit methods and line numbers for
19040 the dynamic symbol file, just write the type table. We can easily
19041 have an external helper program which creates a symbol file for an
19044 2002-10-01 Dick Porter <dick@ximian.com>
19046 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
19047 Only add the handle to the cleanup array when we're about to
19048 launch the thread. Bug 31425 deadlocked when the test was run on
19051 2002-10-01 Martin Baulig <martin@gnome.org>
19053 * debug-mono-symfile.c: Added support for properties.
19055 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
19057 * reflection.c: unaligned store fix from Mark Crichton
19058 <crichton@gimp.org>.
19060 2002-09-27 Martin Baulig <martin@gnome.org>
19062 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
19065 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
19067 * assembly.h, assembly.c: use a sane API to hook into the assembly
19068 loading process instead of a useless special-purpouse hack
19069 (ngen needs a hook, too, for example).
19071 2002-09-27 Dick Porter <dick@ximian.com>
19073 * threads.c (mono_thread_init): Call GetCurrentProcess() so
19074 io-layer can set up some process handle info. Not needed on w32,
19075 but doesn't hurt either.
19077 * process.c: Pass the program name in the second parameter to
19078 CreateProcess, so the path is searched. Include the working
19079 directory. Implemented process name, process enumeration, and some
19080 process detail internal calls.
19082 * icall.c: Added internal calls for process lookup, and some
19085 2002-09-26 Martin Baulig <martin@gnome.org>
19087 * assembly.c (mono_install_open_assembly_hook): New global
19088 function to install a function to be invoked each time a new
19089 assembly is loaded.
19090 (mono_assembly_open): Run this callback function if set.
19092 * debug-mono-symfile.c: Put back line numbers for the dynamic
19093 symbol file and also record the .il file as source file. This
19094 allows us to install the temporary symbol file as `file.dbg' just
19095 like a compiler-generated one.
19097 2002-09-26 Nick Zigarovich <nick@chemlab.org>
19099 * Corrected typo in gc.c (BOHEM vs BOEHM).
19101 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19103 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
19104 GetProperties. Also avoid calling g_slist_length in GetProperties and
19107 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
19109 * reflection.c: avoid unaligned stores (bug spotted by
19110 Mark Crichton <crichton@gimp.org>).
19112 2002-09-25 Martin Baulig <martin@gnome.org>
19114 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
19115 instead of guint64 for addresses and added prologue/epilogue info.
19117 2002-09-25 Martin Baulig <martin@gnome.org>
19119 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
19120 store line number info. For the dynamic symbol file, we only need
19121 to provide the JIT generated dynamic line number info for the dynamic
19124 2002-09-25 Martin Baulig <martin@gnome.org>
19126 * debug-mono-symfile.h: Incremented version number.
19128 2002-09-24 Martin Baulig <martin@gnome.org>
19130 * class.c (mono_debugger_class_init_func): New global function
19132 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
19135 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
19136 function. This is called via the mono_debugger_class_init_func
19137 hook to add all types to the dynamic type table.
19138 (ves_icall_MonoDebugger_GetType): New interncall to get a class
19139 from its metadata token.
19141 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
19142 New interncall for the debugger.
19144 2002-09-24 Nick Drochak <ndrochak@gol.com>
19146 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
19147 before using it in case it is null.
19149 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
19151 * metadata.c: allow custom modifiers in local var signatures
19152 (bug spotted by Zoltan Varga).
19154 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
19156 * class.c: deal with the <Module> class that may have a NULL vtable.
19157 Eliminate warnings.
19159 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
19161 * image.c, image.h: more strong name helpers.
19162 * monosn.c: more work: convert pem keys to cryptoapi format.
19164 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
19166 * string-icalls.c: speedup IndexOf.
19168 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
19170 * icall.c: updates from Zoltan.2.Varga@nokia.com.
19172 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
19174 * icall.c: cleanup: use mono_object_domain ().
19176 2002-09-23 Martin Baulig <martin@gnome.org>
19178 * debug-mono-symfile.c: Improved type support.
19180 2002-09-22 Martin Baulig <martin@gnome.org>
19182 * debug-mono-symfile.c: Added support for reference types and strings.
19184 2002-09-22 Martin Baulig <martin@gnome.org>
19186 * debug-mono-symfile.c: Started to work on the type table.
19188 2002-09-21 Martin Baulig <martin@gnome.org>
19190 * debug-mono-symfile.c: Largely reworked the symbol table format.
19191 The symbol table is now incrementally updated each time a new
19192 method is added. We're now also using our own magic and version
19193 so that you don't need to recompile all your classes if the
19194 dynamic table changes.
19195 (mono_debug_update_mono_symbol_file): Removed.
19196 (mono_debug_symfile_add_method): New function to add a method.
19198 2002-09-21 Martin Baulig <martin@gnome.org>
19201 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
19204 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
19205 New interncall to get a method from its metadata token.
19207 2002-09-21 Martin Baulig <martin@gnome.org>
19209 * debug-mono-symfile.c: Create type table.
19211 2002-09-20 Martin Baulig <martin@gnome.org>
19213 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
19215 2002-09-20 Martin Baulig <martin@gnome.org>
19217 * debug-mono-symfile.c: Provide information about params and locals.
19219 2002-09-20 Martin Baulig <martin@gnome.org>
19221 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
19224 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
19225 interncall to get a method from its metadata token.
19227 2002-09-20 Martin Baulig <martin@gnome.org>
19229 * debug-mono-symfile.c: Added a few checks for method->header
19230 being non-NULL. This should never happen, but for the moment
19231 let's use a g_warning() rather than a g_assert().
19233 2002-09-19 Mark Crichton <crichton@gimp.org>
19235 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
19236 even if support for it isn't present. Added an #ifdef to fix this.
19238 * socket-io.c: Added checks back for Solaris support.
19240 2002-09-19 Martin Baulig <martin@gnome.org>
19242 * debug-mono-symfile.c (read_string, write_string): Reflect latest
19243 changes in the symbol file format.
19245 2002-09-18 Martin Baulig <martin@gnome.org>
19247 * debug-mono-symfile.c: Set version number to 21.
19249 2002-09-18 Dick Porter <dick@ximian.com>
19251 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
19252 on netbsd. Fixes bug 30051.
19254 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19257 (set_version_from_string): little fix.
19259 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
19261 * monosn.c, Makefile.am: added strong name utility.
19262 * reflection.h, reflection.c: implemented delayed signing,
19263 locale, version and hash id assembly attributes.
19265 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
19267 * loader.c, metadata.c: load param attributes in signatures.
19269 2002-09-16 Martin Baulig <martin@gnome.org>
19271 * debug-mono-symfile.c: Added string table with all method names.
19273 2002-09-14 Martin Baulig <martin@gnome.org>
19275 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
19276 fast method lookup.
19278 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
19280 * reflection.c: record the public key token of referenced assemblies.
19282 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
19284 * image.c, image.h: added functions to get the strong name and the
19285 public key of an assembly.
19286 * pedump.c: use them.
19288 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
19290 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
19292 2002-09-12 Miguel de Icaza <miguel@ximian.com>
19294 * marshal.c (mono_marshal_get_managed_wrapper): Added
19297 2002-09-11 Martin Baulig <martin@gnome.org>
19299 * gc.c: Call GC_unregister_disappearing_link() on all links when
19300 finalizing them, this is necessary to aviod a crash in boehm's
19303 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
19305 * gc.c: handle GetTarget for finalized objects spotted and fixed by
19308 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
19310 * icall.c: implemented MonoType::Module.
19311 * reflection.c, reflection.h: mono_module_get_object () from
19312 Tomi Pakarinen <tomi.pakarinen@welho.com>.
19314 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
19316 * icall.c: ignore overridden methods in GetMethods ().
19317 Fix for FieldInfo::SetValue().
19318 * object.c: handle float/double in runtime invoke.
19320 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
19322 * object.c: allow a constructor to be called again on an object.
19324 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
19326 * class.h, class.c: move field layout code to it's own function and
19327 export it. Get an interface id earlier. Move fields in MonoClass
19328 so they are more cache friendly and align the bitfields.
19329 * loader.c: temporary handle get_param_names() for a runtime method.
19330 * reflection.c, reflection.h: more code to handle runtime creation of
19333 2002-09-09 Martin Baulig <martin@gnome.org>
19335 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
19336 signature with the pinvoke field being set for the actual call.
19338 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
19340 * icall.c: removed some unused icalls. Start of map of glib charsets
19341 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
19343 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
19345 * debug-helpers.c: break infinite loop (found and fixed by
19346 Holger Arnold <harnold@gmx.de>).
19348 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
19350 * icall.c: target may be null in create_delegate.
19352 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
19354 * marshal.c: handle a boolean return type.
19356 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
19358 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
19360 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
19362 * gc.c: fix weakreferences.
19364 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
19366 * icall.c: added icall to get default codepage.
19368 2002-09-03 Dick Porter <dick@ximian.com>
19371 * threads.c: Use MonoThread instead of MonoObject where
19374 Store running thread objects in a hash table, so that we have all
19375 the info to hand when waiting for them to finish
19376 (means we don't need OpenThread() any more, so mingw builds should
19377 be fully functional again.)
19380 * object.h: Added thread ID to MonoThread
19382 2002-09-03 Martin Baulig <martin@gnome.org>
19384 * icall.c (System.Reflection.Assembly::get_location): New interncall.
19386 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19388 * icall.c: fixed leak in get_temp_path. Thanks lupus.
19390 2002-09-03 Martin Baulig <martin@gnome.org>
19392 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
19393 argument to store the end address of the disassembled instruction.
19395 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
19396 here from debug-symfile.h.
19397 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
19398 JIT into this struct.
19399 (MonoSymbolFile): Added `char *image_file' field.
19400 (MonoDebugGetMethodFunc): Removed.
19401 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
19402 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
19403 (mono_debug_find_method): New method.
19405 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
19406 create a full symbol file.
19407 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
19408 and static symbol files.
19409 (mono_debug_find_method): The symbol file keeps an internal method hash,
19410 call this to get a MonoDebugMethodInfo from a MonoMethod.
19412 * debug-symfile.[ch]: Removed.
19414 2002-08-29 Miguel de Icaza <miguel@ximian.com>
19416 * image.c (do_mono_image_open): Remove linker version check.
19418 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
19420 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
19421 wrappers for instance methods.
19423 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19425 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
19427 2002-08-28 Dick Porter <dick@ximian.com>
19429 * Makefile.am: Export HOST_CC for w32 builds
19431 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
19433 * file-io.c process.c: MonoString are null terminated, no
19434 need for mono_string_to_utf16() anymore.
19436 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
19438 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
19440 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
19442 * icall.c, reflection.h: speedup System.MonoType.
19444 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
19446 * reflection.c: allow null as the value of a string argument in
19447 custom attributes constructors.
19449 2002-08-27 Martin Baulig <martin@gnome.org>
19451 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
19452 `trampoline_address' field.
19454 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
19456 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
19457 check (fixes bug #29486)
19459 2002-08-27 Martin Baulig <martin@gnome.org>
19461 * debug-mono-symfile.c: Changed the file format in a way that allows us
19462 open it read-only and to use a specially malloced area for all the
19463 dynamic data. We can now also generate a symbol file on-the-fly if we're
19464 debugging IL code and there is no MCS generated symbol file for it.
19466 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
19468 * object.c: added a define for a good string and array
19469 creation speedup (not enabled by default because we need to deal with
19472 2002-08-26 Martin Baulig <martin@gnome.org>
19474 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
19475 function to create a dynamic symbol file. This is used by the
19476 debugger to create a symbol file for IL code on-the-fly.
19478 2002-08-26 Martin Baulig <martin@gnome.org>
19480 * loader.c (mono_lookup_pinvoke_call): Include the error message
19481 from g_module_error() in the error message.
19483 2002-08-24 Martin Baulig <martin@gnome.org>
19485 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
19486 function to update the symbol file. The symbol file is mmap()ed
19487 writable, but private. This allows us to install the symbol file
19488 together with the assembly.
19490 2002-08-24 Martin Baulig <martin@gnome.org>
19492 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
19493 but they can read the new symbol file format which mcs is now creating.
19495 * debug-symfile.c (mono_debug_find_source_location): Moved to
19496 debug-mono-symfile.c; this is now operating on the new symbol file.
19498 2002-08-23 Martin Baulig <martin@gnome.org>
19500 * debug-helpers.c (mono_method_desc_from_method): New function to get
19501 a MonoMethodDesc from a MonoMethod.
19503 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
19505 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
19506 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
19508 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
19510 * string-icalls.[ch]: make helper methods static.
19512 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19514 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
19515 types to it and to SetValueInternal.
19517 * object.c: Moved handle_enum label to its proper place. This was the
19520 This time i compiled mcs and gtk-sharp and they both work.
19522 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19524 * icall.c: reverted partially my previous patch until
19525 object.c:set_value handles enums correcly.
19527 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19530 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
19531 (ves_icall_System_Environment_get_MachineName): removed warning when
19532 compiling under cygwin.
19534 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
19536 * object.c: fixed field_get_value() for reference types.
19538 2002-08-22 Dick Porter <dick@ximian.com>
19540 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
19541 Don't free a buffer while it's still needed. Patch from Jonathan
19542 Liger <Jonathan.liger@wanadoo.fr>
19544 2002-08-21 Miguel de Icaza <miguel@ximian.com>
19546 * icall.c (ves_icall_System_Environment_get_Platform): Add new
19549 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
19551 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
19552 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
19554 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
19555 we call unmanaged code which throws exceptions.
19557 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
19559 * appdomain.h: added per-domain entry_assembly.
19560 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
19562 * icall.c: Assembly::GetEntryAssembly icall.
19563 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
19564 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
19566 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
19568 * appdomain.h, gc.c: added mono_domain_finalize ().
19570 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19573 (mono_print_unhandled_exception): changed g_warning by g_printerr
19574 because g_log has a 1024 characters limit (yeah, i got a big stack
19575 trace). Don't print exception name, that should be in ToString
19578 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19580 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
19581 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
19583 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19586 (mono_print_unhandled_exception): after previous commit, i realized
19587 that MS calls ToString on the exception. I changed this function to
19588 do that. This way we get stack_trace for free.
19590 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19593 (mono_print_unhandled_exception): invoke Message property instead of
19594 getting 'message' field from Exception. Don't allocate memory for
19595 'trace' and 'message' if not needed.
19597 2002-08-18 Dick Porter <dick@ximian.com>
19599 * unicode.c: Fix asserts to match Encoder.cs checks
19601 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
19603 * marshal.c: fix unaligned store issue and a few wrong
19604 opcode argument types.
19606 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19608 * icall.c: added GetUninitializedObjectInternal internal call.
19610 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
19612 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
19613 to the right domain.
19615 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
19617 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
19619 * class.c (class_compute_field_layout): set blittable to false for Strings
19621 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
19623 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
19625 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
19626 first chunk of code to create types at runtime. Code to
19627 handle ReflectedType/DeclaringType. Make reflection handles
19630 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
19632 * class.c: set correct name in arrays.
19634 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
19636 * appdomain.c (mono_domain_transfer_object): make it work with
19637 valuetypes. bug fixes.
19639 2002-08-12 Dick Porter <dick@ximian.com>
19641 * object.h: Rename some parameters to avoid c++ keywords (Patch
19642 from Joseph Wenninger <kde@jowenn.at>)
19644 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
19646 * icall.c: added icall to implement Assembly.GetFile*.
19648 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
19650 * reflection.h, reflection.c: code to embed managed resources.
19652 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
19654 * class.c: move all the type size stuff into
19655 class_compute_field_layout().
19657 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
19659 * class.c: ensure enums have always the correct instance size.
19660 * unicode.c: remove wrong assert.
19662 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
19664 * assembly.c: fix mem corruption issue.
19665 * image.h, image.c: added mono_image_get_resource () to access
19667 * icall.c: implemented Assembly.EntryPoint property and some
19668 Managed Resources related internalcalls.
19671 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
19673 * image.c, image.h: impemented mono_image_get_entry_point ().
19674 * appdomain.c: use mono_image_get_entry_point.
19676 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
19678 * reflection.c: support the object type argument when loading
19681 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
19683 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
19684 String as return type.
19686 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
19688 * reflection.c: fix encoding of named args for custom attrs to match
19689 the ms implementation. Read them back when instantiating custom
19692 2002-08-02 Radek Doulik <rodo@ximian.com>
19694 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
19695 by Dietmar as quick fix
19696 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
19697 16 as stack size, used on more places as quick fix before Dietmar
19698 will fix it properly
19700 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
19702 * object.h, object.c: added accessors for fields and properties.
19704 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
19706 * class.c, class.h: made mono_class_get_field_from_name ()
19707 loop on parent types.
19708 Added mono_class_get_property_from_name ().
19710 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
19712 * class.c, class.h: move the code to setup the type vtable in its own
19713 function so that it can be reused also for types created at runtime.
19714 Eliminate the "class" identifier from the header file.
19715 * reflection.c: setup the vtable for enums so that we can create
19716 objects for use in SetConstant ().
19718 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
19720 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
19721 instead of the delegate itself as this pointer (bug #28383)
19723 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
19725 * marshal.c (mono_marshal_get_managed_wrapper): added return type
19728 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
19730 * loader.c: don't set the pinvoke bit on icalls.
19732 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
19734 * debug-helpers.c (mono_method_full_name): only print a number to
19735 indicate wrapper type (so that the output is more readable in traces).
19737 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
19739 * class.c (mono_class_init): include method override patch from Paolo
19741 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
19743 * icall.c: fixed GetTypeCode().
19745 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
19747 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
19748 use real delegate invoke function to make it work with multicast
19749 delegates (fix bug# 28291).
19751 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
19753 * object.c: load constant strings.
19755 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
19757 * reflection.c: no magic numbers.
19758 * tabledefs.h: security action enum.
19760 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
19762 * assembly.c: fix possible memory corruption.
19764 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
19766 * reflection.h, reflection.c: added support for linking resources.
19767 * verify.c: check we have an updated corlib.
19769 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
19771 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
19773 (mono_marshal_string_array): null terminate unmanaged string arrays.
19774 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
19776 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
19778 * icall.c: Type.GetType () can now return also types from the
19781 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
19783 * loader.h, loader.c: stack walking support.
19784 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
19785 GetCallingAssembly.
19787 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
19789 * marshal.c: added optimisations for blittable types
19791 * class.c (mono_array_class_get): do not set blittable attribute on arrays
19792 (mono_class_setup_mono_type): set blittable attribute for single
19795 * marshal.c (mono_string_utf8_to_builder): impl.
19796 (mono_string_builder_to_utf8): impl.
19797 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
19799 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
19801 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
19802 (mono_marshal_get_managed_wrapper): impl. byref types
19804 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19807 (search_method): don't display debug message.
19809 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
19811 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
19813 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
19815 * appdomain.c: set the missing filename when throwing exception.
19817 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
19819 * metadata.c (mono_type_size): code cleanup
19820 (mono_type_stack_size): removed some test code
19822 2002-07-21 Miguel de Icaza <miguel@ximian.com>
19824 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
19825 mono_get_exception_file_not_found now.
19827 * exception.c (mono_exception_from_name_two_strings): New version
19828 that will call a constructor with two string arguments.
19829 (mono_get_exception_file_not_found): New helper routine, used to
19830 report file-not-found errors.
19832 2002-07-20 Dick Porter <dick@ximian.com>
19835 * process.c: Pass file handles to CreateProcess
19839 * file-io.c: Implemented CreatePipe
19841 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
19843 * metadata.c (mono_get_param_info): set alignment for value types
19845 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
19847 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
19848 Constify mono_domain_assembly_open().
19849 * loader.c: handle null namespace in icalls.
19851 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
19853 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
19854 (emit_str_to_ptr_conv): marshal object as structs
19856 * metadata.c (mono_type_to_unmanaged): marshal object as structs
19858 * marshal.c (mono_marshal_get_runtime_invoke): support value types
19860 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
19862 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
19863 (mono_marshal_get_native_wrapper): we an now return value types
19865 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
19867 * verify.c: more checks implemented.
19869 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
19871 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
19873 (mono_marshal_get_native_wrapper): allow byref arguments
19874 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
19875 impl. PtrToStringXXX methods
19876 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
19877 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
19878 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
19879 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
19880 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
19882 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
19884 * reflection.c: fix buglet in parsing an assembly name.
19886 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
19888 * marshal.c (emit_ptr_to_str_conv): first impl.
19890 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
19892 * object.c, class.h: cache the vtable in the class as suggested by
19893 vargaz@freemail.hu (Zoltan Varga).
19895 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
19897 * class.h, loader.c: added mono_field_from_token().
19898 * verify.c: first cut of type checking code.
19900 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
19902 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
19904 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
19906 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
19908 (mono_marshal_get_remoting_invoke): impl.
19909 (mono_delegate_begin_invoke): impl.
19910 (mono_mb_emit_save_args): impl.
19911 (mono_delegate_end_invoke): impl.
19912 (mono_marshal_get_delegate_begin_invoke):
19913 (mono_marshal_get_delegate_end_invoke):
19914 (mono_marshal_get_delegate_invoke): generate a special name for
19915 those methods (including the signature) and associate them whith
19916 the delegate class.
19918 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
19921 (mono_reflection_type_from_name): now it has a MonoImage parameter
19922 which is used as the default image to search the type in. If the image
19923 is NULL or getting the type from it fails, it defaults to corlib.
19925 * icall.c: changed 1 call to mono_reflection_type_from_name to match
19928 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
19930 * reflection.c: update the parameter table index.
19932 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
19934 * domain.c: don't include the mark byte in the string hash.
19936 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
19938 * icall.cs: icall for Type.GetTypeCode ().
19939 * verify: a couple of fixes and disabled local initialization checks.
19941 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
19943 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
19945 * debug-helpers.c (mono_method_full_name): print the type of the
19948 * metadata.c (mono_signature_hash): a hash function for signatures
19949 (mono_signature_hash): better hash algorithm
19951 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
19953 * debug-helpers.c (mono_method_full_name): this can now generate
19954 method names with signatures
19956 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
19957 method dont have this pointers.
19959 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
19961 * reflection.c: fixup typebuilder tokens.
19962 * image.c: fix buglet.
19963 * marshal.h: remove whitespace.
19964 * metadata.h, metadata.c: reinstate code that was removed.
19965 * verify.c: handle catch directives and fix another couple of bugs.
19967 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
19969 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
19970 (mono_marshal_get_native_wrapper): make it comp. with the old code
19971 (mono_marshal_get_native_wrapper): support boolean
19972 (mono_marshal_get_managed_wrapper): support more types
19974 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
19976 * class.c (class_compute_field_layout): compute class->blittable attribute.
19978 2002-07-09 Dick Porter <dick@ximian.com>
19980 * threads.c: Make the thread cleaning up cope with threads that
19983 2002-07-08 Radek Doulik <rodo@ximian.com>
19985 * reflection.c (method_encode_code): use non-translated values to
19986 compute finally_start, this fixes exception handling on ppc, yay!
19988 * decimal.h (struct signscale): fix endianess
19990 2002-07-07 Radek Doulik <rodo@ximian.com>
19992 * reflection.c: swap box_val and not val
19994 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
19996 * reflection.c, reflection.h: handle full assembly info in type name.
19997 Handle Type arguments when loading custom attributes.
19998 * icall.c: updated to use new mono_reflection_type_from_name () method.
20000 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20003 (method_from_memberref): also print assembly name when method not found.
20005 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20008 (ves_icall_TypeGetProperties): fixed bug #27473.
20010 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20012 * reflection.c: display image name and token when cannot find the
20013 .ctor for an attribute.
20015 2002-07-05 Martin Baulig <martin@gnome.org>
20017 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
20019 2002-07-04 Dick Porter <dick@ximian.com>
20021 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
20022 compile on mingw. This will cause mingw builds to not wait for
20023 subthreads to terminate after the main thread does. I've lodged a
20024 bug with the mingw developers for them to wrap OpenThread().
20026 2002-07-03 Dick Porter <dick@ximian.com>
20028 * threads.c: Store thread IDs instead of handles, because
20029 GetCurrentThread() returns a pseudohandle and therefore stores
20030 useless values. mono_thread_cleanup() continues checking the
20031 array of threads until it is empty, to cope with subthreads
20032 spawning new threads after the main thread has finished.
20036 * profiler-private.h: Pass the thread ID to thread profiler
20037 functions, instead of a handle
20039 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
20041 * verify.c: fixes to make it more usable.
20042 * pedump.c: added --verify code to verify IL code in an assembly.
20044 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20046 * reflection.c: turn errors into warnings to allow compiling corlib.
20048 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
20050 * reflection.c: add special cases to compile corlib.
20052 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
20054 * reflection.c: handle properties with only a set method.
20056 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
20058 * opcodes.h: add enum with opcodes in opval order.
20060 2002-07-01 Dick Porter <dick@ximian.com>
20063 * object.c (mono_runtime_run_main): Removed unneeded argument
20065 2002-06-28 Martin Baulig <martin@gnome.org>
20067 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
20069 2002-06-27 Dick Porter <dick@ximian.com>
20071 * threads.c: Store the handle in both the parent thread and in the
20072 subthread, to minimise the time between starting a new thread and
20075 2002-06-26 Dick Porter <dick@ximian.com>
20077 * appdomain.c (mono_runtime_cleanup): Close the socket library
20078 after all the threads have finished, not before
20080 2002-06-26 Martin Baulig <martin@gnome.org>
20082 * debug-symfile.c (mono_debug_find_source_location): Added
20083 `guint32 *line_number' argument. If it's not NULL, store the line number
20084 there and return the file name without the line number.
20086 2002-06-25 Dick Porter <dick@ximian.com>
20090 * process.c: Process forking and other support functions
20092 2002-06-25 Dick Porter <dick@ximian.com>
20094 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
20095 things dont happen when the image is closed.
20096 (mono_image_lookup_resource): Walk the resource section looking
20097 for a particular entry
20099 * cil-coff.h: PE resource section decoding
20101 2002-06-25 Dick Porter <dick@ximian.com>
20105 (mono_assembly_foreach): Accessor functions to walk the list of
20107 (mono_assembly_set_main):
20108 (mono_assembly_get_main): Process methods need to know which
20109 assembly is the "main" one
20111 * object.c (mono_runtime_run_main): Record the main assembly
20113 * debug-helpers.c: Fix typo
20115 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
20117 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
20118 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
20120 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
20122 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
20124 2002-06-21 Miguel de Icaza <miguel@ximian.com>
20126 * image.c (do_mono_image_open): Initialize reference count,
20127 otherwise we leak the MonoImage.
20129 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
20131 * reflection.c: small tweak to handle self-hosting.
20133 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
20135 * reflection.c: fix type name parse code.
20137 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
20139 * reflection.c: break out of the loop.
20140 * image.c: special case corlib.
20142 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
20144 * reflection.c: add all the custom attrs at the end to ensure the
20145 ctors have been properly initialized when the attributes are defined
20146 in the current assembly.
20148 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
20150 * reflection.c: handle correctly multiple-nested types.
20152 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
20154 * row-indexes.h: fix typos.
20155 * reflection.c: adjust for typos and fix method_def_or_ref
20156 encoding in MethodImpl table.
20158 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
20160 * reflection.c: fix entry point patching (thanks Serge!).
20162 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
20164 * verify.c: add check for System.Exception
20166 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
20168 * image.c, class.c: minifix for code just c&p'ed.
20169 * reflection.c: warning fix.
20170 * object.h, loader.h, domain.c: load also StringBuilder.
20172 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
20174 * marshal.h, marshal.c: some support code to handle complex marshaling.
20176 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20178 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
20179 Better signatures with vtable error dump.
20181 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
20183 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
20185 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
20187 * icall.c (ves_icall_Type_GetField): impl.
20189 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20191 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
20192 to retrieve a marshal description blob for a field or param.
20194 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
20196 * reflection.h, reflection.c: change order of nested type emission
20197 to avoid table corruption. The NestedTypes table is sorted.
20198 * icall.c: change order of GetConstructor results to workaround mcs bug.
20200 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
20202 * reflection.h, reflection.c: handle field and param marshal
20205 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
20207 * icall.c, marshal.c marshal.h: more Marshal class implementation.
20209 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
20211 * reflection.c: fix call convention.
20213 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
20215 * reflection.h, reflection.c: mono_image_get_memberref_token()
20216 takes a type instead of a class, now. Added
20217 mono_image_get_array_token() to create tokens for the special
20218 multi-dim array methods.
20220 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
20222 * assembly.c: handle modules (no assembly table). Split
20223 loading references in its own function.
20224 * class.c: handle moduleref resolution scope.
20225 * image.c, image.h: cache module name in image.
20227 2002-06-07 Martin Baulig <martin@gnome.org>
20229 * reflection.c (mono_image_get_type_info): Only add a class layout entry
20230 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
20232 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
20234 * icall.c: more signature fixes that used uint instead of int.
20236 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20238 * reflection.c: fixed signature of field refs.
20240 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
20242 * class.c, reflection.c: handle typerefs of nested types
20243 (both on read and when writing files).
20245 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
20247 * icall.c: fix method signatures that tried to workaround the previous
20250 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
20252 * debug-helpers.c: fix typo.
20254 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
20256 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
20257 rewrote the PE/COFF writing code (our programs are understood by the
20260 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
20262 * gc.c, gc.h, icall.c: weakreference support.
20264 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
20266 * Makefile.am, mono-config.c: use $(sysconfdir).
20268 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
20270 * icall.c: changed default precision of Double.ToString() to 15.
20271 Fixed memory leak. Unified with Single.ToString.
20273 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
20275 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
20277 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
20279 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
20280 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
20281 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
20284 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
20286 * debug-symfile.c, sysmath.c: yet more compilation fixes.
20288 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20290 * reflection.c, socket-io.c: more compilation fixes.
20292 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
20294 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
20295 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
20296 unicode.c: warning and compiler compatibility fixes.
20298 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
20300 * class.h, metadata.c: fixed warnings/compilation errors.
20302 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
20304 * Makefile.am, mono-config.c, mono-config.h: configuration file
20306 * loader.c, loader.h: make Dll mapping configurable at runtime in the
20307 config file. Export methods to insert and lookup mappings.
20309 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
20311 * reflection.c: handle types and boxed objects in custom attr
20314 2002-05-30 Martin Baulig <martin@gnome.org>
20317 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
20319 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
20321 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
20322 to lookup the implmap row for a P/Invoke method.
20323 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
20324 P/Invoke method from the runtime on an as needed basis.
20326 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
20328 * metadata.c (mono_metadata_parse_signature): impl.
20330 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
20332 * class.c: handle .pack directive.
20334 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
20336 * object.c: initialize static fields with RVA data.
20338 2002-05-25 Martin Baulig <martin@gnome.org>
20341 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
20343 2002-05-24 Martin Baulig <martin@gnome.org>
20346 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
20347 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
20348 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
20350 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
20352 * object.c: special case string ctros in invoke.
20353 * gc.c: silly whitespace changes.
20355 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
20357 * threadpool.[ch]: impl. a threadpool that can
20358 be used by mint and mono.
20360 2002-05-22 Martin Baulig <martin@gnome.org>
20362 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
20363 The first argument is now a `MonoReflectionModuleBuilder *', the return
20364 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
20365 `methods' field to get the method builder. The `token' argument is the
20368 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
20369 invalid characters instead of g_assert_not_reached()ing. This seems
20370 to be the behaviour of mscorlib.
20372 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
20374 * object.c (mono_runtime_invoke_array): applied patch from Rachel
20375 Hestilow to fix bug #25104
20377 2002-05-21 Martin Baulig <martin@gnome.org>
20379 * debug-symfile.c (mono_debug_find_source_location): New function.
20380 Looks up an IL offset in the line number table and returns the source
20381 location as a string.
20383 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20386 (mono_double_ToStringImpl): changed %f by %g until we have something
20389 2002-05-21 Nick Drochak <ndrochak@gol.com>
20391 * icall.c : Use different name for Math.Pow's icall. Needed to check
20392 parameters first in C#.
20394 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
20396 * icall.c, reflection.h: added icall to get info about an event.
20398 2002-05-20 Radek Doulik <rodo@ximian.com>
20400 * object.c (mono_value_box): don't use memcpy for boxing on BIG
20402 (mono_value_box): don't use memcpy for small sizes on
20403 architectures with unaligned access
20405 2002-05-20 Martin Baulig <martin@gnome.org>
20407 * reflection.c (mono_reflection_setup_internal_class): Don't crash
20408 if `tb->parent == NULL'.
20409 (mono_reflection_create_internal_class): New function. This is
20410 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
20413 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
20416 2002-05-19 Martin Baulig <martin@gnome.org>
20418 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
20419 argument to get the length, don't default to the array length.
20421 2002-05-18 Miguel de Icaza <miguel@ximian.com>
20423 * assembly.c (mono_assembly_setrootdir): New function used to
20424 override the MONO_ASSEMBLIES directory.
20426 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
20428 * icall.c: ValueType_GetHashCode() initialize local var.
20430 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
20432 * reflection.c: sort custom attributes table.
20434 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
20436 * reflection.c: support named args in custom attributes (write support).
20438 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
20440 * reflection.c: fix finally position calculation.
20442 2002-05-15 Radek Doulik <rodo@ximian.com>
20444 * reflection.c: fixed endianess at many places
20446 * icall.c (ves_icall_InitializeArray): comment out debug msg
20448 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
20450 * object.c (mono_unhandled_exception): new function to handle
20451 unhandled exceptions.
20452 (mono_unhandled_exception): call the UnhandledException event.
20453 (mono_runtime_delegate_invoke): impl.
20455 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
20457 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
20458 returns the RVA, not the direct pointer to the data. Handle the case
20459 when the class size is fixed.
20461 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
20463 * reflection.c: fix some endianess issues.
20465 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
20467 * object.c (mono_runtime_invoke): is now able to catch exceptions.
20469 * threads.c (mono_thread_init): added a callback which is invoked
20472 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
20474 * icall.c: make GetHashCode return non-negative values.
20476 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
20478 * object.c, icall.c, gc.c: revert to address-based hashcode.
20480 2002-05-13 Miguel de Icaza <miguel@ximian.com>
20482 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
20484 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
20486 * icall.c, class.c: special case <Module>.
20488 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
20490 * icall.c: fix bug in GetNow().
20492 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
20494 * object.c (mono_runtime_class_init): make sure that we call all
20495 static class constructors.
20497 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
20499 * reflection.c: sort methodsemantics table.
20501 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
20503 * reflection.h, reflection.c: honour init locals setting.
20505 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
20507 * icall.c: copied Double ToStringImpl for Single ToStringImpl
20509 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
20511 * reflection.c: support ContructorBuilders in attribute blob creation.
20513 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
20515 * reflection.c: some changes to build a binary that can be run
20516 directly in windows.
20518 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
20520 * loader.c: print a big message when an icall can't be found.
20522 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20524 * string-icalls.c: fix bug 24248.
20526 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
20528 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
20529 icall.c, reflection.h: separate assembly loading by pathname and by
20530 assembly name. Use the MONO_PATH env var to search for assemblies.
20532 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
20534 * assembly.c, image.h: add some support for assemblies
20535 with multiple modules.
20536 * class.c, class.h: export mono_class_from_typeref().
20537 * loader.c: remove duplicated code and use mono_class_from_typeref(),
20540 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
20542 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
20543 documentation says (the ECMA one is correct).
20545 2002-05-02 Dick Porter <dick@ximian.com>
20547 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
20548 Don't name the synchronisation mutex.
20550 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
20553 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
20554 Make the prototypes match.
20555 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
20559 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
20560 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
20561 all systems have tm.tm_zone, so use strftime() with %Z to print
20562 the timezone abreviation into a temp string.
20564 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
20565 rather than mono_array_addr() on a MonoString on Big Endian
20568 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
20570 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
20573 2002-04-30 Dick Porter <dick@ximian.com>
20575 * socket-io.c: Cope with SOCKET being an integer rather than a
20578 * threads.c: Added Thread_free_internal, to deal with thread
20579 handle cleanup. Moved calls to handle_store() and handle_remove()
20580 to start_wrapper(), so each can only be called once. Allocate
20581 synchronisation blocks with GC_malloc(), and use GC finalisation
20582 to close the handles.
20584 * icall.c: added System.Threading.Thread::Thread_free_internal
20586 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
20588 * icall.c: support Environment.Exit, CommandLineArgs().
20590 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
20592 * object.c, object.h: added mono_runtime_run_main () and
20593 mono_runtime_get_main_args () for use in System.Environment.
20595 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
20597 * gc.c: fix thinko, enable actual finalization since the jit is now
20600 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
20602 * gc.c, object.c: take into account that an object may be offset wrt the address
20603 returned by GC_malloc().
20605 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
20607 * image.c: handle files without entries in the assembly table (modules).
20609 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
20611 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
20612 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
20613 allowed to be null when it's System.Object class setup.
20615 2002-04-27 Martin Baulig <martin@gnome.org>
20617 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
20618 if `tb->parent == NULL' rather than crashing.
20620 2002-04-28 Nick Drochak <ndrochak@gol.com>
20622 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
20623 calling acos() where asin() should have been called.
20625 2002-04-26 Martin Baulig <martin@gnome.org>
20627 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
20628 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
20629 there's a subdirectory called `System', but we don't want to read that
20630 subdirectory as an assembly.
20632 2002-04-25 Martin Baulig <martin@gnome.org>
20634 * debug-symfile.c: Reflect latest MonoString changes.
20636 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
20638 * rand.c, rand.h: instance method icalls need to have an explicit
20639 this pointer as first argument in the C implementation.
20641 2002-04-25 Nick Drochak <ndrochak@gol.com>
20643 * icall.c: Fix typo in map for GetNonZeroBytes
20645 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
20647 * string-icalls.c : String does now passes unit tests without any
20648 errors, the following changes has been made:
20650 Implemented replace methods.
20651 Renaming of methods to (try) follow the standard.
20652 Fixed compare ordinal
20653 Made all memory allocated directly to function instead of via icall function.
20654 Small performance fix in is_in_array function
20656 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
20658 c (mono_string_Internal_ctor_charp_int_int):
20659 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
20660 sindex < 0, throw ArgumentOutOfRangeException instead of
20661 ArgumentNullException.
20663 Added new check for length == 0, however
20664 I need to make it return String.Empty from the C code.
20666 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
20667 that calculate the length for us here.
20669 (mono_string_Internal_ctor_sbytep_int_int): Replaced
20670 mono_string_new_utf16 with mono_string_new, since value is utf8.
20672 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
20674 * object.c: register the object for finalization if needed.
20675 Allocate one more char in the string for the terminating 0 char.
20677 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
20679 * class.c, class.h, image.c: check if a type implemenst a destructor.
20680 Use the proper key for array class lookups.
20681 * icall.c: register the icalls in the System.GC class.
20682 * gc.c, gc.h: GC-related functions and icalls.
20684 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20688 * unicode.c: free some strings gotten from mono_string_to_utf8 and
20689 changed a couple of free () by g_free ().
20691 * decimal.c: one-liner in the comments for decimal2string ().
20693 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
20695 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
20697 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
20699 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
20700 * object.c (mono_runtime_invoke_array) : handle null in params
20702 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
20704 * string-icalls.c: fixed bug in split (one off bug)
20706 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
20708 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
20709 * icalls.c: added String::Equals as internal method
20711 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
20713 * threads.c: fixed bug in the double interlocked functions
20715 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
20717 * threads.c: implemented all of the new interlocked icalls.
20718 * string-icalls.c: fix a bug in insert.
20719 * icalls.c: added the icalls for interlocked, removed old string functions.
20721 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
20723 * loader.c: fix off-by-one error when reading argument names.
20725 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
20727 * profiler.c: win32 counter implementation (untested).
20728 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
20729 (the latter needs testing and more complete impl. from win32 folks).
20731 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
20733 * object.c: mono_array_new_full workaround mono_array_class_get
20736 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
20738 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
20739 * object.h (mono_string_chars): Changed casting type.
20741 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
20743 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
20744 method signatures to use gunichar2 instead of gint16.
20746 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
20748 * object.h, object.c: domain-specific versions of mono_object_new and
20751 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
20753 * object.c: changed String layout
20755 * string-icalls.c (mono_string_Internal_ctor_chara): added
20756 internal string constructors.
20758 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
20760 * threads.c: pass 'this' to the thread start routine.
20762 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20764 * string-icalls.c: fix IndexOf and LastIndexOf. Now
20765 InternalCompareStr don't call twice mono_string_cmp_char for the last
20766 character. Improved performance in mono_string_cmp_char.
20768 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
20770 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
20771 code into its own library: libmonoruntime.
20773 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
20775 * object.h, object.c: changed array format so that szarrays do not
20776 require a bounds structure.
20777 * icall.c, appdomain.c: support for new szarray format.
20779 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
20781 * metadata.c: compare also the retuns type when comparing signatures:
20782 we didn't do this as an optimization since really overloaded methods
20783 must differ also in the arguments, but this doesn't work with
20784 low-level IL code (or when using explicit conversion operators: see
20785 bug#23498 for an example).
20787 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
20789 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
20791 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
20793 * icall.c: make MonoType::GetElementType its own icall.
20795 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
20797 * icall.c: remove MonoMethod_get_Name().
20798 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
20801 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
20803 * string-icalls.c: optimized a few methods.
20805 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
20807 * icall.c: added all new string internal calls
20808 * string-icalls.c: added, new string internal call implementation.
20809 * object.c: added mono_string_new_size for allocating a string a size
20811 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
20813 * object.c (mono_object_isinst): use the same code as in the
20814 optimized x86 version.
20816 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
20818 * profiler.c: TSC-based timer code (faster and more accurate).
20819 Not hooked up in configure, yet (set USE_X86TSC to 1).
20821 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
20823 * profiler.c, profiler.h: track time spent compiling methods.
20824 * threads.c: track thread creation/destruction.
20826 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
20828 * profiler.c, profiler.h, profiler-private.h: profiling interface
20829 and sample implementation. Moved here so that it can be used also by
20832 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
20834 * reflection.c, reflection.h: keep types and other handles separate in
20835 the hash tables for referred tokens. Add guid for modules.
20837 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
20839 * assembly.c: fix bugs found with valgrind.
20840 * metadata.h, metadata.c: added mono_metadata_guid_heap().
20842 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
20844 * threads: added icall support for getting current domain for
20847 2002-04-13 Martin Baulig <martin@gnome.org>
20849 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
20850 (MonoDebugVarInfo): Added `index' field for register based addresses.
20851 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
20852 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
20853 `MonoDebugVarInfo *params' and `guint32 this_offset' with
20854 `MonoDebugVarInfo *this_var'.
20856 * debug-symfile.c (relocate_variable): New static function to write
20857 a location description for a local variable or method parameter.
20859 2002-04-12 Martin Baulig <martin@gnome.org>
20861 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
20862 stack offset and begin/end scope address of a local variable.
20863 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
20864 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
20865 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
20867 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
20868 Added new relocation types for start/end scope of a local variable.
20870 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
20872 * object.h: add mono_object_domain() macro.
20873 * reflection.c: handle typespecs.
20874 * icall.c: MonoMethod::get_Name() implementation.
20876 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
20878 * icall.c: String::GetHashCode() icall implementation.
20880 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20882 * icall.c: String::IndexOfAny icall.
20883 * object.c, object.h: make array->max_length more useful.
20884 Intrduced mono_object_class() and mono_string_length() macros.
20886 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20888 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
20889 instead of g_unichar_isdigit.
20891 2002-04-11 Nick Drochak <ndrochak@gol.com>
20893 * icall.c: Implement a simple Double.ToString().
20895 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
20897 * appdomain.h: only io-layer.h is supposed to be included.
20898 * icall.c: explicitly import environ. Fix warning.
20900 2002-04-10 Nick Drochak <ndrochak@gol.com>
20902 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
20903 return true even if it's not Daylight Savings time.
20904 Only return false for the case where the function isn't
20905 implemented for a plaform (read Windows).
20907 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20909 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
20912 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
20914 * mempool.c (mono_mempool_alloc): only use g_malloc when
20915 absolutely necessary.
20917 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
20919 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
20921 * class.c (mono_class_vtable): use domain mempool to allocate vtable
20922 (mono_class_proxy_vtable): use domain mempool
20924 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
20926 * appdomain.h, appdomain.c: split initialization that requires the
20927 execution engine support into mono_runtime_init().
20929 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
20931 * class.c (mono_class_init): don't include vtable inside MonoClass
20932 to save some memory, gather some statistics.
20933 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
20935 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
20937 * icall.c: internalcall implementation for ValueType.Equals().
20939 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
20941 * object.c (mono_message_init): moved
20942 (mono_runtime_exec_main): new arch. independent impl.
20943 (mono_runtime_invoke_array): new method - like
20944 mono_runtime_invoke, but you can pass an array of objects.
20945 (mono_remoting_invoke): new arch. independent impl.
20946 (mono_message_invoke): new arch. independent impl.
20947 (mono_runtime_class_init): new arch. independent impl.
20948 (mono_runtime_object_init): new arch. independent impl.
20950 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
20952 * metadata.c, object.c, reflection.c: documented the exported
20955 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
20957 * icall.c: simpler code to pass the assembly builder data to corlib.
20958 Implement GetNestedTypes() internalcall.
20960 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
20962 * class.c: warn if a type can't be loaded.
20964 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
20966 * image.h: typedef MonoImageOpenStatus
20967 * types.h: removed unused file
20969 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
20971 * icall.c: Enum_ToObject accepts enum value arguments.
20973 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
20975 * class.c: move initialization of properties, events and nested
20976 classes, so that they happen for interfaces, too.
20978 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
20980 * icall.c: cleanup some ugly casts in Array_SetValue*.
20982 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
20984 * icall.c: the values array fro enums is of the correct type, now.
20985 Implement (correctly) getFullName instead of assQualifiedName for
20987 * reflection.h, reflection.c: added mono_type_get_name ().
20989 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
20991 * assembly.c, image.h: for each MonoImage, record from wich assembly
20993 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
20994 Make Type.Assembly work.
20996 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
20998 * debug-symfile.h: use char* instead of gpointer to avoid
21001 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
21003 * icall.c (ves_icall_InternalExecute): impl. FielSetter
21004 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
21006 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
21008 * icall.c (mono_message_init): impl. (code cleanup)
21009 (ves_icall_InternalExecute): impl. FieldGetter
21011 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
21012 defined we call all (non-static)methods through the vtable.
21014 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
21016 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
21017 finalizer even though the memory is still referenced (and the chunk of
21018 memory is not freed).
21020 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
21022 * assembly.c: fix brokeness.
21024 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
21026 * class.c: kill some warnings. Check explicit interface method
21027 implementation also without considering the namespace.
21028 Load also literal strings in static class data.
21030 2002-03-29 Miguel de Icaza <miguel@ximian.com>
21032 * assembly.c (default_assembly_name_resolver): Kill memory leak.
21033 (default_assembly_name_resolver): Make the resolver take the
21034 "base" directory where the assembly was originally defined, so we
21035 can load DLLs that are in the same directory as the assembly that
21036 is being referenced.
21038 2002-03-28 Dick Porter <dick@ximian.com>
21044 * unicode.c: Warning cleanups
21046 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
21048 * object.h, reflection.h: use the correct type instead of MonoObject.
21050 2002-03-28 Martin Baulig <martin@gnome.org>
21052 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
21053 (mono_debug_update_symbol_file): Initialize classes if necessary.
21055 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
21057 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
21058 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
21060 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
21062 * assembly.h: fix function prototype.
21063 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
21064 * mono-endian.h: use const cast.
21066 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
21068 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
21070 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
21072 * loader.c: don't assert when a typeref can't be loaded, give
21073 a chance to the runtime to trow an exception instead.
21074 * loader.h: fix warning.
21076 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
21078 * class.c (mono_class_proxy_vtable): added proxy support
21080 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
21082 * icall.c: removed last of PAL calls, added System.Environment
21083 * file-io.h, file-io.c: MonoIO implementation
21084 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
21086 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
21088 * appdomain.c: do not use the byte marker in ldstr table lookup.
21089 * debug-helpers.c: allow two ':' to separate class and method name.
21090 * object.c: allocate arrays bounds with the GC, too.
21091 * verify: add a few more checks.
21093 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
21095 * reflection.c: output also literal strings. Allocate parameter data
21096 with GC_malloc() (thanks, Martin, for catching this!).
21098 2002-03-26 Martin Baulig <martin@gnome.org>
21100 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
21101 include the `this' offset in the `param_offsets'.
21103 2002-03-25 Martin Baulig <martin@gnome.org>
21105 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
21106 mono_debug_get_class() function to get the classes. Added new
21107 relocation types for arrays and strings.
21108 (mono_debug_get_class): New static function to search in all
21109 referenced assemblies for a metadata token.
21111 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
21113 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
21115 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
21116 hold gc-allocated objects. Make the string heap a stream like the
21117 others. Removed duplicated code when writing stream info.
21118 Added asserts to catch possible buffer overflows. Set the sorted map
21119 for tables that need sorting. Added some documentation.
21121 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
21123 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
21124 for interned strings and vtables.
21126 2002-03-24 Martin Baulig <martin@gnome.org>
21128 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
21129 it in the array since it was created with g_slist_prepend().
21131 2002-03-24 Martin Baulig <martin@gnome.org>
21133 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
21134 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
21135 (mono_debug_method_from_token): Renamed to
21136 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
21137 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
21139 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
21142 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
21144 2002-03-24 Martin Baulig <martin@gnome.org>
21146 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
21147 (mono_debug_method_from_token): New func.
21149 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
21150 New interncall, calls mono_debug_local_type_from_signature().
21151 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
21152 calls mono_debug_method_from_token().
21154 2002-03-23 Martin Baulig <martin@gnome.org>
21156 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
21157 specifies the number of bytes to be converted, not the array size.
21158 Return the number of chars, not the number of bytes.
21159 (ves_icall_iconv_get_chars): The `byteCount' argument
21160 specifies the number of bytes to be converted, not the array size.
21162 2002-03-23 Martin Baulig <martin@gnome.org>
21164 * reflection.h (MonoReflectionSigHelper): New type.
21166 * reflection.c (mono_reflection_sighelper_get_signature_local),
21167 (mono_reflection_sighelper_get_signature_local): New functions.
21169 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
21170 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
21173 2002-03-23 Martin Baulig <martin@gnome.org>
21175 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
21176 is_writeable is set.
21177 (mono_raw_buffer_update): New function to write the modified map
21180 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
21182 * debug-symfile.c (mono_debug_update_symbol_file): Call
21183 mono_raw_buffer_update() when done writing.
21185 2002-03-23 Martin Baulig <martin@gnome.org>
21187 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
21189 * debug-symfile.c: Added support for arguments and local variables.
21191 2002-03-23 Dick Porter <dick@ximian.com>
21193 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
21194 protected by ifdefs, hence breaking the w32 build.
21196 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
21198 * object.c: implement is_interned() the right way.
21200 2002-03-21 Martin Baulig <martin@gnome.org>
21202 * debug-symfile.[ch]: New files to handle debugging information
21203 files. There's also support to dynamically update these symbol
21204 files to include machine dependent information.
21206 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
21208 * threads.c (mono_thread_create): new function to create thread
21211 2002-03-20 Martin Baulig <martin@gnome.org>
21213 * icall.c (ves_icall_InternalInvoke): Create a new object if the
21214 method is a constructor.
21215 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
21216 points to ves_icall_InternalInvoke().
21218 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
21220 * file-io.c: Flush shouldn't throw exceptions.
21222 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
21224 * file-io.c: FileStream flush support; FileSetLength now
21225 restores file pointer.
21227 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
21229 * class.c: set image for pointer classes.
21231 2002/03/19 Nick Drochak <ndrochak@gol.com>
21233 * sysmath.c: Forgot one.
21235 2002-03-18 Miguel de Icaza <miguel@ximian.com>
21237 * sysmath.c: Avoid redefining existing names.
21239 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
21241 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
21242 handled by runtime as icall rather than dllimport from libm.so
21243 * file-io.c, file-io.h: fixed handle argument type.
21245 2002-03-18 Dick Porter <dick@ximian.com>
21247 * reflection.c (mono_image_get_type_info): rename interface to
21248 iface, because of "#define interface struct" on windows.
21250 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
21252 * class.c, class.h: rename and export mono_ptr_class_get().
21253 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
21254 * reflection.c, reflection.h, icall.c: better/saner type name
21255 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
21258 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
21260 * class.c (mono_class_init): removed hardcoded GHC_SLOT
21262 * icall.c (ves_icall_InternalInvoke): impl.
21264 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
21266 * reflection.c: output the interface map table, too.
21268 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
21270 * class.c (class_compute_field_layout): separate computation of
21271 static field layout
21273 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
21275 * icall.c: added System.Buffer support.
21276 * file-io.c: moved file icalls from PAL to FileStream.
21278 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
21280 * icall.c (ves_icall_System_Object_GetHashCode): impl.
21282 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
21284 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
21286 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
21288 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
21290 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
21292 * debug-helpers.{c,h}: moved here from monograph some useful functions
21293 to locate a method by name/signature in a class or image. Included
21294 also a small and flexible IL disassembler.
21296 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
21298 * reflection.c: fixup tokens in methods with small header size, too.
21300 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
21302 * object.c (mono_string_to_utf8): remove assert(!error), instead
21305 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
21307 * icall.c: update to the new mono_Array_class_get interface.
21309 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
21311 * appdomain.c, object.c: Boehm-GC enable.
21312 * icall.c: make get_data_chunk() support split data requests.
21313 Ensure a class is initialized in more cases. Return only the first
21314 property found in GetProperties() or the compiler gets confused.
21315 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
21316 * reflection.h, reflection.c: add fixup mechanism for field and method
21317 tokens. Initialize assembly->typeref in a single place. Output
21318 properties after events. Support custom attributes for events, too.
21319 Typo fix for paramter custom attrs.
21321 2002-03-07 Martin Baulig <martin@gnome.org>
21323 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
21325 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
21327 * class.c (mono_array_class_get): fix. for multi. dim. arrays
21329 2002-03-06 Martin Baulig <martin@gnome.org>
21331 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
21332 non-zero lower bounds. See testcases #F10-#F13.
21334 2002-03-05 Martin Baulig <martin@gnome.org>
21336 * exception.c (mono_get_exception_argument_out_of_range): New exception.
21338 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
21339 ves_icall_System_Array_GetValue(), only calculate the absolute array position
21341 (ves_icall_System_Array_SetValue): Likewise.
21342 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
21343 as argument and does the actual work. This function is used when copying a
21344 multi-dimensional array.
21345 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
21346 now do all the widening conversions of value types.
21347 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
21349 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
21351 * class.c: remove some magic numbers and use the smbolic names,
21352 instead. Added init_events() to load event info at class init time.
21353 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
21354 and mono_metadata_methods_from_event().
21355 * reflection.h, reflection.c: added support for writing out the evnets
21356 related information.
21358 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
21360 * reflection.h, icall.c: use a different method (GetInterfaces)
21361 to gather interface info and add isbyref, isprimitive and
21362 ispointer to the ves_icall_get_type_info() return value.
21364 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
21366 * class.h: stared adding support for events.
21367 * icall.c: split find_members implementation. Added debug icall to get
21368 the address of an object.
21369 * reflection.c: handle TypeBuilders in mono_type_get_object().
21371 2002-03-01 Martin Baulig <martin@gnome.org>
21373 * icall.c (ves_icall_System_Array_GetLength): This must throw an
21374 ArgumentOutOfRangeException(), not an ArgumentException().
21375 (ves_icall_System_Array_GetLowerBound): Likewise.
21376 (ves_icall_System_Array_GetValue): Improved argument checking.
21377 (ves_icall_System_Array_SetValue): Improved argument checking.
21379 2002-03-01 Martin Baulig <martin@gnome.org>
21381 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
21382 called with invalid arguments rather than just dying with g_assert().
21383 (ves_icall_System_Array_SetValue): Likewise.
21384 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
21385 raise a NotImplementedException instead.
21386 (ves_icall_System_Array_GetLength): Added argument checking.
21387 (ves_icall_System_Array_GetLowerBound): Added argument checking.
21389 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
21391 * object.h (mono_assert): new macros mono_assert and
21392 mono_assert_not_reached
21394 2002-02-28 Martin Baulig <martin@gnome.org>
21396 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
21397 and "System::String::IsInterned" to "System::String::_IsInterned".
21399 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
21401 * icall.c: remove hacks for typebuilder. Added icall to create a
21402 modified type from a tybebuilder.
21403 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
21404 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
21405 to create a backing MonoClass for a TypeBuilder.
21407 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
21409 * class.c, class.h: more refactoring of class init.
21410 Export mono_class_setup_mono_type() and mono_class_setup_parent().
21412 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
21414 * marshal.c, marshal.h: start of marshaling interface.
21416 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
21418 * icall.c: fix order in assembly qualified name icall.
21420 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
21422 * class.c: do not free str, since we store it in the hash table.
21423 * reflection.h: add label field to MonoILExceptionInfo.
21424 * reflection.c: handle references to more than one assembly. Handle
21425 case when there isn't a module created in the assembly.
21427 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
21429 * class.c: Fix typo. Start refactoring of class init code.
21431 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
21433 * appdomain.c: exit with 1 on error.
21434 * class.c: we already have the name in MonoClassField.
21435 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
21436 MonoStreamHeader instead of an offset of image->raw_metadata.
21438 2002-02-26 Miguel de Icaza <miguel@ximian.com>
21440 * appdomain.c (mono_init): Be even more descriptive about the error.
21442 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
21444 * appdomain.c: give the user an informative message when corlib can't
21447 2002-02-26 Martin Baulig <martin@gnome.org>
21449 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
21450 New icall to get the time zone data.
21452 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
21454 * reflection.c: set virtual and raw size of section correctly.
21455 * threads.c: transfer domain information to newly created threads.
21457 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
21459 * class.c: when instancing a class in a domain, load the default
21460 vaules for static fields from the constant table. Fix System.Enum to
21462 * icall.c: implement Object::GetType() internalcall. Implemented
21463 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
21464 Fixed checking of binding flags in find_members().
21465 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
21466 * reflection.c: handle enumerations when writing to the constant
21467 table. Use a different object cache for types.
21470 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
21472 * object.c (mono_object_isinst): fix for arrays
21474 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
21476 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
21478 * object.c: don't use mprotect () and fix intern pool hash table
21479 lookup for big endian systems.
21481 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
21483 * icall.c: change type_is_subtype_of () signature.
21485 2002-02-21 Mark Crichton <crichton@gimp.org>
21487 * rand.c, rand.h: Added random number generator for
21488 System.Security.Cryptography classes.
21490 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
21492 * icall.c: Added System.Security.Cryptography calls.
21494 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
21496 * class.c, icall.c, metadata.c: better support for pointer types.
21497 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
21498 * reflection.c: Add support for getting custom attrs for properties
21499 and simplify some code.
21501 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
21503 * icall.c: change getToken () and add custom attribute GetBlob()helper
21505 * reflection.h: add custom attrs array to the reflection builder structures.
21506 * reflection.c: encode and emit custom attributes for all the relevant
21507 reflection objects. Cache fieldref and methodref tokens. Change
21508 mono_image_create_token() interface to take a MonoDynamicAssembly.
21509 More complete custom attributes decoder. Load custom attributes for
21510 Assembly, Field, Method and Constructor objects, too. Make the
21511 returned array an Attribute[] one, not object[]. Added
21512 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
21513 custom attribute constructor.
21515 2002-02-20 Dick Porter <dick@ximian.com>
21519 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
21520 problem code out for now).
21522 2002-02-19 Radek Doulik <rodo@ximian.com>
21524 * object.c (mono_ldstr): use hash table to avoid multiple swapping
21526 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
21528 * icall.c: register the GetCustomAttributes method.
21529 * object.c, object.h: add mono_string_new_len ().
21530 * reflection.h, reflection.c: added mono_runtime_invoke(),
21531 mono_install_runtime_invoke(). Added
21532 mono_reflection_get_custom_attrs () to load custom attributes and
21533 create the attribute objects.
21535 2002-02-19 Dick Porter <dick@ximian.com>
21536 * threads-dummy-types.c:
21537 * threads-dummy-types.h:
21540 * threads-pthread-types.c:
21541 * threads-pthread-types.h:
21542 * threads-pthread.c:
21543 * threads-pthread.h: Deleted obsolete files
21545 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
21547 * class.c (mono_class_vtable): runtime init the class when we
21548 allocate static class data.
21550 * icall.c (ves_icall_System_Array_SetValue): check for null values.
21552 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
21553 and String - but we will need generic marshalling support in the
21555 (mono_init): set the domain name in a ms compatible way
21557 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
21560 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
21562 * object.c (mono_array_clone): use alloca() instead of g_malloc
21565 * appdomain.c (mono_domain_unload): impl.
21567 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
21569 * appdomain.c, object.c: fix intern pool implementation.
21570 * class.c: fix alignment code.
21572 2002-02-16 Radek Doulik <rodo@ximian.com>
21574 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
21575 and s2 > s1, just copy lower bytes to be compatible with little
21576 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
21577 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
21579 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
21580 force big_endian to be 1 for big endian machines
21581 (ves_icall_iconv_new_decoder): ditto
21583 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
21585 * socket-io.c (convert_sockopt_level_and_name): If the system
21586 doesn't define SOL_IP or SOL_TCP, get them by hand using
21587 getprotobyname() and caching the values (because this could be a
21589 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
21590 Use the appropriate struct when the system does support it. Ie,
21591 not all systems have struct ip_mreqn so use struct ip_mreq when
21594 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
21596 * reflection.c: handle finally clauses.
21598 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
21600 * socket-io.c: use g_snprintf() instead of snprintf.
21602 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
21604 * reflection.c (mono_param_get_objects): Cast second argument to
21605 mono_method_get_param_names to a const char** to silence the
21608 * appdomain.c (mono_domain_assembly_open): Put parens around the
21609 truth statement in the for-loop.
21611 * unicode.c (iconv_convert): Got rid of a compiler warning about
21612 int i being unused when the system has a new iconv.
21613 (iconv_get_length): Same.
21615 * image.c (load_class_names): Cast the second argument to
21616 g_hash_table_insert() to char* to hush compiler warnings about the
21618 (mono_image_open): Same here.
21620 * socket-io.c: Don't conditionally include sys/filio.h or
21621 sys/sockio.h here anymore since we now get them from
21622 io-layer/io-layer.h
21623 (inet_pton): If the system doesn't support inet_aton, implement
21624 using inet_addr and also #define INADDR_NONE if it isn't defined
21627 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
21629 * metadata.c, metadata.h: added function to get packing and size info
21631 * reflection.h, reflection.c: handle field RVA data. Save info about
21632 the table layout if needed. Assign typedef indexes to all the types
21633 before dumping the info about them to avoid forward reference problems.
21635 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
21637 * socket-io.c (convert_sockopt_level_and_name): ifdef
21638 SO_ACCEPTCONN because it is not defined on my system (old debian)
21640 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
21642 * opcode.c: use stddef.h to get NULL.
21644 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
21646 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
21647 for FIONBIO, FIONREAD and SIOCATMARK.
21648 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
21649 define INADDR_NONE and besides, inet_addr() is deprecated and
21650 should not be used. Use inet_pton() instead - it also has the
21651 added bonus that it can easily handle IPv6 addresses as well.
21652 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
21654 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
21656 * decimal.c: remove _MSC_VER conditional.
21658 2002-02-13 Dick Porter <dick@ximian.com>
21661 * icall.c: Internal calls for Blocking, Select, Shutdown,
21662 GetSocketOption and SetSocketOption
21664 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
21666 * assembly.cs: better resolver: use it instead of some kludgy
21669 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
21671 * reflection.c: the best way to speed-up the compiler is to avoid
21674 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
21676 * class.c (mono_class_vtable): changed the object layout
21677 (obj->vtable->class).
21678 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
21680 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
21682 * assembly.c: look for assemblies in the assembly dir, too.
21684 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
21686 * class.c: fix thinko in mono_class_from_type().
21688 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
21690 * exception.h, exception.c: added TypeLoadException.
21691 * object.h, object.c: added mono_array_clone ().
21692 * icall.c: handle throwOnError in AssemblyGetType().
21693 Added Array.Clone().
21694 * opcode.h, opcode.c: use a single value for the opcode val.
21695 Compile fix for non-gcc compilers.
21697 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
21699 * opcodes.c, opcodes.h: export interesting info about opcodes.
21701 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
21703 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
21706 * class.c (class_compute_field_layout): set element_class for enums
21707 (mono_class_create_from_typedef): set element_class for normal classes
21709 * icall.c (ves_icall_System_Enum_get_value): impl.
21711 * class.c (mono_class_create_from_typedef): do not set valuetype
21712 flag for System.ValueType and System.Enum
21714 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
21716 * unicode.c (iconv_convert): fix big endian problem.
21718 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
21720 * class.c: add asserts if we are ever going to scribble over memory.
21721 * socket-io.c: not all systems have AF_IRDA defined.
21723 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
21725 * class.c (class_compute_field_layout): do not consider static
21726 fields to compute alignment
21728 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
21730 * appdomain.c (mono_appdomain_get): impl.
21731 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
21733 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
21735 * icall.c: ignore "file://" prefix when loading an assembly.
21737 2002-01-23 Dick Porter <dick@ximian.com>
21741 * Makefile.am: Added socket support
21743 2002-01-23 Miguel de Icaza <miguel@ximian.com>
21745 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
21746 code back. This should return the assemblies that are loaded by
21747 the runtime on behalf of an application domain.
21749 The current implementation is still broken, it just returns every
21750 assembly loaded, but until we get real applications domain this
21753 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
21755 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
21758 2002-01-23 Miguel de Icaza <miguel@ximian.com>
21760 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
21761 the mono_class_from_name lookup.
21762 (ves_icall_get_parameter_info): ditto.
21763 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
21765 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
21767 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
21769 * class.c: load also nested classes on class init.
21770 System.ValueType instance methods gets passed boxed
21771 values, unless methods in derived classed that get a pointer to the
21773 * icall.c: use better name parsing code in GetType().
21774 * image.c, image.h: add mono_image_loaded ().
21775 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
21776 * reflection.c, reflection.h: added mono_reflection_parse_type().
21778 2002-01-22 Veronica De Santis <veron78@interfree.it>
21780 * icall.c : Added mapping of internal calls for Manual and Auto reset events
21781 * threads.c : Added the implementation of internal calls for events
21782 * threads.h : Added prototypes of internal calls for events
21784 2002-01-21 Radek Doulik <rodo@ximian.com>
21786 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
21788 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
21790 * class.c (mono_class_init): set min_align to 1 (instead of 0)
21791 (mono_class_value_size): use min_align
21793 2002-01-20 Dick Porter <dick@ximian.com>
21796 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
21797 so it compiles on w32.
21799 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
21801 * metadata.c (mono_type_stack_size): impl.
21803 * class.c (mono_class_get_field): impl. memberref token
21805 2002-01-16 Veronica De Santis <veron78@@interfree.it>
21807 * icall.h : Added the internal calls mapping for CreateMutex_internal
21808 and ReleaseMutex_internal.
21809 * threads.h : Added the prototype of mutexes internal calls.
21810 * threads.c : Added the implementations of mutexes internal calls.
21812 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
21814 * metaparse.h: removed unused file.
21815 * reflection.c, reflection.h: added stream_data_align () function
21816 to align data in streams and keep stream aligned. Add support for
21817 exception support in method headers.
21819 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
21821 * unicode.c: make iconv_convert () return the number of bytess written
21822 in the output buffer.
21824 2002-01-15 Dick Porter <dick@ximian.com>
21825 * threads.c: Make the runtime's idea of infinite timeouts coincide
21826 with the class library's
21828 Fix a particularly egregious bug in mono_thread_cleanup(). That
21829 code was so utterly bogus it must have been written on a Monday.
21831 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
21833 * reflection.h: add subtypes field to TypeBuilder.
21834 * reflection.c: encode constants for literal fields.
21835 Handle subtypes. Fix user string token (and add a zero byte)
21838 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
21840 * class.c (mono_class_init): bug fix: assign slot numbers for
21843 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
21845 * reflection.c: don't try to output a code RVA for abstract methods.
21846 Small fixes for method header format. Output parameter info to the
21847 ParamDef table. Save method overriding info to MethodImpl table.
21848 Fix property support. Allow typedef.extends to be a type in the
21850 * verify.c: fix off-by-one error.
21852 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
21854 * class.c: fix mono_class_from_mono_type () for szarray types.
21855 Remove unused cache check in mono_class_from_type_spec().
21856 * icall.c: *type_from_name () functions handle simple arrays and byref.
21857 * reflection.c: handle byref and szarray types. Handle methods without
21858 body (gets P/Invoke compilation working). Handle types and fields in
21860 * reflection.h: add rank to MonoTypeInfo.
21862 2002-01-10 Dick Porter <dick@ximian.com>
21864 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
21867 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
21869 * icall.c: initialize class in type_from_handle ().
21870 Loop also in parent classes for get_method ().
21871 * reflection.c: properly encode class and valuetype types.
21872 Start on encoding TypeBuilder types. Handle fieldrefs.
21873 Use correct length when registering a user string.
21874 Handle ConstructorBuilder and MonoMethod in get_token ().
21875 Make mono_type_get_object () aware of cached types.
21876 * object.c: back out change to mono_string_new ().
21878 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
21879 * object.c: mono_string_new should return a NULL when the string
21880 passed in is NULL -- not try to deference it.
21882 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
21884 * icall.c: hack to make IsSubType work for TypeBuilders.
21885 * reflection.c: emit constructors before methods.
21886 Retrieve param names in mono_param_get_objects().
21888 2002/01/05 Nick Drochak <ndrochak@gol.com>
21890 * Makefile.am: fix list of headers and sources so automake 1.5
21891 doesn't complain. Removed \# at end of list.
21893 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
21895 * reflection.c: get token for a method ref. Set return type of
21896 constructor to void.
21897 * loader.c: debug message.
21898 * class.c: typo fix.
21900 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
21902 * icall.c: fix array init with rank > 1. FindMembers
21903 loops in parent class as well.
21904 * image.c: do not insert nested types in name cache.
21905 * reflection.c: warning fix.
21906 * reflection.h: add override method (for interface impl).
21908 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
21910 * metadata.c: fix customattr decoding.
21912 2001-12-21 Miguel de Icaza <miguel@ximian.com>
21914 * rawbuffer.cs: Added native Win32 implementation, avoids using
21915 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
21917 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
21919 * class.c: make the low-level routines handle the cache.
21921 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
21923 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
21925 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
21927 * class.c: fix mono_array_element_size() for objects.
21928 * class.h, class.c: add properties to MonoClass and load them
21930 * icall.c: check with isinst() when assigning a value to an array
21931 instead of requiring the classes to match exactly.
21932 Implemented icall for System.Type::GetType().
21933 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
21934 enums. Handle bindingflags when looking for methods and fields.
21935 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
21936 and mono_metadata_methods_from_property().
21937 * reflection.h, reflection.c: added structures for propreties,
21938 parameters and enums. Implemented mono_property_get_object() and
21939 mono_param_get_objects().
21941 2001-12-18 Dick Porter <dick@ximian.com>
21943 * file-io.c: Use mono_string_to_utf16() instead of
21944 mono_string_chars()
21946 * object.c: Added mono_string_to_utf16(), which copies the non
21947 NULL-terminated MonoString into a new double-null-terminated
21950 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
21952 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
21954 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
21956 * file-io.c: raise exceptions if handle is invalid.
21958 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
21960 * assembly.c: yet another check for mscorlib.
21961 * class.c, class.h: load nesting info for classes.
21962 * icall.c: many new functions to support the Reflection classes.
21963 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
21964 * reflection.h, reflection.c: mono_image_create_token(),
21965 mono_assembly_get_object(), mono_type_get_object(),
21966 mono_method_get_object(), mono_field_get_object(): methods to return
21967 objects that parallel the C representation of assemblies, types,
21970 2001-12-11 Dick Porter <dick@ximian.com>
21973 * file-io.c: Internal calls for file IO.
21975 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
21977 * tabledefs.h: missing FileAttributes.
21978 * verify.h, verify.c: use is_valid_string () to simplify and check for
21979 valid strings more correctly. Fix warnings and speeling.
21980 Check more tables: Filed, File, ModuleRef, StandAloneSig.
21981 Check code: branches, maxstack, method calls.
21983 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
21985 * object.c (mono_object_allocate): removed static, so that the jit
21986 can allocate value types.
21988 * icall.c (ves_icall_System_DateTime_GetNow): impl.
21990 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
21992 * class.c: init enum types right away and register the
21993 token->MonoClass map in mono_class_create_from_typedef ().
21994 * verify.h, verify.c: first cut of the verifier.
21995 * pedump.c: add --verify switch to verify metadata tables.
21996 * tabledefs.h: add some missing enums.
21998 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
22000 * class.c (mono_install_runtime_class_init): impl.
22001 (mono_class_init): renamed mono_class_metadata_init to
22002 mono_class_init, also removed the metadata_inited flag
22004 * object.c (mono_object_isinst): use faster algorithm
22006 2001-11-30 Radek Doulik <rodo@ximian.com>
22008 * mono-endian.h: reverted last change
22009 added function prototypes
22011 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
22012 add mono-endian.c back
22014 * mono-endian.c: returned back, as Paolo pointed out, it's needed
22015 for unaligned access, I've mistaked it with endianess. I am
22017 (mono_read16): fix reverted endianess
22018 (mono_read64): ditto
22019 (mono_read32): ditto
22021 2001-11-30 Dick Porter <dick@ximian.com>
22023 * exception.c: Implement mono_exception_from_name()
22025 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
22027 * metadata.h, metadata.c: remove params_size and locals_size and their
22028 calculation from the metadata code: they are only usefult to the
22031 2001-11-29 Radek Doulik <rodo@ximian.com>
22033 * object.c (mono_ldstr): swap bytes here, it's probably not the
22034 best place, but works for me now, I'll redo it once I know mono
22035 better, also note that I add PROT_WRITE and don't reset back, also
22036 note that it's only affects big endians, so x86 should be OK
22038 * mono-endian.h (read16): use just glib macros for both endians
22040 * mono-endian.c: removed as glib macros are used in in
22041 mono-endian.h so we don't need to care about endianess for read
22042 macros as glib does that for us already
22044 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
22046 * class.h, class.h: take minimum alignment into consideration so
22047 that the fields of a class remain aligned also when in an array.
22049 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
22051 * loader.h, loader.c: add mono_method_get_param_names().
22052 * class.c: 0-init class fields.
22054 2001-11-26 Dick Porter <dick@ximian.com>
22058 * threads.c: New file that handles System.Threading on all platforms
22061 * object.h: Remove the synchronisation struct from MonoObject,
22062 replace it with a pointer that gets initialised on demand
22064 * Makefile.am: Replace all the system-specific threading code with
22065 a single file that uses the new wrapper library
22067 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
22069 * class.c, class.h: add mono_install_trampoline() so that the runtime
22070 can register a function to create a trampoline: removes the ugly
22071 requirement that a runtime needed to export arch_create_jit_trampoline.
22072 * object.h, object.c: added mono_install_handler() so that the runtime
22073 can install an handler for exceptions generated in C code (with
22074 mono_raise_exception()). Added C struct for System.Delegate.
22075 * pedump.c: removed arch_create_jit_trampoline.
22076 * reflection.c: some cleanups to allow registering user strings and
22077 later getting a token for methodrefs and fieldrefs before the assembly
22079 * row-indexes.h: updates and fixes from the new ECMA specs.
22081 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
22083 * class.h, class.c: add enum_basetype field to MonoClass.
22084 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
22085 to get index in the constant table reated to a field, param or
22087 * reflection.h, reflection.c: handle constructors. Set public-key and
22088 version number of the built assembly to 0.
22089 * row-indexes.h: update from new ECMA spec.
22091 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
22093 * class.h, class.c: add a max_interface_id to MonoClass.
22094 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
22095 since it's used to do that. Added mono_type_type_from_obj().
22096 Make GetType() return NULL instead of segfaulting if the type was not
22097 found. Handle simple arrays in assQualifiedName.
22098 * object.h: add a struct to represent an Exception.
22099 * reflection.c: output call convention in method signature.
22100 Add code to support P/Invoke methods and fixed offsets for fields.
22102 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
22104 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
22106 * icall.c: use mono_array_addr instead of array->vector: fixes the
22107 reflection image writing.
22108 * reflection.c: init call convention byte to 0 in method signature.
22109 Encode the property signature. Don't output property-related methods
22110 twice. Really process the properties for a type (don't cast a field to
22111 a property, my mom always told me that).
22112 Fix 64 bit issues in pointer alignment in a different and more
22115 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
22117 * loader.h: Removed type class from MonoDefaults, added monotype
22119 * loader.c: Loaded MonoType, removed loading of Type
22121 * icall.c (my_mono_new_object): Now returns a System.MonoType,
22122 and fills in System.Type._impl with a RuntimeTypeHandle rather
22123 than the actual MonoClass *
22125 (ves_icall_type_from_handle): change from type_class to
22128 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
22131 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
22134 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
22136 (ves_icall_System_Reflection_Assembly_GetType): implemented
22138 (ves_icall_System_MonoType_assQualifiedName): implemented
22140 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
22142 2001-11-09 Miguel de Icaza <miguel@ximian.com>
22144 * assembly.c (mono_assembly_open): Implement a cache for the
22147 (mono_assembly_close): only destroy the assembly when the last
22150 2001-11-09 Dick Porter <dick@ximian.com>
22152 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
22154 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
22156 * class.c (mono_class_metadata_init): bug fix: compute the right slot
22158 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
22160 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
22161 from Martin Weindel.
22162 * object.h: add mono_string_chars ().
22164 2001-11-07 Miguel de Icaza <miguel@ximian.com>
22166 * reflection.c (build_compressed_metadata): Eliminates warnings
22167 and uses 64-bit clean code.
22169 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
22170 (mono_type_equal): Change signature to eliminate warnings.
22172 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
22174 * icall.c, loader.c: remove the internalcall array constructors.
22175 Changes to match the new MonoArray structure.
22176 * object.h, object.c: an array object doesn't allocate an extra
22177 vector. Add mono_array_new_full () to create jagged arrays easily.
22179 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
22181 * metadata.h, metadata.c: add mono_metadata_field_info () to
22182 retreive all the info about a field from vairous tables.
22183 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
22184 * class.h, class.c: augment MonoClassField with more info.
22185 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
22186 policy and load a field's RVA if needed.
22188 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
22190 * class.c (mono_class_metadata_init): create a trampoline for all
22191 virtual functions instead of actually compiling them.
22193 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
22195 * class.h, class.c: include name in MonoClassField.
22196 * class.c: fix fundamental type of System.Object and System.String.
22197 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
22199 * icall.c: remove internalcalls for the Reflection stuff that is now
22201 * loader.c: mono_field_from_memberref () implementation.
22202 * mono-endian.c: thinko (s/struct/union/g).
22203 * object.c, object.h: make the mono_string_* prototypes actually use
22204 MonoString instead of MonoObject.
22205 * reflection.c, reflection.h: updates for changes in the reflection
22206 code in corlib: we use C structures that map to the actual C# classes.
22207 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
22208 fat method header if needed and use the info from the ILGenerator for
22209 methods. Handle fields in types. Misc fixes.
22211 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
22213 * class.c (mono_class_metadata_init): bug fix: always allocate
22214 space for static class data
22216 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
22218 * class.c (mono_compute_relative_numbering): use relative
22219 numbering to support fast runtime type checks.
22221 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
22223 * class.c (mono_class_create_from_typeref): added debugging output
22224 to print class name when MonoDummy is returned instead of real class
22226 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
22228 * class.c (mono_class_metadata_init): interface offset table now
22229 contains pointers into the vtable - this is more efficient for the jit
22231 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
22233 * class.c (mono_class_metadata_init): use a temporary vtable (the
22234 old algorithm only worked for the interpreter, but not for the jit)
22236 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
22238 * loader.c (method_from_memberref): use mono_class_get to get the
22239 class of an array instead of using System.Array directly.
22240 (mono_get_method): also add MEMBERREF methods to the method cache
22241 which usefull for arrays.
22243 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
22245 * pedump.c (arch_compile_method): added to compute vtable entry
22247 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
22248 number of interfaces.
22250 * class.h: merged MonoArrayClass into MonoClass
22252 * class.c (mono_class_create_from_typedef): compute the vtable size and
22253 allocate space to include the vtable inside MonoClass
22254 (mono_class_metadata_init): initialize the vtable
22256 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
22258 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
22259 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
22260 * image.c: endian fixes by Laurent Rioux.
22261 * object.h, object.c: rename MonoStringObject to MonoString and
22262 MonoArrayObject to MonoArray. Change some function names to conform to
22263 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
22264 guint16* as first argument, so don't use char*.
22265 Provide macros to do the interesting things on arrays in a portable way.
22266 * threads-pthread.c: updates for the API changes and #include <sched.h>
22267 (required for sched_yield()).
22268 * icall.c: updates for the API changes above.
22269 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
22270 platforms that need them.
22272 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
22274 * class.c: set the correct type for all the fundamental
22275 type when loading the class.
22277 2001-10-05 Dick Porter <dick@ximian.com>
22279 * threads-pthread.c (pthread_mutex_timedlock): Simple
22280 compatibility version for C libraries that lack this call.
22282 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
22284 * class.c: MonoTypes stored in MonoClass are stored as
22285 fundamental MonoTypes when the class represents a
22286 fundamental type (System.Int32, ...).
22287 The TypeHandle return by ldtoken is a MonoType*.
22288 * icall.c: ves_icall_get_data_chunk () write out all the
22289 PE/COFF stuff. Implement ves_icall_define_method (),
22290 ves_icall_set_method_body (), ves_icall_type_from_handle ().
22291 * image.c: properly skip unknown streams.
22292 * loader.h, loader.c: add type_class to mono_defaults.
22293 * metadata.c, metadata.h: export compute_size () as
22294 mono_metadata_compute_size () with a better interface.
22295 Typo and C&P fixes.
22296 * pedump.c: don't try to print the entry point RVA if there is no entry point.
22297 * reflection.c, reflection.h: many cleanups, fixes, output method
22298 signatures and headers, typedef and typeref info, compress the metadata
22299 tables, output all the heap streams, cli header etc.
22300 * row-indexes.h: typo fixes.
22302 2001-10-04 Dick Porter <dick@ximian.com>
22304 * object.h: Add a synchronisation mutex struct to MonoObject
22306 * object.c (mono_new_object): Initialise the object
22307 synchronisation mutexes
22309 * icall.c: System.Threading.Monitor internal calls
22311 * threads-pthread.h:
22312 * threads-pthread.c: System.Threading.Monitor internal calls
22314 * threads-types.h: New file, includes the system-specific thread
22317 * threads-pthread-types.h:
22318 * threads-pthread-types.c: New files, handle pthread-specific
22319 synchronisation types
22321 * threads-dummy-types.h:
22322 * threads-dummy-types.c: New files of dummy support for
22323 thread-specific types
22327 * pedump.c: include mono-endian.h not endian.h
22329 * Makefile.am: More threads files.
22330 Name mono-endian.h not endian.h
22332 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
22334 * Makefile.am, reflection.h, reflection.c: move here the reflection related
22335 stuff and implement a few more bits.
22336 * icall.c: a field needs to be dereferenced twice. Do not use the same
22337 name for two variables in the same scope.
22338 * image.c, image.h: cleanups.
22340 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
22342 * class.c (mono_class_metadata_init): bug fix: compute the right size
22344 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
22346 * icall.c: implemented some of the Reflection internalcalls.
22347 * image.c, image.h: start writing out the PE/COFF image.
22348 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
22349 that does the reverse than decode_blob_size ().
22350 * object.c: use mono_metadata_encode_value (). Move here
22351 temporary implementation of mono_string_to_utf8 ().
22352 * rawbuffer.c: make malloc_map static.
22354 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
22356 * metadata.c: fix type comparison for arrays.
22357 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
22358 Added a couple of new classes to monodefaults.
22359 * icall.c: added a couple of Reflection-related internalcalls.
22360 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
22361 Added a byval_arg MonoType to MonoClass.
22363 2001-09-28 Dick Porter <dick@ximian.com>
22366 * threads-pthread.h:
22367 * threads-pthread.c: Implemented internal calls for
22368 LocalDataStoreSlot operations. Applied mutexes around all shared
22369 data. Reworked the thread creation and Start() operations to
22370 avoid a race condition.
22373 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
22375 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
22377 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
22379 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
22381 * class.c, loader.c: warn and return NULL instead of erroring out.
22382 * icall.c: added System.AppDomain::getCurDomain().
22383 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
22385 2001-09-25 Dick Porter <dick@ximian.com>
22387 * threads-pthread.h:
22388 * threads-pthread.c: Implemented timed thread joining and added
22389 System.Threading.Thread::Join_internal internal call
22391 * icall.c: Added System.Threading.Thread::Join_internal internal call
22394 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
22396 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
22398 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
22399 mono_string_intern () to implement the semantics of the ldstr opcode
22400 and the interning of System.Strings.
22401 * icall.c: provide hooks to make String::IsIntern and String::Intern
22404 2001-09-23 Dick Porter <dick@ximian.com>
22407 * threads-dummy.h: New files of dummy threading routines
22409 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
22410 support code based on system specifics
22412 Rename PTHREAD_LIBS to THREAD_LIBS
22414 2001-09-23 Dick Porter <dick@ximian.com>
22416 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
22417 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
22419 (mono_thread_init): Set up a Thread object instance to return when
22420 the main thread calls Thread.CurrentThread
22421 (mono_thread_cleanup): Wait for all subthreads to exit
22423 * icall.c: New internal calls for System.Threading.Thread::Sleep
22424 (including Schedule) and CurrentThread
22426 * threads.h: New file, to insulate thread-specific stuff from the
22429 2001-09-21 Dick Porter <dick@ximian.com>
22431 * threads-pthread.h:
22432 * threads-pthread.c: New file, for handling pthreads-style
22433 threading support. Start() now starts a new thread and executes
22434 the ThreadStart delegate instance.
22436 * icall.c: Added the internalcall for
22437 System.Threading.Thread::Start_internal
22439 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
22441 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
22443 * loader.c: work around the different signatures for delegates
22444 constructors csc generates in compiled code vs the ones compiled in mscorlib.
22446 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
22448 * class.h, class.c: add mono_class_get_field_from_name ().
22449 * *: Fix C comments and other ANSI C issues.
22451 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
22453 * endian.h, assembly.c: fix some endianness issues.
22455 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
22457 * loader.h, load.c: add delegate_class to mono_defaults.
22458 Handle runtime provided methods in mono_get_method ().
22460 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
22462 * loader.c (mono_get_method): use pinvoke for internal call
22464 * icall.c: use pinvoke for internal call
22466 * loader.c (method_from_memberref): set the method name
22468 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
22470 * metadata.c: help the compiler generate better code for
22471 mono_class_from_mono_type ().
22473 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
22475 * class.c (mono_class_metadata_init): delayed computing of the
22476 class size to mono_class_metadata_init ()
22478 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
22480 * class.c, class.h: add an interfaces member to MonoClass.
22481 * image.c, image.h: add assembly_name field to MonoImage
22482 from the assembly table.
22483 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
22485 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
22487 * class.c: Handle Array in mono_class_from_mono_type ().
22488 * metadata.c, pedump.c: some endian fixes.
22490 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
22492 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
22493 * metadata.c: fix small problem introduced with the latest commit.
22495 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
22497 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
22498 We don't need a MonoMetadata pointer anymore to compare signatures in
22499 mono_metadata_signature_equal (), update callers.
22500 Reduced memory usage an number of allocations for MonoMethodHeader and
22501 MonoMethodSignature.
22503 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
22505 * metadata.c: added compare for szarray.
22507 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
22509 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
22510 and add a couple more types to it and mono_defaults. Give an hint on
22511 classes that need implementing in our corlib and are referenced
22514 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
22516 * class.h, class.c: keep track if a class is also an Enum.
22517 * loader.c: Implement a couple more types for use in libffi
22518 marshalling. Gives better diagnostics when failing to dlopen
22519 a library. Set method->klass for P/Invoke methods, too.
22521 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
22523 * class.c, class.h: add a MonoType this_arg to MonoClass that
22524 represents a pointer to an object of the class' type that
22525 can be used by the interpreter and later the type cache.
22526 Add best guess alignment info for valuetype objects.
22528 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
22530 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
22531 into MonoType: one less level of indirection and allocation and
22532 simplifies quite a bit of code. Added cache for MonoTypes that are
22533 used frequently, so that we don't need to allocate them all the time.
22535 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
22537 * class.c (mono_class_create_from_typedef): System.Enum is also a
22538 value type, although it does not derive from System.ValueType
22539 (maybe a bug in the ms compiler?)
22541 * metadata.c (mono_type_size): return the right size for value types
22543 * loader.c (mono_get_method): only initialize method header if not abstract
22545 * class.c (mono_class_from_mono_type): use mono_default values.
22547 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
22549 * *: use MonoClass pointers instead of <type_tokens>
22551 * class.h: new flag: metadata_inited.
22553 * class.c (mono_class_metadata_init): impl.
22554 (mono_class_instance_size): impl.
22555 (mono_class_data_size): impl.
22557 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
22559 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
22560 MonoClass now has the name and name_space fields.
22561 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
22562 mono_get_method () takes and optional MonoClass as argument.
22563 Removed mono_typedef_from_name() and added mono_class_token_from_name()
22564 instead that takes advantage of a map from class names to typedef
22565 tokens in MonoImage.
22567 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
22569 * metadata.c: zero is not a valid alignment boundary.
22570 Merge MONO_TYPE_VOID in default decoding code.
22572 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
22574 * image.h: merged MonoMetadata into MonoImage
22576 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
22577 identify the type of elements.
22579 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
22581 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
22582 * cil-coff.h: split MonoMSDOSHeader and add size info.
22583 * image.c: add some consistency checks.
22584 * metadata.c: fix row size computation: one programmer
22585 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
22586 add explanation for the locator routine.
22587 Fix decoding of size in method header.
22589 2001-08-20 Miguel de Icaza <miguel@ximian.com>
22591 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
22592 (g_concat_dir_and_file): Bring g_concat_dir_and_file
22593 function from gnome-libs. This uses the right path separator
22594 based on the OS, and also works around a bug in some systems where
22595 a double slash is not allowed.
22596 (default_assembly_name_resolver): Use g_concat_dir_and_file
22597 (mono_assembly_open): ditto.
22599 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
22601 * metadata.c (mono_metadata_signature_equal): impl.
22603 * *: void is now a realy MonoType (instead of using NULL)
22605 * metadata.c (do_mono_metadata_parse_type): use
22606 mono_metadata_parse_type to parse void value.
22608 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
22610 * metadata.c, metadata.h: in the signature and method header store
22611 only the space required for holding the loca vars and incoming arguments.
22613 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
22615 * metadata.c (do_mono_metadata_parse_type): treat void like any
22616 other type (instead of assigning NULL);
22618 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
22620 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
22622 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
22624 * image.c (do_mono_image_open): added a cache for arrays.
22626 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
22628 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
22629 decode a single column from a row in a metadata table and changes
22630 to take advantage of it in the typedef locator (gives a nice speed up).
22631 Store offset info for function params.
22633 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
22635 * image.h (MONO_IMAGE_IS_CORLIB): removed
22637 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
22639 * assembly.c: how could mono_assembly_close () had ever worked?
22640 * metadata.c, metadata.h: provide offset info for local vars.
22641 Implement mono_type_size () to take care of alignment as well
22642 as size (it was mono_field_type_size in cli/class.c before).
22644 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
22646 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
22648 * assembly.h (CORLIB_NAME): set to corlib.dll
22650 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
22652 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
22654 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
22655 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
22656 tokentype.h: massive namespace cleanup.
22658 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
22660 * metadata.h, metadata.c: decode exception clauses when parsing method header.
22662 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
22664 * metadata.c (mono_metadata_free_type): added check for type !=
22665 NULL (void) before calling mono_metadata_free_type()
22667 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
22669 * metadata.h, row_indexes.h: added header with enumerations to use
22670 to index in the columns from tables in metadata and to decode coded
22671 tokens: we should start using this instead of embedding magic numbers
22674 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
22676 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
22677 Move metadata_t info from cli_image_info_t to MonoImage, where
22678 it's easily accessible. Changed all the uses accordingly.
22679 Added the method and class caches to MonoImage.
22680 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
22681 and mono_metadata_decode_value () signature to be more consistent
22682 with the other parse functions (and simplify code). Taken advantage
22683 of zero-length array allocation with GCC. Removed reduntant (and
22684 wrong) MonoFieldType struct and use MonoParam instead. Changed
22685 mono_metadata_parse_field_type () to use common code for parsing.
22686 Added mono_metadata_typedef_from_field () and
22687 mono_metadata_typedef_from_method () to lookup a typedef index from a
22688 field or method token.
22689 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
22691 2001-07-23 Miguel de Icaza <miguel@ximian.com>
22693 * metadata.c (mono_metadata_parse_field_type): Implement.
22694 (do_mono_metadata_parse_type): Split engine from
22695 mono_metadata_parse_type, so that we can create smaller structures
22696 for things that just have one pointer to the MonoType (look at
22699 2001-07-20 Miguel de Icaza <miguel@ximian.com>
22701 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
22702 as Jan Gray found out, it is incorrect.
22704 2001-07-18 Miguel de Icaza <miguel@ximian.com>
22706 * assembly.c: Implement asssembly loading. This loads an image
22707 and loads all the referenced assemblies. Come to think of it, we
22708 could always do lazy loading of the assemblies.
22710 * image.c (mono_image_open): Keep loaded images in a hashtable.
22712 * image.h (MonoImage): Add reference count.
22714 2001-07-17 Miguel de Icaza <miguel@ximian.com>
22716 * assembly.c (mono_assembly_open): Keep track of the file name in
22717 case the assembly has no ASSEMBLY table.
22719 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
22722 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
22724 * metadata.c, metadata.h: decode local vars in method header
22725 parse function. Change callers accordingly.
22727 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
22729 * metadata.h, cil-coff.h: protect against multiple inclusion.
22730 Added some new structures to hold information decoded from metadata:
22731 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
22732 and relevant decoding/free functions.
22733 * metadata.c: implement decoding functions. Add warning for out of bounds
22734 index in mono_metadata_locate(). Implement mono_get_method () to retreive
22735 all the info about a method signature and invocation. Remove check on
22736 uninitialized local var in parse_mh() and fix memory leak.
22738 2001-07-12 Miguel de Icaza <miguel@ximian.com>
22740 * metadata.h: More macros.
22742 * tokentype.h: New file.
22744 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
22746 * assembly.c: added a consistency check and initialize
22747 some structures with g_new0().
22748 * metadata.c: fixed a couple more bugs in table size computation
22749 and add other checks for out-of bound access to metadata.
22751 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
22753 * metatada.c: fix bugs computing table sizes. Spew a
22754 warning when index in string heap is out of bounds.
22756 2001-07-04 Miguel de Icaza <miguel@ximian.com>
22758 * metadata.h: Add a couple of macros to manipulate tokens.
22760 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
22762 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
22763 cli_section_tables).
22765 2001-07-01 Miguel de Icaza <miguel@ximian.com>
22767 * metadata.c (mono_metadata_user_string): New function, provides
22768 access to the UserString heap.
22770 2001-06-27 Miguel de Icaza <miguel@ximian.com>
22772 * metadata.c: Add inline documentation.
22774 2001-06-26 Miguel de Icaza <miguel@ximian.com>
22776 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
22779 2001-06-22 Miguel de Icaza <miguel@ximian.com>
22781 * typeattr.h: New file, TypeAttribute flags.
22783 2001-06-21 Miguel de Icaza <miguel@ximian.com>
22785 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
22786 mono_assembly_ensure_section): Section loading code.
22787 (load_section_tables): Load the sections.
22789 * mono/metadata/metadata.c (mono_metadata_locate_token,
22790 mono_metadata_locate): Functions to locate the information
22791 definition given a token or a table and an index.
22792 (mono_metadata_compute_table_bases): New.
22793 (compute_size): New function to compute the sizes of the various
22796 * mono/metadata/metadata.h: Finish listing the different index
22799 * mono/metadata/pedump.c: Improve to dump new information.
22801 2001-06-19 Miguel de Icaza <miguel@ximian.com>
22803 * mono/metadata/metadata.c: Entered all the tables matching
22806 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2